Lecture 17: Physical Simulation (46)
wilrothman

I have always been interested in how water simulation works. I understand the the kinematics of it works by having really small particles to simulate a liquid. What I still do not understand, however, how the light and water- (not liquid-) specific physics work. For example, how is the color of the water calculated? There seems to be white foam, and the hue of the water seems to be dependent on the hue of the sky (which is why its blue). Also, how does liquid texture work? Can someone please explain this to me.

KevinXu02

I know that one methed is to use marching cubes to recreate mesh for the particles. And render water as a transparent material (maybe just set its color to blue, like blue glass). For those foams, they are also particles which are generated base on different cases (in areas of high turbulence or where the water's surface intersects with solid objects). And when in rendering, treat them as small bubbles.

AnikethPrasad

Representing fluids as particles seems computationally challenging. Are there any examples of realistic fluids being rendered this way perhaps in a video game or simulation? What kind of optimizations could be made to help handle large-scale simulations?

pranavkolluri

https://www.youtube.com/watch?v=BqJm3B8cubo this is a pretty good overview of how games do representations of water. In most if not all 3D games you're right, I don't think I've ever seen particles used. It's normally a ton of shader tricks to do it.

emily-xiao

How do developers balance the computational demands of particle-based fluid simulations with the need for real-time performance in interactive applications, such as video games or virtual reality environments, while still maintaining a high degree of visual realism?

myxamediyar

to comment on emily's question, this is indeed a really interesting question! I remember when I first started trying to develop games I quickly realized that my ambitions to create a realistic shader for Minecraft that could also run smoothly is quite a challenge. I saw a video on youtube discussing how different distance levels render different resolutions, similar to mipmap levels but for quantity of particles.

aidangarde

When running simulations, I know that would be insanely computationally expensive to simulate each particle interaction, so I wonder how these interactions are generalized in more general patterns that may be less accurate but still show similar behavior. My guess would be that for most use cases having basic rulesets for how liquid behaves would be enough for most renderings. I can understand how liquid would simply find the bounds of its container and fill it, but I wonder how you can cheaply and accurately represent liquid in motion.

omijimo

how is the final geometry and color created from the particles? would it be something like creating a bezier surface by using the particles as points, and then applying a water texture?

Songbird94

Learned about vertex displacement from the link. Interesting technique.

MillerHollinger

If you look very closely at this image, you can see that the surface of the water bends and deflects at distinct points. I think we can conclude from this that the basic skeleton of this fluid rendering is that it draws a mesh between the individual particles and then "rounds the corners" to give it a liquid look.

Zzz212zzZ

This link is interesting and it tells how modern games use the normal map to replace the real-time water rendering in case of its high-performance consumption.

OnceLim

Our final project is similarly uses particle-based physics but we are just simulating airflow instead of fluid. Though it may seem simple to just render a bunny with water like this, we realized that even doing particle-based wind was very complicated since we had to use many different physics algorithms such as Navier-Stokes.

eugenek07

Would particle based fluids have a different system without utilizing springs. Particles move around a lot and it seems like it would need a more complex system to calculate its interactions with every other particle.

You must be enrolled in the course to comment