handling recursive cube maps??

Started by
2 comments, last by ngill 19 years, 2 months ago
I know raytracers have figured out a way to do these sort of things, but a solution for SM3.0 hardware really isn't the same monster. So really, i'm just looking for advice and / or pointers on how to handle dynamic rendering of cube maps for Reflective / refractive surfaces. I understand that once you find a reflective object in your scene, you set up a camera at the center of the object, and render in each direction into a cube map face. What i don't get, is if there are several other reflective / refractive objects during that rendering. Do we stop, and render the other objects? Do we not render them? Do we have a depth limit ? Really, any suggestions / advice would be much appriciated. ~Main
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com
Advertisement
I had the same problem when designing my engine so I implemented the recursive depth idea. Render upto say 2 recursive reflections and stop, this will prevent the "loop" from becoming infinite.
Some games do a scheme where they will track when each cubeface was last updated, and set a 'budget' of # of cubefaces per frame.

In the case that many cubefaces want to be updated, you could drop recursion levels, or skip cube faces.

To prioritize cubefaces you could take into account time since last update, amount of moving objects in it's frustum facing the viewer, if the viewer is moving towards or away, etc...
I don't think there's a quick fix... otherwise you can solve stuff like radiosity really cheaply. :)

--Navreet

This topic is closed to new replies.

Advertisement