# 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.

## 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 on other sites

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 on other sites
Quote:
Original post by Basiror

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.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 23
• 12
• 12
• 11
• ### Forum Statistics

• Total Topics
634779
• Total Posts
3019241
×