I'm having trouble converting normal maps back from tangent space to
world/camera space in a surface or displacement shader in Renderman. What
stops me is I can't seem to compute a continuous dPds or dPdt (the tangents)
on a polygonal or subdivision surface (it's no trouble on a nurbs patch
though). Of course I expect discontinuities where s and t are discontinous,
but I get them also at facet boundaries? I'm not very experienced in
Renderman and I usually manage this without much hassle in Maya or Mental
Ray renderer so I guess there is something I'm overlooking or doing wrong
here. Declaring s and t as "facevarying" on a subdivision surface didn't
help though I expected so.
You can check the general idea of what I'm trying to achieve here :
http://www.drone.org/tutorials/rayDisplace_renderman.html
And here is a sample source rib as well as the images of what I get (note
the torso_dPds.jpg where I'm hoping for continuous tangents and failing to
get them) :
the sample rib file
http://www.drone.org/shared/subdTorsoNormals.rib
the dPds vector expressed as color, showing the discontinuities causing my
trouble
http://www.drone.org/shared/torso_dPds.jpg
the st coordinates
http://www.drone.org/shared/torso_st.jpg
the subdivision surface
http://www.drone.org/shared/torso_subd.jpg
In case someone tackled the problem already or get some insights on this,
I'd be must obliged to see soem light shed for me!
Olivier Renouard
The following post may or may not be relevant:
http://groups.google.com/groups?selm=36AF924D.41C6%40hammerhead.com
Regards,
Dan
However I would have to update them in the 3D animation package every frame
to account for deformations...
I'd be curious to see wether I can get a continuous tangent information at
render time the way using tangentU and tangentVCamera works in Maya...
Olivier
"Dan Maas" <danie...@yahoo.com> a écrit dans le message de news:
fcd1af44.03030...@posting.google.com...