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

Share this post

Link to post
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. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now