Home Technical Talk

Maya: Custom Time Warp using an extra animation curve

polycounter lvl 19
Offline / Send Message
kodde polycounter lvl 19
Hey guys,

I had one of my students who wanted to make a "Matrix like" slow motion effect on an animation.

I encouraged the student to animate in regular speed and then later add the time warp effect. So i tried using the new Animate > Scene Time Warp feature. It works well but it alters everything in your Maya scene. So if you wanted a characters motion to be timed warped and frozen in time, you can't then animate a camera at this point since the cameras time will also be frozen.

There's a time warp effect you can apply on a character clip in the Trax editor that I'm aware of, but I wanted to see if there is another way.

Here's what I came up with this morning. Quite simple but it works.

My question is, when you want to connect this to loads of animation curves you'd have to make all the connections manually. Does anyone have a good solution or idea for this? Any other ideas besides Scene Time Warp and Trax Editor Time Warp that you know of?

Thanks.

customtimewarp.jpg

Replies

  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    So I found a improved solution. Still some manual tweaking but acceptable.

    This way the default time node is warped. So all your animations will be warped. What you do is create a new time node and use the "unwarpedTime" attribute from the"time1" node and connect that to the "outTime" attribute of the "time2" node.

    Then you have to manually connect the time2 to drive the animations you don't want warped. For a scenario where you have lots of motion and things going on and you want everything to be warped except for your render camera you only need to connect the time2 to this camera. A lot less work than my previous case where you had to connect the results to pretty much ALL animation curves except for the render camera.

    customtimewarp2.jpg
  • Warheart
    Options
    Offline / Send Message
    Warheart polycounter lvl 17
    I'd probably just script the connection process. You could do it based on selection or do it by passing an array of control names into a function (if you've got another way to get the array (e.g. via character set or selection set etc.).

    Then in the function just run through the attributes for each control, check whether there are input connections, check whether the input connection is an animation curve, if it's an animation curve then swap the time input connection for your warped time node.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    Warheart> Thanks.
    I had thought about a similar idea, but doing this is beyond my scripting knowledge. I could probably figure it out with some time and effort but I wanted a more simple solution to pass onto my students.

    My second post is quite easy and seems to work well for a scenario where you want to have a render cam without warp and rest of scene warped.
  • Warheart
    Options
    Offline / Send Message
    Warheart polycounter lvl 17
    Yep that's cool, didn't see your second post until I had posted. Looks like that solution works well for what you're doing. I was thinking of a scenario where you'd have a scene with a few characters and only one of them was going into bullet time. If it's hand animated then it'd probably be easier to just animate it like that but it might be useful if you were working with mocap.

    The script is probably simpler than you'd imagine, but yea giving a script to someone is usually a headache for them if they're not sure what they're doing.

    Kind of sounds like an interesting challenge though ^_^. I might give it a shot if I get a spare moment.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    Don't get me wrong.
    I'd love to learn how. I tackled MEL scripting a while back and I'm trying to get better at it every chance I get.

    The thing I like about having one curve to control a warp effect is, it's easy. Sure you could hand animate a warp effect. Then what if you want to tweak it, select all the curves involved and tweak all of them? Sounds like a hassle to me. The trax editor way is probably quite simple, but then you'd have to work with a character set and start creating clips and such.

    If you give the script a go then please do share ;)
  • jipe
    Options
    Offline / Send Message
    jipe polycounter lvl 17
    kodde wrote: »
    Sure you could hand animate a warp effect. Then what if you want to tweak it, select all the curves involved and tweak all of them? Sounds like a hassle to me.
    Oh, it's a total hassle. Animation :)

    But if you've animated something at 24 FPS and you're essentially slowing it down 5x, 10x, whatever, there's so much more fidelity to the motion that it's almost a waste not to keep hand-keying. The modeling equivalent would be subdividing a model several times and then not taking it into ZBrush -- it's a lot smoother, but you're missing out on the chance to get a higher level of detail. Imagine if you animate a boxer getting punched in the face and you want it to go into extreme slow-mo as his eyes shut and he falls backward. There's no way to get all the extra detail of his facial features rippling if you just use something like the Time Warp to stretch out existing curves.

    That said, I dig your method and it's definitely a quicker way to play around with curve timing (and you could always go back and stretch the curves yourself and animate on top). There are a few scripts out there, I think, that can go through a selection hierarchy and select all the animCurve nodes (everything with keyframes). You might be able to re-purpose those and use that array of selected animCurve nodes to attach the connections versus doing everything by hand.
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 19
    That's a good point jipe, concerning the fidelity. But I'm guessing this depends on what you want to do with the warp.
Sign In or Register to comment.