<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>facerFX &#187; Tutorials</title>
	<atom:link href="http://www.mathiesonfacer.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mathiesonfacer.com</link>
	<description>Mathieson Facer - Technical Director</description>
	<lastBuildDate>Thu, 02 Sep 2010 00:43:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using StretchTM</title>
		<link>http://www.mathiesonfacer.com/blog/using-stretchtm/</link>
		<comments>http://www.mathiesonfacer.com/blog/using-stretchtm/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 01:21:46 +0000</pubDate>
		<dc:creator>Mat</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mathiesonfacer.com/?p=857</guid>
		<description><![CDATA[StretchTM is a useful property found on nodes, but it is somewhat hidden. It is particularly useful for bones.In this video I cover two uses of the StretchTM matrix. I show how you can set up bones to stretch along with another bone, as well as how to change the wirecolor of a bone based [...]]]></description>
			<content:encoded><![CDATA[<p>StretchTM is a useful property found on nodes, but it is somewhat hidden. It is particularly useful for bones.<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />In this video I cover two uses of the StretchTM matrix. I show how you can set up bones to stretch along with another bone, as well as how to change the wirecolor of a bone based on how far it has been stretched.</p>
<p><span id="more-857"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553559400" width="594" height="446" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=10292114&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="594" height="446" src="http://vimeo.com/moogaloop.swf?clip_id=10292114&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathiesonfacer.com/blog/using-stretchtm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parameter Wire Copying</title>
		<link>http://www.mathiesonfacer.com/blog/parameter-wire-copying/</link>
		<comments>http://www.mathiesonfacer.com/blog/parameter-wire-copying/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 19:23:34 +0000</pubDate>
		<dc:creator>Mat</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mathiesonfacer.com/?p=853</guid>
		<description><![CDATA[Max does not allow you to copy/paste parameter wires, as it does with most other controller types. This is still capable, however, through MAXScript.This video shows you how to go about creating an instance (cake walk) and unique copy. When creating a unique copy, it copies the controller but the wire no longer updates along [...]]]></description>
			<content:encoded><![CDATA[<p>Max does not allow you to copy/paste parameter wires, as it does with most other controller types. This is still capable, however, through MAXScript.<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />This video shows you how to go about creating an instance (cake walk) and unique copy. When creating a unique copy, it copies the controller but the wire no longer updates along with it&#8217;s targeted track. Really, all the copy needs is a kick in the butt to get it to start working again.<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />This can really help improve workflow, as it allows you to set up instances of wires throughout your rig and easily copy from one track to the next rather than manually connecting each time.</p>
<p><span id="more-853"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553559400" width="594" height="446" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=10290747&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="594" height="446" src="http://vimeo.com/moogaloop.swf?clip_id=10290747&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathiesonfacer.com/blog/parameter-wire-copying/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FFD Mirroring</title>
		<link>http://www.mathiesonfacer.com/blog/ffd-mirroring/</link>
		<comments>http://www.mathiesonfacer.com/blog/ffd-mirroring/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 01:32:14 +0000</pubDate>
		<dc:creator>Mat</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mathiesonfacer.com/?p=736</guid>
		<description><![CDATA[I&#8217;ve always found mirroring FFD Spacewarps to be a real pain. I finally decided to play a bit earlier today to try to find a good way of doing it rather than settling for a negative scale in the x-axis or roughing out a &#8220;mirrored&#8221; version. So, we all know negative scale is a bad [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always found mirroring FFD Spacewarps to be a real pain. I finally decided to play a bit earlier today to try to find a good way of doing it rather than settling for a negative scale in the x-axis or roughing out a &#8220;mirrored&#8221; version.</p>
<p><span id="more-736"></span></p>
<p>So, we all know negative scale is a bad thing; however, mirroring without getting a negative scale is not as straight forward and easy as simply clicking the mirror button in the tool bar.  There are ways of getting around this for things such as morph targets: most straight forward in Max 2010 is using Symmetry Tools in the Graphite Modeling Tools. I&#8217;ve always found it to be extra tedious though when dealing with FFD Spacewarps. They are often warped into very obscure shapes for cartoon-style characters, and unfortunately the Graphite Tools only deal with Editable_Poly classes.  FFD Spacewarps are also a bit of a black hole when it comes to MAXScript, so as far as I know you can&#8217;t just go and write a tool to do it either.</p>
<p>Anyways, I&#8217;ve put together a little tutorial for how to get the mirrored version of an FFD Spacewarp without a negative scale. It uses a similar method to one that has been floating around for quite a while for mirroring morph targets (not sure where original credit is due, sorry :S), but it just requires a few slight edits for tricking Max to doing it with FFDs.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553559400" width="594" height="446" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=9537276&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="594" height="446" src="http://vimeo.com/moogaloop.swf?clip_id=9537276&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffc800&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathiesonfacer.com/blog/ffd-mirroring/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Z-Depth &amp; Fog in One</title>
		<link>http://www.mathiesonfacer.com/blog/z-depth-fog-in-one/</link>
		<comments>http://www.mathiesonfacer.com/blog/z-depth-fog-in-one/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 02:34:03 +0000</pubDate>
		<dc:creator>Mat</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mathiesonfacer.com/wordpress/?p=203</guid>
		<description><![CDATA[This tutorial will show you how to get Z-Depth and fog in compositing out of the same render pass. It will also show you how to tweak your fog without having to go back and re-render from your 3d package. The tutorial is aimed at beginner to intermediate level compositors. The technique for getting Z-Depth [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will show you how to get Z-Depth and fog in compositing out of the same render pass. It will also show you how to tweak your fog without having to go back and re-render from your 3d package. The tutorial is aimed at beginner to intermediate level compositors. The technique for getting Z-Depth and fog from the same render pass is not recommended for all situations but is definitely helpful if you have limited resources and cannot afford to render passes for both.</p>
<p><span id="more-203"></span></p>
<p>I will be using 3ds Max 2008 and After Effects CS3 for this tutorial although the techniques can be applied to any software packages.</p>
<p><a href="http://www.mathiesonfacer.com/wp-content/sampleFiles/zdepthFog/zDepthAndFog_start.max">Click here to download the Max file I am using for this tutorial.</a></p>
<p>We&#8217;ll start off by just rendering a beauty pass of our scene.</p>
<p><img class="alignnone" title="zdepthFog01" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog01.png" alt="" width="594" height="334" /></p>
<p>Next we will render off our Z-Depth/fog pass. For now we will do this through Max&#8217;s render elements. Open your render scene dialog and go to the &#8220;Render Elements&#8221; tab. Click the &#8220;Add &#8230;&#8221; button and add a Z-Depth render element.</p>
<p><img class="size-full wp-image-637 alignleft" title="zdepthFog02" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog02.jpg" alt="zdepthFog02" /></p>
<p>There are a few things you will need to do here in order to get the result we want. For many of the render elements filtering is enabled by default, but for some reason it is not for Z-Depth. Make sure the &#8220;Enable Filtering&#8221; button is checked otherwise we will possibly get rough edges around our geometry&#8217;s edges.</p>
<p>You will also notice at the bottom of the rollout, with our Z-Depth render element selected, two spinners asking for a &#8220;Z-Min&#8221; and &#8220;Z-Max&#8221; value. These values are where our Z-Depth map begins and ends in Z-space, relative to the camera. I find the best method for getting these values is to select the camera we are going to be using and in the modify panel choose to show the camera&#8217;s environment ranges. We then get a perfect visual representation of these ranges and the values to just copy over.</p>
<p>So play around with the environment ranges until you find values that you feel will work well for you and then copy them over to the Z-Min and Z-Max values in the render elements rollout.</p>
<p>Now if we click render, and we render from the proper camera, after the render finishes our Z-Depth pass will pop up. Save the image as PNG with alpha and open up After Effects.</p>
<p><img class="alignnone size-full wp-image-638" title="zdepthFog03" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog03.png" alt="zdepthFog03" /></p>
<p>Start a new file, import footage for both our beauty pass and depth pass. When asked how to interperate the depthPass, choose to &#8220;Ignore&#8221; alpha (we&#8217;re just not going to use it in this example). When your footage has been brought in, create a new comp using both pieces of footage.</p>
<p>Put your beautyPass on the layer above your depthPass. Right click on the beautyPass and go to &#8220;Effect/Blur &amp; Sharpen&#8221; and add a Lens Blur. Your scene should now look similar to this.</p>
<p><img class="alignnone size-full wp-image-639" title="zdepthFog04" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog04.jpg" alt="zdepthFog04" /></p>
<p>In the top left you will see our Lens Blur effect controls. Click next to &#8220;Depth Map Layer&#8221; where it says &#8220;None&#8221;. You have an option between beautyPass.png and depthPass.png here, choose depthPass. The only thing to note here is that the choices only consist of layers that exist in your current comp, if you removed depthPass.png from your comp you would not be able to choose it.</p>
<p>As soon as you choose depthPass.png you will notice the blurring on your image change as your depthPass is now determining how your image is blurred. This is probably not the result we are looking for though, so the next settings we are going to tweak is the &#8220;Blur Focal Distance&#8221; and &#8220;Iris Radius&#8221;.</p>
<p>The blur focal distance is what determines what area of your image is going to be in focus, not hard to figure out. Without knowing how it works though you will probably just play around with the value and guess at it until you are happy with what your image looks like, but if you know how it is being used by the program you can get pin-point accuracy with your depth blur.</p>
<p>If you ramp the blur focal distance value up as far as it can go you will notice it stops at 255. If you know about color values, each the of the red, green, and blue channels range from 0 to 255 and <img class="alignright" title="zdepthFog05" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog05.jpg" alt="" width="399" height="283" />when all 3 are equal to the same number you get a shade of gray. Our Z-Depth pass is a grayscale image ranging from black to white. The blur focal distance is really just telling After Effects what area of your image should be in focus according to the gray value in your depthPass.</p>
<p>Choose an area of your image that you would like to be in focus. Click the eyeball icon to the left of your beautyPass layer in order to hide it and see the depthPass underneith. Move your mouse cursor to hover overtop of the area you chose to be in focus and take note of the &#8220;Info&#8221; window in the top right of your screen. The info window will give you the color value of the pixel your mouse is currently hovering over. All three values for R, G, and B should be the same. Type this value in for your blur focal distance and unhide your beautyPass. Your image should now be focused on the correct spot.</p>
<p>Now adjust the &#8220;Iris Radius&#8221;, no special tricks to this one, to the value you see fit. It is basically just the blur amount. Here is how the image should look now, notice the subtle blur.</p>
<p><img class="alignnone size-full wp-image-641" title="zdepthFog06" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog06.jpg" alt="zdepthFog06" /></p>
<p>Now we are going to create our fog. We are going to do a few steps before we begin. Select your beautyPass layer and go to the &#8220;Layer&#8221; menu in the top menu bar and select &#8220;Pre-Compose&#8221;, way down at the bottom. A window will pop up and prompt you. Enter &#8220;beautyWithFog&#8221; as your &#8220;New composition name&#8221;, choose &#8220;Leave all attributes in &#8216;beautyPass&#8217;&#8221;, and check the box for &#8220;Open New Composition&#8221;.</p>
<p>The reason we are creating a new composition for our beautyPass is that when we put the fog overtop of our footage we want our fog to be blurred by the Z-Depth as well. Choosing &#8220;Leave all attributes in &#8216;beautyPass&#8217;&#8221; means that although we are moving our selected layers to a new composition any existing effects on our selection will remain in this composition and be applied to the new comp that is taking the place of our current selection.</p>
<p>Now that we have our new comp created and open you will notice the blur is no longer there, that is okay. Go to your project bin and drag the depthPass footage into the current comp, placing it on top of your beautyPass layer. Change the blending mode from &#8220;Normal&#8221; to &#8220;Screen&#8221; (This might be currently hidden. Right click the bar above your footage, go to columns, and make sure &#8220;Modes&#8221; has a checkmark beside it.).</p>
<p><img class="alignnone size-full wp-image-642" title="zdepthFog07" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog07.jpg" alt="zdepthFog07" /></p>
<p>You will now notice that the fog is actually at the front of your image, to fix this we will simply add an invert effect to our footage. You can find invert in the channel category of your effects. Your image should now look like this.</p>
<p><img class="alignnone size-full wp-image-643" title="zdepthFog08" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog08.jpg" alt="zdepthFog08" /></p>
<p>Now we are going to fine tune our fog to how we want it. Believe it or not, but we have almost all the same control over it in After Effects as we do with Max&#8217;s built in fog render effect, and even a little extra in some areas. All we need for this is a &#8220;Levels&#8221; effect to be added to our depthPass layer, so do that now. You can find levels in the color correction category.</p>
<p><img class="alignnone size-full wp-image-644" title="zdepthFog09" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog09.jpg" alt="zdepthFog09" /></p>
<p>The image above is showing control commonalities; 3ds Max on the left, After Effects on the right. If you play with these values in both software packages you will see that they give the exact same results, you even get more control over the exponential falloff by having three control points as opposed to one checkbox.</p>
<p>Other parameters in Max, such as color, environment color map, environment opacity map, and the entire layered fog type, are not as easily accessible in After Effects but are still attainable, you just need to get creative! For example, you can change the color by adding a &#8220;Hue/Saturation&#8221; effect to your depthPass layer and checking the &#8220;Colorize&#8221; option. You can get the same effect as the environment opacity map and layered fog by playing around with masks.</p>
<p>Anyways, tweak your fog settings until you find something you are happy with. I went with values of 32 for Input Black, 255 for Input White, and 0.70 for Gamma, all of which relate to the exponential falloff in Max, and then a value of 18 for Output Black (Near %) and 153 for Output White (Far %).</p>
<p>Go back to your main comp and you will see that we now have fog and Z-Depth from the same pass and they are working in unicen. Here is what your final image should look like.</p>
<p><img class="alignnone size-full wp-image-645" title="zdepthFog10" src="http://www.mathiesonfacer.com/wp-content/images/zdepthFog/zdepthFog10.jpg" alt="zdepthFog10" /></p>
<p>Well! Thats all! I hope you have found this tutorial helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathiesonfacer.com/blog/z-depth-fog-in-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stretchy Twist Bones</title>
		<link>http://www.mathiesonfacer.com/blog/stretchy-twist-bones/</link>
		<comments>http://www.mathiesonfacer.com/blog/stretchy-twist-bones/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 02:29:59 +0000</pubDate>
		<dc:creator>Mat</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.mathiesonfacer.com/wordpress/?p=199</guid>
		<description><![CDATA[Many character rigs require both stretchy limbs and twist bones in the same appendage. It can be tricky to get these two things working in unicen, and there are many different methods. I am going to show you the technique I have been using as of late. I prefer this method because it is very [...]]]></description>
			<content:encoded><![CDATA[<p>Many character rigs require both stretchy limbs and twist bones in the same appendage. It can be tricky to get these two things working in unicen, and there are many different methods. I am going to show you the technique I have been using as of late. I prefer this method because it is very straight forward, easy to set up and easy to maintain.</p>
<p><span id="more-199"></span></p>
<p>This tutorial is being done in 3ds Max 2008 and uses some beginner level MAXScript. <a href="http://www.mathiesonfacer.com/wp-content/sampleFiles/stretchyTwistBones/stretchyTwistBones_start.max">Click here to download the starting max file</a>.</p>
<p>I suggest first watching Paul Neale&#8217;s <a href="http://www.paulneale.com/tutorials/IKFKarm/IKFKarmSetup.html" target="_blank">IK/FK Arm video tutorial</a> and <a href="http://www.paulneale.com/tutorials/twistBones/twistBones.html" target="_blank">Twist Bones video tutorial</a> before going any further. I will be refering to many things he covers in these videos, I will be starting this tutorial where Paul leaves off at the end of his IK/FK Arm tutorial, and will be using the same technique for twist bones that Paul explains in his Twist Bones tutorial just implementing it in a different way.</p>
<p>The entire idea behind this method is that the twist bones are just going along for the ride with the blend bones, so we can set up our IK/FK blend system and stretch system fully and then just add the twist bones in after. Again, the twist bones are just going along for the ride, we are essentially keeping them completely separated from the actual rig.</p>
<p>Here is how your viewport should look when you open the starting file:</p>
<p><img class="alignnone size-full wp-image-646" title="stretchyTwistBones01" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones01.jpg" alt="stretchyTwistBones01" width="594" height="462" /></p>
<p>We will begin by putting our stretchy limb system in place. The way I like to do this is through the position list that should already exist on your blend bones, if you remembered to freeze their transform. I have a few reasons for doing it this way. The main reason is that if you put the stretchy limb system on the IK bones you need to set up position constraints on the blend system for it to blend to the stretched out position. Having position constraints on the blend system can create issues with the bones separating, the same reason you have to use look-at constraints and point helpers when creating a stretchy bone.</p>
<p>So, go to the nub bone of the blend bones chain, go into your curve editor and add a Position XYZ controller to the available slot and then in the Motion Panel rename it to &#8220;IK Stretch&#8221;. Then go back into the curve editor and add a float script controller to the X Position of IK Stretch. Create three new variables in the script controller, &#8220;sh&#8221;, &#8220;wr&#8221;, and &#8220;dis&#8221;, and then enter the expression &#8220;if ((distance sh wr) &#8211; dis) &gt; 0 then ((distance sh wr) &#8211; dis) / 2 else 0&#8243;. If you would like to understand what is actually happening with this expression and have a more in depth look at stretchy limb systems, you can pick up (I swear hes not paying me for the plugs) <a href="https://www.cg-academy.net/es_catalog/product_info.php?cPath=22_40&amp;products_id=41" target="_blank">Paul Neale&#8217;s Rigging DVDs from CG Academy</a>.</p>
<p><img class="alignnone size-full wp-image-647" title="stretchyTwistBones02" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones02.jpg" alt="stretchyTwistBones02" /></p>
<p>Next we will have to assign values to each of the variables we created here.</p>
<p>Select the first bone in the IK bone system, then select &#8220;sh&#8221; in the variables list in our script controller and click &#8220;Assign Node&#8221;. A window should appear. Put your mouse over &#8220;Objects&#8221;, which should be at the bottom of the list, right click and choose &#8220;Expand Objects&#8221;. Find the object highlighted yellow, which in this case should be ikBone01, select it and press OK.</p>
<p>Select the ikWrist control object, then select &#8220;wr&#8221; in the variables list and follow the same process as explained above.</p>
<p>Lastly we need to figure out what value to assign to our &#8220;dis&#8221; variable. Make sure you are at frame 0 so that the arm is fully extended. Select both the first bone in the IK bone system and the ikWrist control object, open your MAXScript Listener and evaluate the following line of code &#8220;distance $[1] $[2]&#8220;. Copy the returned value, go back into our script controller, select &#8220;dis&#8221; from the variables list and click &#8220;Assign Constant&#8221;. Paste the value we got from the Listener, click Evaluate and then OK.</p>
<p>Back in the script controller&#8217;s main window, click Evaluate and then Close.</p>
<p>You should not get any errors if you followed these steps correctly and find that now if you pull the ikWrist control further than the arm&#8217;s full extension, the blend system will go half the distance.</p>
<p><img class="alignnone size-full wp-image-648" title="stretchyTwistBones03" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones03.jpg" alt="stretchyTwistBones03" /></p>
<p>To get it to go the full distance, select the nub bone of the blend bones chain, the one we added the script controller to, and in the curve editor right click the IK Stretch controller and click copy. Select the forearm blend bone, named blend02, and in the curve editor go to the available slot in the position list, right click and select paste. When prompted as to whether you want this to be a copy or instance, choose instance. You will have to go back to the Motion panel and rename this one to IK Stretch as well. The blend bone system should now go the entire distance when you pull the ikWrist control further than its full extension.</p>
<p>We do have a slight problem here, but one that is easily fixed. Scrub the timeline through the entire animation I have set up on the rig. You&#8217;ll notice that by the end the ikWrist control has been stretched out and our stretchy limb system is working. If you select the ikWrist control and ramp up our IK/FK blend so we go over to FK you&#8217;ll notice that our stretch doesn&#8217;t go away.</p>
<p><img class="alignnone size-full wp-image-649" title="stretchyTwistBones04" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones04.jpg" alt="stretchyTwistBones04" /></p>
<p>To fix this we just need to wire the weights of our stretch system back into the IK/FK value that is on our control objects. You will have to do the following steps for each of the blend bones we added the script controllers to.</p>
<p>Select the bone, right click and select wire parameters. Go to Transform/Positions/Weights and click IK Stretch. Click any control object for the arm, IK or FK, and go to Modified Object/Attribute Holder/Custom_Attributes and click IK/FK. You want to create the wire going right to left with the expression &#8220;(100 &#8211; IK_FK) / 100&#8243;. Click connect and do the same for the next bone. The blend bones should now have the stretch system blend on and off when switching between IK and FK.</p>
<p><img class="alignnone size-full wp-image-650" title="stretchyTwistBones05" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones05.jpg" alt="stretchyTwistBones05" /></p>
<p>Now we can start creating our twist bones. Go to your top view and create two bone chains, each consisting of two bones and a nub.</p>
<p><img class="alignnone size-full wp-image-651" title="stretchyTwistBones06" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones06.jpg" alt="stretchyTwistBones06" /></p>
<p>We are now going to create stretchy bones from these bone chains. This is not the same as what we did above, which was a stretchy limb system. We can easily do this step by using <a href="http://www.jasonlabbe3d.com/scripts.html" target="_blank">Jason Labbe&#8217;s Stretchy Bones Tool</a>. Drag the script into Max&#8217;s viewport then double click the bone at the root of a bone chain to select the entire chain in it&#8217;s hierarchial order. Change the size from 25.0 to 3.0, turn off Box and turn on Cross, then click &#8220;Create Stretchy Bones&#8221;. Do this for both bone chains. Your scene should now look like this:</p>
<p><img class="alignnone size-full wp-image-652" title="stretchyTwistBones07" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones07.jpg" alt="stretchyTwistBones07" /></p>
<p>If you select and move one of the resulting red point helpers that were created you will see that our bones are now constrained to the point helpers and will stretch accordingly. This is great, but not exactly what we are looking for yet. If you watched <a href="http://www.paulneale.com/tutorials/twistBones/twistBones.html" target="_blank">Paul&#8217;s Twist Bones tutorial</a><a href="http://www.paulneale.com/tutorials/twistBones/twistBones.html" target="_blank"></a> you&#8217;ll have noticed that the calculations being done in the parameter wiring rely on the bone hierarchy and rotation being inherited; we no longer have a hierarchy in place with the current stretch bones setup. What we want to do is re-create the hierarchy, but through the point helpers instead of the bones.</p>
<p>Select and link the point helper that controls the nub bone to the point helper that controls the middle bone, and then that point helper to the one that controls the root bone. Do this on both bone chains.</p>
<p><img class="alignnone size-full wp-image-653" title="stretchyTwistBones08" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones08.jpg" alt="stretchyTwistBones08" /></p>
<p>Now we want to get our twist bones to follow along with our blend bones. Hide the ik and fk layers so we only see the blend bones and our twist bones. In Bone Tools, under the Animation menu, we want to turn on the front fin for all of these bones and set the size to 1.0.</p>
<p>Select the point helper that controls the root bone for either of the twist bone hierarchies and align it positionally and orientationally to the pivot of the forearm blend bone. With the point helper still selected, position constrain it to the forearm blend bone and then position constrain it to the nub blend bone. It should now be sitting half way on our forearm blend bone. We want this to be sitting two thirds of the way towards the elbow joint, so in the motion panel select our position constraint and set the weights to 65.5 for blend02 (forearm bone) and 33.5 for blend03 (nub bone). Now do the same thing for the next two point helpers but have the middle point helper constrained two thirds towards blend03 and the the nub point helper constrained 100% to blend03.</p>
<p>Follow the same technique for the other twist bones on the bicep. You&#8217;ll probably notice that it doesn&#8217;t appear as though your bones are lined up properly. Select all of the twist bones and in Bone Tools click &#8220;Reset Stretch&#8221;, it can be found near the bottom of the rollout. After you&#8217;re done it should look like this.</p>
<p><img class="size-full wp-image-682 alignnone" title="stretchyTwistBones09" src="http://www.mathiesonfacer.com/wp-content/images/stretchyTwist/stretchyTwistBones09.jpg" alt="stretchyTwistBones09" /></p>
<p>Now if you unhide the ik and fk layers and play through the animation you will see that the twist bones follow along perfectly with our blend bones. All there is left to do is set up the twisting. I am not going to go through how to set up the twist system, since it is the same as what Paul outlines in his tutorial. All you have to remember is that we re-created our bone hierarchy through the point helpers we used to create our stretchy bones, so anything Paul does to the twist bones you just need to do with the point helpers instead.</p>
<p>Hope you learned something from reading this tutorial. <a href="http://www.mathiesonfacer.com/wp-content/sampleFiles/stretchyTwistBones/stretchyTwistBones_finish.max">Here is the finished Max file</a> incase you ran into some problems along the way and want to see how the final thing looks, and <a href="http://www.mathiesonfacer.com/wp-content/sampleFiles/stretchyTwistBones/stretchyTwistBones_finishWithTwists.max">here is the final with all the twists set up</a>.</p>
<p>Now, with no further adieu, <a href="http://www.paulneale.com/tutorials/twistBones/twistBones.html" target="_blank">Paul&#8217;s Twist Bones video tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathiesonfacer.com/blog/stretchy-twist-bones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
