PointVOP - transform objects to origin and back

   7143   3   1
User Avatar
Member
85 posts
Joined: Jan. 2009
Offline
I want to fracture some objects which are positioned anywhere in my scene. Therefore I want to do the following:

Inside Geometry SOP:

- Transform object to origin (world space 0)
- Fracture
- Transform fractured object back to original position in space.

I know it should work by:

- calculating my object's world space transformation matrix, and multiplying each Point by that Matrix. That should move my geo to the origin.

- Do Fracturing

- multiply each point with the original (non inverted) transformation matrix to get it back to it's original position.

The problem is I do not know how to get that transformation matrix.

Any ideas?
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Is the original positioning done at the Object level? If so, you might not need to do the matrices yourself. You could use the Object Merge to fetch the non-transformed geometry.

If the original positioning is done at the SOP level, then you could use xform VOP and invert VOP to get the transformations that you want.
Andrew / アンドリュー
User Avatar
Member
85 posts
Joined: Jan. 2009
Offline
Here's an example that illustrates my problem.

“Imported Geo” simulates geo that is coming from an external source. It is inside a GeoSOP.

I tried translating it to the origin using an xform SOP, but nothing happens, as I am apparently doing something wrong. That's where I got stuck…

Attachments:
transform.hipnc (258.0 KB)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
You'd need to have access to the original transformation. If it's an actual xform SOP, then you can channel reference all the parameters and do a invert transformation. And then redo the transformation later. See the attached file for how to do this.

However, if it's not actually a xform SOP, then it gets tricky. In general, there's no way to recover what the original transformation is, because the transformation could be “baked” into the geometry already. But depending on what your actual source and setup is, there may be ways to recover the transformation.

Attachments:
transform.2.hipnc (265.6 KB)

Andrew / アンドリュー
  • Quick Links