Search - User list
Full Version: PointVOP - transform objects to origin and back
Root » Houdini Indie and Apprentice » PointVOP - transform objects to origin and back
Phlok
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?
awong
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.
Phlok
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…
awong
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB