Monday, July 07, 2008

The first Alpha Beta release....

The final dusting to the poly boundary code have been completed. So now you can play with the new code. There are a few extra options now for boundary's that I will try to explain here. At this stage its about making options avalible so that others can play with setting to what works and what does not.

The first new option is the PolyBoundry. This makes it a polygon type boundary rather than a vertex based boundary object. The remaining options don't work unless PolyBoundry is true.

The next option is the calculate boundary outside poly. What this means is does a polygon effect extend out from the edges rather than the projected normal volume. In more technical terms, if we project a particle with the plane normal onto the plane that contains the polygon, do I do anything if its outside the polygon. Generally setting this to false works best. But for convex shapes there is the possibility of "leak vectors" . Setting it on mean that concave sections give too much boundary force.

The last new option is really for the case where Calculate boundary outside is set to false. Generally we will get very slow leaks over time. If we provide a constant velocity bias to the boundary conditions we help move particles that are close to leaking, back inside. But this is adding energy to the system and therefore can lead to pretty weired results. Below are some examples, but this should be small 0.01 or smaller. Always try 0 first. Even at low values that can make still fluids "boil".

There are some limitations to the current implementation. The biggest is the complete lack of friction. All current boundary's are frictionless and that can lead to bizzar results from what you might expect. Another is getting fluid boundaries to match the boundary surfaces for rendering. Currently there is no way to ensure that ray tracing a glass with water will be done correctly as far as I know. Its also not currently optimized either meaning that its slow that it needs to be. But its still faster than particle boundaries. The last limitation is the need to put the boundary triangle into all voxels that it overlaps. This means that using smaller particle sizes will increase memory requirements for the boundary objects.

So here is an example of the unstable rotation that is now, hopefully fixed.
rotator mpeg 4

This a example scene with the outside boundary's set to true.
Hour Cup
Note the large distance between the walls and the particles.

The same thing but with outside boundary's set to false.
It now leaks, but only slowly.

Then we add just a little velocity bias (0.01).
bias fixes leak
We can really see the lack of friction here.

Getting stupid with bias (0.05).
Too much bias
Now the lack of friction is compounded with the extra energy added by the boundary.

Finally the file I have used.
AoI example file

This plugin is now only for AoI 2.6. But only because I don't use 2.5. Also its a beta-alpha for a reason.

Download the Physics Plugin


Anonymous said...

Deltor - thats fantastic.
It feels just faster on my old Athlon!

(I say this after first recalculate your example file)

Well done - the result looks funny though - as put in the fridge far to long


bob said...

Thats exactly what I get. Its the fact that the fluid is really "too" close to the boundary...

You can't see water moving except from surface deformations, that are amplified by refraction. In this case the surface is dominated by the boundary with only slight randomness. Try a camera angle from the top....

bob said...

ps.. i just found the bug in the soft body code!!!

Anonymous said...

pretty good.
now boundary mesh has lesser problems . I changed advanced spawn>
smooth(3.0) , spacing (0.2) etc.
can these help in smoothing the boundary interface ? or will they
just reduce turbulence ?

yet another Q.
do we need to have an emitter
always? how about simulating
a fixed volume fluid ?

any way this one is faster and
with lesser problems.
thanks for fluids.

:D Truth.

bob said...

Smoothing is only used for XSPH simulation mode. The smaller spacing does make the boundary smoother but it won't be perfect and it puts the simutation time up fast. (1/2 the spaces x8 the number of particles and hence x8 longer to simuate).

Long story short the boundary does need some fixing really. I may need to create a explicit boundary object like you can do with real flow.

You can only use emitters for now. Static fluids as initial conditions is coming soon.

Anonymous said...

Just for the record:

Hope to get such a result sometime!

(The needle is moved by my daughter - camera made 300 fps!)


TroY said...

Great work! PolyBoundaries work very well here. :)

This feature could make the plugin way more popular! I think I'll have to update my tutorial. :)

Thanks for your effort!

afifi said...

Deltor, great work..
piece of art..
can i have your email id?
btw i know you from nik, he is the one who give me your blog url..


afifi said...

i forget to give u my email id.. :)