<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sol Brennan on Medium]]></title>
        <description><![CDATA[Stories by Sol Brennan on Medium]]></description>
        <link>https://medium.com/@sol-g-brennan?source=rss-fed6bb5378------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*s1hRqP9-KBHd15QJO21C9Q.jpeg</url>
            <title>Stories by Sol Brennan on Medium</title>
            <link>https://medium.com/@sol-g-brennan?source=rss-fed6bb5378------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:38:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sol-g-brennan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Rigging Tip: Driving your Deformations (primarily for Games)]]></title>
            <link>https://sol-g-brennan.medium.com/rigging-tip-driving-your-deformations-primarily-for-games-9265a38492b5?source=rss-fed6bb5378------2</link>
            <guid isPermaLink="false">https://medium.com/p/9265a38492b5</guid>
            <category><![CDATA[maya]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[video-games-industry]]></category>
            <category><![CDATA[rigging]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Sol Brennan]]></dc:creator>
            <pubDate>Fri, 11 Jun 2021 21:35:46 GMT</pubDate>
            <atom:updated>2021-06-11T21:35:46.769Z</atom:updated>
            <content:encoded><![CDATA[<p>So in the article <a href="https://medium.com/@sol.g.brennan/rigging-tips-methods-for-extra-character-deformation-in-game-dev-e4c0e89e7b00">Rigging Tips: Methods for Extra Character Deformation (in Game Dev)</a>, I spoke about when to use blendshapes versus helper joints? Now that we have an understanding of that, let’s talk about how we can drive these attributes.</p><p><em>Please note I will only detail Maya-centric solutions as this is most common within the professional industry and I don’t really have the experience and authority to speak about other programs. A lot of these concepts can be applied in to other programs and hopefully will be of some help even if you are not using Maya.</em></p><p>When we talk about ‘<em>driving your deformations</em>’- what do I mean? In this, I’m talking about getting one or more values, to drive one or more other values. To create a relationship between two sets of numbers — whether they be translation, rotations, simple floats or complex matrices. All we need to focus on when creating these relationships are — what is the data I’m controlling, and what am I hoping to drive? Where you build this into your setup — on the rig, the bones directly, another rig that plugs in or additional logic that is housed outside of it, within a plugin or perhaps even real-time in engine — should be tailored to what you care about. Is it performance? Reusability? Flexibility? Ease of use? Simple to access? This is all down to your preference and needs for your project, your content and your workflow and tools.</p><p>I will discuss some of the most commonly seen methods easily available and often used, specifically within my area of expertise — video games.</p><h3>SDKS</h3><p>Helper joints have often traditionally been driven by system like Maya’s SDKs. SDK stands for <em>‘Set Driven Keys’</em> — as it is named within Maya itself. So what are SDKs? They’re a way to have an arbitrary value control (or drive) another value/s with an <em>animation curve. </em>These can be found relatively hidden within the Animation &gt; Key &gt; Set Driven Key &gt; Set… (click the box to get the UI).</p><figure><img alt="A looping gif showing the Maya user interface. There is a blue cube moving to the right with the word ‘Driver’ written on it. Next to it, on the right, is a green cube with the word ‘Driven’ written on it. As the blue cube moves right, the green cube moves up. At the bottom of the screen, you can see Maya’s Curve Editor open and a smoothed curve onscreen. The playback bar can be seen progressing linearly across the screen from left to right." src="https://cdn-images-1.medium.com/max/892/1*6rRb6TrQ9ObxFh4njpfb9Q.gif" /><figcaption>The animation curve on the bottom is driving the green cube. As the Driver object moves in +Z, the Driven moves up in +Y.</figcaption></figure><p>The important distinction to make here is that the animation curve is driving properties real-time in the viewport and doesn’t require any change of <em>time</em>, but rather a change of a <em>value </em>being evaluated in Maya. SDKs are just ONE implementation of a technique like this in Maya. You can technically drive any value by another — this could be controlled by a node graph node (like remap, a multiplier, or various other means). The power of the animation curve is that the motion can be keyed and customised — which can be quite powerful if you want to control the way your attributes are driven. Not only that, but it is method of driving that is understood by animators — so if you expose it you can have animators edit the curve to their satisfaction (if they’re savvy enough to understand SDKs and their disconnect to time).</p><p>Typically, when it comes to SDKs — setup usually consists of selecting what you are driving, setting the initial key on it (with the UI!) and whatever it’s driving (can be multiple objects/channels) and then for every bit of movement, stopping and doing the same process. This has flaws however. If you are dealing in translations only — SDKS are pretty easy and useful to use. Rotation driving or being driven will result in Euler pops or <a href="https://www.youtube.com/watch?v=zc8b2Jo7mno">gimbal lock</a> (a video like this will explain it much better than I can!). Not ideal. In this case, you’ll want to add additional logic, using aim constraints or some other vector calculations than drive the rotations instead to reduce that. Scale get even trickier — because the base value for scale is 1, not 0. Therefore, additional SKDs on scale can be negative curves and can be very difficult to read and parse after setting them (if you want to edit them perhaps). When driving simple things, SDKs can work well — the more complicated a setup gets — the more difficult it becomes to manage SDKs and at this point you might need a tool to manage to curves (as Maya’s default editor is not very in-depth or useful past the initial setting of keys). Notoriously, it can clog up the Curve Editor if not sufficiently removed from animator controls, and makes Curve Editor a nightmare to read if you are editing them within the interface.</p><p>On top of that, SDKs can be a slow, outdated and rather cumbersome way of driving attributes. When Maya constructs these, it creates a whole bunch of nodes with each key, compounded by blending nodes when there is more than one SDK driving a control.</p><figure><img alt="A screenshot of Maya’s node editor showing a single node inputting into a middle node, then out to another single node." src="https://cdn-images-1.medium.com/max/859/1*8nmIqH6Io_4xb0TFU_GGSA.png" /><figcaption>Look at this simple little guy! Transform to Transform is nice and clean!</figcaption></figure><figure><img alt="A screenshot similar to above but this time there is a unitConversion node between the first node and second node’s connection." src="https://cdn-images-1.medium.com/max/970/1*pCY1TtWoiLRTGJR5Hx6Ngw.png" /><figcaption>A rotation driving a rotation adds a unitConversion node! Anytime a rotation is used, Maya create a unitConversion node to handle the transformation of a float into a eular angle.</figcaption></figure><figure><img alt="In this one, there is two node connections similar to the screenshots above, but then are both feeding into a new ‘blendWeights’ node, which blends the results into an output." src="https://cdn-images-1.medium.com/max/1024/1*g4UOEetXPN1MfYmLBRcqSQ.png" /><figcaption>Having two separate objects drive a single one adds a blendWeighted node — PER CHANNEL! You can imagine how complex it starts to get as more drivers are added. Also, remember to rig and create SDKs in centimeters — otherwise you will compound the unitConversion nodes!</figcaption></figure><h3>Expressions</h3><p>Speaking of slow and outdated… another method of driving things in Maya can be <a href="https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Scripting/files/GUID-5F75516C-403A-4CC3-A118-AEDEFDE970B4-htm.html">expressions</a>. I’ll be honest here — people either love or hate them. Expressions are chunks of Maya MEL code that are running live. I’m in the latter camp — but I know their usage can be divisive. I don’t use them because they are difficult to parse, debug and edit in code. Many rigging setups are created, edited, rebuilt and evaluated via Maya scripts — and expressions can complicate this. However, they have their usages. Patrick Woo covers expressions in a series of videos <a href="https://lesterbanks.com/2016/07/beginners-introduction-maya-expressions/">here</a>, doing them a lot more justice than I ever could.</p><p>These are more common for simple, linear types of behaviour — like a twist joint setup. What is cool is that you can use math functions that aren’t available as native nodes in the Node Editor, such a cos, sin, etc…</p><figure><img alt="A screenshot of Maya’s expression editor. You can see an expression written in MEL at the bottom. It reads Ball.translateX=cos(time)" src="https://cdn-images-1.medium.com/max/500/0*_PbyfpNSPU6DVRIT.png" /><figcaption>As seen here, linked from the <a href="https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Scripting/files/GUID-EF3F2007-74E7-4F23-B4A3-8D2EF94579A1-htm.html">Maya Documentation</a></figcaption></figure><p>Moving on to more (relatively speaking) modern ways of creating these relationships…</p><h3>Cone Readers</h3><p>Ah! The humble Cone Reader. The Cone Reader first came into popular usage with the amazing set of tools offered by <a href="http://www.comet-cartoons.com/">Michael Comet</a> — a suite of tools for Maya still used to this day.</p><figure><img alt="A gif from a educational video on The Last of Us rigging. There is a character’s wrist onscreen. The wrist is moved slightly, and you can see 3 joints inside move to correct the deformations at the write. The wrist joint is then clicked and 3 large and very flattened cones appear — showing the cone reader’s visual representation." src="https://cdn-images-1.medium.com/max/640/1*2B0GXHuJNZUuyu0Lx_3DYA.gif" /><figcaption>Cone Readers as seen in one of my oft-references videos<a href="https://youtu.be/myZcUvU8YWc?t=1006"> Rigging on The Last of Us</a></figcaption></figure><p>Cone Readers are a fairly simple concept — they give you the angle of a cone, with a given angle where a value will start to fade from 0 (the outer limits of the cone) to 1 (the centre of the cone). These are useful as you can tune at what angle of rotation starts to drive an external value (the 0–1 float). The problem with Cone Readers is that they are uniform in scale (no squished or irregular shapes cones!) and can only drive a single behaviour — meaning that tuning the fade in and fade out of the angle can be a balancing act and fine-tuning the behaviour is not always achievable.</p><p>Traditionally, their usage has been limited to <a href="https://www.youtube.com/watch?v=6Gb3ZiITCmE&amp;t=2s">blendshapes</a> but in video games, joints are often more economical, or easier to reuse — thus the 0–1 driving system can be a bit odd to navigate when you are driving transforms.</p><p>Here’s an older, but extremely helpful <a href="https://vimeo.com/64958089">video from Marco Giordano</a> on how you can build your own cone reader — without the need for a plugin, and also a good explanation on how it works.</p><p>At scale, the <a href="http://www.comet-cartoons.com/MELfiles/poseDeformer.html">famous Comet Cone Reader </a>can be a big of a resource hog which is not surprising seeing as the most recent releases of it as basically life-support and the poor code has been around forever. Companies will often develop their own cone-readers or perhaps use some of the newer, quicker plugins built by other studios smart folks out there like Vector Angle mode in <a href="https://www.braverabbit.com/braverabbit/tools/weightdriver/">Brave Rabbit’s weightDriver</a>.</p><h3>Radial Basis Function(RBF)</h3><p>Ahhh… the big daddy itself of driving deformations and an industry standard. Much heavier and more complex than SDKs, Cone Readers or other such methods… Radial Basis Function is named (within rigging circles) after the original<a href="https://www.disneyanimation.com/publications/evaluation-of-the-radial-basis-function-space/"> Disney Paper </a>written on it.</p><p><a href="https://vimeo.com/120117324">Hans Godard’s RBF solver</a> example explains this more beautifully than I ever could.</p><figure><img alt="A looping gif of a large black ball in Maya with multiple coloured balls on its surface. There is a pin control on it and a flat coloured sphere to its right. As the pin rotations in the center of the balls and moves closer to the many multiple coloured balls on the surface, the output ball (the one of the right) changes colour to approximate the closest combination of colours to the pin control." src="https://cdn-images-1.medium.com/max/640/1*gsCssmtyVtDdT_64Vbsdgw.gif" /><figcaption>RBF in action — finding the best colour to blend between sampling all the colours around it.</figcaption></figure><figure><img alt="A looping gif of a shoulder rig showing off 4 crafted shoulder blendshapes and the RBF driven solution blending between these blendshapes to create a deforming shoulder mesh that considers the mass and volume of the shoulder as it moves." src="https://cdn-images-1.medium.com/max/640/1*8Us_zeGpTMwssDqpeojdLQ.gif" /><figcaption>RBF driving blendshapes, a single joint driving multiple float values.</figcaption></figure><p>I’m not going to lie — the maths behind this eludes me here. But the concept is simple. You can use a single solver to use arbitrary values to drive an unlimited number of other arbitrary values — which means this is perfect for a matrix driving other matrices(joint transforms) or single values (blendshapes). This is a very flexible and powerful option for those who are looking to finesse shapes. The downside is nothing is for free if you prefer more additive solution. Combination shapes must be distinctly sculpted or driven by different solvers to combine their transforms. For example, say you have a mouth wide shape in a facial rig, and a mouth open shape. These cannot be driven by the same interpolator to get mouth wide and open at the same time, meaning more solvers will be required for those solutions. If driven by the same solver, this will result in a compromised shape-where only half of each shape is being engaged. For solutions like that — SDKs can be a simpler choice.</p><p>RBFs solvers are either written by individuals, offered online like <a href="https://www.braverabbit.com/braverabbit/tools/weightdriver/">Brave Rabbit’s weightDriver</a> (choose RBF mode) or even available <a href="https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-CharacterAnimation/files/GUID-45D389D6-B8E4-4225-B27B-9927BB61C28D-htm.html">natively in Mata </a>— with a little extra work required.</p><p>Maya’s native Pose Deformer tool still has the problem that it expects blendshapes — but you can use the nodes that come with it to extract the behaviour and drive your own setups.</p><figure><img alt="a screenshot from Maya’s Node Editor showing a simple setup of a node connecting to Maya’s poseInterpolator node. It’s outputing to a blendshape" src="https://cdn-images-1.medium.com/max/858/1*mLnHDg2BG3ys_Kfwz-vbkw.png" /><figcaption>Here is the poseInterpolator node driving a Blendshape — as setup in the UI that comes with it.</figcaption></figure><figure><img alt="In this screenshot, very similar to above, the output of the poseInterpolator is also going to a remapValue node, which feeds into the position of another node in Maya’s Node Editor." src="https://cdn-images-1.medium.com/max/828/1*w2XhAnf-D52A20UskU6Fig.png" /><figcaption>Think you’re driving a blendShape? Wrong, poseInterpolator! You’ve been HIJACKED!</figcaption></figure><h3>Math Nodes</h3><p>Maya has many natively supplied nodes within it — often given names that don’t correspond to their practical usage but derived of some feature they were built to supplement. Because Maya lacks a lot of really simple functions but it built on a node-based system — we can use these nodes to drive desired behaviours. This is extremely useful and pretty crucial for rigging itself, but can be used also in driving deformations. For what are deformations other than relationships between a control and something being controlled — often by a character rig itself?</p><p>Here I will cover and give a summary and some usages of some of the more useful Maya nodes. You may not be aware of some of these or be confused by their purpose because of the name — but if there is anything you should learn by working in tech-art, it is to use every tool available to you to do the job you need, regardless of it’s intended purpose (just please talk to a programmer if you are planning on doing this in a game-development environment. Sometimes they will have a better solution, or what you think is a good way to use a tool might cause problems for others, whether in performance or implementation).</p><p>Without further ado:</p><h4>AddDoubleLinear (also, plusMinusAverage)</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the addDoubleLinear and plusMinusAverage nodes not connected to anything." src="https://cdn-images-1.medium.com/max/396/1*cQEjfKvRaB-wguPf3s90Qw.png" /><figcaption>addDoubleLinear and it’s bigger sibling plusMinusAverage</figcaption></figure><p><strong>Function</strong>: <br><em>addDoubleLinear </em>takes two inputs an sums them. Simple, fast and clean for when you need addition.<br><em>plusMinusAverage </em>is a little more complex, allowing for not only the addition of floats(1D), but also 2D(UVs) and 3D(vectors) to be calculated. It also allows for more than 2 inputs — but will only add similar types. Be careful with the UI — to add 1D inputs, you will need to add them either via connections in the Node Editor/Connection Editor or via script. Thanks Maya! The Channel Box also doesn’t contain any information at all… <br><strong>Usage:</strong><br>Simple enough! Do you need to add two or more numbers together? If you need to subtract, it’s easier to use the <em>plusMinusAverage </em>node, rather than converting all subtracted values to negatives.</p><h4>multDoubleLinear(also, unitConversion, multiplyDivide)</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the multDoubleLinear, unitConversion and multiplyDivide nodes not connected to anything." src="https://cdn-images-1.medium.com/max/335/1*NREkCAn8vZc92ePLIyzcKQ.png" /></figure><p><strong>Function</strong>: <br><em>multDoubleLinear </em>takes two inputs and multiples them. Maths! The Channel Box doesn’t have show the values however, so make sure to check the Attribute Editor.<br><em>unitConversion </em>is very similar except the input is the first value and the conversion factor is the second value.<br><em>multiplyDivide </em>allows you to do a multiply, divide or power operation with vectors (3 channels!). If you wish to divide, it’s safer to use a multDoubleLinear or multiply operation with your dividing number as a negative if you can as this way you never divide by zero. (Computers LOVE dividing by zero).</p><p><strong>Usage:</strong><br>Mutliply! Divide! Multiply to the Power of! This is just simple maths stuff, but it’s nice to know it’s all still here.</p><h4>Reverse</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the reverse node not connected to anything." src="https://cdn-images-1.medium.com/max/238/1*6iiMv1r0o-NpHxwQRuU9FA.png" /></figure><p><strong>Function</strong>: <br><em>reverse </em>has 3 channels for inputs — meaning you can use it for vectors or 3 float operations. Converts 0 to 1 and 1 to 0. Operation is <em>(-1x +1) = y</em>, where <em>x </em>is your input and <em>y </em>is your output.<br><strong>Usage:</strong><br>Very useful for IK/FK switches, or any operation where you want the opposite behaviour from a 0–1 range.</p><h4>Remap Value (also remapColor, remapHSV)</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the remapeValue, remapColor and remapHSV nodes not connected to anything." src="https://cdn-images-1.medium.com/max/365/1*YiuxU_53O5XE3XW5VcvvUg.png" /><figcaption>remapValue is surprisingly useful! remapColor/Hsv are the same with additional functionality.</figcaption></figure><p><strong>Function</strong>: <br><em>remapValue </em>also allows you to remap a range of values to another range. Unlike <em>setRange</em>, it gives you a handy-dandy little curve, allowing you to have multiple points, or tangents in your range, controlling the rate of your interpolation. You give it a min, and a max for both the input and the output, and the controls the relationship. Color gives you the ability to remap to a vector (3 values) instead of a singular float. 2 for 1! Only use it for a single type of operation though, as the input will affect both output and outColor. <br><em>remapColor </em>and <em>remapHSV </em>(which I’ve honestly never used) are variant of the same thing. Ignore the naming — in maya nodes, color is often a good substitute for vector. Also watch out! For some reason, the Channel Box only contained a limited number of the channels in the node. <br><strong>Usage:</strong><br>Have a linear value — say the output of a poseInterpolator needing to be converted into a transform-type value? Say 0 is translateX: 0 on your output, but 1 is translateX:20, and you want the interpolation to be smooth, not linear — this is a good way of doing that.</p><h4>Set Range</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the setRange node not connected to anything." src="https://cdn-images-1.medium.com/max/336/1*RAVI81mnmFWJKnxdKxLrQQ.png" /><figcaption>setRange node within Maya’s node editor.</figcaption></figure><p><strong>Function</strong>: <br><em>setRange </em>allows you to remap a range of values to another range, with up to 3 inputs/outputs — allowing you to work with vectors (which transforms, rotations and scales all are!).</p><figure><img alt="A screenshot of Maya’s Attribute Editor for the setRange node. You can see a table of values — 3 rows each. One for value, one for min, one for max and one for old min." src="https://cdn-images-1.medium.com/max/449/1*lMaM9F79AIQD7T571WlZOw.png" /><figcaption>All the channels for the setRange in the Attribute Editor — these can also be viewed in the Channel Box.</figcaption></figure><p><strong>Usage:</strong><br>Do you have a 0–1 range but want to convert it into something strange, like 80–150? This is where setRange comes in. Giving you 3 dimension allows you to calculate vectors or just be cheeky and do 3 operations in one (just try and make sure you’re not fighting Maya’s parallel mode by reusing the node several times in a chain). Also useful for reversing a range.</p><h4>Clamp</h4><figure><img alt="A screenshot of Maya’s Node Editor. It shows the clamp node not connected to anything." src="https://cdn-images-1.medium.com/max/399/1*GJzjZyBG64N9hWBP2lN7Mg.png" /><figcaption>The clamp node as seen in Maya’s node editor.</figcaption></figure><p><strong>Function</strong>: <br><em>clamp </em>is great for setting limits on a number or range of numbers. You set a min, a max and an input. Supports vectors. <br><strong>Usage:</strong><br>Although I don’t recommend this (gimbal), say you have a shoulder pad, and you want it to translate up slightly in a linear fashion with a multiply node when the shoulder joint rotates in a single axis but when the arm falls you don’t want it to move at all? This would be a great example of clamp.</p><h4>Matrix Nodes</h4><p>Well, we have arrived at matrices. Help us all. But for real — matrices are excellent because they contain the full transform of a node — knowing how to use them is super powerful and will help you overcome all sorts of problems like gimbal and scale issues. Let’s go over some of the simpler ones.</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the composeMatrix and decomposeMatrix nodes not connected to anything." src="https://cdn-images-1.medium.com/max/300/1*oRE0sXSzRz1PCLMxu9cZgA.png" /><figcaption>composeMatrix and decomposeMatrix as seen in Maya</figcaption></figure><p><strong>Function</strong>: <br><em>composeMatrix </em>gives you the ability to create a matrix composed of a node’s translate, rotate, scale and sheer. This is useful because Maya doesn’t always let you access the matrix of nodes.<br>Similarily, <em>decomposeMatrix </em>does the opposite. Takes a matrix and turns it back into translate, rotate, scale and sheer. This is especially useful as maya likes to use matrices to exchange information, but doesn’t often let you see the matrices themselves (for example, in a matrix, you can extract single vectors or the position of a transform).</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the addMatrix and multMatrix nodes not connected to anything." src="https://cdn-images-1.medium.com/max/296/1*hgZFZzcMpJpmDNxHaCk50g.png" /><figcaption>addMatrix and multMatrix as seen in Maya’s Node Editor.</figcaption></figure><p><em>addMatrix </em>lets you add x number of matrices and gives you the sum as an output.<br><em>multMatrix </em>multiplies x number of matrices and gives you the multipied output. Does what it says on the tin.</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the inverseMatrix, fourByFourMatrix and transposeMatrix nodes not connected to anything." src="https://cdn-images-1.medium.com/max/296/1*S5UiD5XC-EhyZABHXqf8sA.png" /><figcaption>inverseMatrix, fourByFourMatrix and transposeMatrix as seen in Maya’s Node Editor.</figcaption></figure><p><em>inverseMatrix </em>is useful for calculations involving hierarchies. For example, say you want another node to drive it as if it were in a hierarchy — ever seen parentInverseMatrix being used in constraints? This is where this node will come in useful.<br><em>fourByFourMatrix </em>lets you full construct a matrix from single values, then outputs the new matrix.<br><em>transposeMatrix</em>…is a little out of my depth for my matrix math right now so I’ll let Google answer for me. ‘The <em>transpose</em> of a <a href="https://mathinsight.org/matrix_introduction">matrix</a> is simply a flipped version of the original matrix’. (from <a href="https://mathinsight.org/matrix_transpose">mathinsight.org</a>).</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the pickMatrix and pointMatrixMult nodes not connected to anything." src="https://cdn-images-1.medium.com/max/316/1*KfQGP05lMTvUvZDDwFOIDA.png" /><figcaption>pickMatrix and pointMatrixMult as seen in Maya’s Node Editor.</figcaption></figure><p>I’m now venturing into unfamiliar territory but figured out I might as well mention the other matrix nodes. At this point, I’m just going to paste what Maya’s documentation says — because I honestly would be making it up as I go otherwise.</p><p>Will Telford explains Maya’s <em>pickMatrix </em>node <a href="https://area.autodesk.com/tutorials/maya-2020-pick-matrix/">here</a>, but the documentation says: Pick element of a matrix (scale, translate, rotate and shear) and build a matrix only with the selected one.<br><em>pointMatrixMult </em>is used to ‘multiply a point by a matrix’</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the blendMatrix and aimMatrix nodes not connected to anything." src="https://cdn-images-1.medium.com/max/289/1*lwdMGcv18WAu-HslQkH9dA.png" /><figcaption>blendMatrix and aimMatrix as seen in Maya’s Node Editor.</figcaption></figure><p><em>blendMatrix </em>takes a base matrix (InputMatrix) and blends it successively with each target. Here’s a <a href="https://www.youtube.com/watch?v=eQCGd-x_WB4">video</a> demonstrating how it can be used to create a pole vector.<br>While I’ve personally not used this, I imagine an <em>aimMatrix</em> is a great replacement for the old Maya trick of using an aimConstraint to make deformations controlling or controlled by rotations a little less problematic. Often used in twist calculations, and <a href="https://www.riganimator.com/tutorial-twist-extractor/">explained quite well here</a> by Jørn-Harald Paulsen.</p><p>Doing a little Googling brought me to some more articles if you wish to learn more about this stuff — already covered by some other folks who understand it better than I can explain here.</p><p>Brendan Kelly — <a href="https://clamdragon3d.com/blog/2017/6/7/mayas-native-matrix-nodes">Maya’s native matrix nodes</a></p><p>Vasil Shotarov — <a href="https://bindpose.com/maya-matrix-based-functions-part-1-node-based-matrix-constraint/">Maya matrix nodes — Part 1: Node based matrix constraint</a></p><p><em>Note: a lot of the newer functions in Maya introduced in 2020 are explained very well by Will Telford </em><a href="https://area.autodesk.com/tutorials/series/maya-2020-rigging-tutorials/"><em>here</em></a><em> and are worth checking out as it includes the Matrix changes.</em></p><p>Finally, if you like playing with fire — or don’t want to deal with full matrices just because you hate gimbal — there are some Euler to quaternion nodes, and a whole bunch of quaternion math nodes available for your pleasure (or pain)</p><figure><img alt="A screenshot of Maya’s Node Editor. It shows the quatToEuler, eulerToQuat and axisAngleToQuat nodes not connected to anything." src="https://cdn-images-1.medium.com/max/322/1*ESY76VaISGkjU6fhya3fWw.png" /><figcaption>axisAngletoQuat, eulerToQuat and quatToEuler in Maya’s Node Editor.</figcaption></figure><p>Finally, I know this doesn’t cover it all — there are a million ways to drive connections and create relationships between transforms and values in Maya — but hopefully this is a small taste and intro to what’s available out there! Good luck and happy rigging!</p><p>Ultimately if you enjoyed this and got this far, perhaps consider throwing my some spare change to feed my addiction to cats, Pokémon or cat-like Pokémon?</p><p>Tip-jar: <a href="https://ko-fi.com/solhappening">https://ko-fi.com/solhappening</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9265a38492b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rigging Tips: Methods for Extra Character Deformation (in Game Dev)]]></title>
            <link>https://sol-g-brennan.medium.com/rigging-tips-methods-for-extra-character-deformation-in-game-dev-e4c0e89e7b00?source=rss-fed6bb5378------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4c0e89e7b00</guid>
            <category><![CDATA[gamedev]]></category>
            <category><![CDATA[rigtip]]></category>
            <category><![CDATA[character-rigging]]></category>
            <category><![CDATA[deformation]]></category>
            <category><![CDATA[blendshape]]></category>
            <dc:creator><![CDATA[Sol Brennan]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 17:39:41 GMT</pubDate>
            <atom:updated>2020-11-13T19:37:17.244Z</atom:updated>
            <content:encoded><![CDATA[<p>A question I’m often asked as a rigger in game dev is ‘<em>when should I use blendshapes?</em>’ or<em> ‘when should I use helper joints?’</em> when creating more advanced character definition. Because of the limited nature of real-time deformers —skinned joints and blendshapes are often the only two real-time deformers rigging artists have at their disposal that can run in a real-time environment.</p><p>This doesn’t mean what is described below isn’t applicable outside of a real-time environment — just that the limitations for pre-rendered aren’t as strict and the tools and techniques at hand are a lot more complex and powerful. This information will be useful in your arsenal — but consider the restrictions on them a little looser.</p><p><em>(Note: I’ve done this job for a decent while now — but I’m not the arbitrator of all knowledge. What I say might not be true for your pipeline or production — but I operate on general guidelines here that are hopefully useful for everyone. If you have any questions, comments or feedback feel free to ping me.)</em></p><p>Firstly, let’s define what some of these terms so we are all sharing the same vocabulary.</p><h3><strong>Helper Joints:</strong></h3><p>Helper Joints are additional skeletal joints in a character that are <em>purely</em> added to improve deformation. These might go by other names in your pipeline, but for the sake of this article I’m calling them ‘helper joints’. Example of these can be something as commonly needed twist joints to support deformation in the shoulder, forearm and legs. The goal here is that there is the core skeleton that drives all the major limbs and appendages, but helper joints are critical if you want to drive extra motion to simulate the contraction or twisting of muscle, as well as mass preservation. In essence, a series of joints can be used to stabilise deformation and counteract a lot of the common pitfalls of classic linear skinning.</p><p>A wonderful example demonstrating these joints in action can be seen here on Ellie’s wrist rig from Naughty Dog’s <em>The Last of Us</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*UEw3qEaAnsAvTefZ1jTOsA.gif" /><figcaption>Helper joints on Ellie’s wrist rig from The Last of Us.</figcaption></figure><p>You can see as the wrist bends forward and backwards — 3 joints will move to fill in the volume in areas where it is needed. You can view this in Judd Simantov’s great overview of the rigs from <em>The Last of Us</em> <a href="https://youtu.be/myZcUvU8YWc?t=1023">here</a>.</p><p>However — there are some real limitations to this. Firstly, game engines often have hard limits on how many joints can have influence on a single vertex. Modern AAA games often have 4 joints per vertex as a max, but this can be pushed to 8 (and even 16 in some of the most extreme cases in modern games) for cinematics and high quality characters. Mobile games, lower quality assets and skinned objects drawn in the distance (as LODs — LOD meaning ‘level of detail’) will have even less. If you are skinning your pelvis, you may be sharing influence between your left and right hip joint — as well as your pelvis and lower spine. You can see how in these complex areas you will reach your max very quickly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMmk8e2ut-s800CjmVdYNA.png" /><figcaption>In Maya, you can see the weights on an individual vertex in the Component Editor under Smooth Skins. Here, you can see the selected vertex is part of a skin cluster where the max influence per vert is set to 4.</figcaption></figure><p>Secondly, whenever you add a joint — you are removing influence from another joint. All joints must add to a total of 1. This means there is often a delicate balance when skinning — and when you move a joint it will be competing with all the surrounding skinned joints. The further away you move the joint, especially when rotation is taken into consideration, the more mass your skinning will lose. An example of this can be seen below, as I rotate the hip around 55 degrees — the mass on the buttocks seems to disappear. When I flip the skinning evaluation from linear to dual quaternion (which is another form of skinning evaluation that is built to combat this mass loss) you can see how much mass is lost from a single joint rotation. (Note: Dual Quaternion is possible in some engines, but it is more expensive and is an either/or situation that means linear skin clusters come out as the winner in general).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*ekJ0TPRek6b2rkm4j0B-Xw.gif" /><figcaption>You can see the mass loss as the joint rotates — as I switch between the skinning evaluation modes you can see the mass change.</figcaption></figure><p>Because of this, achieving the exact shapes you need can be a very delicate and time-consuming balance. There are ways to counter this, like scripts that transfer weights from blendshape to joints (an open source version of this can be found <a href="https://www.ea.com/seed/news/open-source-dem-bones">here</a>. Also check out Hans Godard’s skinning converter <a href="https://vimeo.com/123883474">here </a>if you want to see how this looks) or using a skinning tool like <a href="https://www.ngskintools.com/">ngSkinTools</a> (that operates on layers). However, this can get messy and overtly complex very quickly if you are running up against engine limitations.</p><p>So with that said, let’s move on to other other solution — blendshapes.</p><h3><strong>Blendshapes:</strong></h3><p>Blendshapes are target meshes that your mesh will deform to — normally within a 0–1 range. To achieve this — the original object and it’s target objects must have identical vert order and topology. If these do not match — the results will be wildly unpredictable or just plain broken. When you create a blendshape and add a ‘target shape’ — Maya will examine the difference between them (the delta) and create the ‘target blendshape’ from that.</p><p>Below I’ve detailed a hypothetical blendshape example. As you can see, there are two targets. When I animate the value of the blendshapes ‘target_1’ — you will see the original mesh deform to match the target in a linear fashion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*43cgNg7nlPVmvaIOV2gV4A.gif" /><figcaption>Animating taret_1 on the blendshape.</figcaption></figure><p>The same can be seen for target 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*o4VQZQIUony7th6rZVhLDA.gif" /><figcaption>Animating target_2 of the blendshape.</figcaption></figure><p>These shapes are linear and additive. Because of this, when I animate both targets at the same time, it results in the below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Lxbb67cXZzLdm0pc9a3ZZg.gif" /><figcaption>Animating both target_1 and target_2 on the blendshape</figcaption></figure><p>You can see this creates a new composite shape — something that didn’t exist before. This is the very basics of how blendshapes work.</p><p>The cool thing about blendshapes is if you have active targets you can edit them in real-time. Maya has pretty robust shape editing tools in the Shape Editor these days — so it’s worthwhile taking a look at that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*MN3DpKpqoNQ66Tk_KS2Svg.gif" /><figcaption>Editing a blendshape target while it is active.</figcaption></figure><p>Now, when we factor this into a skinned model — the skin cluster has to be taken into the evaluation (and must be performed last — always check the order of evaluation when you create the blendshape node as it doesn’t always default to this behaviour in Maya). When your character is posed, you will want to make a blendshape from that pose and modify it. Because the skinning and movement of joints is taken into consideration from this — your delta (the shape that is calculated and added to the blendshape whenever you add a target) may look bizarre. I may cover this later in another post — but for now just know that adding skinning complicates the process of generating the delta shapes.</p><p>So let’s make an example from this: that of an arm bending. When this happens, the bone in your lower arm will rotate and will cause your elbow to become more pointed.</p><p>Below is an X-ray of the bend in motion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*UWk6Q79ZMmp9Fakp91cfqw.gif" /><figcaption>X-ray image of an elbow bending and the movement of the bone.</figcaption></figure><p>In this case — because of the simplicity of the movement (it’s a hinged movement in a single axis) you could craft a blendshape to capture this. In classic linear skinning — no matter how you skin a simple 3 joint bone chain — this bend will look rounded (unless you use some sneaky modelling techniques detailed in this great example <a href="https://www.youtube.com/watch?v=X5Jksu5Z8AA">video</a>! However in this case, I’m using this generic example to show the root problem with linear skinning).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*7T6AokIrnZZNNrANUZpLyA.gif" /><figcaption>Default classic linear skinning behaviour on an elbow bend.</figcaption></figure><p>To combat this rounded elbow — you might craft a elbow bend blendshape. Below is an example of one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*RLH01xq6BvtjTo7kl5Q0ww.png" /><figcaption>On the left — the original skinned mesh with the elbow shape. On the right, the correct shape (static mesh — no skinning)</figcaption></figure><p>When we create a blendshape deformer with this corrective shape and hook it up so that it activates when the arm begins to bend, we get the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*gnm5TBmnDHXNx8Z1OpGiWw.gif" /><figcaption>The arm bending with an active blendshape. You can see the elbow sharpens here.</figcaption></figure><p>Here’s a side by side comparison of with and without:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bEVyyxIXsLMVDttklASIg.gif" /><figcaption>You can see the blendshape activating on the bend on the right, but not on the left.</figcaption></figure><p>However! With blendshapes you are able to add resolution and finesse that might be harder with helper joints. Let’s take a look at the comparison from another angle!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUv86wq8SNVC_xFMyyWHVQ.gif" /><figcaption>Look at the volume where the arrows point! Can you see the difference?</figcaption></figure><p>In this example above, you can see in the arm with the blendshape active that the skin around the bend of the elbow gets pushed out and up — much like the mass of a real arm. This kind of resolution is easily sculpted with a blendshape — but is much harder to achieve with joints only.</p><p>Now that we know a little about both of these methods — let’s review the pros and cons so you might know which system might best fit your problem and pipeline.</p><h3><strong>Pros and Cons: Helper Joints</strong>:</h3><h4><em>Pros</em></h4><ul><li>Joints setups can be scripted and much more reusable across characters. For example if you have a knee bending joint solution — it’s likely that that can be used across all bipeds with minimal upkeep</li><li>Excel in areas where blendshapes might not — for example twist joints! Replicating a twist joint setup (the joints that distribute twist between two joints) with blendshapes would be very cumbersome and difficult because of the variable distribution and also the linear movement of blendshapes. Helper joints handle arcs a lot better than blendshapes do. On top of that — you can get a lot of movement for free depending on how it’s setup — games can use these twist joints to create smears frames like as seen in Overwatch:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*UyOHcjdps-dqPUOnqQu8Og.png" /><figcaption>Look at the arc on that arm! Achieved by pulling twist joints off the rigid IK arm. The smear on the leg is achieved by using non-linear scale (often supported in engine on leaf nodes — the last node in a joint chain)</figcaption></figure><ul><li>Artists can use helper joints to craft/tweak the appeal of frames if they are animatable and accessible in the DCC app (the program where you create the content — like Maya). If riggers expose these to animators they can really craft shapes down to the <a href="https://youtu.be/myZcUvU8YWc?t=949">detail</a> in those special cases (like high-quality cinematics)!</li><li>Easy to script and write into rigs as a default! Since blendshapes have to be hand-crafted — joints can do a lot of the guess work and be automated by a script.</li><li>Can take memory burden off character with lots of vertices. Blendshapes aren’t free in a game engine. They cost memory to store! Joints instead of blendshapes can cheapen characters that are vertex heavy.</li><li>When people talk about driving helper joints — set driven keys (SDKs) are often one of the more commonplace techniques. But this is only one way — it can be driven by a wide array of drivers such as RBF nodes, cones, maths, curves, etc… Helper joints can have very elegant and versatile solutions — as creative as the rigger making them can get!</li><li>If you can drive joints real-time in engine (instead of having to drive them in DCC) you can get truly real-time reactive joints! Great for when your character enters a ragdoll like state or between animation blends.</li></ul><h4><em>Cons</em></h4><ul><li>If it’s for a game it’s very easy to hit max vertex limit (mentioned above) in complex areas like shoulder/armpit or hips/thigh/pubic area. Balancing these areas can be extremely time consuming and frustrating.</li><li>Mentioned above — it’s a delicate balance of skinning between the helpers and movement. Improving one area can potentially reduce the effectiveness of another shape. You have to be very careful when adjust skinning on the helper joints. The more weight they hold — the more they have to be doing the right thing and doing the heavy lifting — but if the weight on them is too soft it can be very difficult to get them achieving the shapes you need — or filling in the volume in areas where it gets lost.</li><li>Speaking of — volume will be lost as you do bigger movements — especially with rotations (a problem that’s linked to classic linear skinning)</li><li>If your joints are baked and exported from your DDC program — then there will be a memory cost to the curves in engine. If you have large animation sets (say an enemy type that is used everywhere) then this can seriously bloat the data.</li><li>Say goodbye to nice interpolation when your character is blending between animations or enters a ragdoll state. This can something cause pops or jittering artifacts. This is also true to blendshapes — the only way to resolve this is to have the helper joints solving at runtime.</li><li>If you DO have real-time helper joints running real-time in engine — without a solution on the DCC side for animators to see that — they could be working blind and will find that massively frustrating that they can’t see their character as close to 1:1 with game as possible.</li><li>If the joints aren’t solved real-time — every time you adjust how they are driven you need to re-export the animation on all the affected animations that use that skeleton.</li><li>If you are adding helper joints on to characters but they are running animation from another character that doesn’t include them — what happens to these joints? Your engine might not have an elegant solution for this!</li><li>If your helper joints are not perfectly mirrored you can lose accurate and good-looking engine-side animation mirroring which can cut the memory of animation sets on characters considerably!</li></ul><h3><strong>Pros and Cons: Blendshapes</strong></h3><h4><em>Pros:</em></h4><ul><li>You can craft really unique or desirable shapes — no messing with multiple joints and weight limits! Some deformations are literally not achievable in games without blendshapes! Specifically high-frequency detail shapes or shapes in areas where there isn’t enough joint resolution to fix it adequately.</li><li>Depending on your pipeline and tools — blendshapes can be easy to fix and update. Regenerating and integrating can be as simple as a button click and re-export.</li><li>Updating the shapes means you only need to re-export the mesh they are associated with (unless how they are triggered is modified). Much easier on a pipeline for iteration.</li><li>Can be parameterised for reuse across characters (for example, <em>L_leg_out</em> can be reused between characters if naming is generic enough) — allowing you to have unique shapes per character but have them automatically driven via channels on the rig.</li><li>Can be potentially outsourced (depending on the expertise you have). Whether this is inhouse or externally — this takes the burden of making quality deformation off your valuable riggers and frees them up to build more rigs or tools!</li><li>Can be easily batched transferred between characters! Your results may vary, but there are lots of ways to transfer blendshapes that affect volume between similar characters.</li></ul><h4><em>Cons:</em></h4><ul><li>Memory — game engines might be limited on how many blendshapes can be active on a character or everything in the game at once. Your engine might not support blendshapes at all! Often there is a cap at which lesser shapes (blendshapes that affect less verts) will be pruned. This can a cause pops or artifacting if this isn’t carefully managed as blendshapes fight against each other to be active.</li><li>Time intensive — often useful to have a dedicated sculpting artist. Sculpting blendshapes is not an easy process and dedicated blendshape artists are few and far between — especially within games development. Many a good character artist has quit their role after being relegated to ‘the blendshape artist’. Make sure if you have someone who is dedicated to this task — that they enjoy this role! Otherwise you will have to spread the love across the team to make sure none of your character artists quit from sheer frustration.</li><li>Not easily reusable in DCC — can be transferred to other meshes as mentioned above but results can be really off depending on the mesh and shapes being transferred. Often, the transferring process is very slow — especially if you need to regenerate for LODs too. Often they are also not re-usable between characters at all at runtime too — unless you are very restrictive and clever about how you set them up.</li><li>Need to be regenerated every time a mesh is updated or skinning is adjusted. Changing the skinning changes the corrective delta — thus regenerating is a must. If you have tools for this it is potentially not as big of a deal.</li><li>Export time! Meshes with high numbers of blendshapes that need to be processed at export time can have massive export times/load times into engine making iteration slow and time consuming.</li><li>Blending between shapes can cause ‘swimming’. If you have in-betweens or breakdown shapes (pretty much necessary with large rotation/arcs) then you have to be very careful about how/what vertices you move. If the movement and degree of which they move is not consistent between shapes then you will likely get ‘swimming’ — where a vertex will move back and forth as it blends between the shapes. (I might cover this in a later post if there is interest!)</li><li>Because of the above, you have to be very technical and careful about what vertices you move if you want to minimise these issues — which can be incredibly easy to spot in meshes with high/fine texture detail.</li><li>Any movement with arc is going to suffer because of the linear nature of blendshapes (eyelids, for example) — either meaning you must create more blendshapes for inbetweens or be very selective of what blendshapes you choose to craft.</li><li>Crafting shapes takes a lot of technical knowledge of how the maths is moving vertices underneath (combined with the skinning) that isn’t often natural to artists. Even using tools that help artists visualise this can be cumbersome or expensive!</li><li>Some engines don’t update normals on blendshapes at runtime! This can give strange or undesirable shading results if the movement on the blendshape is considerable and the surface of the affected faces deform.</li></ul><p>In an ideal world — the best rigs have blendshapes and helper joints working together to achieve the best deformation. Which parts of a rig you use what techniques on is up to you, your characters, your team and your pipeline.</p><p>This isn’t an exhaustive list by any means — and as our tools rapidly improve (especially with the new generation of games now reaching our shelves) some of these pros/cons may become non-issues. However, I’d love to hear feedback! Please leave a comment below if you have anything to add (and I can add it to the list) or feel free to email me at sol.g.brennan@gmail.com.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4c0e89e7b00" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>