Thursday, August 27, 2009

How does the renderer know the point of origin of the light as a shadow emitting point in renderman?

When camera at the time that the shadow map was made-in other words, the emitting point. The shadow() function knows to look for this information in the shadow map file. Notice that since the shadow origin comes from the shadow map file rather than the light shader, it's permissible(and often useful) for the shadows to be cast from an entirely different position than the point from which the light shader illuminates.

개인적인 생각으로 Renderman lighting의 장점 중에 하나가 depth map shadow을 쓸때 Shadowing을 lighting으로 부터 완전히 분리 시켜 다룰 수 있다는게 아닌가 싶다.

실제로 종종 composition 이유로 light와 상관없이 shadow 방향을 틀어야 할때가 있겠고 더 나가 shadow map을 여러개 만들어 한 light에 연결하여 쓸 수도 있겠고(예:주로 넓은 배경에서 아주 큰 쉐도우 맵이 필요로 할때) shadow를 다른 light와 공유해서 쓰고 싶을때도 움직이는 물체와 고정된 물체를 같이 렌더링 할때 움직이는 물체만을 위해선 매 프래임마다 쉐도우를 만들게 해주고 고정된 물체에는 한장으로 재사용이 가능하게 만들어 그 두 쉐도우를 한 라이트에 연결기켜 사용하기 등등등....

이런 자유로움을 가능하게 해주는 이유 중에 하나가 shadow depth map 안에 그 shadow를 제너레이션 했던 camera의 정보가 들어 있기에 어디서든 어느 다른 light와 연결하거나 share가 가능한 것이다.

아직까지 큰 스튜디오에서 ray-tracing shadow 대신 depth map 방식을 쓰는 이유 중에 하나가 이런 자유로움에서 오는 optimization과 cinematic flexibility 같은 장점이 있기 때문일 것이다. 뭐 요즘은 거의 deep map shadow을 쓰지만....

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home