Jump to content
  • Advertisement
Sign in to follow this  
ramy

need opinions in water reflections

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

hey guys, i need ur opinion in water reflections. im wondering how water refletions r done. at the moment, i have two ways: 1- render the entire scene on a texture, and place that texture as a water texture. 2- or use the stencil buffer and render the entire scene to stencil buffer, and somehow i dont know to get that on to the water texture. or can that be done with environment mapping? but wat exactly is environmental mapping? which is faster, and wat is more efficent? thx

Share this post


Link to post
Share on other sites
Advertisement
Both are pretty much the same.

Basicaly, either way, you're going to have to render your scene twice, from two different camera positions.

You can either store it on a texture, and then use the texture to render the actual water, or,

You can use the stencil buffer as a *mask*. You first mask out just the water (draw the water plane with stencil writing). Then, you render your whole scene only on the mask.

I think the first options allows greater flexibility with later moving the water around and creating waves, and doesn't require a stencil buffer, though the second one would probably be faster.

Lastly, environment mapping is when you create a texture that maps the environment around your camera position, and use that as a referance for reflactions. You can either use a static environment map (just some nice sky -- but then your actual scene doesn't show up in the water reflection) or, a dynamic environment map, which requires you to render the whole scene multiple times.

I hope this helps a bit :).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!