Draw / Render group child layer into a different group at a specific depth

I’m looking for a solution to overcome the Z depth limitation for child layers of a group. I need to draw / render layer1 from Group B in Group A, over layer2 and below layer1 without being affected by Group A’s transformation. Confused? Yea me too.

Let me lay out a scenario: Animation if a " Knife game", sliding a knife between each finger

Group Hand_L (Z:0) (6 nested layers)

Wrist (subZ:0)
Finger1 (subZ:1)
Finger2 (subZ:2)
Finger3 (subZ:3)
Finger4 (subZ:4)
Thumb (subZ:5)

Group Arm_R(Z:1) (1 nested group)

Group Forarm (subZ:0) (1 nested group)

Group Hand (subZ:0) (1 nested group)

Group Knife (subZ:0)

Group Hand_L hast each finger and wrist, allowing the hand to be moved as a whole while allowing each finger to be moved interdependently relative to the hand.

Group Arm_R as several groups nested with each other to allow each to be rotated relative to its parent. Arm > Forarm > Hand > Knife

The goal is to draw / render the Knife in inbetween each finger layer, changing depth each pass. Also, transformation changes to Hand_L should not affect the position of the knife.

This sounds complex, but it really should be possible some how…

What I’ve tried so far, unsuccessfully…

  • Export Knife Layer canvas, create [Knife] group inside Hand_L>>>Results: Renders at correct height, BUT Hand_L’s origin and transformation values place the knife out of position/ rotation :frowning:

  • Change Z Depth >>> Results: LOL we all know that can’t work since Depth only affects layers in the same parent group, not other groups >_<

Does anyone have a suggestion?

Hi,

I understand what you’re trying to do. And the answer is: it’s not possible to do with your current scheme. As you said, the problem is that Synfig doesn’t have a “Global Z depth”, so child groups don’t know anything about their parents.

Some time ago I was trying to solve a similar issue and the only solution I’ve come up with was pretty cumbersome. Anyway, maybe it will be useful for you. First, we put ALL layers in one group called “HANDS” (see example) and then we make proper rotation joints with inheritance manually.

This is accomplished by “exporting” (https://wiki.synfig.org/Export) rotation of every possible parent and then connecting it to a “Rotate” layer with a proper offset.
Here is an example: HandZ.sif (86.4 KB)
It’s quickly made but should be sufficient to illustrate the technique. With this you can keep everything in one group and therefore properly manipulate Z depth.

But yeah, If there’s any way to accomplish some sort of “Global Z depth” in Synfig that would be cool. Although I have no idea how it could be implemented…