phong Posted February 26, 2010 Share Posted February 26, 2010 Hi! I searched through the expression functions, but couldn't find anything to transform a point from one coordinate system to another. In particular I want to transform a point from world coordinates to NDC. Is there an expression or do I have to go through the matrix stack? Thanks, Phong Quote Link to comment Share on other sites More sharing options...
SpencerL Posted February 26, 2010 Share Posted February 26, 2010 if its at render time, there is a toNDC VOP which does this. If you want to do it at the SOP level, you could use your camera to project the uvs via uv texture SOP, then use a point SOP and in position replace $TX, $TY, $TZ with $MAPU, $MAPV, $MAPW. Quote Link to comment Share on other sites More sharing options...
phong Posted February 26, 2010 Author Share Posted February 26, 2010 I want to use it at the POP level would be too cool if there was a uvproject SOP.. Quote Link to comment Share on other sites More sharing options...
symek Posted February 26, 2010 Share Posted February 26, 2010 (edited) I want to use it at the POP level would be too cool if there was a uvproject SOP.. Don't have to use projection in pops. In both Sops and Pops land you can use toNDC() with additional parameter for camera name: $ndcP = toNDC("/obj/cam1", P); You can paste it to inlineVOP to check how it works. hth. skk. Edited February 26, 2010 by SYmek Quote Link to comment Share on other sites More sharing options...
SpencerL Posted February 26, 2010 Share Posted February 26, 2010 Don't have to use projection in pops. In both Sops and Pops land you can use toNDC() with additional parameter for camera name: $ndcP = toNDC("/obj/cam1", P); You can paste it to inlineVOP to check how it works. hth. skk. Didnt know about that one, Thanks SYmek! Quote Link to comment Share on other sites More sharing options...
phong Posted February 27, 2010 Author Share Posted February 27, 2010 Wow how cool. Thanks SYmek 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.