Hello and thanks again for your replies!
I think I might have come up with something close to a solution for my problem. Again, I first want to get more control over how the first bone in my bicep twist setup twists, then take care of the remaining twistbones. (lots of twists for one sentence ;))
With a normal setup where I try to eliminate the twist of the first twistbone (by for example connecting the Y and Z rotations to the driving UpArm bone and leaving the x blank etc.) I get a flip when the system either rotates 90° from the TPose to the front/back OR up/down, which is of course sogical as we hit gimbal lock. BUT, you might want to have your characters Arms swing down a bit more than just straight down or front, and if your bone flips 180° at that moment it might look really weird.
I’ve tried and tried to get around that by using set driven Keys, or expressions that, based on the UpperArm joints rotation would do something to the first twistbone but nothing worked … of course, because i was relying on the rotations, which get sort of unpredictable when I hit gimbal lock.
Now what if I didn’t rely on rotations at all for the joints twist?
So I’ve come up with this partial solution(which is probably nothing new and far from perfect, but I didn’t think of it before and i though maybe it would be a nice starting point for people with the same problem) :
I create 2 locators at the position of my bone and freeze their rotations. One of them ( loc_Aim ) I move down the arm (like to the elbow) and parent constrain it to the UpperArm, the other one I move slightly up. Then I Aim Constraint the first twistbone to the loc_Aim ans use the other one ( loc_UpNode ) as upnode.
This gives me a system that works alright, but flips around the y axis if aiming straight up or down.
Now, to prevent that I looked at how I want my joint to be oriented at different Arm poses. Here comes the tricky part I haven’t cleaned up yet, as i might try to work some conditions in here to get nice and clean poses all the way. But for now I continued by writing an expression for the loc_upnode, that alters its x position relative to the loc_Aim’s position in Y (and again, that’s just a start).
This gives me relatively clean predictable results and the system flisp only when the arm would already stick deep in the body
i hope this makes senese somehow, I basically try to control the different stated of the joint, by looking at the quadrants the loc_Aim is in.
the expression I used is this:
[font=Courier New][size=1]loc_UpNode.translateX = loc_Aim.translateY* (-0.1)
I’m attaching the test file for you to check.
I’ll try and play around with that a bit more. Also, next on the list is getting something like your awesome spine (@ mberglund) in there, to prevent the rest of the twistbones from flipping.
Looking forward to your feedback,