<?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>Technical Art for Games &#187; Tutorial</title>
	<atom:link href="http://adammechtley.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://adammechtley.com</link>
	<description>Tips, Tutorials, and Tools - by Adam Mechtley</description>
	<lastBuildDate>Thu, 12 Jan 2012 02:11:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using Multiple AssetPostprocessors</title>
		<link>http://adammechtley.com/2011/01/using-multiple-assetpostprocessors/</link>
		<comments>http://adammechtley.com/2011/01/using-multiple-assetpostprocessors/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 22:20:14 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://adammechtley.com/?p=865</guid>
		<description><![CDATA[In working on my asset pipeline for my current Unity project, I stumbled across something handy today I hadn&#8217;t needed to use before. As such, I figured a short post might help me remember and spread a useful tip. Specifically, the AssetPostprocessor class contains a function GetPostprocessOrder(). I didn&#8217;t find the documentation to be immediately [...]]]></description>
			<content:encoded><![CDATA[<p>In working on my asset pipeline for my current Unity project, I stumbled across something handy today I hadn&#8217;t needed to use before. As such, I figured a short post might help me remember and spread a useful tip. Specifically, the AssetPostprocessor class contains a function <a href="http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.GetPostprocessOrder.html">GetPostprocessOrder()</a>. I didn&#8217;t find the documentation to be immediately obvious, so here&#8217;s a quick example.</p>
<p>A couple of weeks ago, I posted up an <a title="Automatically export Maya blend shapes to Unity" href="http://adammechtley.com/2011/01/gdc-and-a-new-years-resolution/">example video for an automated Blend Shape extraction tool</a> I made for Unity and Maya. Moving this tool back into Touch KO 2.0, I needed it to work in conjunction with another big AssetPostprocessor script that sets up my boxer prefabs. Basically, I needed to make sure that my blend shapes were all set up on the character before I start building the prefab, so that I can link them up as needed.</p>
<p>My first thought was to make my prefab setup script inherit from the blend shape importer, call the base method, and then call all of my setup stuff. This approach would work, provided that my base method appropriately contained controls to avoid reduplication of information. Then I stumbled across this function. All I had to do was add it to my AssetPostprocessor class that sets up my boxer prefab.</p>
<pre class="code">/*
 * Ensure this script executes after blend shapes have been set up
 * */
public override int GetPostprocessOrder ()
{
	return 100;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://adammechtley.com/2011/01/using-multiple-assetpostprocessors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SVN and UAS to Synchronize Library Code in Unity</title>
		<link>http://adammechtley.com/2011/01/using-svn-and-uas-to-synchronize-library-code-in-unity/</link>
		<comments>http://adammechtley.com/2011/01/using-svn-and-uas-to-synchronize-library-code-in-unity/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 02:01:33 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity Asset Server]]></category>

		<guid isPermaLink="false">http://adammechtley.com/?p=853</guid>
		<description><![CDATA[So, you&#8217;ve bought Unity Pro and the Unity Asset server. If you&#8217;re like me, in spite of its disadvantages, you really like the UAS. It&#8217;s integrated into the editor and does a much cleaner job of versioning on serialized assets than does external version control, because it operates on the project&#8217;s Library folder rather than [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;ve bought <a title="Unity game engine" href="http://unity3d.com/unity/">Unity Pro</a> and the <a title ="Unity Asset Server" href="http://unity3d.com/unity/features/unity-asset-http://unity3d.com/unity/features/unity-asset-server">Unity Asset server</a>. If you&#8217;re like me, in spite of its disadvantages, you really like the UAS. It&#8217;s integrated into the editor and does a much cleaner job of versioning on serialized assets than does external version control, because it operates on the project&#8217;s Library folder rather than requiring you to generate and synchronize all of the sidecar data. However, there are some key things it cannot do.</p>
<p>I don&#8217;t have very complicated needs like branching and so on, but I do have a library of common code that I share across projects. This library contains a bunch of useful stuff that doesn&#8217;t rely on any game systems: things like helper classes, math classes, serialization for built-in types, and so on. The trouble is, I&#8217;m often working simultaneously on a bunch of projects that share my library (or worse still <em>parts</em> of my library), and so it can be a pain in the neck to push the changes out across all my projects. As such, I took the time to set up a system using Subversion working on top of my UAS projects in order to synchronize my library code.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/qf80-kcDIyQ?hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qf80-kcDIyQ?hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object><br />
<span id="more-853"></span><br />
Apart from Unity, you obviously need Subversion. If you&#8217;re on OS X, this is part of Snow Leopard, so you&#8217;re good to go. Because I&#8217;m not especially adept at all the setup, and because there are plenty of <a title="Setting up Subversion in Snow Leopard" href="http://www.mosacrea.com/howto-setup-a-svn-server-under-mac-os-x-10-6-in-less-than-1-min/">really good tutorials</a>, I won&#8217;t go through all the details. Basically, you need to prepare a repository somewhere and get a good SVN client. If you&#8217;re on OS X, I really recommend <a title = "Cornerstone SVN client for OS X" href="http://www.zennaware.com/cornerstone/index.php">Cornerstone</a>. It&#8217;s not open source, but it does some key things I need:</p>
<ol>
<li>It has a great GUI. Apart from letting you do things easily, it also allows you to set up each working copy to show when it is out of sync, so I know which Unity projects needs to pull down new library updates.</li>
<li>The GUI lets you effortlessly modify your snvignore settings, allowing you to exclude all of your non-library code from your SVN repo. For example, I only want to include folders like <strong>Assets/ Scripts/Library</strong>, and <strong>Assets/Editor/Library</strong>, so I want to be able to easily exclude my per-project code and assets from the SVN repo.</li>
<li>It lets me take advantage of sparse checkout features in SVN. This feature was actually the deciding factor for me, as I distribute <a title="Adam Mechtley's Unity Asset Store Tools" href="http://adammechtley.com/2011/01/unity-asset-store-updates/">packages in the Unity Asset Store</a> with limited copies of my library code. For example, my <a title="Adam Mechtley's Biped Editor for Unity" href="http://adammechtley.com/2010/11/biped-editor-released-2/">Biped Editor package</a> contains library code for my VectorHelpers class, but not FloatMatrix. This requirement was also part of the reason I opted for SVN instead of Git. Maybe it&#8217;s possible to manage it easily with Git, but it wasn&#8217;t something I was up for fighting against!</li>
</ol>
<p>The basic requirement to make this work as painlessly as possible is to have parallel structure in your Unity projects. I have a generally parallel structure, but because of Asset Store requirements, for example, my library code needs to be in folders like <strong>Assets/PackageName/ Scripts/Library</strong>, whereas all of my games are simply <strong>Assets/ Scripts/Library</strong>. Because of this issue, instead of making my <strong>Assets</strong> folder top-level in my repo, the repo simply has <strong>Scripts/Library</strong>, <strong>Editor/Library</strong>, and <strong>Plugins/Library</strong> at the top level. The problem in the video, as you can see, is that all of my working copies for my games are called Assets, whereas having <strong>Assets</strong> as the top-level folder in my repo would allow Cornerstone to display my Unity project folder names in the working copy list, so I wouldn&#8217;t have to look in the inspector to double-check what project I&#8217;m in. Depending on your SVN client, you may or may not experience this problem. Probably the absolute easiest way to set your project up is to have an <strong>Assets/Library</strong> and an <strong>Assets/Game</strong> folder in your project, the latter of which contains all of your actual per-game stuff. Using this organization, you would only have to apply svnignore to the <strong>Assets/Game</strong> folder in your working copy, instead of having to add all of your individual project folders. I leave it up to you to know what is best for your needs, but it suffices to say &#8220;stop and think about it before you pull the trigger.&#8221; Once you&#8217;ve picked out your organization system, export your library code as a unitypackage from Unity&#8217;s main menu.</p>
<p>At this point, create a new, empty Unity project and make it a working copy of your new SVN repo. In my case, I had to point to my project folder and call the working copy Assets because of my organizational structure. Again, if your repo will contain <strong>Assets</strong>, your project folder can be your working copy folder, but you&#8217;ve probably already figured that out.</p>
<p>Now, import your unitypackage into this empty project using the one you just created. This will populate your project with your library code.</p>
<p>Finally, check your library into the repo and voila! Now you have a common code library under version control sitting on top of your Unity project, which is managed using the Asset Server.</p>
<p>Now, if you set up a new project, just always make it a working copy of your repo first thing. If you dump all of your game assets into a folder that is already ignored (e.g., <strong>Assets/Game</strong>), then you shouldn&#8217;t have further work to do. Otherwise, make sure you remember to ignore your non-library folders when you commit any library code changes to your SVN repo. Using a client like Cornerstone, any new folders will show up in bold in your working copy view, and you can easily ignore them from the inspector or using the RMB context menu.</p>
<p>If you want to get extant projects set up on your SVN repo, you may want to first rename your extant project folders whose names conflict with those on the repo. You can then make your project a working copy and move over anything from your renamed folders that you need to keep and ignore or commit to the repo.</p>
<p>I hope some of you find this helpful, but if not at least I&#8217;ve documented it for myself!</p>
]]></content:encoded>
			<wfw:commentRss>http://adammechtley.com/2011/01/using-svn-and-uas-to-synchronize-library-code-in-unity/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Root Motion Computer for Unity</title>
		<link>http://adammechtley.com/2010/05/root-motion-computer-for-unity/</link>
		<comments>http://adammechtley.com/2010/05/root-motion-computer-for-unity/#comments</comments>
		<pubDate>Wed, 26 May 2010 16:45:22 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[3D Animation]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://adammechtley.com/?p=786</guid>
		<description><![CDATA[I recently finished up a new component for Unity as part of a contract job with Mixamo. For those of you who are unaware, Mixamo provides an online motion capture download and retargeting service powered by HumanIK. It lets you use sliders to creatively adjust a piece of motion capture data and then automatically retarget [...]]]></description>
			<content:encoded><![CDATA[<p>I recently finished up a new component for Unity as part of a contract job with <a title="Mixamo: Character animation in seconds" href="http://mixamo.com">Mixamo</a>. For those of you who are unaware, Mixamo provides an online motion capture download and retargeting service powered by HumanIK. It lets you use sliders to creatively adjust a piece of motion capture data and then automatically retarget it onto your own hierarchy and download it for use in your game. It&#8217;s really slick and pretty affordable, so it&#8217;s definitely worth checking out, particularly for any indie developers out there.</p>
<p>At any rate, the component that I created is designed to let animation data, rather than procedural velocity values, drive a character&#8217;s motion in space. The component sits on top of Unity&#8217;s animation API to let you simply play, crossfade, and blend animations using any of the existing API methods, and the computer takes care of everything else after the fact. The way it works is by tracking the position and rotation of the pelvis in the space of the character&#8217;s root node for each active AnimationState and then backward applying this motion to the root node itself and snapping the pelvis back into its position hovering over the root. Since the source code is all available in the project, I won&#8217;t belabor the details too much here, but you can certainly ask me if you have any questions. (The one thing perhaps worth mentioning, as an addendum to the video, is that the pelvis forward axis is not strictly necessary for computing output: only for displaying debug information. For computation, the character&#8217;s rotation is determined using the pelvis right axis.)</p>
<p>You can <a title="Download free Unity project with Root Motion Computer component and motion-captured animations" href="http://content.mixamo.com/mixamo_animationdrivenplayablecharacter.zip">download an example project from Mixamo</a> that contains the component as well as a sample character with some animations. Because the <a title="Root Motion Computer tutorial" href="http://www.mixamo.com/c/tutorials#unity2">tutorial video on the Mixamo website</a> is compressed pretty substantially, I have also uploaded a copy to my Vimeo account in case you would like to watch it in full HD resolution.</p>
<p><object width="640" height="360"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12052874&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12052874&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://adammechtley.com/2010/05/root-motion-computer-for-unity/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>New Section for Unity Tutorials</title>
		<link>http://adammechtley.com/2010/04/new-section-for-unity-tutorials/</link>
		<comments>http://adammechtley.com/2010/04/new-section-for-unity-tutorials/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 01:26:42 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://adammechtley.com/?p=717</guid>
		<description><![CDATA[Among other things, I&#8217;ve been developing some new tutorial videos for a friend (and former instructor) of mine who teaches in LA. He&#8217;s been spinning up a program focused on iPhone development using Unity, so I&#8217;ve started to put together some introductory Unity videos for him to share with his art students. As such, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Among other things, I&#8217;ve been developing some new tutorial videos for a friend (and former instructor) of mine who teaches in LA. He&#8217;s been spinning up a program focused on iPhone development using Unity, so I&#8217;ve started to put together some introductory Unity videos for him to share with his art students. As such, I&#8217;ve added a <a title="Free Unity video tutorials for artists" href="../../../tutorials/unity/">tutorials section for Unity</a>, which currently features a video on basics. As you can see from visiting the section, I have a few more lined up in the short term, so it will be growing over time. Let me know if there&#8217;s anything specific you might like to see in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://adammechtley.com/2010/04/new-section-for-unity-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Video Tutorial</title>
		<link>http://adammechtley.com/2009/01/new-video-tutorial-2/</link>
		<comments>http://adammechtley.com/2009/01/new-video-tutorial-2/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 15:26:12 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[Rigging]]></category>
		<category><![CDATA[3D Animation]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.adammechtley.com/?p=337</guid>
		<description><![CDATA[I have completed my second rigging video tutorial. This one focuses on how to rig a twist structure in a forearm that is easily portable into game code, does not interfere with IK, and is not affected by Gimbal locking on the hand.]]></description>
			<content:encoded><![CDATA[<p>I have completed my <a href="../../../tutorials/rigging/forearm-twist/">second rigging video tutorial</a>. This one focuses on how to rig a twist structure in a forearm that is easily portable into game code, does not interfere with IK, and is not affected by Gimbal locking on the hand.</p>
<p><iframe width="640" height="400" src="http://www.youtube.com/embed/KYY7qo0z5h8" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://adammechtley.com/2009/01/new-video-tutorial-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

