# Texturing fluid dynamics grid to convey the movement

This topic is 2628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So let's say I have a traditional fluid dynamics grid of 256 x 256. Within the fluid dynamics simulation you have the velocity of the fluid at each cell.

Given that it's a grid that therefore could easily be made into a grid mesh of vertices, I want to be able to generate texture indices at each vertex of the grid cells to convey the movement of the fluid i.e. water.

I was thinking something along the lines of having a "still" water texture that represents the fluid when there is little or no movement. As the velocity at a vertex increases I would blend in a more turbulent water texture i.e. waves/white horses over the top. However I want these waves to animate in the direction of the fluid at this point.

Is this easy to do? I'm having trouble figuring out how to generate the texture indices on the fly each frame so that the texture is orientated in the right direction each frame as the fluid moves around.

To help visualise what I want to do, see this water from the game "From Dust" (skip to 1:45):
,while that is 3D, it's still a dynamic fluid as such, and you can see their waves/white horses travel in the movement of the water. I want that same effect with the movement and blending in for faster moving water, but with a fluid dynamics grid.

Thanks for any pointers or tips!

Cheers

##### Share on other sites
Take a look at this: http://valvesoftware...s_waterflow.pdf

The only difference is, they have an artist draw the velocity map for the water surface. You could just use your velocity map directly out of your fluid simulator.

##### Share on other sites
Thanks, I'll have a read of that.

1. 1
2. 2
Rutin
20
3. 3
khawk
17
4. 4
A4L
14
5. 5

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633759
• Total Posts
3013715
×