magneto Posted April 11, 2012 Share Posted April 11, 2012 I have a geometry with 2 points (positions = both {0,0,0}, normals = {0,0,1} and {0,1,0}). If I parent this geometry to a camera, I get the points and normals correctly transformed: But if I transform them myself without parenting, using optransform(/obj/cam1) in VOPs by multiplying with both point positions and normals, I get this: The geometry is not transformed, only camera is. Any ideas on how to fix this? Thanks Quote Link to comment Share on other sites More sharing options...
magneto Posted April 11, 2012 Author Share Posted April 11, 2012 I figured it out. I had to multiply the normal by the inverse transpose of the same matrix 1 1 Quote Link to comment Share on other sites More sharing options...
tjeeds Posted April 11, 2012 Share Posted April 11, 2012 I think you just need to convert your M4 to M3, you don't want to apply translation to vectors, only rotation. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 11, 2012 Author Share Posted April 11, 2012 Thanks tjeeds, how do I do that in VOPs? I looked at the Convert VOP but it doesn't have matrices. Also you are talking about the normals, right? 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.