best way to fmod a value ona controller?


#1

Hey everyone,

I have wracked my brain at a problem I am having. Essentially, I have a character with a shoulder pad and I want it to automatically move certain translation and rotate values depending on how the shoulder/clavicle moves.

So I am using a bunch of network nodes feeding off, for example, the shoulder joint’s rotate Z value. This all works fine, but through the course of the characters animations, the gimbal of the character means that the shoulder pad is way off once it goes past 360 degrees on an axis.

Because it is an IK/FK switching arm, it needs to get the value from the joint. I have currently got a fmod script that will ‘normalise’ the rotation values to within 360, and this is working fine, however its useless on a practical level as the user has to update the timeline before the script updates.

And I have been unable to identify a network node that will do the fmod function.

However, surely this is a somewhat common issue for medium to advance level rigs, so there must be a solution which I can’t figure out. Does anyone here have any recommendations?

Thanks in advance, any help is greatly appreciated.


#2

you need to use an expression , or code by yourself an fmod-node :slight_smile: same with sinus or cosinus or any other math-operations you want to use :slight_smile:


#3

Ha, thanks for your help mate.

I’m afraid that might be a bit out of my current depth (and job title), but thanks for your feedback, I might have to start looking into all that if my career turns more technically oriented.

In the end I was able to write the expression to update in real time, and although it can still easily break (especially in IK), for the most part what I have is working, and I have also been able have an off switch for this automatic movement for animations where its a problem. This is obviously a filthy solution, but for now and with no wiser minds to learn from at work, that’s about the level I am at right now.

So essentially, the only way to solve issues like these is to understand the maths behind gimbals, and manually code solutions for gimbal issues such as these? Is this something a professional rigger would need to learn and really understand in order to do semi-robust rigs?


#4

yeah , expression is the easiest way , to do fmod in rigging . programming your own nodes needs some basic understanding in python-programming , and on the other side , you then need to install the plugin on every workstation and so on …


any “midlevel”-experienced rigger usually knows about the gimbal-lock-problem , and how to eventually handle these issues on a shot-by-shot basis ( as usually you will have one basic character-rig , which is flexible in terms of “rotation orders” ) - there are two different main approaches for dealing with this issue - 1. use additional rotation-attributes , to “pre-rotate” the group , which is the “null”-parent-group of your control . 2. directly give the paren a controlShape , which can be then turned-visible , once a gimbal occurs . usually this is done on the upperArm-FK controls and the IK-wrists . but well , for any sort of beginner-rigs , this is not so important , and could also be implemented later on , once needed . much more of importance is the basic structure of the rigs.

  • joints ( especially learn about “jointorientation” )
  • controls ( usually you put each control curve into an empty-group , which is at the same position , so the controls will have zero translations and rotations )
  • connections ( all the IK-handles and connections and so on )

most professional animators use the “gimble-mode” when it comes to “rotating objects”. so that way , they can quite easily see , if there are 2 of the rotation-axes lining up , so the third rotation-axis gets blocked. ( that’s what is causing the gimbal lock normally )


for most operations on most of the controls , switching the rotateOrder of your controls is sufficient , once the rest of the rig is stable . and once you need the character in a special-pose in a certainshot , you can switch the rotateOrder for the affected controls .


#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.