multi parent constraint (maya like) ?

   806   4   1
User Avatar
Member
219 posts
Joined: March 2023
Offline
Hello there,

I've been trying to reproduce the maya's parent constraint for the last few week, and after suffering multiple failure and many hair loss, I had to give up, the kind of transformation required to achieve the same behavior, taking into account the euler angle from the parent's input while taking into account their own parent to compensate for the axis flip that would happen with using a simple slerp is beyong my math capability.

did anyone managed to reproduce that constraint before ? I feel like it a pretty important constraint to achieve a hell lot of rigging feature like more complex spine controller (with a mid controller following both start and end), and many other similar stuff like that.

if any of the sidefx's dev is working on it or planned to work on it, I would love to know if it can happen soon!
Head of Pipeline @ LightVFX
User Avatar
Member
448 posts
Joined: Aug. 2019
Offline
Could you elaborate how this constraint works for non-Maya people?
User Avatar
Member
219 posts
Joined: March 2023
Offline
well, it a constraint that is supposedly available in most DCC that have matured rigging toolset so it isn't just a maya thing.

the constraint can take any number of parents and a target, and will basically blend a parent/child constraint between all of them using a specific weight per parent.
this is beyong a simple 'slerp()' applied over all the xform of the parent, as it require calculation of the euler's angle of each parent to produce non flipping result that can rotate indefinitely. There is some limit when you start manipulating the parent of the parent that would produce flipping, but those would usually never be reached in a normal rig.

I attached a video demonstrating the constraint in maya, simplified in a 2D view for clarity.

for any rigger, this is an important constraint as it can help create controller that are dependant of two or more's parent for positionning, and create certain transformation behavior required for nice deformation ( for exemple : a spine ).

so far, every example provided by sidefx showcase spine where middle controller are directly attached to the pelvis or the chest, which produce odd looking spine deformation, this constraint can create amazing result when used for the middle controllers.
it also help in the creation of inbetween controller often used for tweaking.

I'm sure a professional rigger working on maya could give many more reason why this is probably a very important constraint to have.

Attachments:
007686_maya_okHPfbWpMS_2024-01-12_11-05-30.webm (4.7 MB)

Head of Pipeline @ LightVFX
User Avatar
Member
219 posts
Joined: March 2023
Offline
I believe, after 100+ hours of trying, 5 giving up, 10 'eureka', 30 disapointment, I may have figured out the algorithm, or at least a big chunk of it.

I really started to believe there no way in way I could have done it, but there is it !

since this is not something I wish for anybody to try to figure out by themselve, I will share the demo scene, but don't complain if you can't understand most of the code, I don't get most of what I did myself
normally, this should work with more than 2 parent, but I don't have the heart to try and see it fail.
I'm sure there is some scenario in which this specific algorithm will fail, but it seem good enough for the majority of the case, if anybody with a mathematic spirit want to give a look at the code and maybe propose better solution / tweak, I'll be happy to hear about it !

currently it pure vex for kinefx, but I already started working on an apex equivalent, which I will share once ready !

I hope a better version will eventually be made by sidefx themselve and implement officially, it such a usefull constraint.

Attachments:
parent_constraint_demo.hiplc (197.6 KB)
007689_houdini_NdG81ynuWO_2024-01-12_15-07-43.webm (4.8 MB)

Head of Pipeline @ LightVFX
User Avatar
Member
177 posts
Joined: Jan. 2014
Offline
Do you know any examples of the rig using it? Would be interesting to see. Maybe a YouTube video
I contribute to the beauty of this world
  • Quick Links