AntoineSfx Posted November 14, 2017 Share Posted November 14, 2017 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. Quote Link to comment Share on other sites More sharing options...
djiki Posted November 18, 2017 Share Posted November 18, 2017 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. Quote Link to comment Share on other sites More sharing options...
julian johnson Posted November 18, 2017 Share Posted November 18, 2017 This is not particularly parametric, a template or procedural so probably useless! But here's a vex driven cube wrap using hierarchical matrices. Might be a little help... parenting_cube_example.hipnc 4 Quote Link to comment Share on other sites More sharing options...
AntoineSfx Posted November 19, 2017 Author Share Posted November 19, 2017 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. Quote Link to comment Share on other sites More sharing options...
fuat Posted November 24, 2017 Share Posted November 24, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.