<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>darkvertex.com</title> <link>http://darkvertex.com/wp</link> <description>Bringing CG to life, one rig at a time...</description> <lastBuildDate>Mon, 27 Jun 2011 13:05:03 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency>  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/darkvertex" /><feedburner:info uri="darkvertex" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://darkvertex.com/wp/?pushpress=hub" /><item><title>Commercial: T. Rowe Price Glass Jellyfish</title><link>http://feedproxy.google.com/~r/darkvertex/~3/bAa3X3N08ek/</link> <comments>http://darkvertex.com/wp/2011/06/09/glass-jellyfish-commercial/#comments</comments> <pubDate>Thu, 09 Jun 2011 09:05:53 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[finished works]]></category> <category><![CDATA[commercials]]></category> <category><![CDATA[softimage]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=566</guid> <description><![CDATA[I was responsible for rigging the jellyfish (tentacle sim. included) in this commercial for T. Rowe Price, produced by Psyop: Enjoy! (Best appreciated in HD.) Oh and check out the art of this concept artist that worked on it.]]></description> <content:encoded><![CDATA[<p>I was responsible for rigging the jellyfish (tentacle sim. included) in this commercial for T. Rowe Price, produced by Psyop:</p><p><iframe src="http://player.vimeo.com/video/25579208?title=0&amp;byline=0&amp;portrait=0&amp;color=fbca54" width="580" height="326" frameborder="0"></iframe></p><p>Enjoy! <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> (Best appreciated in HD.)</p><p>Oh and check out <a href="http://www.marasmalley.com/1029225/T-Rowe-Price">the art of this concept artist</a> that worked on it.</p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/bAa3X3N08ek" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2011/06/09/glass-jellyfish-commercial/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2011/06/09/glass-jellyfish-commercial/</feedburner:origLink></item> <item><title>CG-related humour (with a side of cheese)</title><link>http://feedproxy.google.com/~r/darkvertex/~3/gTG-c9TuSoU/</link> <comments>http://darkvertex.com/wp/2011/05/13/cg-jokes/#comments</comments> <pubDate>Fri, 13 May 2011 20:02:16 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=540</guid> <description><![CDATA[I hope you&#8217;re not lactose intolerant because these jokes can get cheesy&#8230; However, I&#8217;m certain at least one will bring a smile to your Friday. Check it out: http://CGjokes.com/ It all started when I wrote the very first joke (the one at the very bottom.) I wondered if I could think of more, and so [...]]]></description> <content:encoded><![CDATA[<p>I hope you&#8217;re not lactose intolerant because <a href="http://cgjokes.com"><strong>these jokes</strong></a> can get cheesy&#8230; However, I&#8217;m certain at least one will bring a smile to your Friday. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Check it out: <a href="http://cgjokes.com"><strong>http://CGjokes.com/</strong></a></p><p>It all started when I wrote the very first joke (the one at the very bottom.) I wondered if I could think of more, and so I did, but then I challenged myself to come up with a one-liner every workday or so. (Quality varies as it&#8217;s hard to write brilliant ones all the time, but I try.)</p><p>I looked online for more material but only found a really old thread from CGTalk, and many of their jokes were worse than my worst. I figured, if there&#8217;s sites out there listing trigonometry or Physics jokes, why can&#8217;t we have one more just for CG-related jokes? And so it came to be.</p><p>I will eventually run out of puns so I&#8217;d like to invite you, yes <strong>you</strong>, to think of hilarious material and submit it on the site. I will review any and all that come in and publish those that make me smile or chuckle; with your name as the post author of course. (If you leave a link to your blog I&#8217;ll link you if you get posted.)</p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/gTG-c9TuSoU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2011/05/13/cg-jokes/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2011/05/13/cg-jokes/</feedburner:origLink></item> <item><title>Python: Naming Objects for Numerophobes 101</title><link>http://feedproxy.google.com/~r/darkvertex/~3/ZBYte5sfqHI/</link> <comments>http://darkvertex.com/wp/2011/04/21/naming-for-numerophobes/#comments</comments> <pubDate>Thu, 21 Apr 2011 19:01:16 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[softimage]]></category> <category><![CDATA[python]]></category> <category><![CDATA[scripts]]></category> <category><![CDATA[tips]]></category> <category><![CDATA[tutorial]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=160</guid> <description><![CDATA[You can call me a numerophobe when naming rig objects, but the reason I personally avoid numbers in my rigging naming conventions (99% of the time) is so that when I duplicate something, a number at the end won&#8217;t increase by itself because there isn&#8217;t one. (The issue can be circumvented by having numbers somewhere [...]]]></description> <content:encoded><![CDATA[<p>You can call me a <em><acronym title="numerophobia, the fear of numbers!">numerophobe</acronym></em> when naming rig objects, but the reason I personally avoid numbers in my rigging naming conventions (99% of the time) is so that when I duplicate something, a number at the end won&#8217;t increase by itself because there isn&#8217;t one. (The issue can be circumvented by having numbers somewhere before the end, but I&#8217;m the kind of weirdo that prefers to go with letters altogether.)</p><p>We humans work numbers in what&#8217;s known as the &#8220;<a href="http://en.wikipedia.org/wiki/Numeral_system">Numeral system</a>&#8220;, also known as the &#8220;base 10&#8243; system (as we have that many fingers&#8230;) but hold on&#8230; the alphabet has 26 letters, not 10, so what do we call that system? It has a name: it&#8217;s the <a href="http://en.wikipedia.org/wiki/Hexavigesimal"><em>Hexavigesimal</em></a> (or &#8220;base 26&#8243;) system.</p><p>As the ever-so-handy Wikipedia denotes,</p><blockquote><p><em>Any number may be converted to base-26 by repeatedly dividing the number by 26.</em></p></blockquote><p>Pretty easy stuff for Python.</p><p>This is how I&#8217;d do it:<span id="more-160"></span></p><div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> base26str<span style="color: black;">&#40;</span>i, padding = <span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>:
	<span style="color: #483d8b;">&quot;&quot;&quot;
	Turns a number to a base26 string, with optional padding support.
	&quot;&quot;&quot;</span>
&nbsp;
	alphabet = <span style="color: #008000;">map</span><span style="color: black;">&#40;</span><span style="color: #008000;">chr</span>, <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">65</span>, <span style="color: #ff4500;">91</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	alphaStr = <span style="color: #483d8b;">&quot;&quot;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">if</span> i <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:
		number = i
		<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span>number <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
			remainder = number <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">26</span>
			alphaStr = alphabet<span style="color: black;">&#91;</span>remainder<span style="color: black;">&#93;</span> + alphaStr
			number /= <span style="color: #ff4500;">26</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		alphaStr = <span style="color: #483d8b;">&quot;A&quot;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;"># Pad to X digits?</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>padding<span style="color: black;">&#41;</span>.<span style="color: black;">isdigit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
		alphaStr = alphaStr.<span style="color: black;">zfill</span><span style="color: black;">&#40;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>padding<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;0&quot;</span>,alphabet<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">return</span> alphaStr
&nbsp;
<span style="color: #808080; font-style: italic;"># ------------------------------------</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Check this out...</span>
<span style="color: #ff7700;font-weight:bold;">print</span> base26str<span style="color: black;">&#40;</span><span style="color: #ff4500;">4</span><span style="color: black;">&#41;</span>		<span style="color: #808080; font-style: italic;"># &quot;E&quot;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> base26str<span style="color: black;">&#40;</span><span style="color: #ff4500;">4</span>, <span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span>		<span style="color: #808080; font-style: italic;"># &quot;AAE&quot; (&quot;E&quot; padded to 3 letters. A = 0)</span>
<span style="color: #ff7700;font-weight:bold;">print</span> base26str<span style="color: black;">&#40;</span><span style="color: #ff4500;">28</span><span style="color: black;">&#41;</span>		<span style="color: #808080; font-style: italic;"># &quot;BC&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#</span></pre></div></div><p>Now let&#8217;s put it to use in a simple renamer example. This sample below is Softimage-oriented, but you could easily change it to PyMEL:</p><div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;font-weight:bold;">import</span> ceil
xsi = Application
&nbsp;
typeSuffix = <span style="color: black;">&#123;</span>
	<span style="color: #483d8b;">&quot;crvlist&quot;</span>:	<span style="color: #483d8b;">&quot;CRV&quot;</span>,
	<span style="color: #483d8b;">&quot;polymsh&quot;</span>:	<span style="color: #483d8b;">&quot;GEO&quot;</span>,
	<span style="color: #483d8b;">&quot;surfmsh&quot;</span>:	<span style="color: #483d8b;">&quot;GEO&quot;</span>,
	<span style="color: #483d8b;">&quot;null&quot;</span>:		<span style="color: #483d8b;">&quot;NULL&quot;</span>,
	<span style="color: #483d8b;">&quot;root&quot;</span>:		<span style="color: #483d8b;">&quot;RT&quot;</span>,
	<span style="color: #483d8b;">&quot;bone&quot;</span>:		<span style="color: #483d8b;">&quot;BN&quot;</span>,
	<span style="color: #483d8b;">&quot;eff&quot;</span>:		<span style="color: #483d8b;">&quot;EFF&quot;</span>
<span style="color: black;">&#125;</span>
&nbsp;
oSel = xsi.<span style="color: black;">Selection</span>
prefix = xsi.<span style="color: black;">XSIInputBox</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;What would you like to prefix these objects?&quot;</span>, <span style="color: #483d8b;">&quot;NAME PREFIX&quot;</span>, oSel<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>.<span style="color: black;">Name</span> <span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;"># Find out the padding required:</span>
padding = <span style="color: #483d8b;">&quot;&quot;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> oSel.<span style="color: black;">Count</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">26</span>:
	padding = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span> ceil<span style="color: black;">&#40;</span> oSel.<span style="color: black;">Count</span> / <span style="color: #ff4500;">26.0</span> <span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> i, eachObj <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">enumerate</span><span style="color: black;">&#40;</span>oSel<span style="color: black;">&#41;</span>:
&nbsp;
	<span style="color: #808080; font-style: italic;"># Get suffix if it has been defined, else leave blank:</span>
	suffix = <span style="color: black;">&#40;</span> <span style="color: #483d8b;">&quot;&quot;</span> <span style="color: #ff7700;font-weight:bold;">if</span> eachObj.<span style="color: black;">Type</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #ff7700;font-weight:bold;">in</span> typeSuffix.<span style="color: black;">keys</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">else</span> <span style="color: #483d8b;">&quot;_&quot;</span>+typeSuffix<span style="color: black;">&#91;</span>eachObj.<span style="color: black;">Type</span><span style="color: black;">&#93;</span> <span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;"># Rename object:</span>
	newname = prefix+<span style="color: #483d8b;">&quot;_&quot;</span>+ base26str<span style="color: black;">&#40;</span>i<span style="color: black;">&#41;</span> +suffix
	<span style="color: #ff7700;font-weight:bold;">print</span> eachObj.<span style="color: black;">Name</span>+<span style="color: #483d8b;">&quot; --RENAMED-TO--&gt; &quot;</span>+newname
	eachObj.<span style="color: black;">Name</span> = newname
&nbsp;
<span style="color: #808080; font-style: italic;">#</span></pre></div></div><img src="http://feeds.feedburner.com/~r/darkvertex/~4/ZBYte5sfqHI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2011/04/21/naming-for-numerophobes/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2011/04/21/naming-for-numerophobes/</feedburner:origLink></item> <item><title>URL QR Code Bookmarklet: Copy a URL to your phone without browser extensions</title><link>http://feedproxy.google.com/~r/darkvertex/~3/OYit9xjN4uE/</link> <comments>http://darkvertex.com/wp/2011/02/27/url-qr-code-bookmarklet/#comments</comments> <pubDate>Sun, 27 Feb 2011 19:49:10 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[scripting]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=463</guid> <description><![CDATA[First things first, you need a QR code scanner app for your smartphone, be it an iPhone, Android, Blackberry or Nokia. Then highlight the bit of code below and drag it to your bookmarks bar on your browser. javascript:location.href='http://chart.apis.google.com/chart?chs=300x300&#38;cht=qr&#38;chl='+encodeURIComponent&#40;location.href&#41;; Next time you want to open a page you&#8217;re browsing in your phone, press it, a [...]]]></description> <content:encoded><![CDATA[<p>First things first, you need <strong>a <em>QR code</em> scanner</strong> app for your smartphone, be it an <a href="http://itunes.apple.com/us/app/scan/id411206394?mt=8">iPhone</a>, <a href="https://market.android.com/details?id=com.google.zxing.client.android">Android</a>, <a href="http://www.neoreader.com/get-neoreader/wap-download">Blackberry</a> or <a href="http://mobilecodes.nokia.com/scan.htm">Nokia</a>.</p><p>Then highlight the bit of code below and drag it to your bookmarks bar on your browser.</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">javascript<span style="color: #339933;">:</span>location.<span style="color: #660066;">href</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'http://chart.apis.google.com/chart?chs=300x300&amp;cht=qr&amp;chl='</span><span style="color: #339933;">+</span>encodeURIComponent<span style="color: #009900;">&#40;</span>location.<span style="color: #660066;">href</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Next time you want to open a page you&#8217;re browsing in your phone, press it, a QR code shows up, scan it and the url will be on your phone.</p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/OYit9xjN4uE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2011/02/27/url-qr-code-bookmarklet/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2011/02/27/url-qr-code-bookmarklet/</feedburner:origLink></item> <item><title>Some more commercials I worked on</title><link>http://feedproxy.google.com/~r/darkvertex/~3/_6E9UjuXJCA/</link> <comments>http://darkvertex.com/wp/2010/11/17/more-commercials/#comments</comments> <pubDate>Wed, 17 Nov 2010 15:20:19 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[finished works]]></category> <category><![CDATA[commercials]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=446</guid> <description><![CDATA[These were completed earlier this year but I forgot to post them here. Enjoy! This one involved geometry tracking (PFTrack) for full head replacement. FaceRobot was used in production for the first time. The original plan was to use the automatic lipsyncing feature (introduced in Soft 2011) to save us time. It did work, but [...]]]></description> <content:encoded><![CDATA[<p>These were completed earlier this year but I forgot to post them here. Enjoy!</p><p><iframe src="http://player.vimeo.com/video/11728129?byline=0&amp;portrait=0&amp;color=ff9933" width="620" height="465" frameborder="0"></iframe><br /> This one involved <em>geometry tracking</em> (PFTrack) for full head replacement. FaceRobot was used in production for the first time. The original plan was to use the <em>automatic lipsyncing</em> feature (introduced in Soft 2011) to save us time. It did work, but the client wanted 1:1 lip performance with what the actor did so in the end we didn&#8217;t use much of the automatic lipsync. &#8212; <a href="http://www.topixfx.com/reels/kitkat/">See for yourself how close the final is to the source footage <strong>here.</strong></a> Hats off to the animators.<br /> &nbsp;</p><p><iframe src="http://player.vimeo.com/video/12564181?byline=0&amp;portrait=0&amp;color=ff9933" width="620" height="349" frameborder="0"></iframe><br /> I rigged the popcorn/kernel guy and helped set up the rigidbody simulation of the M&#038;M&#8217;s pouring at the end. &#8212; Also wrote a little Python script to do a fair randomization of all 6 colours. You&#8217;d run it after the sim was happy to make sure the colours were random but in equal amounts.<br /> &nbsp;</p><p><iframe src="http://player.vimeo.com/video/8204760?byline=0&amp;portrait=0&amp;color=ff9933" width="620" height="349" frameborder="0"></iframe><br /> I did the ICE instances setup for the lights and the rig of the lumpy bottle at the end. &#8212; By the way, the environment is 100% CG. There was a ton of rotoscoping done to make it work. There&#8217;s something like 60 shots, almost all shot against blackness (because if it were green/blue-screen it would have shown up in the reflections.)<br /> &nbsp;</p><p>Hope you likey. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/_6E9UjuXJCA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/11/17/more-commercials/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/11/17/more-commercials/</feedburner:origLink></item> <item><title>Softimage: ICE String to Particles trick</title><link>http://feedproxy.google.com/~r/darkvertex/~3/6ufPHlfQ0mU/</link> <comments>http://darkvertex.com/wp/2010/11/15/softimage-ice-string-to-particles/#comments</comments> <pubDate>Mon, 15 Nov 2010 14:30:57 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[softimage]]></category> <category><![CDATA[tutorials]]></category> <category><![CDATA[ice]]></category> <category><![CDATA[tips]]></category> <category><![CDATA[tutorial]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=431</guid> <description><![CDATA[[I shared this on the Softimage Mailing List the other day and thought it was worth posting here.] Here&#8217;s a fun trick for parsing an ICE string attribute, identifying the letters and typing out the text with particles: Download the sample scene here and read more about it below. (Soft 2011+ required.) Taking this knowledge [...]]]></description> <content:encoded><![CDATA[<p>[I shared this on the Softimage Mailing List the other day and thought it was worth posting here.]</p><p>Here&#8217;s a fun trick for parsing an ICE string attribute, identifying the letters and typing out the text with particles:<br /> <a rel="shadowbox[Mixed];width=1635;height=1055" href="http://s3.darkvertex.com/hlinked/ice/ICE_string_to_particles.png"><img class="size-medium wp-image-87 " src="http://s3.darkvertex.com/hlinked/ice/ICE_string_to_particles.png" alt="ICE string to particles" width="490" height="316" /></a><br /> Download the <a href="http://s3.darkvertex.com/hlinked/ice/ICE_string_to_particles.zip"><strong>sample scene</strong> <em>here</em></a> and read more about it below. (<strong>Soft 2011+</strong> required.)<br /> <span id="more-431"></span></p><p>Taking this knowledge we can also do variations on the concept like <strong>turning <em>a string into an array of booleans</em></strong>, for example:</p><p><a rel="shadowbox[Mixed];width=975;height=858" href="http://s3.darkvertex.com/hlinked/ice/ICE_string_to_boolean_array.png"><img class="size-medium wp-image-87 " src="http://s3.darkvertex.com/hlinked/ice/ICE_string_to_boolean_array.png" alt="ICE string to array of booleans" width="487" height="429" /></a></p><p>Let me know in the comments if you make anything cool with this technique. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/6ufPHlfQ0mU" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/11/15/softimage-ice-string-to-particles/feed/</wfw:commentRss> <slash:comments>4</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/11/15/softimage-ice-string-to-particles/</feedburner:origLink></item> <item><title>Softimage: Symmetrical Shape Splitting with ICE</title><link>http://feedproxy.google.com/~r/darkvertex/~3/4f0EqomzJWM/</link> <comments>http://darkvertex.com/wp/2010/11/08/symmetrical-shape-split-with-ice/#comments</comments> <pubDate>Mon, 08 Nov 2010 14:09:02 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[softimage]]></category> <category><![CDATA[tutorials]]></category> <category><![CDATA[blendshapes]]></category> <category><![CDATA[compounds]]></category> <category><![CDATA[shapes]]></category> <category><![CDATA[tips]]></category> <category><![CDATA[tools]]></category> <category><![CDATA[tutorial]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=339</guid> <description><![CDATA[I propose a way of using ICE to split symmetrical shape halves. Here it is in action: (Download here and read more about it below.) The classical way of doing symmetrical shapekeys (a.k.a. &#8220;blendshapes&#8221; if you&#8217;re in Maya or morphs if you&#8217;re in Max) is to make a symmetrical one then add it twice and [...]]]></description> <content:encoded><![CDATA[<p>I propose a way of using ICE to split symmetrical shape halves. Here it is in action:<br /> <a rel="shadowbox[Mixed];width=1293;height=878" href="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/DeformWithSourceMesh_ICEcompound_exampleResult.png"><img class="size-medium wp-image-87 " src="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/DeformWithSourceMesh_ICEcompound_exampleResult_THUMB.jpg" alt="My "Deform with Source Mesh" compound in action" width="517" height="351" /></a><br /> (<a href="http://s3.darkvertex.com/tools/ICE/Deform%20with%20Source%20Mesh.1.1.xsicompound"><strong>Download here</strong></a> and read more about it below.)<br /> <span id="more-339"></span></p><hr /></p><p>The classical way of doing symmetrical shapekeys (a.k.a. &#8220;<em>blendshapes</em>&#8221; if you&#8217;re in Maya or <em>morphs</em> if you&#8217;re in Max) is to make a symmetrical one then add it twice and paint off its influence with two weight maps, one for each half. In Maya you&#8217;d use the <em>Paint Blend Shape Weights</em> tool, but it&#8217;s basically the same deal.</p><p>In ICE, shapekeys have a <strong>.positions</strong> ICEattribute in them. This is an array of positions (vectors) representing the relative offset from the original mesh. In other words, it means you need to add them to the existing point positions to make said shape occur. That said, we won&#8217;t be using .positions in this post but full PointPosition&#8217;s instead.</p><p>Here&#8217;s what we&#8217;re gonna be working with in my example:<br /> <img src="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/xsimanFace_neutralAndSmileSymmShape.jpg" alt="Amazing smile!" /></p><p>Normally you would make the 2 weightmaps, select one then Shape->Modulate Shape Key with Weight Map. The map looks kinda like this:<br /> <img src="http://wpfiles.darkvertex.com.s3.amazonaws.com/wp/wp-content/uploads/2010/11/XSIman_weightmap_halfFace.jpg" alt="Middle is 50 percent, rest is 100 percent." /><br /> This involves making sure you have 100% of one half and 50% of the middle. You want 50% because you want to be able to add the shapes for both sides and get 100% of the deformation in the middle, else you&#8217;d get 200% and that&#8217;s no good.</p><p>Let&#8217;s see how we can use ICE to skip that step altogether by only deforming points in one half instead of relying on a map to define it, as pictured at the beginning of this post.</p><p><a rel="shadowbox[Mixed];width=1752;height=972" href="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/ICEtree_DeformWithSourceMesh.png"><img class="size-medium wp-image-87" src="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/ICEtree_DeformWithSourceMesh_THUMB.jpg" alt="My "Deform with Source Mesh" compound in action" width="450" height="250" /></a></p><p>So as you can see we read the PointPosition, split out to scalars with the &#8220;<em>3D Vector to Scalar</em>&#8220;, then feed the X to different nodes to see if it&#8217;s bigger or equal to / bigger / smaller or equal to / smaller than zero. With the &#8220;<em>Select Case</em>&#8221; we use the correct one as defined from our dropdown menu input attribute &#8220;<em>Type</em>&#8220;. (If you didn&#8217;t know: to define a dropdown menu for an attribute in a compound just rightclick it and go to <em>Properties</em>, then fill in &#8220;<em>Combo string</em>&#8221; and &#8220;<em>Combo value</em>&#8221; then click &#8220;<em>Add combo</em>&#8221; as desired.)</p><p>The <em>If</em> node before the <em>Linear Interpolate</em> makes sure that if we&#8217;re not dealing with the correct half, we just let the positions pass through untouched. Otherwise, we check if the &#8220;<em>Type</em>&#8221; (mode) is set to one that includes the middle line, and if X is 0 it means we have a point in the perfect middle of the mesh, in which case we only affect it by 50%, else we let it go through. At the end we do one more <em>Linear Interpolate</em> between the affected result and the original mesh, so we can blend it gradually with a slider.</p><p>Lastly, if anyone&#8217;s curious what the word &#8220;<em>Epsilon</em>&#8221; means in regards to an &#8220;<em>Equals</em>&#8221; node, it&#8217;s basically the margin of error permitted in the comparison since vector values aren&#8217;t exact numbers most of the time in 3D. Thus an epsilon of 0.001 in this case means that a vector&#8217;s posX can be off from 0 by 0.001, so it could anywhere between -0.001 and 0.001 and still be considered to equal 0. You can increase the epsilon if you need to.</p><hr /> Long story short, you can <a href="http://s3.darkvertex.com/tools/ICE/Deform%20with%20Source%20Mesh.1.1.xsicompound"><strong>download the compound right here.</strong></a> I find it has greatly sped up my workflow when generating shape halves. Hope it helps you too. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/4f0EqomzJWM" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/11/08/symmetrical-shape-split-with-ice/feed/</wfw:commentRss> <slash:comments>5</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/11/08/symmetrical-shape-split-with-ice/</feedburner:origLink></item> <item><title>Triggering PrintScreen in Windows with an Apple keyboard</title><link>http://feedproxy.google.com/~r/darkvertex/~3/0xtBSbytyxw/</link> <comments>http://darkvertex.com/wp/2010/11/05/printscreen-with-apple-keyboard/#comments</comments> <pubDate>Fri, 05 Nov 2010 18:11:40 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[tools]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=387</guid> <description><![CDATA[I wrote this simple tool for a buddy at work today. In my present employer they have a lot of Apple computers running Windows and most still have the Apple keyboard in front of them. For those unaware, the Apple keyboard has no PrintScreen key. (On another note, they have F13 to F19 keys where [...]]]></description> <content:encoded><![CDATA[<p>I wrote <a href="http://s3.darkvertex.com/tools/PrintScreen_with_F15_key.exe"><strong>this simple tool</strong></a> for a buddy at work today. In my present employer they have a lot of Apple computers running Windows and most still have the <a href="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/Apple_keyboard.jpg" rel="shadowbox[sbpost-387];player=img;">Apple keyboard</a> in front of them.</p><p>For those unaware, the <a href="http://wpfiles.darkvertex.com/wp/wp-content/uploads/2010/11/Apple_keyboard.jpg" rel="shadowbox[sbpost-387];player=img;">Apple keyboard</a> has no PrintScreen key. (On another note, they have F13 to F19 keys where normal PC keyboards stop at F12.) You could download a <a href="http://getgreenshot.org/">screenshot</a> <a href="http://code.google.com/p/zscreen/">program</a> of course, but they&#8217;re always convoluted. Too many options when all you truly want is the simple key.</p><p>So if you&#8217;re in Windows with an Apple keyboard, or know a friend who is, <a href="http://s3.darkvertex.com/tools/PrintScreen_with_F15_key.exe"><strong>download this</strong></a> and pass it on. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p><p>It&#8217;s just 2 lines of <a href="http://www.autohotkey.com/">AHK</a>:</p><div class="wp_syntax"><div class="code"><pre class="autohotkey" style="font-family:monospace;"><span style="font-style: italic; color: #009933;">; F15 = PrintScreen tool / http://darkvertex.com</span>
<span style="color: #000000; font-style: italic;">#NoEnv</span>
<span style="color: #000000; font-style: italic;">#NoTrayIcon</span>
<span style="color: #000000; font-style: italic;">#Persistent</span>
<span style="color: #000000; font-style: italic;">#SingleInstance</span> ignore
<span style="color: #FF00FF; font-style: italic;">SendMode</span> <span style="color: #FF00FF; font-style: italic;">Input</span>
&nbsp;
~<span style="color: #FF0000; font-style: italic;">F15</span>::
<span style="color: #FF00FF; font-style: italic;">Send</span> <span style="color: #00FF00; font-weight: bold;">&#123;</span><span style="color: #FF0000; font-style: italic;">PrintScreen</span><span style="color: #00FF00; font-weight: bold;">&#125;</span></pre></div></div><p>There&#8217;s no interface, install or anything. You run it and it&#8217;ll sit idle in the background. Whenever you hit F15 on your shiny white Apple keyboard it will trigger the PrintScreen key. Simple as that! (To stop it, kill the process manually.)</p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/0xtBSbytyxw" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/11/05/printscreen-with-apple-keyboard/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/11/05/printscreen-with-apple-keyboard/</feedburner:origLink></item> <item><title>And now for something completely different…</title><link>http://feedproxy.google.com/~r/darkvertex/~3/6iw0WneZYFE/</link> <comments>http://darkvertex.com/wp/2010/08/24/and-now-for-something-completely-different/#comments</comments> <pubDate>Tue, 24 Aug 2010 04:17:36 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=360</guid> <description><![CDATA[I wanted to shamelessly plug a non-3D blog/project I started this month titled&#8230; &#8220;One Artist A Day&#8221; &#160; As the name implies, I intend on mentioning 1 (likely awesome :p) musician or band I genuinely enjoy, every single day for the forthcoming future. It&#8217;s been almost a month so far and it&#8217;s been a fun [...]]]></description> <content:encoded><![CDATA[<p>I wanted to shamelessly plug a non-3D blog/project I started this month titled&#8230;</p><p><h1><a href="http://oneartistaday.com/">&#8220;<strong>One Artist A Day</strong>&#8221;<br /> <img src="http://static.oneartistaday.com/hlinked/oneartistaday_promo_thumbnail.png" alt="One Artist A Day - music recommendation blog" /></a></h1><p>&nbsp;</p><p>As the name implies, I intend on mentioning 1 (likely awesome :p) musician or band I genuinely enjoy, every single day for the forthcoming future.</p><p>It&#8217;s been almost a month so far and it&#8217;s been a fun challenge to mention artists while trying to stay away from mainstream names. After all, I want to show you music you haven&#8217;t heard before, not what&#8217;s pumping on MTV or some lousy Top40s&#8217;-like radio show. (I miss when MTV had music in it; don&#8217;t you?)</p><p>So&#8230; <a href="http://oneartistaday.com/">check out my new blog!</a> <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I will of course continue to keep this one and as soon as production slows a little where I&#8217;m working at I will be posting a backlog of educational content I have been meaning to submit for a while. (I currently have 9 drafts of coolness in my WordPress waiting for you.)</p><p>Last but not least, I welcome any music suggestions if anyone&#8217;s reading this and want to leave a comment down below. I promise to give you credit and link to your blog if I use your suggestion.</p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/6iw0WneZYFE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/08/24/and-now-for-something-completely-different/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/08/24/and-now-for-something-completely-different/</feedburner:origLink></item> <item><title>Python: Distance between 2 Position Vectors</title><link>http://feedproxy.google.com/~r/darkvertex/~3/AihrdVX0FyE/</link> <comments>http://darkvertex.com/wp/2010/06/05/python-distance-between-2-vectors/#comments</comments> <pubDate>Sun, 06 Jun 2010 00:05:31 +0000</pubDate> <dc:creator>Alan</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[softimage]]></category> <category><![CDATA[maya]]></category> <category><![CDATA[python]]></category> <category><![CDATA[scripts]]></category> <category><![CDATA[tutorial]]></category><guid isPermaLink="false">http://darkvertex.com/wp/?p=307</guid> <description><![CDATA[This post surged from a question at a forum where somebody tried to use the ctr_dist() function &#8212; that returns distance between two object centers &#8212; in a Softimage script only to realise that actually it only exists for expressions, not scripting. Here&#8217;s my take on said function for both Softimage and Maya&#8230; First of [...]]]></description> <content:encoded><![CDATA[<p>This post surged from a question <a href="http://www.xsiforum.com/forum/index.php/topic,7677.0.html">at a forum</a> where somebody tried to use the <a href="http://softimage.wiki.softimage.com/sdkdocs/ref_quickref_DistanceFunctions.htm"><strong>ctr_dist()</strong></a> function &#8212; <em>that returns distance between two object centers</em> &#8212; in a Softimage script only to realise that actually it only exists for expressions, not scripting.</p><p>Here&#8217;s my take on said function for both Softimage and Maya&#8230;<br /> <span id="more-307"></span><br /><hr /></p><p>First of all, we need to know the math behind it. Knowing global position vectors A and B, the formula for the distance (d) between them would be:<br /> <span style="white-space: nowrap; font-size:larger"><br /> d = &radic;<span style="text-decoration:overline;">&nbsp; Ax-Bx<sup>2</sup> + Ay-By<sup>2</sup> + Az-Bz<sup>2</sup> &nbsp;</span><br /> </span><br /></p><p>I&#8217;ve decided to borrow sqrt() and pow() functions from Python&#8217;s <a href="http://docs.python.org/library/math.html">math</a> library, by the way.</p><p>First let&#8217;s see how to do this with Python in Softimage:</p><div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">xsi = Application
lm = xsi.<span style="color: black;">LogMessage</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> ctr_dist<span style="color: black;">&#40;</span> objA, objB <span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;font-weight:bold;">import</span> sqrt,<span style="color: #008000;">pow</span>
&nbsp;
	Ax, Ay, Az = objA.<span style="color: black;">Kinematics</span>.<span style="color: black;">Global</span>.<span style="color: black;">Transform</span>.<span style="color: black;">GetTranslationValues2</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	Bx, By, Bz = objB.<span style="color: black;">Kinematics</span>.<span style="color: black;">Global</span>.<span style="color: black;">Transform</span>.<span style="color: black;">GetTranslationValues2</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">return</span> sqrt<span style="color: black;">&#40;</span>  <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Ax-Bx,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> + <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Ay-By,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> + <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Az-Bz,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>  <span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;"># -------------------------</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;"># Try it out with 2 selected objects:</span>
fromObj, toObj = xsi.<span style="color: black;">Selection</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>, xsi.<span style="color: black;">Selection</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
lm<span style="color: black;">&#40;</span>
<span style="color: #483d8b;">&quot;Distance between &lt;&quot;</span>+fromObj.<span style="color: black;">FullName</span>+<span style="color: #483d8b;">&quot;&gt; to &lt;&quot;</span>+toObj.<span style="color: black;">FullName</span>+<span style="color: #483d8b;">&quot;&gt; is: &quot;</span>
+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span> ctr_dist<span style="color: black;">&#40;</span>fromObj, toObj<span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
<span style="color: black;">&#41;</span></pre></div></div><p>Now let&#8217;s repurpose it for <a href="http://code.google.com/p/pymel/">PyMEL</a> in Maya, without using <a href="http://www.3dtutorialzone.com/tutorial?id=106">distance nodes</a>:</p><div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> pymel.<span style="color: black;">core</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> ctr_dist<span style="color: black;">&#40;</span> objA, objB <span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">math</span> <span style="color: #ff7700;font-weight:bold;">import</span> sqrt,<span style="color: #008000;">pow</span>
&nbsp;
	Ax, Ay, Az = objA.<span style="color: black;">getTranslation</span><span style="color: black;">&#40;</span>space=<span style="color: #483d8b;">&quot;world&quot;</span><span style="color: black;">&#41;</span>
	Bx, By, Bz = objB.<span style="color: black;">getTranslation</span><span style="color: black;">&#40;</span>space=<span style="color: #483d8b;">&quot;world&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">return</span> sqrt<span style="color: black;">&#40;</span>  <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Ax-Bx,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> + <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Ay-By,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span> + <span style="color: #008000;">pow</span><span style="color: black;">&#40;</span>Az-Bz,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>  <span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;"># -------------------------</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;"># Try it out with 2 selected objects:</span>
sel = ls<span style="color: black;">&#40;</span>sl=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Distance between &lt;&quot;</span>+sel<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>+<span style="color: #483d8b;">&quot;&gt; to &lt;&quot;</span>+sel<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>+<span style="color: #483d8b;">&quot;&gt; is: &quot;</span>+<span style="color: #008000;">str</span><span style="color: black;">&#40;</span> ctr_dist<span style="color: black;">&#40;</span>sel<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>,sel<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span></pre></div></div><p>By the way, note the awesomeness of Python for letting you assign multiple variables from an array using a single line. That&#8217;s pretty nice. <img src='http://darkvertex.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Hope somebody finds this useful! You can use it a <strong>measuring tool</strong> or for <strong>distance-dependent rigging logic</strong>.</p><p><strong>If you do use it for rigging</strong>, please remember that <strong>if you want the distance to stay the same while a character is scaled, you must divide the distance by the scaling value.</strong></p> <img src="http://feeds.feedburner.com/~r/darkvertex/~4/AihrdVX0FyE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://darkvertex.com/wp/2010/06/05/python-distance-between-2-vectors/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://darkvertex.com/wp/2010/06/05/python-distance-between-2-vectors/</feedburner:origLink></item> </channel> </rss>

