Hi,
I've cached out a low-res fractured geometry and was wondering is there any way I could read it back into houdini with a file sop and use it as a transform for my hi-res geometries?
Basically I just wanted to avoid doing my sim with hi-res geos to save time. I've tried using dopimport with “transform input geometry” but that doesn't seem to save much time for me.
Voronoi Fracture Geo Replacement
16486 14 5- lawbh
- Member
- 10 posts
- Joined: June 2012
- Offline
- nikmolson
- Member
- 54 posts
- Joined: Dec. 2011
- Offline
As long as you have an equal number of pieces in the hi rez what iv always done is sim using the low res. Then use a dop import bringing in that low res' sim set to transform input on the hi rez geo and cache that out. Hope that makes sense, if not il make an example file
Edit: oh didnt realize this was your post boon ahaha
Edit: oh didnt realize this was your post boon ahaha
- djwarder
- Member
- 83 posts
- Joined: Nov. 2018
- Offline
- zdimaria
- Member
- 390 posts
- Joined: Jan. 2012
- Offline
there is an example of how to do this in the docs. http://www.sidefx.com/docs/houdini12.1/nodes/sop/dopimport [sidefx.com]
.
- djwarder
- Member
- 83 posts
- Joined: Nov. 2018
- Offline
- pclaes
- Member
- 257 posts
- Joined: Nov. 2007
- Offline
Or you can apply the transforms directly to the pieces. (Same thing happens when doing delayed load instancing). You need two things for this:
A) the pieces geometry (initial state of pieces) with a “piece” attribute (can be turned on to be kept from the voronoi sop - or create your own with the connectivity sop)
B) the points from the sim, coming from the dopimport (as points to represent objects)
1) Bring in the points with the dopimport. (-> B)
2) Attribprmote a “piece” attribute on your pieces geometry to points. (-> A)
3) use this piece attribute as a lookup in a vopsop to apply the orient, P and scale attributes coming from the dopimport (this gives you really fast transforms, much faster than the copy sop). (A to look up in B)
Now here is the cool bit: You can replace the pieces geometry (A) with whatever geo you want (C), as long as you make sure the piece attribute is transferred, because eventually that is what is used to look up the transformation attributes (in B). (C to look up in B, using the piece attribute from A).
The C geometry can be clusters of other geometry, as long as they all have the same “piece attribute” they will look up the same transformation from the points (B). This is useful to simulate with lower resolution convex geometry, but then create high resolution clusters of pieces.
In order for this to work, you need to learn how you can recreate the transformation behaviour the copy sop does. Use vops ( learn to apply orient, P and scale to build the transform that is then applied to the points), as it is the fastest way.
-> the main thing is to extract the rotations out of the orient quaternion. I generally go import(orient) -> quaternion to matrix3 -> matrix 3 to matrix 4 -> extract rotations -> build transform (also plug the P and scale into this).
Hope this makes sense.
A) the pieces geometry (initial state of pieces) with a “piece” attribute (can be turned on to be kept from the voronoi sop - or create your own with the connectivity sop)
B) the points from the sim, coming from the dopimport (as points to represent objects)
1) Bring in the points with the dopimport. (-> B)
2) Attribprmote a “piece” attribute on your pieces geometry to points. (-> A)
3) use this piece attribute as a lookup in a vopsop to apply the orient, P and scale attributes coming from the dopimport (this gives you really fast transforms, much faster than the copy sop). (A to look up in B)
Now here is the cool bit: You can replace the pieces geometry (A) with whatever geo you want (C), as long as you make sure the piece attribute is transferred, because eventually that is what is used to look up the transformation attributes (in B). (C to look up in B, using the piece attribute from A).
The C geometry can be clusters of other geometry, as long as they all have the same “piece attribute” they will look up the same transformation from the points (B). This is useful to simulate with lower resolution convex geometry, but then create high resolution clusters of pieces.
In order for this to work, you need to learn how you can recreate the transformation behaviour the copy sop does. Use vops ( learn to apply orient, P and scale to build the transform that is then applied to the points), as it is the fastest way.
-> the main thing is to extract the rotations out of the orient quaternion. I generally go import(orient) -> quaternion to matrix3 -> matrix 3 to matrix 4 -> extract rotations -> build transform (also plug the P and scale into this).
Hope this makes sense.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
- nikmolson
- Member
- 54 posts
- Joined: Dec. 2011
- Offline
- Alejandro Echeverry
- Member
- 691 posts
- Joined: June 2006
- Offline
Nice Peter!!! Thank you!!
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
- anon_user_47126064
- Member
- 24 posts
- Joined: Feb. 2010
- Offline
- tricecold
- Member
- 260 posts
- Joined: July 2006
- Offline
+1
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
- depleteD
- Member
- 6 posts
- Joined:
- Offline
- johner
- Staff
- 823 posts
- Joined: July 2006
- Offline
As of 12.5, the Transform Pieces SOP will do exactly this transformation.
http://www.sidefx.com/docs/houdini13.0/nodes/sop/xformpieces [sidefx.com]
http://www.sidefx.com/docs/houdini13.0/nodes/sop/xformpieces [sidefx.com]
- tricecold
- Member
- 260 posts
- Joined: July 2006
- Offline
johner
As of 12.5, the Transform Pieces SOP will do exactly this transformation.
http://www.sidefx.com/docs/houdini13.0/nodes/sop/xformpieces [sidefx.com]
yay, thnx man, everything just got a lot easier.
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
- Netvudu
- Member
- 304 posts
- Joined: May 2006
- Offline
- johner
- Staff
- 823 posts
- Joined: July 2006
- Offline
Netvudu
I think this kind of solutions should be more prominently mentioned. I know this node skipped under my radar for almost a year
Fair point. I've attached a simple example of transforming hi-res fractured geo from a low-res RBD simulation. This will be an example for the Transform Pieces help for tomorrow's build.
By the way, Transform Pieces actually shows up in the Point Replicate SOP: all the points are created and sampled at the origin then transformed by the template points using Transform Pieces. POP Replicate is also based on Point Replicate, so Transform Pieces gets a fair bit of use, just somewhat hidden.
-
- Quick Links