<?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>Softimage Blog &#187; Animation</title>
	<atom:link href="http://www.softimageblog.com/archives/category/animation/feed" rel="self" type="application/rss+xml" />
	<link>http://www.softimageblog.com</link>
	<description>People and thoughts behind Softimage in production...</description>
	<lastBuildDate>Mon, 21 Jun 2010 20:40:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Two Undocumented Lip sync commands in Softimage 2011 SP1</title>
		<link>http://www.softimageblog.com/archives/517#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=two-undocumented-lip-sync-commands-in-softimage-2011-sp1</link>
		<comments>http://www.softimageblog.com/archives/517#comments</comments>
		<pubDate>Mon, 21 Jun 2010 20:40:48 +0000</pubDate>
		<dc:creator>Luc-Eric</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[JScript]]></category>

		<guid isPermaLink="false">http://www.softimageblog.com/?p=517</guid>
		<description><![CDATA[In 2011 SP1, there are three new commands to get Face Robot lip sync data out into your own tools.  One of them doesn't even require the use of Face Robot and calls the speech recognition library directly]]></description>
			<content:encoded><![CDATA[<p>Hi there! It&#8217;s been a while..</p>
<p>In Softimage 2010, a new lip sync feature was added to Face Robot (here&#8217;s the <a href="http://softimage.wiki.softimage.com/xsidocs/dp888102.htm">doc</a>).  In 2011 SP1, there are three new commands to get the data out into your own tools.  One of them doesn&#8217;t even require the use of Face Robot and  calls the speech recognition library directly.</p>
<p>The commands return VBScript-compatible multi-dimensional arrays.    This is transparent in VBScript and Python, but it requires a bit of magic in JScript, so check the example in the first command if that&#8217;s what you&#8217;re using.</p>
<h2><strong>Getting Phonemes without Face Robot</strong></h2>
<h2>SIExtractPhonemes</h2>
<h3>Description</h3>
<div>
Extracts phonemes from an audio file using a text to guide the recognition</p>
</div>
<h3>Scripting Syntax</h3>
<div>
<table>
<tbody>
<tr>
<td>
<pre>oReturn = SIExtractPhonemes( Language, FileName, GuideText );</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Return Value</h3>
<div>
<p>Returns a multi-dimentional array of results. Each column will contain</p>
<p>1) The Unicode IPA code of the phoneme</p>
<p>2) The Start Time of the  phoneme, in seconds</p>
<p>3) The End Time of the phoneme, in seconds</p>
<p>4)  A human-readable hint of phoneme, useful for debugging</p>
</div>
<h3>Parameters</h3>
<div>
<table cellspacing="5" cellpadding="5">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>Language</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/String.htm">String</a></td>
<td>Language to use. &#8220;en&#8221; for English, or &#8220;jp&#8221; for Japanese</td>
</tr>
<tr>
<td>FileName</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/String.htm">String</a></td>
<td>Path to an audio file, for example a .wav or an .avi file. Mono and 16000k  is recommend. Same audio formats as Audio in Softimage; MP3 not supported.</td>
</tr>
<tr>
<td>GuideText</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/String.htm">String</a></td>
<td>Text that match the spoken words in the audio file. Avoid any unusual  punctuations or strange characters that may throw off the engine</td>
</tr>
</tbody>
</table>
</div>
<h3>Examples</h3>
<div>
<h4>JScript Example</h4>
<div>
<table>
<tbody>
<tr>
<td>
<pre>//returns a VBArray object, which require using the .getItem method in Jscript because they are not
//native objects there.
//However, they work transparently like multi-dimentionnal arrays in VBscript and Python
var res = SIExtractPhonemes ("en", "s:\\here_be_dragons.wav", "Here be dragons, the map says");
arraysize = res.ubound( 1 );
logmessage( arraysize + "phonemes found" );
for (  i=0; i &lt; arraysize; i++)
{
logmessage( "IPA#" + res.getItem(i,0)
         + "(" + res.getItem(i,3) + ") "
         + "Start Time(sec) " + res.getItem(i,1)
         + "End Time(sec) " + res.getItem(i,2) );
}</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p><strong><br />
</strong></p>
<h2><strong>Getting Lip Sync Stuff Out of Face Robot</strong></h2>
<p>This allows the artists to tweak the phonemes with the Face Robot UI, but used the data outside of Face Robot, perhaps in a game engine that does phoneme blending already.</p>
<p>The second command even allows you to get the result of the blend algorithm of Face Robot, so you can make a simplified playback environment.</p>
<h2>GetPhonemeFromSpeechClip</h2>
<h3>Description</h3>
<div>
<p>Returns the data of the Face Robot speech operator, as shown on the tracks of  in the Lip Sync view. The data starts at time zero, and needs to be offsetted by  the offset of the Speech Clip.</p>
</div>
<h3>Scripting Syntax</h3>
<div>
<table>
<tbody>
<tr>
<td>
<pre>oReturn = GetPhonemeFromSpeechClip( SpeechClip );</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Return Value</h3>
<div>
<p>Returns a multi-dimentional array of results. Each column will contain</p>
<p>1) The Unicode IPA code of the phoneme</p>
<p>2) The Start Time of the  phoneme, in seconds</p>
<p>3) The End Time of the phoneme, in seconds</p>
<p>4)  A human-readable hint of phoneme, useful for debugging</p>
<p>5) weight for this  phoneme</p>
<p>6) in falloff for this phoneme</p>
<p>7) out falloff for this  phoneme</p>
<p>8) shape weight for this phoneme</p>
<p>9) shape in falloff for  this phoneme</p>
<p>10) shape out falloff for this phoneme</p>
<p>11) blend  start scale factor</p>
<p>12) blend end scale factor</p>
<p>13) phoneme  variation</p>
</div>
<h3>Parameters</h3>
<div>
<table cellspacing="5" cellpadding="5">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>SpeechClip</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/String.htm">String</a></td>
<td>The Speech Clip from the animation mixer</td>
</tr>
</tbody>
</table>
</div>
<h3>Examples</h3>
<div>
<h4>VBScript Example</h4>
<div>
<table>
<tbody>
<tr>
<td>
<pre>phonemes = GetPhonemesFromSpeechClip ("Face.Mixer.Phoneme_Speech.SpeechAction_Clip")
LogMessage "phoneme data"
for i = 0 to UBound( phonemes )
	LogMessage "IPA # " &amp; phonemes(i, 0) &amp; "(" &amp; phonemes(i, 3) &amp; ")" &amp; " Start (sec)" &amp; phonemes(i, 1) &amp; " End (sec)" &amp; phonemes(i, 2)
next
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h2>GetPhonemeBlendFromSpeechClip</h2>
<h3>Description</h3>
<div>
<p>Queries the Face Robot speech operator for the list of phonemes and weights  at a given time, as evaluated by its blend algorithm. At a given time there  generally is the current phoneme, as shown in the lipsync view, but also some of  the previous and the next one. With its different parameters, the speech  operator could evaluate a different blend for the lips, jaw and tongue.</p>
</div>
<h3>Scripting Syntax</h3>
<div>
<table>
<tbody>
<tr>
<td>
<pre>oReturn = GetPhonemeBlendFromSpeechClip( SpeechClip, [Channel], [Time] );</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>Return Value</h3>
<div>
<p>Returns a multi-dimentional array of results. Each column will contain</p>
<p>1) The Unicode IPA code of the phoneme. Value zero is the rest pose</p>
<p>2) A human-readable hint of phoneme, useful for debugging</p>
<p>3) The  weight of the viseme at this time</p>
<p>4) The viseme variation selected by the  user</p>
</div>
<h3>Parameters</h3>
<div>
<table cellspacing="5" cellpadding="5">
<tbody>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>SpeechClip</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/String.htm">String</a></td>
<td>The Speech Clip from the animation mixer</td>
</tr>
<tr>
<td>Channel</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/Integer.htm">Integer</a></td>
<td>0 for Lips, 1 for Jaw, 2 for TongueDefault Value: 1</td>
</tr>
<tr>
<td>Time</td>
<td><a href="http://softimage.wiki.softimage.com/sdkdocs/Integer.htm">Integer</a></td>
<td>Frame at which to evaluate the blendDefault Value: Current frame.</td>
</tr>
</tbody>
</table>
</div>
<h3>Examples</h3>
<div>
<h4>VBScript Example</h4>
<div>
<table>
<tbody>
<tr>
<td>
<pre>phonemes = GetPhonemeBlendFromSpeechClip ("Face.Mixer.Phoneme_Speech.SpeechAction_Clip")
LogMessage "phoneme blend"
for i = 0 to UBound( phonemes )
	LogMessage "IPA # " &amp; phonemes(i, 0) &amp; "(" &amp; phonemes(i, 1) &amp; ")" &amp; " Weight " &amp; phonemes(i, 2 )
next</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=517&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/517/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Jitters</title>
		<link>http://www.softimageblog.com/archives/124#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=more-jitters</link>
		<comments>http://www.softimageblog.com/archives/124#comments</comments>
		<pubDate>Sat, 09 Dec 2006 19:14:23 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=124</guid>
		<description><![CDATA[A while ago I posted a Scripted Operator for XSI that generates jittering animation.
Well, a colleague of mine, Etienne Pellerin, and myself are starting to work in C++ in XSI so the Jitter tool was rewritten.
New in Jitter v1.5:

Installation is smoother &#8211; just drop it into your favourite Application/Plugins folder
Performance is increased when you have [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.xsi-blog.com/?p=23">while ago</a> I posted a Scripted Operator for XSI that generates jittering animation.</p>
<p>Well, a colleague of mine, Etienne Pellerin, and myself are starting to work in C++ in XSI so the Jitter tool was rewritten.</p>
<p>New in Jitter v1.5:</p>
<ul>
<li>Installation is smoother &#8211; just drop it into your favourite Application/Plugins folder</li>
<li>Performance is increased when you have large numbers of Jitter Ops</li>
<li>You can now apply the operator to parameter groups such as kine.local.ori.euler</li>
</ul>
<p><span id="more-124"></span>You can <a href="/userContent/patrickb/Jitter/Jitter_v1.5.zip">download</a> the new version and beat the snot out of it if you wish. I can&#8217;t guarantee it&#8217;ll survive though, and if it doesn&#8217;t drop me a line and I can fix bugs.</p>
<p>I only have a windows version but if someone has a Linux box and would care to recompile I can host both versions.</p>
<p>Cheers,<br />
Patrick</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=124&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/124/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Soft IK in XSI, Part II &#8211; Stretchy bones</title>
		<link>http://www.softimageblog.com/archives/109#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=soft-ik-in-xsi-part-ii-stretchy-bones</link>
		<comments>http://www.softimageblog.com/archives/109#comments</comments>
		<pubDate>Wed, 16 Aug 2006 17:28:06 +0000</pubDate>
		<dc:creator>Andy Nicholas</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Programming / Scripting]]></category>
		<category><![CDATA[Rigging]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=109</guid>
		<description><![CDATA[When I wrote the first article, I hadn&#8217;t planned on writing a sequel, but a couple of people on XSIBase asked me to look into how I could extend the Soft IK system to work with a stretchy bone chain. 
Initially, figuring out how this could work seems like a pretty tricky problem. The bone [...]]]></description>
			<content:encoded><![CDATA[<p>When I wrote the first article, I hadn&#8217;t planned on writing a sequel, but a couple of people on XSIBase asked me to look into how I could extend the Soft IK system to work with a <em>stretchy</em> bone chain. </p>
<p>Initially, figuring out how this could work seems like a pretty tricky problem. The bone chain needs to stretch intuitively to give the impression that it&#8217;s stuck to the IK effector. But we also need it to flatten gradually to avoid the snap effect. Unfortunately, the only thing we have available to us to control these two effects, is the ability to change the length of the bones, since the end position of the chain must always be located at the effector. </p>
<p>So we need to scale the bones to allow them to stretch, but at a specific rate to make sure we avoid the snap. Like this:</p>
<p><img src="/userContent/anicholas/softik/StretchyChain.gif" alt="Stretchy Soft IK" /></p>
<p><span id="more-109"></span>The first thing to do is to look at how we solved the problem for the non-stretchy bone chain. When we look at what happens when we move the Soft Effector past the point where it starts to leave the original IK effector behind, all we want to do for the stretchy bone chain system is make sure that the bone chain gets longer so that the original IK effector is at the same position as the Soft Effector. But we need to do this while also keeping the bones angles the same, this avoids the snap effect since the bone angles would change at exactly the same rate as in the non-stretchy bone chain system.</p>
<p>A diagram should make things a bit clearer. Basically, given a non-stretchy chain, we want to match the position of the two effectors by scaling the chain length, but without changing the bone angles, like this:</p>
<p><img src="/userContent/anicholas/softik/ChainScale.gif" alt="Scaling the Soft IK chain" /></p>
<p>Okay, so that doesn&#8217;t seem too hard. We just need to figure out how much to move the IK Effector to match the position of the soft effector. </p>
<p>The only way we can do this is by changing the length of the bone chain. Again, this initially looks like quite a tricky problem, until you realize that scaling the length of each bone by some value X, also scales the distance of the original IK effector from the IK root by a factor of X as well. A simple test proves it (and it can be easily shown with a little math too):</p>
<p><img src="/userContent/anicholas/softik/ScaleChain.gif" alt="Scaling bone lengths" /></p>
<p>This diagram shows a bone chain with bones of different lengths, before and after I scaled each individual bone length by a factor of 2. It can be seen that the IK effector has traveled directly away from the IK root and has doubled it&#8217;s distance from it. Not only that, but the bone angles have remained unchanged. This is exactly what we need!</p>
<p>Now, all we need to do is to figure out the amount we need to scale each bone length to make the original IK effector match the position of the soft effector. That scale factor is just the ratio of the distances of the two effectors:</p>
<p><em>Scale Factor = EvalDistance(IK root, Soft Effector) / EvalDistance(IK root, original IK effector)</em></p>
<p>Where EvalDistance() is just a function that measure the distance between the two objects.</p>
<p>Finally, we need to position constrain the original IK effector to the soft effector, so that it follows it. Otherwise, all that would happen is that the length of the chain would change.</p>
<p>So that&#8217;s it, we&#8217;re there. All that remains is to package it all up into a plugin with a handy custom property to drive it all. This is what the new property page looks like:</p>
<p><img src="/userContent/anicholas/softik/StretchyPPG.gif" alt="Stretchy Soft IK PPG" /></p>
<p>The bone lengths can be adjusted (and even animated) from this PPG, as well as the Soft Distance parameter, which behaves in exactly the same way as in the non-stretchy Soft IK. The bone lengths are all driven from this PPG using expressions. Note, that for extra performance we only have one Scripted Operator here which operates on the BoneScale parameter of the PPG. </p>
<p> I&#8217;ve updated the original Soft Effector script to include a new menu item to apply the Stretchy Bone Soft IK system to any chain you select.</p>
<p><a href="/userContent/anicholas/softik/FXNut_SoftEffector.zip">Soft Effector Download (3Kb)</a></p>
<p>Incidentally, if you ever want to remove the Soft IK (stretchy or otherwise) from a bone chain. All you have to do is delete the Soft Effector object. All the expressions and operators will be automatically deleted since they will have lost their connections. Nice and tidy!</p>
<p>P.S. Thanks to Daniele Niero for suggesting I cache the math objects inside the operator user data!</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=109&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/109/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Soft IK in XSI</title>
		<link>http://www.softimageblog.com/archives/108#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=soft-ik-in-xsi</link>
		<comments>http://www.softimageblog.com/archives/108#comments</comments>
		<pubDate>Mon, 14 Aug 2006 12:48:12 +0000</pubDate>
		<dc:creator>Andy Nicholas</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Programming / Scripting]]></category>
		<category><![CDATA[Rigging]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=108</guid>
		<description><![CDATA[When an IK chain extends towards its full length, it will tend to snap into it&#8217;s final position. To prevent this from happening, it is possible to give the appearance that the IK chain is stiffening as it extends towards it&#8217;s full length. This technique isn&#8217;t new and similar functionality is already implemented in Cinema [...]]]></description>
			<content:encoded><![CDATA[<p>When an IK chain extends towards its full length, it will tend to snap into it&#8217;s final position. To prevent this from happening, it is possible to give the appearance that the IK chain is stiffening as it extends towards it&#8217;s full length. This technique isn&#8217;t new and similar functionality is already implemented in Cinema 4D.</p>
<p>In XSI, we need a way of allowing the chain to gradually fall behind the position of the effector. This stops the effector from snapping the chain into the final position, and gives rise to a much more natural motion (as seen below).</p>
<p><img src="/userContent/anicholas/softik/SoftIK.gif" alt="Soft IK Comparison" /><br />
<em>(Note: If you are unable to view the GIF animation, you may need to change settings in your Firewall. For example, in Zone Alarm, you need to disable Privacy->Ad Blocking)</em></p>
<p><span id="more-108"></span>The snap effect visible in the top chain isn&#8217;t due to some inaccuracy in the IK calculation, but is just down to a simple geometrical effect. It can be shown mathematically (see diagram below) that as the effector pulls the chain into the final position, the velocity of the bones towards their final position tends towards infinity! This is obviously not desirable and can make the animation look jerky and artificial.<br />
<a href="/userContent/anicholas/softik/BoneSnap.gif" target="_blank"><br />
<img src="/userContent/anicholas/softik/BoneSnap_thumb.gif" alt="Why snapping happens" /></a><br />
<em>(click to enlarge)</em></p>
<p>To achieve the type of motion shown in the lower chain, we need to add an extra object which is used to drive the IK chain effector. A scripted operator links the two objects and we use a mathematical expression to give the desired result. The only bits of information the operator needs are the total chain length, and something I call the &#8220;Soft Distance&#8221;. This represents the distance from the chain&#8217;s full extension that the effect starts to work.</p>
<p>There is one downside with this approach, as it means you can&#8217;t fix the end point of the chain in position. However, this can be solved as long as you are willing to put a small amount of extra work to animate the Soft Distance parameter.</p>
<p>The soft effector object has a custom property to allow you to easily control the operator.</p>
<p><img src="/userContent/anicholas/softik/PPG.gif" alt="Soft Effector PPG" /></p>
<p>To make things easier for you, the Chain Length is calculated by an expression which sums the length of each bone in the chain. This allows you to change the length of a bone, and still have the Soft IK work.</p>
<p>In the diagram below, the Soft Distance is represented by the distance between the green and the red lines (actually, they&#8217;re circles, but too large to see). As soon as the effector reaches the green line, our scripted operator starts to lag the chain effector behind our soft effector. This is done while making sure that we have no jerkiness in the motion of the chain effector.</p>
<p><img src="/userContent/anicholas/softik/SoftIK_Closeup.gif" alt="Soft IK Closeup" /><br />
<em>(Note: If you are unable to view the GIF animation, you may need to change settings in your Firewall. For example, in Zone Alarm, you need to disable Privacy->Ad Blocking)</em></p>
<p>The equation used to create this effect is shown below:</p>
<p><a href="/userContent/anicholas/softik/Equation.gif" target="_blank"><br />
<img src="/userContent/anicholas/softik/Equation_thumb.gif" alt="Soft Effector Equation" /></a><br />
<em>(click to enlarge)</em></p>
<p>For a chain length of 3 and a soft distance of 1, this equation looks something like this:</p>
<p><a href="/userContent/anicholas/softik/MainGraph.gif" target="_blank"><img src="/userContent/anicholas/softik/MainGraph_thumb.gif" alt="Distance Graph" /></a><br />
<em>(click to enlarge)</em></p>
<p>You can use the following link to download the Soft Effector plugin:</p>
<p><a href="/userContent/anicholas/softik/FXNut_SoftEffector.zip">Soft Effector Download (3 Kb)</a></p>
<p>(Note that this also features the Stretchy Bone Chain extension shown in <a href="/archives/109">Part 2</a> of this article)</p>
<p>To install the plugin, just download the zip file, unzip the script, and copy it to a &#8220;Plugins&#8221; folder. So for example, you can use your &#8220;C:\users\<em>username</em>\Softimage\XSI\Application\Plugins&#8221; folder, or one in your workgroup. </p>
<p>To use the Soft Effector, create a 2D or 3D Skeleton Chain, select any part of the chain, and go to &#8220;Model->Create->Skeleton->Apply Soft Effector&#8221;.</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=108&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/108/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Footroll &#8211; or just rolling an object&#8230;</title>
		<link>http://www.softimageblog.com/archives/94#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=footroll-or-just-rolling-an-object</link>
		<comments>http://www.softimageblog.com/archives/94#comments</comments>
		<pubDate>Mon, 10 Apr 2006 13:29:41 +0000</pubDate>
		<dc:creator>Helge Mathee</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Programming / Scripting]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=94</guid>
		<description><![CDATA[How to use a curve to roll something along its edges.]]></description>
			<content:encoded><![CDATA[<p>In this post I would like to demonstrate a technique using a scripted operator to roll something along its edges / boundary. The post includes the full code as well as images / movies for further explanation.</p>
<p><span id="more-94"></span>I created an object, and extracted a curve from the boundary edges. Of course, you can always go the other route and create the curve first, and then afterwards create the mesh off the curve.</p>
<p>What I now want to do is roll the object along this curve, like a footroll. Here&#8217;s a picture and a movie for further explanation:</p>
<p><img id="image141" src="/userContent/upload/2007/01/adv_footroll1.jpg" alt="adv_footroll1.jpg" /></p>
<p><a id="p143" href="/userContent/upload/2007/01/adv_footroll.avi">The movie is encoded using Camtasia (Techsmith Codec) and is around 3 MB small / large&#8230; ;-) Click on this link to get it.</a></p>
<p>The code is fairly simple, and I tried to comment / document as much as possible.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// get the transform of the control object</span>
<span style="color: #003366; font-weight: bold;">var</span> inXf <span style="color: #339933;">=</span> Inlocal1.<span style="color: #660066;">value</span>.<span style="color: #660066;">transform</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// get the control object's rotation</span>
<span style="color: #003366; font-weight: bold;">var</span> inRot <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
inXf.<span style="color: #660066;">GetRotation</span><span style="color: #009900;">&#40;</span>inRot<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// get the value of the operator's roll parameter</span>
<span style="color: #003366; font-weight: bold;">var</span> roll <span style="color: #339933;">=</span> In_UpdateContext.<span style="color: #660066;">parameters</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;roll&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// get the value of the operator's distance parameter</span>
<span style="color: #003366; font-weight: bold;">var</span> distance <span style="color: #339933;">=</span> In_UpdateContext.<span style="color: #660066;">parameters</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;distance&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// set a vector which is going to start out as the y axis</span>
<span style="color: #003366; font-weight: bold;">var</span> yAxis <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateVector3</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
yAxis.<span style="color: #660066;">Set</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// multiply y by the rotation, so it points along the</span>
<span style="color: #006600; font-style: italic;">// control object's y axis</span>
yAxis.<span style="color: #660066;">MulByRotationInPlace</span><span style="color: #009900;">&#40;</span>inRot<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// create the output transform of the curve</span>
<span style="color: #003366; font-weight: bold;">var</span> xf <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateTransform</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// if there is any rotation (if y doesn't point straight up)</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>yAxis.<span style="color: #660066;">x</span><span style="color: #339933;">!=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">||</span>yAxis.<span style="color: #660066;">z</span><span style="color: #339933;">!=</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// store the height of y temporarily</span>
	<span style="color: #003366; font-weight: bold;">var</span> yAxisHeight <span style="color: #339933;">=</span> yAxis.<span style="color: #660066;">y</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// remove the y part of yAxis</span>
	yAxis.<span style="color: #660066;">y</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// normalize it (puts its length to 1)</span>
	yAxis.<span style="color: #660066;">NormalizeInPlace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// multiply the length of y by the distance param</span>
	yAxis.<span style="color: #660066;">ScaleInPlace</span><span style="color: #009900;">&#40;</span>distance <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// get the curve's geometry</span>
	<span style="color: #003366; font-weight: bold;">var</span> geo <span style="color: #339933;">=</span> Incrvlist.<span style="color: #660066;">value</span>.<span style="color: #660066;">Geometry</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// get the closest curve position to the resulting</span>
	<span style="color: #006600; font-style: italic;">// position of the yAxis (on the ground plane)</span>
	<span style="color: #003366; font-weight: bold;">var</span> vbArgs <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> VBArray<span style="color: #009900;">&#40;</span>geo.<span style="color: #660066;">GetClosestCurvePosition2</span><span style="color: #009900;">&#40;</span>yAxis<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> args <span style="color: #339933;">=</span> vbArgs.<span style="color: #660066;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// change the length of y relatively to the distance</span>
	<span style="color: #006600; font-style: italic;">// of the closest point on the curve</span>
	<span style="color: #006600; font-style: italic;">// this removes the unwanted jittery behaviour</span>
	yAxis.<span style="color: #660066;">NormalizeInPlace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	yAxis.<span style="color: #660066;">ScaleInPlace</span><span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// now get the closest position again</span>
	<span style="color: #003366; font-weight: bold;">var</span> vbArgs <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> VBArray<span style="color: #009900;">&#40;</span>geo.<span style="color: #660066;">GetClosestCurvePosition2</span><span style="color: #009900;">&#40;</span>yAxis<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> args <span style="color: #339933;">=</span> vbArgs.<span style="color: #660066;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// get the U value of the curve for the closest point</span>
	<span style="color: #003366; font-weight: bold;">var</span> curveU <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// now evaluate the curve for the given U</span>
	<span style="color: #006600; font-style: italic;">// note: this is using the hard coded subcurve index</span>
	<span style="color: #006600; font-style: italic;">// 0, so it never works for multi-curve-curvelists</span>
	<span style="color: #003366; font-weight: bold;">var</span> vbArgs <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> VBArray<span style="color: #009900;">&#40;</span>geo.<span style="color: #660066;">curves</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">EvaluatePosition</span><span style="color: #009900;">&#40;</span>curveU<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> args <span style="color: #339933;">=</span> vbArgs.<span style="color: #660066;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// get the position and tangent</span>
	<span style="color: #003366; font-weight: bold;">var</span> curvePos <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> curveTan <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// calculate the angle between the former Y axis and</span>
	<span style="color: #006600; font-style: italic;">// the ground plane</span>
	<span style="color: #003366; font-weight: bold;">var</span> angle <span style="color: #339933;">=</span> Math.<span style="color: #660066;">acos</span><span style="color: #009900;">&#40;</span>yAxisHeight<span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// negate (turn around) the yAxis</span>
	<span style="color: #006600; font-style: italic;">// as we want to move the object position</span>
	<span style="color: #006600; font-style: italic;">// relatively to the position on the curve</span>
	curvePos.<span style="color: #660066;">NegateInPlace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// define a quaternion for the rotation</span>
	<span style="color: #003366; font-weight: bold;">var</span> quat <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateQuaternion</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// the rotation for the tilt is a rotation around</span>
	<span style="color: #006600; font-style: italic;">// the tangent of the curve on the given position</span>
	<span style="color: #006600; font-style: italic;">// with an angle defined by the overall rotation</span>
	<span style="color: #006600; font-style: italic;">// of the control object</span>
	quat.<span style="color: #660066;">Set</span><span style="color: #009900;">&#40;</span>
		Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> curveTan.<span style="color: #660066;">x</span><span style="color: #339933;">,</span>
		Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> curveTan.<span style="color: #660066;">y</span><span style="color: #339933;">,</span>
		Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>angle<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> curveTan.<span style="color: #660066;">z</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// create a rotation for the tilt</span>
	<span style="color: #003366; font-weight: bold;">var</span> rotTilt <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	rotTilt .<span style="color: #660066;">SetFromQuaternion</span><span style="color: #009900;">&#40;</span>quat<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// now we rotation the position of the curveobject</span>
	<span style="color: #006600; font-style: italic;">// around the tangent of the curve, by using</span>
	<span style="color: #006600; font-style: italic;">// our rotTilt rotation</span>
	<span style="color: #003366; font-weight: bold;">var</span> centerPos <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateVector3</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	centerPos.<span style="color: #660066;">MulByRotation</span><span style="color: #009900;">&#40;</span>curvePos<span style="color: #339933;">,</span>rotTilt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// define an additional rotation for the roll	</span>
	<span style="color: #003366; font-weight: bold;">var</span> rotRoll <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// define an eulerangles vector for the rotation</span>
	<span style="color: #003366; font-weight: bold;">var</span> rotAngles <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateVector3</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// set the y rotation by the given roll param</span>
	rotAngles.<span style="color: #660066;">y</span> <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">DegreesToRadians</span><span style="color: #009900;">&#40;</span>roll<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// set the rotations euler angles by the vector</span>
	rotRoll .<span style="color: #660066;">SetFromXYZAngles</span><span style="color: #009900;">&#40;</span>rotAngles<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// rotate the position of the curveobject again</span>
	<span style="color: #006600; font-style: italic;">// by the rotRoll rotation</span>
	centerPos.<span style="color: #660066;">MulByRotationInPlace</span><span style="color: #009900;">&#40;</span>rotRoll<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// for the output transform, create a new rotation</span>
	<span style="color: #006600; font-style: italic;">// and multiply both rotations together</span>
	<span style="color: #003366; font-weight: bold;">var</span> rot <span style="color: #339933;">=</span> XSIMath.<span style="color: #660066;">CreateRotation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	rot.<span style="color: #660066;">Mul</span><span style="color: #009900;">&#40;</span>rotTilt<span style="color: #339933;">,</span>rotRoll<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// now substract the curvePosition off the center</span>
	<span style="color: #006600; font-style: italic;">// position, to put it back in its own space</span>
	centerPos.<span style="color: #660066;">SubInPlace</span><span style="color: #009900;">&#40;</span>curvePos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// for the output transform, set the</span>
	<span style="color: #006600; font-style: italic;">// translation and rotation</span>
	xf.<span style="color: #660066;">SetTranslation</span><span style="color: #009900;">&#40;</span>centerPos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	xf.<span style="color: #660066;">SetRotation</span><span style="color: #009900;">&#40;</span>rot<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// output the transform</span>
Out.<span style="color: #660066;">value</span>.<span style="color: #660066;">transform</span> <span style="color: #339933;">=</span> xf<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>If you want to checkout the scene, <a id="p144" href="/userContent/upload/2007/01/adv_footroll.zip">here it is (XSI 5.1)</a>.<br />
You can find the scripted operator below the local kinematics of the curve. Enjoy!</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=94&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/94/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Keys on the Timeline can be Manipulated&#8230;</title>
		<link>http://www.softimageblog.com/archives/87#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=keys-on-the-timeline-can-be-manipulated</link>
		<comments>http://www.softimageblog.com/archives/87#comments</comments>
		<pubDate>Tue, 21 Feb 2006 19:35:39 +0000</pubDate>
		<dc:creator>Luc-Eric</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=87</guid>
		<description><![CDATA[Something funny&#8217;&#8217;s come up since XSI 5.0.   It seems a good part of users  do not know that the key bars that apear on the timeline when you start animating can be manipulated.   This could be for example users who are not familiar with Maya and therefore not expecting to [...]]]></description>
			<content:encoded><![CDATA[<p>Something funny&#8217;&#8217;s come up since XSI 5.0.   It seems a good part of users  do not know that the key bars that apear on the timeline when you start animating can be manipulated.   This could be for example users who are not familiar with Maya and therefore not expecting to be able to move these keys.  Just in case this can help a few people, here&#8217;&#8217;s how it works:</p>
<ol>
<li> Shift+Click and drag to create a region around the keys on the timeline </li>
<li>Shift+Double Click to select a single frame</li>
<li>Hold Middle mouse button and drag that region to move keys</li>
<li>Ctrl+Drag on that region to copy keys </li>
<li>Middle Click on the extremities of the region to scale keys</li>
<li>There are some more timeline options in the right mouse click menu</li>
<li>You can view an audio wave in the timeline if you have an audio clip in the scene.</li>
</ol>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=87&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/87/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Editing Templates in XSI</title>
		<link>http://www.softimageblog.com/archives/81#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=editing-templates-in-xsi</link>
		<comments>http://www.softimageblog.com/archives/81#comments</comments>
		<pubDate>Fri, 13 Jan 2006 15:01:35 +0000</pubDate>
		<dc:creator>Andy Nicholas</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=81</guid>
		<description><![CDATA[Anyone who&#8217;&#8217;s had to do much work with Symmetry Mapping Templates (for transferring envelope weights from one side of a rig to another), or Connection Mapping Templates (used for applying actions to different bone rigs) will know that editing the data can be tricky and error prone. But there&#8217;&#8217;s a solution.

Simply select the rows in [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who&#8217;&#8217;s had to do much work with Symmetry Mapping Templates (for transferring envelope weights from one side of a rig to another), or Connection Mapping Templates (used for applying actions to different bone rigs) will know that editing the data can be tricky and error prone. But there&#8217;&#8217;s a solution.<br />
<span id="more-81"></span></p>
<p>Simply select the rows in the data grid control by left clicking on the row header on the left hand side, and shift clicking further down. Press Ctrl+C and the data will be copied to the clipboard. Open up Microsoft Excel, and you can paste this data into a worksheet!</p>
<p>Luckily, this copy and paste process also works in reverse (using Ctrl+V to paste back in to XSI), meaning that you can use all of Excel&#8217;&#8217;s handy sorting and filtering utilities to make sure that you don&#8221;t have duplicate bones in the list. When pasting back into the XSI template, you&#8221;ll need to make sure you&#8221;ve created the necessary number of rows in the template before you paste the data.</p>
<p>If you don&#8221;t have Excel, then this will also work in any standard text editor (although, you&#8221;ll need to make sure that the text editor copies the data as plain text, rather than including any font information). Each row will be pasted as a separate line with columns separated by a tab character.</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=81&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/81/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Newsflash : Marking Sets are Dead.</title>
		<link>http://www.softimageblog.com/archives/51#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=newsflash-marking-sets-are-dead</link>
		<comments>http://www.softimageblog.com/archives/51#comments</comments>
		<pubDate>Wed, 05 Oct 2005 21:51:03 +0000</pubDate>
		<dc:creator>Luc-Eric</dc:creator>
				<category><![CDATA[Animation]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=51</guid>
		<description><![CDATA[Animating something by yourself, or setting up a rig for a group is two different things.   One person will do just fine with the basic keying workflow, mark+key, for rigs usually what needs to and can be keyed is controlled.  People are using various tricks for this

The Dead Simple Keying Workflow
Every XSI [...]]]></description>
			<content:encoded><![CDATA[<p>Animating something by yourself, or setting up a rig for a group is two different things.   One person will do just fine with the basic keying workflow, mark+key, for rigs usually what needs to and can be keyed is controlled.  People are using various tricks for this</p>
<p><span id="more-51"></span></p>
<p><strong>The Dead Simple Keying Workflow</strong></p>
<p>Every XSI user understands the basic workflow.  &#8220;Mark&#8221;, or select, a parameter,  and hit &#8220;K&#8221; to key it.<br />
Actually, it&#8217;&#8217;s possible to use XSI without ever knowing anything about marking, because the basic SRT tools mark what&#8217;&#8217;s appropriate for you.<br />
This is a good &#8221;next gen&#8221; version of the &#8221;Set Key&#8221; menu in SI3D, where you&#8221;d click the SaveKey button and pick in the Windows Start menu-style hierachy of eeeevvverything that&#8217;&#8217;s keyable, and then middle mouse button to repeatedly key the same things.  </p>
<p>Behind the scene, parameters are not in fact directly &#8220;selected&#8221;.  The Marking list is in fact just a list of strings, a relative path to parameters, and XSI commands will try to match these strings against the parameter names on the current object at the moment of executing a command.</p>
<p><strong>Selective Keying</strong></p>
<p>As you&#8221;re building your rigs, quickly you end up wanting to key translation, and only translation, on one object, and rotation on &#8220;Y&#8221; on another.  Ideally you want to key everything all at once so that the rig is &#8221;locked&#8221; at every key and there is no random behaviour caused by not having keyed everything you intented.</p>
<p>This is all doable with scripts and buttons that will key exactly the parameters of interests, and people do this, however XSI has services for that built-in.</p>
<p><strong>Marking Sets and Setting Branch Keys (ALT+K)</strong></p>
<p>Marking sets are cool and they&#8221;re also a &#8220;demo&#8221; of sorts of the architecture of XSI.  Basically, it&#8217;&#8217;s a property set that&#8217;&#8217;s created which contains links to the parameters that you want to key.</p>
<p>In fact, there is nothing special behind Marking Sets, it&#8217;&#8217;s directly using the Custom Parameter Set commands, and creates a property set called &#8220;MarkingSet&#8221;.  Then, the &#8220;Set Key Using Marking Set&#8221; commands simply looks for a custom property set with that exact name and set keys on everything.</p>
<p>There is a second command &#8220;Set Branch Key&#8221; [..."Using Marking Set", in XSI 4.2] that does the same thing, but searches the entier branch of selected objects for the Marking Sets.  It&#8217;&#8217;s mapped to ATL+K.</p>
<p>These commands are all in the Animation menu that is that the bottom of the interface.</p>
<p><strong>Here Comes &#8230;Keyable Parameters</strong></p>
<p>In V5.0 we introduce Keyable Parameters, and this is where we&#8221;ll focus in the future.   Of course, Maya users are familiar with Keyable Parameters, and the words mean the same thing as in Maya.  At this point, although it can be confusing to have &#8221;animatable parameters&#8221; and &#8221;keyable parameters&#8221;,  IMO it&#8217;&#8217;s probably best to not try to invent a new word for it, so we will use the same.</p>
<p>Keyable Parameters do the same job as marking sets : they allow you to select which parameters you want to key.  By default, local kinestate &#8211; scale, rotate, translate &#8211; is keyable.  </p>
<p>The Keying Panel is the panel that shows you which parameters are keyable on the current object.  What you see is what is going to be keyed.  The Keyable Parameter Editor allows you to choose which parameters are keyable or not.</p>
<p>IMHO, it&#8217;&#8217;s a little more clear in XSI what these things do, because the Keying Panel isn&#8221;t doing double-duty as a generic property panel, which it isn&#8221;t meant to be.   It&#8217;&#8217;s really a Panel for Keying.  In the future we&#8221;ll continue to invest into more animation workflow items in there.</p>
<p>We&#8221;ve also added a few script commands to get the keyable parameters.</p>
<p><strong>Save Key Command Mapping</strong></p>
<p>The most critical user preference setting in XSI animation is in the animation menu at the bottom of the screen, is it called Save Key Command Mapping.  These are the three choices : </p>
<ul><strong>On Marked Parametes</strong></ul>
<ul>This is the default XSI method, pre-keyable parameters.   Hitting &#8220;K&#8221; will set keys on the parameters that are currently Marked on the currently selected objects.  Hitting ALT+K with set  a branch key on the Marking Sets it finds on the selected objects.</ul>
<ul><strong>On All Keyable Parameters</strong></ul>
<ul>This is a Maya-like behaviour and it&#8217;&#8217;s the default in QWERTY Interaction.<br />
<strong>However, XSI users should use it as well</strong>, but obviously we couldn&#8221;t put that as the default in V5.0 without causing some confusion with current users.</p>
<p>Hitting &#8220;K&#8221; will set keys on all the keyable parameters on the selected objects.  Hitting <strong> ALT+K</strong>  will save a key on all keyable parameter <strong>in the selected branch</strong>, no need for Marking Sets.</ul>
<ul><strong>On All Marked Keyable Parameters</strong></ul>
<ul>This is a mix of both, it sets keys on the intersection of both keyable AND marked parameters.<br />
For example,  if you&#8221;re in the Translate tool, it will set a key on the position of the object, IF the parameters are keyable.  This is a good mode as well for XSI users, because it means that the transform tool will key the parameters you expect, unless you removed their &#8221;keyable&#8221; flag.  (Note that you could also use Locking to protect parameters from being keyed)
</ul>
<ul>
</ul>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=51&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/51/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Going in unknown directions!</title>
		<link>http://www.softimageblog.com/archives/23#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=going-in-unknown-directions</link>
		<comments>http://www.softimageblog.com/archives/23#comments</comments>
		<pubDate>Wed, 11 May 2005 22:58:02 +0000</pubDate>
		<dc:creator>Patrick Boucher</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.xsi-blog.com/?p=23</guid>
		<description><![CDATA[Remember Softimage&#124;3D? Remember Jitter+?
Here is my take on Jitter+ for XSI: PB_Jitter! Just drop both files in the Application/Plugins folder and don&#8217;t forget to install the buzz.xsi library first.
Back in the days of Softimage&#124;3D there was a plug-in called Jitter. It was used to create random movement on objects. My take on this idea, thanks [...]]]></description>
			<content:encoded><![CDATA[<p>Remember Softimage|3D? Remember Jitter+?</p>
<p>Here is my take on Jitter+ for XSI: <a href="/distrib/PB_Jitter/2005.05.11/PB_Jitter_0.9.zip">PB_Jitter</a>! Just drop both files in the Application/Plugins folder and don&#8217;t forget to install the <a href="http://www.xsi-blog.com/?p=22">buzz.xsi</a> library first.</p>
<p>Back in the days of Softimage|3D there was a plug-in called Jitter. It was used to create random movement on objects. My take on this idea, thanks to the XSI architecture, takes it one little step further. If it&#8217;s animateable, you can add a PB_Jitter to it. Which means you can add a PB_Jitter to almost anything. Once you add this Scripted Operator to a marked parameter (Animate -&gt; Create -&gt; Parameter -&gt; Jitter Marked Parameter) you&#8217;ve basically piped a procedural animation generator into your parameter.</p>
<p><span id="more-23"></span><br />
Here is the main tab of PB_Jitter:<br />
<img src="/distrib/PB_Jitter/2005.05.11/ppg1.png" alt="The main tab for PB_Jitter" /></p>
<p>This generator has two facets to it. A sine wave generator and a random noise generator.</p>
<p>The first part of the generator creates a sine wave. This regular motion can be toggled on or off, it&#8217;s amplitude can be animated and the base wave can be shifted left or right. A concept of octaves is also available. Each successive octave&#8217;s computed value is added to the total value for that calculation but each octave&#8217;s wavelength is half the preceding octave&#8217;s and each successive octave&#8217;s amplitude is diminished by a factor corresponding to the overall persistance. This means that the higher your persistance and the larger the number of octaves the wilder your motion, while the lower the persistance and the lower the number of octaves the smoother the motion.</p>
<p><img src="/distrib/PB_Jitter/2005.05.11/ppg2.png" alt="The sine tab of PB_Jitter" /></p>
<p>The second part of the generator creates random noise. The wavelength of this noise is animateable as well as it&#8217;s amplitude. The octaves/persistance concepts show up again like in the sine wave generator. This time around the extra features you get are a choice of curve interpolation and a smoothing option. The horizontal shift this time can be used as such or it can be used as a random seed by inputing ridiculous numbers and shifting the curve left by, say, -2845037.</p>
<p><img src="/distrib/PB_Jitter/2005.05.11/ppg3.png" alt="The random tab of PB_Jitter" /></p>
<p>Another neat thing about the PB_Jitter is that if the parameter you want to jitter allready has an f-curve animation, this animation will be preserved in the offset parameter of the PB_Jitter and the computed sine or noise values will be added to the allready existing animation.</p>
<p>There are two bugs that I know about that are both related to the layout of a runtime scripted operator. The first is, if you plug a PB_Jitter in the offset value of a PB_Jitter (why not), the next time you want to inspect the outer PB_Jitter, the PPG layout and all it&#8217;s parameters will be gone. The second is if you save a scene that has a PB_Jitter inside it, next time you open the scene the PPG layout will be gone &#8211; though you still have access to the parameters, they&#8217;re just not nicely laid out in tabs.</p>
<p>Because of these little problems and the lack of documentation this is release 0.9 but hopefully I&#8217;ll be able to call it a full 1.0 in a short amount of time.</p>
<p>Hope you like! If you have questions, comment or verbal abuse, don&#8217;t be shy!</p>
<img src="http://www.softimageblog.com/?ak_action=api_record_view&id=23&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.softimageblog.com/archives/23/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
