Wednesday, July 16, 2008

The Beta Alpha ++ release.

Yep a new release is here. First some movies:
loopable AoI
Filling an A with the old boundary
Filling an A new boundaries

There is a lot in this release so we will start with a list derived from the change logs.
  • Fluid objects are in. They are not "stabilized" and look rough. But we can now start with liquid in the scene.
  • New boundary parameters have been added and generally work better than the velocity bias parameter. The parameters are a factor to increase boundary force and a clamp value to limit the max value of that force. If the clamp value is greater than one particles can bounce a bit.
  • All particle boundary code has been more or less removed.
  • The integrator was made more consistent. This mean one more pass per iteration, but is more stable.
  • Softbodies are working.... Kind-of. WARNING, this can break your scene, have a backup.
  • Note that you still need to subdivide emitters.
So the fluid objects do work pretty good at this stage. They are however rough in that the surface does not look so good. When stabilization is added it will improve. What is stabilization. Say if you have a block of fluid and you place it into the same block as a boundary. When the simulation starts the fluid will move a little in order to settle properly. Its not a big deal but a "lake" will drop a little over the first few frames/seconds of the animation. Don't forget when using small particle sizes that you also need to drop the time steps as well.

Next is the boundary code. I'm a lot happier with these parameters to control boundaries than the velocity bias. The boundary factor is just a simple multiplier on the base force and clamp simple clamps the value. So the default is that the boundary has a effect of one on the surface. If we set the multiplier to say 1.5 and leave the clamp at one. Then the "thinness" of max effect is now larger. But the magnitude of the maximum effect is the same. If we let clamp be larger than one then the boundary gets a little spring to it and can push particles back rather than stop them from traveling though the boundary.

But what about softbodies! Well first of all its a long way from finished. Ok so not that long. But this really is a alpha alpha stage in that I does delete data from the scene and generally does not like anything other than full rebakes every time. So here are the guidelines:
  • Don't use high poly/vertex count objects.
  • Keep the spring stiffness high. About 5000-100000.
  • If the object collapses the simulation will go unstable.
  • If you want fluid interactions, then you will need to up the mass values to more than 1 on the softbodies. Also smaller time steps will be needed.
  • Every time you make a change to the scene rebake.
  • Once a object is set to softbody its animation tracks may get deleted. You cannot move the object around the scene. Reload the scene and position the object before adding it as a softbody.
  • Vertex are mass. If you have a lot of vertexs at one end, thats the heavy end.
  • avoid long and short vertexs in the same model.
So after that list does anyone want to try it? Note that softbody objects must be triangle meshes and can have approximation/interpolation smoothing.

Now I often get complaints with the large number of options. That is the deal at this stage. I/We need to be able to work out what works and what does not. The only way to do that easily is have the options available to try in different situations.

Happy AoI'ing....
Oh, I almost forgot, the plugin is here:
The Plugin

13 comments:

Anonymous said...

Hi. Excellent stuff - thanks for all your work on this.

However, I'm not having much luck with the softbodies - I created a small sphere, converted to triangle mesh and defined it as a SOFT. When I try to bake the simualation, it gets to 0.2 and freezes. I have tried to make several other triangle meshes as softbodies with the same result...

If you need more details, let me know.

Julian

bob said...

You need to use a smaller time step and make sure you set the springs to good values and that the point mass is high enough.

The defaults don't really work. Sorry.

Start with a plane and a cube. Cubes are better because they don't end up with too many vertices's. Set the spring value to 10000 and the mass to 1. Place a "ground" plane in as well and set it as a boundary. Don't forget to convert it all to triangle meshes. time step should be about 5e-4 or smaller.

If you put fluids in there as well... its gets hard.

Also don't expect to save softbody scene properly yet.... You can try, but YMMV

Anonymous said...

Wohhooo - I made an simple example of a cube that consists of fluid.

http://freenet-homepage.de/vidiot/AOI/Fluid1.avi

Perfect fun (10.000 + particles)

Thanks Deltor for letting us play so fast with it.

I need to try softbodies, too.

Harald

Anonymous said...

http://www.bryce-board.de/attachment.php?attachmentid=16907

Phew - Ajax from Jotero as fluid (Ajax Head has 250.000 faces)

All good - but it doesn´t raytrace!
I can render it as shown - but if I try to raytrace it it shows nothing!

Harald

bob said...

Wow 250,000 faces. That would have taken some time. The fluid Section is slower than it needs to and I could easily get a 2-3x speed increases out of it, But i was not expecting that kind of complicated geometry. Its a brute force algo so it would have taken a while yes?

Also did you use Render or preview. I find the preview does not always work. I believe its the same threading issue that causes the flashing in animations.

So I have never had problem with it ray tracing. Doesn't look like a lot of particles........

mmmm I seem to remember a bug with the mesh verteics getting included with the raytracing.... That could do it. Does it go to a 100% cpu and just not do anything for a long time?

Anonymous said...

Wuh, that's just great!

Fluids which only consist out of PolyMesh-Objects work very, very well now. Seems like the need for subdivided TriMeshes is gone forever. :) Starting with objects set to "Fluid" is very nice!

Still, a flaw is the long rendering process - so I can't show "fancy stuff" right now. ;)

But I have tried soft bodies:

http://www.uninformativ.de/gal/3d/misc/AoI_FluidBeta62_SoftBodySimple.avi
http://www.uninformativ.de/gal/3d/misc/AoI_FluidBeta62_SoftBodyStairs.avi

Excellent! :) Of course, it looks a bit funny due to the lack of friction.

Great work, Deltor. Thanks a lot! :)

Greetings,
TroY

bob said...

You can try setting to preview mesh and rendering that. It should be faster. But its a little on the ugly side. I can't see the ray tracing getting all that faster. Its the same with POV ray. Isosurfaces are slow. There is not much you can do without fancy oct tree. Since thats already done for other primitives in AoI getting nice isomeshes are perhaps the best idea, this would help isosurfaces as well.

Yes the lack of friction looks all kinds of wrong.

Anonymous said...

Hmm ... that's strange. The fastest way is to leave all options (means "Mesh Preview" and "Sample Grid") *disabled*. Anything else - especially the sample grid - is slower with SoftBodies.

I've done some more stuff which I will collect over here:

http://www.uninformativ.de/?ndo=single&newsid=53

The most interesting ones are these two videos:


http://www.uninformativ.de/gal/3d/misc/AoI_FluidBeta62_SwimmingCube2.avi

Spring Constant of the cube is set to 50'000, Particle Mass to 20. Maybe not 100% realistic but pretty good imo. :)


http://www.uninformativ.de/gal/3d/misc/AoI_FluidBeta62_FallingTowel.avi

Woho! Using a spline mesh as a SoftBody, Spring Constant 10'000, Particle Mass 1. Great! :D


Looking a loooong way into the future: We need something to "pin" SoftBodies in order to make a curtain or something like that. :)

Best regards,
TroY

bob said...

Thanks troy... That confirms a bug.

The balls of fluid at the vertex of your swimming cube are a bug.

imagine 250000 vertex's balls of fluid. Thats the bug for Harald. Sorry I will see if I can fix it...

Anonymous said...

http://www.bryce-board.de/attachment.php?attachmentid=16946

Bob - Fluids/Physisc works fantastic.
Above is a video with a ball that fells into a glass with 25.000 particles.

A rendering is also available:
http://www.bryce-board.de/attachment.php?attachmentid=16945&thumbnail=1

Thanks for all your hard work on that plugin! I´m sure it was worth the time - and I hope you´ll be rewarded somehow!

Harald

Anonymous said...

Picture
http://www.bryce-board.de/attachment.php?attachmentid=16968
Video
http://www.bryce-board.de/attachment.php?attachmentid=16967

Very nice - though there are some mistakes - due to bad choosen resolution of the "towel".

Ajax has 20.000 vertices in this case.

Simulation took more than 2 hours on my old athlon.

Now I know how Christo must have felt.
;)

Harald

bob said...

@Harald
you might find that adding lattice damping in the advanced menu will help.

Of course there is no bending stiffness so its not very good for cloth simulation right now.

Performance is a issue. But one I will look at later. The number of vertices's needed for softbodies will go down when they get polygon to polygon collisons rather than polygon to vertex collisons.

Anonymous said...

Hello!

As a Blender Dev I am interested if the source is available anywhere / if there are any plans to integrate it :)

You can contact me through my fluid dev blog here: http://www.wxtools.com

Greetings
Daniel / Genscher