Categories
Blog Post rigtip tutorial video

Mocap Online – Motionbuilder UE4 Root Motion Animation Retargeting

Something that comes up often is dealing with hip vs root bone motion and having to either add or remove it to work with diffrent game engines or mix and match move sets. If you are a AAA team and have tech artists and experienced editors it is a challenge but if you are an independent game studio or a lone artist, this might simply be impossible as was the case for the people who reached out to us.

https://forums.autodesk.com/t5/motionbuilder-forum/working-with-root-translation-in-motionbuilder/m-p/7517630

I passed this on to Crispin and he worked up a great and clear tutorial on how to get motion ready for Cry Engine using their Motus Mocap online animations.

Click the image and check out the video on their blog post

 

Motionbuilder Tutorial - UE4 Root Motion Retargeting

 

A Motionbuilder tutorial discussing how to re-target animations from one character to another, and transfer the full Root motion correctly and accurately – even if there is a scale difference between the two rigs.

INDEX is below to jump directly to any section. The question came up on the Autodesk forums. Shout out to Brad Clark with Rigging Dojo, our friends at Crytek and CryEngine, and Epic and the Unreal Engine.
INDEX: 0:00 Introduction
01:49 Basics – Settings, Extensions, Constraints and Match Source
07:41 Plotting and Results
08:16 Scaling – Why do it and problematic results.
12:25 Some things are simpler than they first seem… Doh
13:40 Scaling – The Simple Fix and Results
17:00 Vertical Root Motion – Yes it works, an example.
19:57 Plot All Takes and Editing afterwards.

Rigging Dojo – http://www.riggingdojo.com
CryEngine – https://www.cryengine.com/
Unreal Engine – https://www.unrealengine.com

https://www.MocapOnline.com
http://www.MotusDigital.com

 

If you are needing more MotionBuilder training and help you can check out our other free tips and tutorials, dig in with our paid on-demand workshop or get custom studio training and consulting like Epic Games, EA and Sony have (contact us for information).

 

 

Categories
rigtip tutorial video

Skinning Rigtip for a little known tool

Move Weights tool, a little known tool that you should be using to make skinning easier and allow for added control in a pinch. TDs can use it to speed up skinning by copying good weighting to new joints for twist, like shoulders to a few new twist joints in the upper arm for example.

Mesh and Rig from 3dfiggins.com/Store/ AnimRig – Amazing Spiderman – Free Download

Rig free from 3dfiggins.com/Store/ that we used for this #rigTip video.

 

Categories
Blog Post rigtip tutorial

Cult of Rig : Season 00 Day 007 Matrix math rig clean-up

Season 00 Day 007 Stream – Cleaning the Components

“Day 7, we introduce matrix multiplication and then proceed to an uninterrupted stretch of rigging proper (yay!)
Lots of nodelling.”

 

What is the Matrix? 6:00 (video)

Raf hits some basics of the Matrix, the Matrix is the transform in Maya and describes what was required to move the object to where it is in space.

If you want to reverse the path of the object back to 0,0,0 this is the “inverse Matrix” will give you this path.

*order maters in how they are multiplied*  Similar to Rotate order

“Build a rig that you are not affrid to change the rig”

Implement the rig:

If the rig so far has been built correctly you can simply select all the “deform” nodes and graph them and cut the connections. (rig should stop updating the mesh after)

Don’t be afraid to detach chunks of your rig and re-hook up later.

Next hunt down any nodes that are in the connections but not named correctly

example:

  • pedals_M_cmpnt
    • input
      • localWorld_srt  updated to pedals_M_localWorld_srt
  • Control graphed and  “wheel_M_main_ctrl_wMtx_output_fNode2” gets updated to match what the in and out connections are “pedals_M_staffworldMtx_fNode”
  • Continue to clean the graph and make sure the IK FK blend works
    • Here you need to watch closely as Raf shows a fearless editing of the existing rig nodes to prep the rig.

Build a new attribute holder

  • Create new curve shape
    • pedals_M_settings_ctrl and parent it under the pedals_M_cmpnt-controls
    • It needs to move along with the rig
      • pedals_M_world3staff_offset_srt-> pedals_M_staffworldMTX_fNode-> pedals_M_settings_ctrl
  • Add custom attribute FKIK_switch  and pedals_gravityAligned

We had this working before but it gets disconnected and cleaned up

  • We were using the animBlendNode_AdditiveRotation weight to rotate the node to flip the value and also do the blend.
  • Make sure animBlendNode_AdditiveRotation.output -> pedals_M_pole_srt.rotation (this still works from our process before)
  • Few more cleanup passes on some of the  other unnamed nodes multMatrix1, decomposeMatrix2, vectorProduct3,angleBetween node, from pedals_M_world3staff_offset_srt.   pedals_M_localizedPEdal2staff_fNode, pedals_M_localizedPEdal2staff_mtx2srt, pedals_M_ikPedals_projectedAxis_fNode, pdeals_M_ikPedals_projectedAngle_fNode

“Don’t just copy what I do, become familiar build dexterity with the Node editor”

 

The next process is hooking up the logic for the connections, FKIK_switch out to Weight B on but the value needs to be flipped- Using Reverse node to flip the 0 to 1 should give us the weight swap.

 

FKIk_swtich to animBlendNode_AdditiveRotation.Weight A to finish the rig.

Next get multDoubleLinear node take FKIK switch attribute to its input 1 and set input 2 to -1 to flip the incoming value and hook it up to the animBlendNode_AdditiveRotation.Weight A .

Rename your nodes and clean up the graph on what you just created and hooked up.

Staves rigging:

  • wheel_M_main_ctrl_wMtx_output_fNode1.Translate -> staves_srt.Translate
  • animBlendNode_AdditiveRotation.rotate-> staves_srt.rotation
  • update name animBlendNode_AdditiveRotation  to pedals_M_FKIK_rotBlend_fNode

Continue clean up and end: (1:15:00)

Here Raf walks the graph and updates the names of the nodes to help make sure they make sense to the rig and do what they are doing, there are many changes here so take the time to watch this part of the video or clean up the rig names on your own.

 

 

Get involved:
Follow Raf on twitter for announcements and news
https://twitter.com/ThE_JacO
Follow the Streams live on Twitch
https://www.twitch.tv/cultofrig/
Subscribe and watch past broadcasts
Cult of Rig -YouTube
And keep up to date with news on the website
http://www.cultofrig.com

Categories
Blog Post rigtip

Cult of Rig : Season 00 Day 06 – Theory and Applied vectors, IK pedals

Season 00 Day 6 – Theory and Applied vectors, IK pedals

 

“More on vectors while we actually show some application, and eventually make it to hooking up the pedals’ geo to the IK pedals control in the niche of time”

“Day 6, crash course in vector math, sprinkle of matrix math, and finally, applying in Maya. IK pedals connected to the geometry in the niche of time.”

continuing from last video cult-rig-season-00-day-005-vectors

Quick catch up:

  • Shout out to animBlendNodeAdditiveRotation for angle connections without unitConvert nodes.
  • Pythagorean theorem reminder for dealing with vector length
  • |V| or ||V|| is how you might see will be an absolute length of a vector, if you read about vectors in math books
  • a unit vector is the vector compressed in to a 0 to 1 range
    if you want to scale it, normalize it first then * by value to scale it up to be longer.

How to do this with nodes: Vector scale and playing with vector math.

  • create a control transform group “pedal_ik_ctrl”
  • Add a cone polygon primitive
  • Connect the ik control to drive the cone
    • create the node vectorProduct
    • connect ik translate to node input and go output to the cone translate.
    • set the vectorProduct attribute normalize output this crates a “follow” that is limited to a range of 1 and set to “no operation” because we only want the value normalized.

How do we create the Math with only nodes?

  • interesting tip that comes up later: If you have two vectors and normalize them then do dotProduct you get the angle between them
  • Create a spherical constraint with just vector math(13:29)
    • ik ctrl node translate – vector Product-translate of target
    • To control the length is multiply the vectorProduct by a value with a multiplydivide node before the target translate.
    • If you want to lock this sphere to a single plane you need to set the axis in the mitiplyDivde node to zero.

Need to control this effect or build on.

  • dotProduct
    • ||a|| *||b||* cos  – if you have two normalized vectors multiplied by COS gives you an angle.
    • If your vectors are aligned (angle zero) the COS of that angle is going to be 1
      • ||b|| * COS  normalized gives you the magnitude(length) of the vector
  • So with out a “length node” in Maya we can use the vectorProduct node
    • pedal_ik_ctrl.translate out to vectorProduct 1 node (normalizing the value no operation) -out to vectorProduct 2nd node input 1
    • pedal_ik_ctrl.translate out to vectorProduct 2 node input 2 (with no normalizing set to dotProduct)
  • We get the result of the length of the vector
  • Condition node (if length of first vector in to “first term” ) is greater than 3 (then we want the reScaled vector from multiplyDivde node “second term” )
    multiplyDivide.output – Color if true.
    otherwise if the length is less than, use the pedal_ik_ctrl translate.
    Then take condition.out to the cone.translate.
  • This creates an “IK” like behavior by creating a limited range

RIGGING : Back to rigging the bike pedals

Raf now uses what he just worked through with the vectors to create the rigging. And updates the names of the nodes.

  • pedals_M_pedal_IK_ctrl_srtBuffer
    • pedals_M_pedal_IK_ctrl
  • pedals_M_pedal_IK_ctrl. translate->vectorProduct (no operation) – multipleyDivide

 

We want to have our pedals_M_pedal_ik_ctrl_srtBuffer end up in the same space as the the pedal_Mstaff_ctrl_srtBuffer + an offset

  1. parent pedals_M_pedal_IK_ctrl_srtBuffer under pedals_M_cmpnt-control
  2. world2Pedals_offset_srt->wheel_M_main_ctrl_wMtx_output_fNode2 -> pedals_M_pedal_IK_ctrl_srtBuffer
  3. create a new node staff2pedals_offset_srt that is a child of pedals_M_cmpnt- input- world2pedals_offset_srt (rename name to world2staff_offset_srt )
  4. staff2pedals_offset_srt world matrix out- to new decomposeMatrix node wheel_M_main_ctrl_wMtx_output_fNode3- srt out to pedals_M_pedal_IK_ctrl_srtBuffer

Now the IK control starts in the same place as the FK

Raf does something interesting here to drive the control points on the shape for the pedal inverse of the transform to create a visual link 

At this point Raf also digs in to Matrix math (1:00hr) to setup the information needed to create context to the nodes and rigging that he needs to do to make the IK buffer work in the rig.

*Maya uses row matrices, reading top to bottom across the matrix

1,0,0,0 x
0,1,0,0 y
0,0,1,0 z
0,0,0,1 (w) displacement from world 0,0,0

Continue the rig

  • world2staff_offset_srt
  • pedals_M_peal_IK_ctrl

New node time ( multiplyMatrix )

Take the inverse matrix from world2staff_offset_srt ->multMatrix.Matrix In[2]

and pedals_M_peal_IK_ctrl.worldMatrix to ->multMatrix.Matrix In[1]

Now decompose the multMatrix output  and drive a sphere for visualize the output of the offset we now need in order to drive our pedals.

delete it and create a cone.

parent the code under the world2staff_offset_srt for visualization of the pivot.

  • multMatrix-decompose->and attach it to the translate/rotate to check that your offset goes to the pedal location.

But we need rotations, not translate

  • create vectorProduct and set it to no operation
  • Dot product can give you both projection and angle of the vector.
  • New node (angle between)
    • multMatrix-decompose-Y and Z in to the angle between vector Y.Z and then angle.euler out to the cone to show rotation. of only Y and Z, keeping X from solving and creating a flat plane of rotation
    • To invert the value push the Euler out to animBlendnodeAdditiveRotation and – the weight so you can get the rotation angle in the direction you need.
    •  To do the final rig hook up between the IK and FK  using the existing animBlendnodeAdditiveRotation  node, take and pedals_M_staff_Ctrl (our fk rig) .Rotate  into  animBlendnodeAdditiveRotation.inputb
    • then animBlendnodeAdditiveRotation.Output – to Deform-pedals_M_pole_srt
  • Now the weight value on the animBlend node will mix between the IK or FK rig system.

 

What does this give us?

  1. A rig that doesn’t depend on hierarchy
  2. no relationships with layers of constraints because the rigging is managed with pure math and in the DG not in the hiearchy.
  3. A deeper understanding of what Maya is managing behind the scenes when you are doing constraints and parents etc in the DAG.

 

 

Get involved:
Follow Raf on twitter for announcements and news
https://twitter.com/ThE_JacO
Follow the Streams live on Twitch
https://www.twitch.tv/cultofrig/
Subscribe and watch past broadcasts
Cult of Rig -YouTube
And keep up to date with news on the website
http://www.cultofrig.com

 

Categories
Blog Post rigtip video

Cult of Rig : Season 00 day 001 Naming and Components

season 00 day001 stream – namingAndComps

What the first Season will be about:

  • Show was inspired by HandMade Hero format
  • Few streams leading up to SIGGRAPH and first season will be after SIGGRAPH
  • New rig every season getting more complex
    • Season 1 will be rigging  a Unicycle in Vanilla out of box Maya
    • How to organize the rig
  • Performance is a big part of this “The absolute #1 important thing in a rig”
    • Check out what can be a bottleneck
    • If we hit a node we are missing we will write it
  • Escalation of concepts- not just a button combo of clicks and “named” technique taught as if they were something special. Learning the maths and ideas and design of a rig
  • Start with the simple rig needs and as we hit something like algebra or a need for vectors, we will dig into them piecemeal.

First Principles “8:00”

  • Rig by first principles – something you assume to be true and base your thinking on.
  • Have to be simple and bullet proof basic building blocks.
  • Nothing should drop the performance of a rig unless necessary. (feature vs. performance)
  • Great ideas that are slow don’t get adopted (clunky demos) so make them fast

Rig organization – Naming Conventions

  • Not a matter of opinion (despite your opinion of them 🙂  but don’t follow along blind, explore your own and try it out
  • First principles of naming
    • Names will be strings
    • Facts about strings
      • CPU string processing is slow
      • No long tokens at start of string (token discrete element or name)
        • component_side_ etc_extension or type
        • Note: “Type” is what it should be used for not just what it is “loc” example , DON’T DO THIS
        • Instead the “Type” is what the node is doing, not what it is – examples – “hrc” (hierarchy separator or spacer ) “srt” (scale rotate translate) “srtBuffer” (aka zero or offset or pivot)”leg_R_something_srt”We will look at Apps Hungarian notation as reference
      • Edges of the string are fast to get to in code
        • First block “leg” will be fastest part of string compare
        • End block is second fastest, “FK” checking the string
        • block length doesn’t matter, doesn’t have to be 3 char for example.
      • Capitalization  use  “lowerCamelCase”
      • _L_ _M_ _R_  vs. _Lf_ _Rt_ _Md_  etc.. doesn’t matter really it just depends on how you want to do it and how many things you have to describe, what do you do if you have more than just left and right?
      • Name spaces vs. separators? Need to use Name spaces to fully get use out of Maya but the problem is that the tools to deal with them are or can be buggy.
      • NAME shouldn’t have any effect on what happens to the node or what the node actually does on the back end.
      • NAME should be able to made sense of if you have to work through the rig during trouble shooting or tracking down a bug.
      • Context Matters (hiearchy + name) can help make sure you know what the nodes are doing.
      • Remember the name is also for the animators and a good naming convention will help them know what they have selected and what they do and how much space they take up in the graph editor outliner so understand when and where to be flexible.
      • Question – What about fingers or spine Numbering?
        • “hand_L_[finger01_knuckle]_srt or fingerKnuckle_L but more of this will be covered in the next video talking about how to break the rig in to components

Rigging Dojo note: “There is an argument for not putting a buffer node above controls that will be in world space” I will disagree here because of how many cases where having animation be relative to a transform node and not the world is such a great thing,  that we will recommend you buffer any animation control nodes. You could argue that you can always move the data to be relative and bake the animation it back out to world but that is a time cost that isn’t worth it.

Rig organization – MetaData 59:00

  • Names can act as redundant work but don’t replace or should be used as MetaData
  • Have as much redundancy that doesn’t cost performance as possible.
  • MetaData can be a source of problems or get broken, causing TD to have to troubleshoot by hand or repair from the name but name isn’t only source.

Intro to components:

  • For you to organize the rig
    Example: Bike
    Wheel + Fork/frame + pedals
  • Help with evaluation of graph not just pure visual
    • What order do you want the components to drive each other
      • Pedals drive wheel?
      • Frame moves Wheel and updates pedals?

Rigging Dojo note: “Raf digs in to some examples on circular logic but the core concept is good component design allows for more flexibility in changing relationships AKA having easy space switching or layers of drivers that don’t break.
Picking what and when is in charge like a multi way constraints
Raf hits a point where he gets to the point of why and what he really means with not labeling techniques like “Broken Hierarchy” or “Flat Hierarchy”  He doesn’t have formal names for this part due to the existing names not being clear so he would call a “Flat or a non-hiearchy” a WIDE vs. DEEP hiearchy.   It can’t be a hiearchy if it is flat and it isn’t Broken hiearchy because it works and it isn’t a hiearchy either. We Actually agree here that being stuck on the  names for things and not being mindful of or creating meaningful ideas of what is really there “seeing the rig” vs. getting stuck on a technique name.

Wrap up QA

 

Get involved:
Follow me on twitter for announcements and news
https://twitter.com/ThE_JacO
Follow the Streams live on Twitch
https://www.twitch.tv/cultofrig/
And keep up to date with news on the website
http://www.cultofrig.com