Jump to content
  • Advertisement
Sign in to follow this  

Texturing fluid dynamics grid to convey the movement

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

If you intended to correct an error in the post then please contact us.

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!


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!