new fluid sim adventures
I've been experimenting the concept of using motion vector fields to create dynamic lighting on the fly, in a an efficient way that makes use of parallel processing and image products that are typically generated when doing fluid sim.
With a fluid sim, or other things that you can analyze motion vectors from, it's conceivable to create an image output that shows the motion vectors, and using OpenCL, it's reasonable to get it going at a fairly high resolution in QC and still be speedy. By using a byproduct of the motion vectors at various points in the chain along with modification to those outputs, one can create different styles of, perhaps "over-hyped" but dramatic, normal maps that influences lighting.
By using the divergence, I'm finding that one tends to get a lighting look that reflects the surface of water, while also revealing stuff underneath. That's what gives the look of the darker, wetter looking parts of this clip.
By using the straight up motion vectors, the lighting tends to feel more integrated into the sim, without a surface tension thing going on. With muted light settings, it can look a bit cloudy, though can also look really wet when the ambient, specular, and main lighting settings are tweaked just so.
What I'm finding most novel out of it is the lighting method of normals being generated from motion, and that it works, looks cool, and doesn't add much more processing toll. The result feels like a hi-fi look for QC.
I'm outputting the liquid sim to cwright's normal map demo qtz 1 glsl shader, which is built to receive texture and normal map, to create the lit look. I'm also using Stoney Ballard's image to force as an easy way to get the motion going for the fluid sim... it's also pretty cool using the schema apple did for their wind tunnel to generate force.
I'm going to post this soon after I edit it some more, and add notes.
More like this