Cult of Rig : Season 00 Day 005 – Vectors

Note : There isn’t much breakdown on this, as you really need to watch it through and pay attention, enjoy!

Season 00 Day 005 Stream – Vectors

Math time! ( need more reference check our math resources for more )

“Day five: a crash course in vector math basics all the way to practical application, at which point a crash in input devices all the way to mouse click prevented actual practical application.

Minute 52 to 58 are largely pointless, once you get to 52m just skip ahead to this point in the video: https://youtu.be/1qSEKo_nWTQ?t=3448
Sadly as of two months ago YouTube doesn’t allow annotating any longer, so I can’t inline this in the video itself like you might have seen elsewhere.”

  • Why vectors? Problem with the rig right now is you can’t twist the rig as everything pivots from a diffrent location/offsets. That is normal but want to cover vectors before we get to the fixes.
  • Not a rotation issue – it is a translation issue ( the rotations are linked well but they don’t translate when rotated, the position is still added in world space, not the local space
    • Simple fix? add in some extra nodes under localWorld_srt – world2pedals_offset_srt and match that offset to the center of the wheel, then grab its world space in push it in to the pedals_M_staff_ctrl_srtBuffer

Why does this work?because there is a real transform node located at the correct place that is now rotated by the control.  This is fine but great, what about if we want to keep the rig in the node graph and not hiearchy hacking?

Intro to Maths

  • vectors
  • linear algebra
    • when you want to work on two numbers together like X and Y you use linear algebra
  • the meeting location of the 2 numbers (X,Y) gives you a direction aka 2d vector

In Maya you get a Vector (xyz) and a Point (xyzw)where the w is the length of travel down the vector until you hit the point location.

  • What can you do to the vectors?
    • Add the 2 of them them piece wise ( each value) per part X/Y/Z
    • Subtract them but remember order of operation matters to go in the correct direction along the vector
    • Multiply them
    • Vectors of length 1 (normalized or normal vector) and how the Pythagorean theorem works to find it.

 

Then Maya crashed and took the stream to QA 🙂 but the rest of this is in the next video and our next breakdown as you should watch next!

QA: Use case for this math stuff?

 

 

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

Cult of Rig : Season 00 Day004 – Nodelling the Components

Season 00 Day 004 – Nodelling the Components

Day 4, nodelling some components together and finally some amount of actual rigging

Continuing to build on the previous video with some updates to the core control shapes with better direction and selection and moved the model and nodes up from the world (this was done off screen due to crash recovery)

Myth: Having more than one shape node under a transform is a problem

Busted: You can have as many shapes as needed, the problem is that some scripts and tools assume there is only one shape node and or the shape node is the name of the transform+Shape. Write better tools.

 

Rigging up pedals:

  • Try to keep pivots clean, either world 000 or local in the position you need (put there by the buffer)
  • Rotate order for the pedal – make sure the driving axis is not influenced by the other two axis (like X in rotate order XYZ)
  • Build rig function in the graph and don’t relay on the hiearchy of nodes to make the rig work, use good graph connections so if there are changes in the hiearchy the rig function won’t break. (see rotate order comment previously ) need rotate order help check our infographic
  • Locking attributes are an interface issue not a “rig” issue, the rig shouldn’t break the actual functionality.

Make the pedals stay flat (oriented to the world) is the rigging goal (AKA anti-counter animation rig). Concept is rotation Data of the wheel control can be reversed and drive the pedal in order to have the rig do the counter animation.

Rigging Dojo Note:Raf starts talking about custom nodes vs. Maya default nodes and how connections like we are about to do cause Maya to create unitConversion nodes to deal with Angles and Radian conversions between connections. Rigging Dojo Alumnus Ryan Porter has release an open source set of angle nodes to help keep the graph clean
You can use the animBlendNodeAdditiveRotation node to do this without extra nodes or unit conversions to reverse the rotation if you need or want to to stay in vanilla Maya.

Connections:

  • rotationX -> input A and B of the animBlendNodeAdditiveRotation node then set the Weight B to -1 you now have zeroed out the rotation from the input.

Video 30:00

  • Notes on Left and Rig components (example is the left and right pedals) It all can still be thought of as a middle component
    • We asked about a shot need like a gag that animators need to counter rotate the arms like they broke.
      GREAT TIP!!! as long as it is for  a single shot fine to do a single one off

      “Don’t complicate anything you design you can preemptively address any case you can think of…. address the minimal requirements. as well you can and quickly as you can and let them find out what they like about the main use cases”

Rig the other side:

  • Duplicate the pedals_M_pedalLeft_ctrl_srtBuffer and name it Right
  • Move the buffer to translate the rig over to the right pedal location
  • At this point Raf hit a point where there were some bad issues with the rig because of so many connections going to one node that was effecting many areas…time to break up the connections
  • Under pedals_M_cmpnt  break up the deform output system
    • deform (create new nodes)
      • pedals_M_pole_srt
      • pedals_M_pedalLeft_srt
      • pedals_M_pedalRight_srt
    • These new deform nodes replace the quick connections done before so re-connect the incoming connections from the controls to the deform nodes and then back out to the mesh
      example:
      the pedals_M_pedalLEft_ctrl_srtBuffer ->addDoubleLinear to the new deform-pedal_m_pedalLeft_srt– and back to pedal_L_footRest_mesh
    • Continue for the pole and the Right pedal

 

 

Wheel hook up 58:00

Time to drive the wheel mesh with the control rig so follow the process for component hookups outlined so far and check out the video

  • need to create an pedals_M_cmpnt- output
    • create (staves_srt)
  • hook up the connections to drive the wheel and we need world transform as this is the master control or close to master:
    pedals_M_staff_ctrl-decomposeMatrix- staves_srt-(wheel_input)localWorld_srt-wheel_M_main_ctrl_srtBuffer

When you do “god” nodes or master nodes always add offsets to these controls as a safety backup. The offsets allow you to expose it to animators without creating a problem with trying to deal with Maya pivots.

godNode_M_cmpt

  • output
    • master_srt
  • control
    • godNode_M_master_ctrl_srtBuffer
      • godnode_M_master_Ctrl
        • godNode_M-masterOffset_ctrl

 

… This section gets a bit complex and hard to follow here in text, make sure you watch the video and build the nodes as you follow along

QA:

quality comes from Iterations, build a rig that you are not afraid to edit…building a robust and clean rig allows this.

Q: can you add an attribute to turn off the autocounter rotation on the pedals.

A: Adding an attribute to allow the effect to be turned off can create a bit of a cycle loop on the graph but it isn’t too bad, won’t cause a problem. Using a custom attribute “blend” to the pedals_m_sttaff_ctrl and feed it in to the multDoubleLinear value to change the multiplier.

 

 

NOTE: Thank you to the other TDs reading over our documents and catching problems, spelling or things we missed, it makes it better and we appreciate it.

 

 

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

Cult of Rig : Season 00 day 002 Components and Interfaces

 

season 00 day002 stream components, Interfaces

Day 2, components and interface first for encapsulation of components.

Components and interfaces:

  • Isolation of components
  • Few streams leading up to SIGGRAPH and first season will be after SIGGRAPH

First Principles

  • Encapsulation is one of the most important parts of object oriented programing and building interfaces.
    • Components require figuring out how they fit together or connect to each other
    • Public and Private concept
    • Interface First – think of how the users will interact with the content and design based on that.
  • Rig example: Wheel with spokes
    • In and out for each component
    • Contract or agreement for the component interface is that they will only connect from an Component Out to -> Component In
    • Animators don’t use “Maya” as much as they use the “Rig”, the rig is their Software (the public part of the component).
    • Component connections are a concern for the TD not the animators
  • Private area of the component would be anything that a tool or script manages and you don’t want people aware or messing with it… space switching systems for example

QA on an how to think about IK solver in a component

 

Maya Example 26:44

Example but not a hard and fast rule

  • wheel_M_cmpnt
    • input
      • localWorld_srt
    • output
      • wheel_srt
    • control [animation transform icon nurbs curve ]
      • wheel_M_main_ctrl_srtBuffer
        • wheel_M_main_ctrl
    • guide [ something to change the build + attributes to change settings ]
    • deform [joints, clusters]
      • wheel_M_wheel_srt ( node type is joint)

 

Don’t over build a component interface so for example a Master World node (god node) just needs an output

  • godNode_M_cmpt
    • output
      • master_srt
    • control
      • godNode_M_master_ctrl_srtBuffer
        • godNode_M_master_ctrl

 

Connections between Input and Output systems are done with direct connections vs. constraints. based loosely on the “contract” for our components as connections between them.

 

godNode_M_master_ctrl.worldMatrix-> decomposeMatrix-> godNode_M_cmpt |output|master_srt

… now we send godNode component output to wheel component input node

godNode_M_cmpt |output|master_srt -> wheel_M_cmpnt| input|localWorld_srt

now the wheel_M_cmpnt| input|localWorld_srt -> wheel_M_cmpnt| control |wheel_M_main_ctrl_srtBuffer

Rigging Dojo Note: This seems confusing at first but it simply creates a system of connections that is still based on the “contract” setup at the start that states each component will only connect to each other through OUTPUT and INPUT. In this way once you have a value coming into the components input then you can get that and send it to the animation control part of your component making sure the controls move together and stay zeroed.

When using decomposeMatrix or other nodes that sit between the two components they are or can be though of as  underworld node.
This means here that they are not part of components (you can use Maya Name Space Editor )  but you can to assign a nameSpace like “underworld” to keep track of those connecting nodes between components.

 

Now the final pass will be to send out the “deform” connection from the component to the wheel geo.

wheel_M_cmpnt| control|wheel_M_main_ctrl_srtBuffer|wheel_M_main_ctrl.worldMatrix   -> decomposeMatrix -> wheel_M_cmpnt|output|wheel_srt

Now we need to have the wheel control sending world transform from the component to a “joint” now in the system

wheel_M_main_ctrl.worldMatrix   -> decomposeMatrix -> wheel_M_cmpnt| deform|wheel_M_wheel_srt  (our deformation “Joint” )

Encourage the reusing our underworld decomposeMatrix node that is creating the component output and also sends over to the deformation part of our component.

Now our joint can direct connect to a transform node above the geometry or you could skin the mesh to the joint…etc…

 

Rigging Dojo Note: We hope the rough transcript outline and notes help new TDs dig into the great information and opportunity to learn from Raf.

 

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

 

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

Cult of Rig

This is going to be a must watch source so spread the word and show support and follow Raf on Twitter https://twitter.com/ThE_JacO

We have had Raf on our A.I.R video series and he showed us all a glimpse of how he thinks about rigging and performance, this new stream looks to be a PHD level of learning depth aimed at all skill levels.

“Join the Cult”

logo_inverted_small

Cult of Rig is a series about character rigging based on first principles, intended to show how to produce high performance, feature rich rigs from absolute scratch.

Everything needed will be covered on a per-need basis as we go, in a very accessible manner, with little technical know-how required to join; from mathematics to programming to how DCC software works under the hood, as well as anatomy and kinesiology (much) later on.”

Broadcast times: