Tuesday 24 May 2016

Importing reference crashes my scene!

Just a quick one, but I feel as though someone out there is probably going to have a similar problem.

Let's say you have 2 animated 'things' in a scene, for example: a sword and a character.
Let's also say both of these things are referenced.
Let's ALSO say that the sword has a constraint coming from the characters hand.
Let's finally say you want to import the reference at some point.

Nooooope. Crash crash crash crash crash crash.

I didn't know why I was getting this issue for a while, but it turns out that the thing that was causing it was the mixing of constraints between two referenced objects. Best to bake out the keys you need and delete the constraint before importing!

Thursday 19 May 2016

Animation amplify/mute

I made another thingy!

So, you have an animation and you're reasonably happy with it but you wish one section was slightly more exaggerated, or maybe less so. You could go in and tweak every individual curve ooor...

...You could use my script! Download it here: AT_anim_amplifyMute

What the script does, is scales every selected curve up/down by a specified amount, using the mid-point (between the max min values of the selected curve range) as the pivot.

Here it is in action:



Tuesday 17 May 2016

More Unity Animation Mismatches

Yet again, another mysterious animation mismatch.
You have your animation in Maya, it's all set up how you want it, you export it, open it up in Unity and boom - something's out of line, mis-placed or rotated in the wrong way.

The problem that caused the issue for me this time round, were rotational values dipping from negative to positive. In the gif below, you can see the mismatch:

As you can see, the hand is rotated as intended in Maya, and yet when exported and brought into Unity, something is happening along the way.

The fix was to go into the graph editor and edit the rotate X value, so that it no longer crept up into the positive values. Interestingly, using the Curves>Euler fix button actually caused the issue for me this time round. Here, you can see the graph editor before and after:

Still not entirely sure what causes this, but it looks as though Mecanim has something to do with it, as when set to 'generic' mode, the issue no longer persists within Unity.

 Unity is a mysterious woman.