Jump to content

How to get world coordinates at the geometry level?


Recommended Posts

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 :)

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...