View Full Version : River Foam

08-14-2004, 04:25 AM
Simple question, I appologize ahead of time if this topic has already been covered. If I recall I read about this or something similiar in another thread, I just cant remember if it was at the this forum or not.

I was just wondering if anyone has a method for getting particles to interact with the pond. Such as when rocks in a river collect foam around the edges as the water rushes by. The foam should also react to the waves and surface motion of the pond. I was hoping to do this without having to use excessive tracking in a compositing app.

If anyone can point me in the right direction or towards another thread, any and all opinions welcome. Thankyou

08-16-2004, 06:52 PM
This is a rather large topic, however you can in general get pond values with a combination of fluidVoxelInfo and getFluidAttr. Create a pond surface locator to see how these are used. The ocean wake setup is more complicated than the pond, but in most cases preferable(note that if you create an ocean wake and make the numFrequencies =0 on the oceanShader then assign the shader to a simple plane it is roughly equivalent to a pond). In this one can use colorAtPoint. Again create an ocean surface locator and look at the expression generated. One can emit particles from a flat plane and then inside a particle expression evaluate the water height at the particle xz location, setting the particle y such that it sits on the water surface. If you evaluate neighbor water height values you can determine the local slope, which can be used to move the particles with the waves( i.e. surf the particles ).


08-16-2004, 07:00 PM
Also.. with flowing rivers the navier stokes simulation is sometimes preferable to the spring mesh. Look at the wind tunnel examples. These have expressions that set the velocity along
the incoming boundary. One can set up a similar thing with a fluid texture used as a displacement map. Where one collides objects with the flow it will bunch up and move around,
creating standing waves. Rapids can also be created by emitting force from a volumeAxis field with perhaps some turbulence into the fluid. To provide simple wave textures on top of the flow one can use an animated "volume wave" texture (on the fluid under textures).

If one is using an ocean with a wake one could also use observer speed combined with wind direction on the oceanShader to create a textured wave flow


08-17-2004, 06:41 AM
Thankyou very much for that valuable information. I must say due to my novice scripting abilities this seems somewhat daunting. Although in theory I understand how it works, and how to accomplish the task. Thankyou again for you help.

CGTalk Moderation
01-18-2006, 11:00 PM
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.