Jump to content
Sign in to follow this  
AntoineSfx

Parenting at geometry level

Recommended Posts

Hi,

I'm trying to make a parametric folding cube template. How can I achieve the equivalent of parenting (scene level) at the geometry level ?

My goal is to have 6 grids, one for each face of the cube, on a plane all next to each other (unfolded state),  set the parents accordingly, then set each pivot, and eventually the angles, to have a folding template. I did it earlier with multiple bends but it's tedious and not flexible at all.

Share this post


Link to post
Share on other sites

You can create custom matrix attribute for holding transformation, parentid attribute to handle link to your parent and with some loop iterate from bottom most child to topmost parent and cumulatively apply transformation. That would be exact approach you asked for. But I have to ask why not using transformation and parenting at obj level? You could have empty objects, just for storing transformation (and potentially parenting hierarchy if it is known) and use houdini's functions for transformation space change from one object to another if hierarchy evolve somehow during time.    

Share this post


Link to post
Share on other sites
On 18/11/2017 at 9:04 AM, djiki said:

You can create custom matrix attribute for holding transformation, parentid attribute to handle link to your parent and with some loop iterate from bottom most child to topmost parent and cumulatively apply transformation. That would be exact approach you asked for. But I have to ask why not using transformation and parenting at obj level? You could have empty objects, just for storing transformation (and potentially parenting hierarchy if it is known) and use houdini's functions for transformation space change from one object to another if hierarchy evolve somehow during time.    

I just wanted to know if something similar to parenting existed in the same way at geo level. Apparently not. So I guess I can certainly do it with a hierarchy of objects.

Share this post


Link to post
Share on other sites
On 11/19/2017 at 6:23 PM, AntoineSfx said:

I just wanted to know if something similar to parenting existed in the same way at geo level. Apparently not. So I guess I can certainly do it with a hierarchy of objects.

there is.
see attached file. the "optransform" vex function returns a 4x4 global matrix of an object.
then you just multiply your pointposiiton with that 4x4.
hope this helps?
Fuat

SOPParent.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×