Sign in to follow this  

Need info about cubemaps for water reflections

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

I'm currently writing a short essay about water reflections, and need to write a few paragraphs about reflections using cubemaps. I know that if I have a scene with two chromed sphere, I need to render a cubemap for each of them, for the reflections to be correct. That's because the cubemap is centered inside the spheres. But, if I were to render a swimming-pool with cubemap reflection. Would I render a cubemap from the center of the surface, thus the distance to the pool's edges would always be the same in the reflection no matter where on the surface? Or would I make a screenspace-thingy and render the cubemap from below the surface from "mirror space", thus creating a cubemap centered on the (mirrored) viewer? (Sorry if odd explanation, but if surface is at 0,0,0 y-axis up, camera is at 0,10,25 and mirror-camera is at 0,-10,25, anything below surface culled) Is there ever any point in using cubemaps for water reflections if the water surface is somewhat calm or will they always be "inaccurate"?

Share this post


Link to post
Share on other sites
Cubemap reflections are designed for sphere-like localized objects. They often won't look right for a water plane.

Like you say, you need to pick a point to render it from, and it would be correct at that point only. If you are representing infinitely far terrain in your reflection cubemap, it may look fine across the entire surface.

What it can't handle is local reflections ( ie ship in the pool ).

Share this post


Link to post
Share on other sites
Thanks SimmerD. That's pretty much the conclusions I came to aswell.

I guess I just mixed up the rendering of screenspace texture reflections with cubemaps. A nudge in the right direction combined with pen and paper usually sorts things out =)

Share this post


Link to post
Share on other sites
Now I'm at it again...

Would it be possible to render a cube-map from the position of the viewer and use it for the reflections in the water? That way the cube-map would only have to be updated now and then for things to look okay (saving alot of rendering time compared to a screen-space projected texture).

The reflections would of course look bad if the viewer was high above the surface. But if he was low enough, wouldn't it work?

Share this post


Link to post
Share on other sites
You'd have to try it and see, but I have my doubts.

You could apply the same idea to a regular planar reflection - just don't update it every frame if it's that slow.

But then, do you want the frame rate to drop every 10 frames or so when it updates?

The reflection map does not have to be the same rez as the screen, and the objects drawn into it don't have to be full detail, so it can be cheap.

Share this post


Link to post
Share on other sites

This topic is 4596 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this