Nasyrov Posted June 23, 2008 Share Posted June 23, 2008 (edited) Hi! I have a problem with normal map baking. I want to bake normals to texture. Then I want to load this tex by point sop to restore them from texture. 1. I'm fiting N to 0 -1 and transfering N to Cd 2. Then I'm rendering Cd to float tex by mantra -u mode without dithering and with pixel filter minmax edge 3. Than I'm loading this texture into point sop into normal fields by such expression: tex(chs("$HOME/Desktop/testPoint.tiff"), $MAPU, $MAPV, D_CR) for the X channel. And so on for Y and Z. 4. Than i'm simply fitting normal range to -1 - 1 values. But normals are going to be mad! What's wrong? Thanks Edited June 23, 2008 by Nasyrov Quote Link to comment Share on other sites More sharing options...
symek Posted June 23, 2008 Share Posted June 23, 2008 (edited) Hi! I have a problem with normal map baking. I want to bake normals to texture. Then I want to load this tex by point sop to restore them from texture. 1. I'm fiting N to 0 -1 and transfering N to Cd 2. Then I'm rendering Cd to float tex by mantra -u mode without dithering and with pixel filter minmax edge 3. Than I'm loading this texture into point sop into normal fields by such expression: tex(chs("$HOME/Desktop/testPoint.tiff"), $MAPU, $MAPV, D_CR) for the X channel. And so on for Y and Z. 4. Than i'm simply fitting normal range to -1 - 1 values. But normals are going to be mad! What's wrong? Thanks You're rendering normals in camera space and apply them in object space... before saving normals in shader in Cd you should do something like: oN = ntransform("space:object", N); Also keep in mind that applying colors to points is a way faster vis VOPs rather than expressions, what could make a difference for you in case of bigger geometry. Hope this helps. sy. PS I hope you aren't computing this way basic normals for your geometry Edited June 23, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
Nasyrov Posted June 23, 2008 Author Share Posted June 23, 2008 Hi, SYmek! No, I'm not))) I can't do so. I make vertex color in sops from N and shaider simply transfer this color to Cf. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.