PDA

View Full Version : Anybody read ATI's Siggraph papers?

PSarge
30-Jul-2002, 12:43
This one in particular, as it talks about how the demos were done.

I was interested in the bit to do with the "Natural Light" demo. On slide 51 it talks about sampling the local environment map with a blend of the Surface normal and the reflection vector.

Anybody understand why you might do that?

Simon F
30-Jul-2002, 13:41
I can't say that I've given it a lot of thought but here's my guess.

If the environment map is meant to represent the "infinitely" distant environment, then the reflection vector is the correct choice (since all parallel lines will meet at the same point on an infinitely distant the environment map).

OTOH if the environment map represented the region that was exactly local (i.e. at the same position as the object itself) then the surface normal would be the correct choice for sampling.

Any other distances could then be done as a blend.

gking
30-Jul-2002, 21:27
OTOH if the environment map represented the region that was exactly local (i.e. at the same position as the object itself) then the surface normal would be the correct choice for sampling.

The reflection vector will always be the correct vector to choose for specular reflection; however, with a length of 0, the reflection vector and the normal (or any other vector you choose) are trivially equal.

I'm not sure why ATI chose to blend between the normal and the reflection vector for sampling from the environment maps - it seems like an ad-hoc thing that the demo authors thought looked more appealing than using the reflection vector everywhere.

Of course, I haven't given this too much thought, either.

Simon F
31-Jul-2002, 08:29
OTOH if the environment map represented the region that was exactly local (i.e. at the same position as the object itself) then the surface normal would be the correct choice for sampling.

The reflection vector will always be the correct vector to choose for specular reflection; however, with a length of 0, the reflection vector and the normal (or any other vector you choose) are trivially equal.
;....
No. I'm now convinced I am correct. I think you are perhaps confusing a reflection ray (as in raytracing) with just its direction; a ray also has an origin. Note that environment maps are accessed by a direction vector.

An environment map (be it sphere or cube) represents the view from one point in space. If you can assume that the objects shown in the map are infinitely far away (and therefore that the sphere/cube has infinite dimension), then all parallel (reflection) rays will strike the same point in the environment map.

If, OTOH, you wanted to model the map as though it was not infinitely distant, then parallel rays won't meet. Now I hope my earlier message will make more sense.

gking
31-Jul-2002, 08:51
You're right -- I hadn't given it enough thought. Using just the reflection direction won't allow the base's reflection to "stick" to the ball.

The blend function is completely ad-hoc, though.

PSarge
31-Jul-2002, 12:29
Cheers guys, I'd thought it was probably something specific to their scene, and now I'm sure it is.

Seems odd to spend a full slide on it in the presentation though.

JasonM [ATI]
03-Aug-2002, 07:15
The use of the normal for the "southern" regions of the spheres was done to make the balls appear to be in contact with the black pedestals holding them up. With traditional environment mapping (which is also a hack), the balls would not appear to be sitting on the twisty black pedestals. This is a hack that I felt developers might want to use in their content, hence I explained it in the talk.

-Jason Mitchell

Tahir2
03-Aug-2002, 16:55
There you go... told you ATi et al read these forums ;)

MDolenc
03-Aug-2002, 18:20
Hello Jason!
Nice to see you here! :D

JasonM [ATI]
03-Aug-2002, 18:53
I should also point out that most of the material from the talk is probably more easily understood from reading the course notes (http://www.ati.com/developer/SIGGRAPH02/ATIHardwareShading_2002_Chapter3-1.pdf) in addition to the slides (http://www.ati.com/developer/SIGGRAPH02/ShadingCourse_Mitchell.pdf).

-Jason