Guest Post : Evan Cox MotionBuilder Gotcha’s

In our previous blog post ( http://www.riggingDojo.com/2017/03/22/custom-studio-training-volition-agents-mayhem/) We talked about our custom studio training with MotionBuilder and how our alumnus Evan Cox was hired on to be their MotionBuilder Tech artist. In this post Evan has a few tips and tricks and gotchas to share with you. These are a start and we hope to bring you a few more deeper explorations of his solutions and tools in the next few months.

And now from Evan…

After nearly 3 years of MotionBuilder in both preproduction & full blown production, my team has collected a hefty list of Mobu’s kinks & quirks. Some of these we have solutions/wrappers for, others we are actively working through, and some we’ve brought up to the powers at be.

General Gotcha’s

Camera “roll” is a separate property, not part of the camera’s rotation matrix.

A camera can be animated with rotation in X Y & Z and then another property "Roll" can be animated, which doesn't update the XYZ rotations of the camera.
At first glance, you may be looking at a camera and seeing rotation, but not seeing the rotation matrix change. This can be very confusing! Always check the Roll property to see if it's animated before investigating camera rotation issues.

Script/process failures are not always obvious. Can lead to artists working in broken scenes without knowing about it!

Maya and Max have handy little status bars at the bottom left of the interface that turn red/yellow/pink if processes fail and are reported in their respective script editors. MotionBuilder does not have one of these, so your artists may not always know when things break!
We've implemented a system at Volition where FBHUD objects are generated with red text in the viewport that notify users of errors in their scenes. This is hooked into the traceback/exception handler and is surprisingly easy to setup! Post about that coming in hot, so be prepared.
Careful about cleaning this up tho!

Watch out for hidden properties

Watch out for "hidden" properties that don't appear in the Properties pane as well as watch out for interactions between .Show and .Visibility E.G. creating a FBLight via scripting will instantiate a light, but it won't appear in the 3d view. You can even select it and inspect its 'Visibility' property in the Properties pane to see that it defaults to True, yet it isn't in the 3d view until you set its "Show" to True also…which doesn't appear for the light be default in the Properties pane by default.

Do you have story mode active when you don’t mean to?

You might be tempted to use anim layers while in story mode, doesn’t work. Use subtracks.

Constraints cannot be added to story tracks.

At Volition, we utilize the FBCharacterFace constraint for our face animation. Unfortunately, it's treated as a constraint in MotionBuilder and thus cannot be added directly to a story track.
To get around this issue, instead of animating the object directly, all animation is stored on a proxy FBModelNull. Using a FBConstraintRelation we then send the data to the FBCharacterFace.
A simpler way, and if not for some quirks of out pipeline, would be to add the animatable properties on the FBCharacterFace to the story track by way of a FBCharacterExtension. Got a property you want to animate/represent in story mode? Add it to the extension!

Config files can get corrupted easily. If Mobu crashes on startup, delete them and Mobu will automatically create default files.

Config files meaning window layout files, keyboard shortcut presets etc
Do not delete binary files.
*This may be a problem localized to Volition as we edit those on start up occasionally with new settings.

Python Gotcha’s

Pyfsdk

pyfbsdk does not like unicode strings.

If a string you're working on setting is failing or you get a TypeError, try recasting the string. str() is your friend.

There are numerous blog posts about deleting objects in Mobu ( one of which was my own ). It's a tricky issue, but hopefully the code example above will help you out in stabilizing that portion of your workflow.

Relation constraints are great but are limited in exposure and can be tricky to set up. Use a serializer to write one for you. Expect another post about this soon as this topic is worthy of its own story.

Be sure to clean up/disconnected HUD objects from cameras while deleting them. Not doing so can cause Mobu to crash.

We've run into this problem a lot in creating interactive interfaces for face animation tools, custom property sliders etc. It's tempting to just evaluate the whole scene to be sure all the data is valid and up to date. However, this can cause playback issues or worse, crashes.
Check out the gotcha gist for an example of how to solve.