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?
PointVOP - transform objects to origin and back
7143 3 1- Phlok
- Member
- 85 posts
- Joined: Jan. 2009
- Offline
- awong
- 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.
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 / アンドリュー
- Phlok
- Member
- 85 posts
- Joined: Jan. 2009
- Offline
- awong
- 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.
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.
Andrew / アンドリュー
-
- Quick Links