Jump to content

Why do fluids take longer to compute than other sims?


Recommended Posts

Hi everyone!

Just a quick question out of interest.

Speaking very generally, fluids usually take longer to compute/sim/render than other types of sim(e.g. rdb). Just wondering why from a technical point of view?

Is it anything to do with equations used to compute it? or i guess more particles stuff in the scene?

I've just seen how vague and ridiculous this question might sound but any info on this would be really interesting!

Thanks in advance!

Edited by MilesS1
Link to comment
Share on other sites

I'm no expert at this but this really rough "explanation" might help:

Smoke/Pyro: uses voxels "only" to compute all that fields like pressure, velocity, etc that is needed in the math to describe the behaviour of gas

FLIP: on top of volumetric calculations as in pyro it has to transfer those results onto points (particles), adjust their position and other attribs, from there calculate new volumes again and so on

RBD: the bullet solver is not designed to be highly accurate but to be efficient and fast. most noticable as it uses a convex hull approximation of the objects to calculate collisions. it only uses transform matrices, the collision shape and things like velocity, mass to do the calculations

particles: just points in space with velocity (maybe angular vel aswell), no collisions. basically just @P += @v * @TimeInc * @Frame


Regarding the rendering:

the documentation about rendering is a chapter worth reading here. but as a most basic example let's say a ray hits a stone. it gets reflected in some direction and thats it. with fluids and volumes that ray enters the "object" gets refracted, scattered, refracted again when leaving and all that is ofcourse more heavy to compute. but RBD can be "slow" to render aswell just depends on the object. things with SSS or refraction(glass) or ice take their time too. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...