Showing posts with label Animation. Show all posts
Showing posts with label Animation. Show all posts

Wednesday, September 10, 2014

Lost Animation - part?? 3 ??





So this stupid bloody bug is still showing up in Maya, animation reloading in T-pose, all the animCurves still in the scene but Maya failing to reconnect the data on file load.

We've debugged this so many times in the last 10years I've lost count and yet it still pops up. So I've added more in-depth support for the fix methods in the Red9 Studio Pack.

There's now a new UI that opens up, this has 2 base methods.

Method 1: You're running character sets and referencing, Maya has failed to connect the data up BUT left the animCurves connected to the ReferenceNode.

Method 2: Maya has had a full blown fuck fest and left you with no hint to what data goes where. This method uses the names of the selected objects, and their animatable channels, then looks for all animCurves that may match.

Two flags, StripNamespaces.... does just that, removes the namespaces of the node before doing the curve match (curves are usually in root namespace). StripMergedLayerData, allows for the additional 'Merged_Layer_inputB' naming that animLayers use.

Hopefully that'll save somebodies life, I've had so many emails over these fixes over the last few years it's ridiculous

thanks

Mark

Wednesday, November 20, 2013

BUG: keyframe cmd with option flag

import maya.cmds as cmds
cube=cmds.polyCube()[0]
cmds.setKeyframe(cube,t=[0,8,25])
cmds.keyframe('%s_visibility' % cube, edit=True, r=True, timeChange=5, time=(0,8), option = "insert")

I'm trying to add to the Red9 animTools and want to be able to offset an entire hierarchies animations in one go, this is already supported however I want to add the ability of specifying a timeRange. Imaging you have a huge chunk of anim data and want to shift a section of it for a character by 10 frames. Currently shifting keys in the timeline won't ripple, it uses the segmentOver and causes a mess. Also you need to have all the objects selected when doing it and there's no numeric input. So I want to add it to the offestTime code.

This is all up and running except I've hit another crash bug, 100% repeatable crash and it boils down to the 'option' flag as used above. Give it a go, boom. Now I accept that in this case the sparse keys are an issue, but really the code should catch this.

cheers

Mark

Monday, October 7, 2013

Lost Animation Part3 !!

Well it seems this bug is very much still in Maya 2013 and for some reason we seem to be hitting it with more frequency at work. For those of you not aware this it's a bug where the referenceEdits in Maya don't get reconstructed correctly and you end up opening Maya scenes with characters in T-pose and all the anim data thrown back to the referenceNode.

Now over the years I've posted 2 options for reconnecting this data and had SOOO many emails about it, but now that we all run animLayers reconstructing this lost data is a damn sight harder. I'm just wondering if anybody else out there had any ideas of why animation keeps disconnecting itself from referenced rigs with chSets. I've been working past this bug for nearly 7 years now and thought it was quashed!

 Back to Autodesk I guess.

 Mark

Thursday, September 6, 2012

Lost Animation - Part2!

God how many times have I been asked for this since posting the 'Lost Animation' thread nearly a year ago now. So here's a complete and utter dirty hack for those who have requested it. Unlike the other fix code this is completely blind. You select the controllers that are no longer connected to the animation data that they should be, and this, in an ideal world, will reconnect the required animCurves for you.

There are a few HUGE expectations here, mainly that the scene is clean and that the animCurves are still consistently named against the channel they were keyed against. As I said, this is a hack but it seems to be what a lot of people are in need of.

So the expectation is that an attr on a controller called NameSpace:L_Foot.translateX should be connected to NameSpace:L_Foot_translateX, or L_Foot_translateX depending on the flag stripNamespace thats in the code.

As I said, this is a really quick hack, but I figured what the hell. Oh and if the data went through AnimLayers....sorry, you're stuffed!

Mark

import maya.cmds as cmds
nodes=cmds.ls(sl=True,l=True)
chns=[]

#Change this to False if the curves are not in the rootNamespace but
#in the sameNamespace as the controllers.
stripNamespace=True

#build up the main lists
animCurves=cmds.ls(type='animCurve',s=True)
[chns.extend(cmds.listAnimatable(node)) for node in nodes]    
    
for chn in chns:
    if stripNamespace:
        animCurveExpected=chn.split(':')[-1].split('|')[-1].replace('.','_')
    else:
        animCurveExpected=chn.split('|')[-1].replace('.','_')
    if animCurveExpected in animCurves:
        if not cmds.isConnected('%s.output' % animCurveExpected,chn):
            print '%s >> %s' % (animCurveExpected,chn)
            cmds.connectAttr('%s.output' % animCurveExpected,chn,force=True)

Tuesday, April 10, 2012

Taking Animations from 2012 back to 2011

AutoTangent type:

  This is something we discovered last week, to be honest I should have figured it before but as a lot of the data passing between 2012 and 2011 at the studio is baked MoCap nobody spotted this issue. 

The problem is the new 'AutoTangent' type in Maya 2012. So lets say you start animating in 2012 but need to pass that data back to somebody running 2011. We already know Maya binaries between the two are incompatible, so you save and an Ascii file and that works. The issue is that by default in Maya2012 the tangent type is set in the prefs as the new 'AutoTangent'. Now this is great and to be honest a big improvement over the standard spline tangents. BUT.... Maya 2011 doesn't know anything about it. The key data still loads up, but the tangent types of each keyframe in2011 remain unset which means any interpolation between keys you did in 2012 is now screwed! 




 If you intend to do this, go from 2012 back to 2011 DO NOT use AutoTangent when keying.

Friday, March 23, 2012

Trax Blending, finally the Tech Preview is out

At last, Cory's just posted the Trax Blending tech preview up here, something I've been working with the Maya dev team on for the last 6 months or so.

http://area.autodesk.com/blogs/cory/maya_trax_blending_technology_preview

I might follow this up with a few more examples over the next few weeks. Basically it allows you to properly redirect animation data and complex rigs in the Trax, lining motion up using the ghosts, kind of taken tech from MotionBuilder. We've been testing this on raw MoCap data and Rigged data, only been begging for the guys to do this for 7years! :)  Theres also an automated match function, you select the offset node from the data and hit the match, it'll take the first and last frames from 2 clips and line the general motion up based on those.

Tuesday, July 6, 2010

Maya Animation Layers

I've just spend the last few days moaning at the Animation Layer setups and how poor the merge functionality is in Maya. We had a cutscene here that was 4000frms of baked MoCap, 3 animLayers, which took 40 minutes to merge on a 64bit beast of a machine. I can't understand why Autodesk are running the standard Bake command when it's so slow over large timelines.

Answer, by-pass it and use Trax. Ended up writing a function that would take all the nodes in each layer and generate a clip with the animData in it. So for the above case we end up with 3 clips. Now the Trax merge is FAST. The results meant that the same bake process going via this method went from 40 minutes, to 20 secs :)

And people diss Trax! It may be a little excentric, and lacking in features, but at least it's fast and clean.