Jump to content
  • Advertisement
Sign in to follow this  
xujiezhige

Why do cubic environment mapping only represent distant objects?

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

In Real-time Rendering, page 307, there is a sentence---'The primary limitation of environment maps is that they only represent distant objects'.

I mean the cubic environment mapping projects the environment onto the sides of a cube. So all objects are projected and can be reresented. Because of this, I can't understant the sentence mentioned above.

Share this post


Link to post
Share on other sites
Advertisement
Environment maps are typically static constructs, which makes them more suitable for static, large, distant objects. I don't think there's any more to it than that.

Share this post


Link to post
Share on other sites
As Promit says, they're usually static. This means there's no parallax between objects on a static cube map, which is an approximation for objects that are distant. However, there are various ways cubemaps have been extended to deal with this; for example, look at the papers on distance impostors. Just one example: http://http.develope...gems3_ch17.html

Share this post


Link to post
Share on other sites
Thank you, Promit and Prune.

The book says that a great strength of Greene's method is that environment maps can be generated relatively easily by any renderer and can be generated in real time.
I'm english is not good. So I think the meaning of the sentence is that cubic environment maps can be generated in each frame.

Is my comprehension wrong?

Share this post


Link to post
Share on other sites
1. they represent distance object, because those objects need to be so far away, that the position where you apply the cubemap is not important anymore, it's similar to a skybox. if you would apply a cubemap of a room to some objects that are inside, you would notice that the reflection is wrong the more you are away from the center of the room.

2. yes, they can be created every frame, racing games do that, here you can see an example:








Share this post


Link to post
Share on other sites
I don’t know what Greene’s method is, but my method is to render distant objects once (or very rarely) and render closer objects every frame or every few frames.
Firstly you store the distant objects as 6 flat images.

When you update the cubemap, render only the non-distant objects first, then render the 2D images as a flat quad, putting the distant images into the scene.

The same distant objects’ quads can be used for all of the environment maps, so you don’t have to waste a lot of space keeping one copy for every cubemap, and they can also be rendered at a lower resolution, typically half of the resolution of the cubemap.


L. Spiro

Share this post


Link to post
Share on other sites

In Real-time Rendering, page 307, there is a sentence---'The primary limitation of environment maps is that they only represent distant objects'.


I think what this means is that even if you dynamically re-rendered the environment map each frame (ignoring any performance hit), you are still left with an approximation,since the reflection color that is returned by the cube map lookup does not take into account the position P on the surface of the model where the reflection of the light ray occurs, but instead it's assumed/computed as if the reflection occurred at the pivot/origin O of the model (the center of the frustum position that was used to generate the environment cube map).


If we estimate that the distance D of the reflected object to the point P is much larger than |P - O|, or "tending to infinity", then the error caused by not taking into account |P - O| tends to zero.

Perhaps a similar idea when explaining when it's ok to treat sunlight as a positionless directional light instead of a point light source - since it is so far away, the size of the sun, and the difference in the direction is minimal, so it's ok to use a directional light.

Share this post


Link to post
Share on other sites
Thank you very much, clb.

Your explanation is very elaborate, helping me understand it greatly.
But if we adapt it to near objects, whether the result will be objectionable?

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!