Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1301873 Posts in 58014 Topics- by 49084 Members - Latest Member: K

June 25, 2017, 04:19:40 am

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTutorialsRange of Motion Tool in Maya
Pages: [1]
Print
Author Topic: Range of Motion Tool in Maya  (Read 172 times)
tiny_phoenix
Level 0
*


View Profile Email
« on: March 22, 2017, 02:16:31 pm »

Hello everyone!

We wanted to share a tool that one of our 3D Artist's , Wes, recently created while working on our game, Frank from Earth. We thought it would be a cool way to interact with everyone and also share a useful tool we believe some of you could benefit from when making your games. Here it is! Link is also below.

Scott

www.tinyphoenixgames.com/blog/range-motion-tool-maya


Hello everyone!  I'm Wesley Wilson with Tiny Phoenix and I want to talk a bit about a neat little tool I made for Maya using Python.  I call it the "Range of Motion" tool.  As for what it does, the name tells it all, really!  This tool makes a simple range of motion animation that allows quick feedback during skinning.  You select a joint from the selection menu showing all the joints in your scene and then you can set keyframes for the rotations and/or the translates to get an idea of how the mesh will deform around that joint.




This tool came about as a means to help speed up the skinning process.  I found myself needing to test rotate or translate joints to see how the skinning was affecting the vertices of a particular mesh.  This testing was overly complicated and involved deselecting the mesh, getting out of the weight painting tool I was using, and then selecting the joint I wanted to test with before rotating it or translating it.  During this testing, great care would need to be taken to prevent the joint's position or rotation from being altered, since that would obviously over complicate the skinning process and lead to problems later on down the rigging pipeline.  
 
The easier approach is to simply set keyframes on the joint, so you can easily get back to the beginning state since it's keyframed.  Simply set one for your beginning state, then advance some arbitrary amount of frames and either rotate or translate the joint how you would like before keying the joint again. You also don't need to deselect the mesh you are working with, or even get out of the weight painting tool you are using once the keyframes are set. Scrubbing the timeline will move the joints how you keyframed them with no workflow interruption.
 
The next improvement is to build a tool to place keyframes for you automatically.  And just like that, the Range of Motion tool is born!

The way the tool works is by keying the selected attribute's 3 channels (XY and Z) four times each. (1) It keys the starting value. (2) Then, it adds in the value you specified in the corresponding field, advances 5 frames, and sets a key on that channel. (3)  Next, it subtracts the value you specified in the field 2 times and advances another 10 frames before setting another key. (4) Finally, it goes back to the starting value and sets another key 5 frames after the last keyframe.  It repeats these steps for the other 2 channels for that attribute.  Crucially, it places the keyframes in a non-overlapping manner, so we can see better how the skinning reacts to being pulled in a single direction.




Here is the current working copy of the script for anyone to use or edit how they see fit.  To use it in Maya, just download the python file and open it in a new python tab in Maya's script editor.  Hit "Ctrl+A" to select all of the code, then drag it to the shelf.  Enjoy!

« Last Edit: March 22, 2017, 02:32:22 pm by tiny_phoenix » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic