Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

Algorithm for water/terrain skirt?

This topic is 4857 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

Someone told me that there is an algorithm for determining water/terrain intersection. I have looked but can't seem to find anything on it? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Here s a thread about Breaking waves on shorelines

I guess you want to implement something similar.

Especially the last post from Steve132 who suggests to create a spline around the islands

Quote:
reate a spline around your island. This spline will make up the inner edge of a triangle strip wrapping all the way around the island, moving up and down with the surface of the ocean. The outer edge will be about 5-6 feet out, creating a strip around the island. (Picture an island with a tutu and you will understand what I mean) Then, texture map this strip with an alpha white texture. This texture should consist of several alpha lines snaking across it with a thick line at the bottom(for the shore foam). Slowly transform the texture matrix to make all of the coordinates pulsate back and forth as the water rises and falls, in addition to slowly rotating the entire splines texture one direction around the island. Add 1-3 more of these tutues rotating in slightly different directions to make a really neat compound blending effect as the alphamaps layer on top of each other. Finally, throw in a neat small shimmering particle effect for the foam spraying around the edges where the water meets the shore. (It might help if you make your edge definition spline also serve as an emitter for your particles)

Share this post


Link to post
Share on other sites
Quote:
Original post by Basiror
Here s a thread about Breaking waves on shorelines

I guess you want to implement something similar.

Especially the last post from Steve132 who suggests to create a spline around the islands

Quote:
reate a spline around your island. This spline will make up the inner edge of a triangle strip wrapping all the way around the island, moving up and down with the surface of the ocean. The outer edge will be about 5-6 feet out, creating a strip around the island. (Picture an island with a tutu and you will understand what I mean) Then, texture map this strip with an alpha white texture. This texture should consist of several alpha lines snaking across it with a thick line at the bottom(for the shore foam). Slowly transform the texture matrix to make all of the coordinates pulsate back and forth as the water rises and falls, in addition to slowly rotating the entire splines texture one direction around the island. Add 1-3 more of these tutues rotating in slightly different directions to make a really neat compound blending effect as the alphamaps layer on top of each other. Finally, throw in a neat small shimmering particle effect for the foam spraying around the edges where the water meets the shore. (It might help if you make your edge definition spline also serve as an emitter for your particles)



I am as of now determining the collision points on the water and terrain. I have one large quad rendering my water/reflections. As of now the foam is there but I don't like the way it looks. First off due to my one large quad my water flows in one direction and is hard to allow foam to collide into the four sides of my terrain and match the current of the water... Kind like a skirt or idea of a spline but using quads for polygons.

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!