Thursday, September 24, 2009

Reusing Shadow Map

scene내에 light는 여러개인데 light shader는 1개일때가 있다. 만약 shadow map이 생성된다면 attached 된 light만큼 shadow map이 생성되는데 문제는 reuse 할 때 file name을 지정 할 수 없다는 것이다.

1. 먼저 light shape node에 string type의 new attr을 추가한다.(여기에서는 'dsh')
2. 추가된 attr에 현재 light shape의 name을 넣는다.(ex, 'keyLightShape.dsh')
3. slim에서 shadow map에서 frequency 속성은 never, file 속성은 아래의 tcl code를 입력한다.
scenes/renderman/rmantex/shd/hair_v2_w1.[mel "getAttr $OBJNAME.dsh"].$F4.tex

p.s.
hair_v2_w1은 display name인데 이것도 $OBJNAME처럼 예약어가 있을듯 한데 아직 못 찾았음. path도...

No comments:

Post a Comment