PDA

View Full Version : renderman space transformations


mjs1
07-06-2005, 07:14 AM
I was reading the article on subsurface scattering on rendermanacademy.com and had a question about transforming points from one space to another. In the article one of the goals is to transform a point being shaded into the light camera's NDC coordinates in order to create s,t coordinates for a texture lookup into the depth map rendered from that light camera. It says to transform the point P being shaded by the projection matrix of the light source camera, after which the point is translated and scaled in order to get it into NDC space.

What I'm unclear of is how multiplying the point P with the light camera projection matrix alone will help. Wouldn't you first have to multiply P by the light camera viewing matrx and THEN by the light camera projection matrix to get the correct shadow map lookup assuming that P is in "world" space? Or is Renderman smart enough to do this when you tell it you want a world space point in a camera's projection matrix space? When you transform a point in Renderman into another space are you doing a straight matrix multiply or are you doing in some cases a number of matrix multiplications under the hood, with Renderman knowing what space the point is currently in and what matrices it needs to multiply through to get to the space you need?

Thanks!

playmesumch00ns
07-11-2005, 10:04 AM
When you do transformations between named coordinate systems you're doing a straight matrix multiply.

However, the matrix might be the concatenated result of several different transformations. In the case of the projection matrices stored in shadow maps, that's the concatenation of the viewing transform and the projection transform.

CGTalk Moderation
07-11-2005, 10:04 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.