magneto Posted April 10, 2012 Share Posted April 10, 2012 I have a Geometry object and a Null object. I want to get the world coordinate position of the Null object that will always be at the position of the Null no matter the transformation of the Geometry object. Currently I use origin expression but I get the position that's offset by the transformation of the Geometry object. Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
sanostol Posted April 10, 2012 Share Posted April 10, 2012 in a vopnetwork, use the `optransform("path to object")` it gives you a matrix, that you can use to multiply the pointpostion to get it in global space another thing would be (easier) use a object merge SOP and merge in the point of the null, and set it to transform into this object this gives you the point in global space 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 10, 2012 Author Share Posted April 10, 2012 Thanks sanostol. Do you mean using optransform in VEX? How can I use it in VOPs since you said in a vopnetwork? I was gonna try the Object Merge, but it can be any object, i.e. very high res mesh, so that's why I didn't want to merge it just for this. Quote Link to comment Share on other sites More sharing options...
graham Posted April 10, 2012 Share Posted April 10, 2012 You'll need to multiply by the transform of the null and the invert transform of your geometry object. It's definitely easy enough to do in Python so that might be a better bet. You can do this with 2 of the operators I posted in your other thread connected together. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 10, 2012 Author Share Posted April 10, 2012 Thanks Graham, in VEX/VOPs how would you get the transform matrix of an object? I looked at VOPs just to see but didn't see anything matrix related that has an object/operator path. I will give your operator a try for this problem as well. origin expression also works, just had to figure out the path issue there Quote Link to comment Share on other sites More sharing options...
tjeeds Posted April 10, 2012 Share Posted April 10, 2012 The help has two listings for optransform, one is VEX and one is an expression. Occasionally you'll run into VEX functions that aren't mapped into VOPS, this appears to be one of them. You can just pop it into an inline code node to use it in VOPS. opxform_vops.hip 6 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 10, 2012 Author Share Posted April 10, 2012 Thanks tjeeds, very helpful. I think that also happens when you go from VOPs into VEX, like there is no sign function in VEX. 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.