Using nParticles for water sim - Questions

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2010   #1
Using nParticles for water sim - Questions

So, I'm trying to make a decent-looking water simulation, using nPartices. To get a hang of what the settings actually does, I've rigged up a simple scene - a glass filled with nParticles, getting knocked over, the particles spilling out - Pretty basic.

Now, i rendered this and immediately noticed a problem. The mesh created from the nParticles when one converts Nparts to Mesh seems based on particle concentration. In other words, as the particles start to spread out after the glass is tipped over, the actual volume of the liquids mesh gets less and less - it looks like globs of water are instantly evaporating.
What setting did i miss? What do i need to tweak to sort this out?

Additionaly, I wonder if its possible to simulate/fake surface tension with nParticles (if at all possible). Like when water is running down a sphere, for instance. It wont just lose its "grip" of the spheres surface when it reaches the horizontal middle of the sphere, it will continue on down it until gravity overpowers the waterdrops own "stickyness", and makes it drop from the spheres surface. Also, a force between the particles themselves, that makes two drops of liquid that collides join into one, bigger drop. And also, that several joined drops of water have a greater pull on a single drop than vice versa. Is this at all possible to simulate?

This is for a work-related project, and the only tools I have are Maya 2009. It seems like RealFlow would be the way to go, ideally, but I have to make due with what I have at hand now.

Just to clarify: I'm not looking for a hyperrealistic, 100% physically correct simulation. Think more along the lines of an acceptable estimate of how it would look
 
Old 03 March 2010   #2
Check out Duncan's blog post on nParticles.
http://area.autodesk.com/blogs/dunc...with_nparticles

The final outcome is still blobby but might help you in some way.
 
Old 03 March 2010   #3
This is a good one for Duncan. But just to help you out on the mean time you could try using self attract under force field to keep the particles hanging together and I believe this together with incompressibility will stop them from bunching up, this would help with a surface tension.

As for the sticking to surfaces I think you may have hit it on the head by mentioning "Stickiness". Use that attribute to make your particles glue themselves to a surface. I think both the particles and surface need stickiness for it to take affect. You should check out the docs for these attributes to get you going.

Edit. I just checked the link by Efecto in which Duncan mentions using a negative force field on the passive nRigid to get particles to adhere to surface.
__________________
www.jeremyraven.co.nz
Vimeo

Last edited by Aikiman : 03 March 2010 at 09:04 AM.
 
Old 03 March 2010   #4
Duncan's blog answers and explains a lot of what you are looking for. In my own experience I have found that it is a delicate balance between the size of the nparticle and the mesh triangle size. Ideally you want the smallest radius and the smallest mesh and millions of nparticles, however that is computationally unfriendly.

I know this is far from the effect you are trying to achieve but this is a flood type effect I have been working on.
Flood

I am emitting 100,000 nparticles with a radius of .7 and a mesh Triangle size of .3. You can still see how large the nparticles are though as they leave the main volume and slide across the ground.
__________________
Regards,

Todd Palamar

www.speffects.com
 
Old 03 March 2010   #5
there is a good video on youtube that shows comparison between nParticles and realFlow.
- here

Todd > Nice flood. I have also noticed in your dynamics book that flood made with nParticles look very blobby. I'm not convinced to use it for highend water fx. But it may be useful for water fx in cartoonish 3d.

Last edited by efecto : 03 March 2010 at 07:14 PM.
 
Old 03 March 2010   #6
Something in particular to watch out for... as the particle system bounding box increases you may hit the maximum resolution for the voxel grid used to march and create the mesh. When this happens you can see the size of the triangles grow and eventually your entire fluid may dissappear. One solution is to increase the MaxTriangleResolution attribute, however you should also try to avoid having any stray particles fly far out. (i.e keep the total volume of the particle system bounding box as small as possible)

Duncan
 
Old 03 March 2010   #7
This clip http://www.youtube.com/watch?v=ULMD-27Rlng shows pretty clearly what my main problem is atm. The water dissipates towards the end of the system. Is the way to sort this out to increase the particle count and decrease tri size?
 
Old 03 March 2010   #8
Originally Posted by hellspawned: This clip http://www.youtube.com/watch?v=ULMD-27Rlng shows pretty clearly what my main problem is atm. The water dissipates towards the end of the system. Is the way to sort this out to increase the particle count and decrease tri size?


I believe just above you, Duncan mentions that you would need to increase resolution. What I would also try if simulation power is already maxed, make a kill plane before the problem area, and emit new particles with a second simulation, have your new nparticles continue on inherit velocity, and then resim your mesh with only these new particles, and of course blend in comp(blend could be tricky!).
But in theory, you could have that grid resolution continue on for miles and miles.
__________________
________________________________________
MEC 2014
 
Old 03 March 2010   #9
Yep that looks pretty much like you need to increase the max resolution, as well as kill particles that go out of view to keep the particle bounds tight.

Duncan
 
Old 03 March 2010   #10
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:13 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.