Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Alload

About cubic environment mapping

This topic is 5920 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 want to use cubic environment mapping in my engine and I was wondering where the camera had to be positioned in order to render the cube maps. Is the position of the camera the same as if I rendered normally the scene? Or is it elsewhere?

Share this post


Link to post
Share on other sites
Advertisement
It should be at the place where you display your cubemap afterwards.

Eg. if you have an object you would like to apply a reflective cubemap to, then place the camera at the center of that object, and render the geometry around it to the 6 sides of the cubemap (but skip the object itself !).

Don''t forget to set your camera to a FOV of 90°.

/ Yann

Share this post


Link to post
Share on other sites
quote:

Does setting a larger FOV (e.g., 95 degrees) help?


Well, you''ll introduce discontinuities at the edges of the cubemap for every FOV other than exactly 90°. But for special effects (esp. refractive), it can be useful.

Share this post


Link to post
Share on other sites
Okay.

But if I want to render several objects with environment mapping, do I have to draw for each object four times the scene?

Share this post


Link to post
Share on other sites
Since you will have to re-render the cubemap for each object ( as they are at different positions/orientations, and can see different things etc ), yes, you will.

Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
Although... If you have a static scenery, you could compute the cubemaps at run-time, save them somewhere, and only render the dynamic objects ontop of them... perhaps... Wait... no.. you won''t have depth information to do that... well, perhaps a variation on that.

Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
For instance, if you take a look at the water effect in Morrowind. Do they render cube maps for every triangles of the water surface?

Share this post


Link to post
Share on other sites
they dont use cubemaps. they render the scene mirrored at the waterplane, then copy this on texture (or render it on texture directly.. blah).
this one is then used on the rippled water surface wich displaces the texturecoordinates a little (per vertex or perpixel with pixelshaders, dunno) to get the waves working.

"take a look around" - limp bizkit
www.google.com

Share this post


Link to post
Share on other sites

  • 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!