Skip to main content
gamedev.net
🔒 Locked

Water modeling

Started by NiteLordz Feb 26, 2013 at 9:28 PM 1 replies 1.4k views
Original Post
NiteLordz
NiteLordz

Currently i have a terrain that i render out using patches, and i have a plane that represents the water level. this works fine... however, as majority of the water plane is under the terrain, it is wasted rendering.

ideas i have are that i create a patched water system similar to what i did with terrain and using software occlusion to determine if a patch is visible. if i did this, i could theoretically use a heightmap to build the build level, allowing for rivers of multiple heights, instead of a plane.

any suggestions?

Code makes the man
phil_t
phil_t

Assuming you are drawing the water after you draw the terrain, you probably aren't taking much of a performance penalty.

Have you measured the "wasted rendering", and if so, how much is it eating into your frame time?

Flimflam
Flimflam

You could just designate areas that are bodies of water on your map manually and draw a quad or quads (if the water body is irregularly shaped) in that area specifically, if you're worrying about overdraw or something.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.