<?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>Ling's Blog</title>
	<atom:link href="http://linghaoli.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://linghaoli.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 07 Jun 2010 19:32:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enroute Visual Effect Breakdown</title>
		<link>http://linghaoli.com/blog/?p=236</link>
		<comments>http://linghaoli.com/blog/?p=236#comments</comments>
		<pubDate>Mon, 07 Jun 2010 01:43:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=236</guid>
		<description><![CDATA[Here is the breakdown for &#8220;Enroute&#8221;, a student film I worked on.
Enroute won 5 awards in the SCADemy awards at Savannah College of Art and Design.
• Best Cinematography
• Best Editing
• Best Production Design
• Best Graduate Film
• Best Visual Effects
Thanks Sandro Blattner put this together and thanks all the great work the visual effects crew have [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the breakdown for &#8220;Enroute&#8221;, a student film I worked on.</p>
<p>Enroute won 5 awards in the SCADemy awards at Savannah College of Art and Design.</p>
<p><strong>• Best Cinematography</strong><br />
<strong>• Best Editing</strong><br />
<strong>• Best Production Design</strong><br />
<strong>• Best Graduate Film</strong><br />
<strong>• Best Visual Effects</strong></p>
<p>Thanks Sandro Blattner put this together and thanks all the great work the visual effects crew have done.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="394" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12307227&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="700" height="394" src="http://vimeo.com/moogaloop.swf?clip_id=12307227&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/12307227">En Route &#8211; VFX Technical Breakdown</a> from <a href="http://vimeo.com/user598252">Sandro Blattner</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Studio II project breakdown</title>
		<link>http://linghaoli.com/blog/?p=226</link>
		<comments>http://linghaoli.com/blog/?p=226#comments</comments>
		<pubDate>Mon, 15 Mar 2010 03:39:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=226</guid>
		<description><![CDATA[This is the breakdown video for my studio II/independent study project:
The detailed page for this is :
http://linghaoli.com/blog/?page_id=151
]]></description>
			<content:encoded><![CDATA[<p>This is the breakdown video for my studio II/independent study project:</p>
<p>The detailed page for this is :</p>
<p><a title="http://linghaoli.com/blog/?page_id=151" href="http://linghaoli.com/blog/?page_id=151" target="_blank"><span id="sample-permalink">http://linghaoli.com/blog/?page_id=151</span></a></p>
<div class="wp-caption aligncenter" style="width: 710px"><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="394" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/ptc/ptc_breakdown.mp4&amp;quality=false&amp;image=http://www.linghaoli.com/misc/ptc/ptc_breakdown.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /><embed id="player" type="application/x-shockwave-flash" width="700" height="394" src="../../../../ui/player.swf" allowfullscreen="false" wmode="transparent" flashvars="&amp;file=../../../../mov/ptc/ptc_breakdown.mp4&amp;quality=false&amp;image=http://www.linghaoli.com/misc/ptc/ptc_breakdown.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" name="player"></embed></object><p class="wp-caption-text">point cloud API and usage</p></div>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=226</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from Digital Domain</title>
		<link>http://linghaoli.com/blog/?p=148</link>
		<comments>http://linghaoli.com/blog/?p=148#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:16:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=148</guid>
		<description><![CDATA[Just got back from Digital Domain internship.
The 3 months internship was awesome and I learned a lot. I got involved a lot of stuff and met so many awesome people that make things happen. I really appreciate the experience.
Basically I worked on one shot in Tron 2.
Wrote and maintained several pipe line shelf buttons(with python) [...]]]></description>
			<content:encoded><![CDATA[<p>Just got back from Digital Domain internship.</p>
<p>The 3 months internship was awesome and I learned a lot. I got involved a lot of stuff and met so many awesome people that make things happen. I really appreciate the experience.</p>
<p>Basically I worked on one shot in Tron 2.</p>
<p>Wrote and maintained several pipe line shelf buttons(with python) to help lighters in my sequence.</p>
<p>Created and maintained the render template for my sequence (100+ shots)</p>
<p>Got into some Maya API stuff, and I will continue working on it this quarter.</p>
<p>Worked on some look dev for my sequence.</p>
<p>Thanks to all the DD folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing for Siggraph</title>
		<link>http://linghaoli.com/blog/?p=136</link>
		<comments>http://linghaoli.com/blog/?p=136#comments</comments>
		<pubDate>Fri, 31 Jul 2009 04:02:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=136</guid>
		<description><![CDATA[I updated my demo reel a little bit, and kicked out some old stuff out of my reel.
Since I used the accumulated displacement technique in my recent centipede shot 02, I could remove this one below from my reel:
Hope I could get some good feedback  at Siggraph..
]]></description>
			<content:encoded><![CDATA[<p>I updated my demo reel a little bit, and kicked out some old stuff out of my reel.</p>
<p>Since I used the accumulated displacement technique in my recent centipede shot 02, I could remove this one below from my reel:</p>
<div class="wp-caption aligncenter" style="width: 710px"><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="467" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/accu_disp.m4v&amp;quality=false&amp;image=http://www.linghaoli.com/misc/accu_disp_play.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /><embed id="player" type="application/x-shockwave-flash" width="700" height="467" src="../../../../ui/player.swf" allowfullscreen="false" wmode="transparent" flashvars="&amp;file=../../../../mov/accu_disp.m4v&amp;quality=false&amp;image=http://www.linghaoli.com/misc/accu_disp_play.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" name="player"></embed></object><p class="wp-caption-text">accumulated displacement</p></div>
<p>Hope I could get some good feedback  at Siggraph..</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=136</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More about Occlusion(part III)</title>
		<link>http://linghaoli.com/blog/?p=117</link>
		<comments>http://linghaoli.com/blog/?p=117#comments</comments>
		<pubDate>Thu, 23 Jul 2009 02:41:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maya]]></category>
		<category><![CDATA[bent normal]]></category>
		<category><![CDATA[reflective occlusion]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=117</guid>
		<description><![CDATA[There is a siggraph 2002 paper talking about how the ILM uses &#8220;Reflective Occlusion&#8221; and &#8220;Bent normal&#8221; techniques to generate fast and reasonablely accurate fake GI passes for light.
First we start with a reflective occlusion pass, actually it&#8217;s very easy to set up in the mib_amb_occlusion:
This shader set up makes sure we are using &#8220;reflective [...]]]></description>
			<content:encoded><![CDATA[<p>There is a siggraph 2002 paper talking about how the ILM uses &#8220;<strong>Reflective Occlusion</strong>&#8221; and &#8220;<strong>Bent normal</strong>&#8221; techniques to generate fast and reasonablely accurate fake GI passes for light.</p>
<p>First we start with a reflective occlusion pass, actually it&#8217;s very easy to set up in the mib_amb_occlusion:</p>
<div class="wp-caption aligncenter" style="width: 430px"><img title="ref_occ" src="http://linghaoli.com/misc/ref_occShader.png" alt="ref occ" width="420" height="185" /><p class="wp-caption-text">Reflective Occ shader set up</p></div>
<p>This shader set up makes sure we are using &#8220;reflective occlusion&#8221; instead of ambient occlusion.<br />
The image below shows the difference of normal Ambient Occlusion and Reflective occlusion. Obviously the reflective occlusion is more rely on<strong> camera angle</strong> and the <strong>surrounding objects</strong>:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="occ_compare" src="http://linghaoli.com/misc/occ_compare.png" alt="occ compare" width="540" height="257" /><p class="wp-caption-text">compare of Reflective Occ and Ambient Occlusion</p></div>
<p>And below is the <strong>compare</strong> of a same reflective occ pass with 2 different reflection passes:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="rel_occ result" src="http://linghaoli.com/misc/refOcc_result.png" alt="ref occ result" width="540" height="935" /><p class="wp-caption-text">result of reflective Occlusion</p></div>
<p>Then, it comes to the bent normal part. The goal of using this technique is to get a flexible fake GI pass (or indirect light pass) based on the given environment image.</p>
<p>Before we use the <strong>mib_bent_normal_env shader</strong> in MR, we need to do:</p>
<p>a. <strong>Bake(use mib_lightmap_write)</strong> the ambient occlusion into texture, before that we need to UV the geometry properly , in my case is the skull  model, without too many overlapping areas.</p>
<p>b. Bake(same as &#8220;a&#8221;) the bent normal into texture, just change the <strong>mode</strong> from 0 to <strong>2</strong>(world space ) or <strong>3</strong> (object space) in the mib_amb_occlusion shader.</p>
<p>Then set up the mib_bent_normal_env as below:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="bent_normal_env" src="http://linghaoli.com/misc/mib_bent_normal_env.png" alt="ref occ" width="540" height="353" /><p class="wp-caption-text">mib_bent_normal_env set up</p></div>
<p>And the render of mib_bent_normal_env will look like a GI pass based on the env map we provided:</p>
<p>Here is the result:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="resultall" src="http://linghaoli.com/misc/envMap.png" alt="result_all" width="540" height="736" /><p class="wp-caption-text">result of bent normal render and usage with reflection pass and a key light pass</p></div>
<p>In the siggraph paper, mighty ILM people were using customized Renderman shader to generate the reflective occlusion, baked AO and bent normal, and shader to use the baked textures.  I tested with Mib_ambient_occlusion instead, but the whole idea is pretty mucn the same.</p>
<p><strong><span style="text-decoration: underline;">Be to noticed</span></strong>: this technique is not suitablt for a deforming object, and dramatic camera movement may also cause problem because of the baked textures.</p>
<p>Originally I did this test just for a fake GI test for a student film project I am working on. But I also had fun while was playing this, which is important ^____^.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1844px; width: 1px; height: 1px;"><strong>mib_bent_normal_env shader</strong></div>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A recent project</title>
		<link>http://linghaoli.com/blog/?p=111</link>
		<comments>http://linghaoli.com/blog/?p=111#comments</comments>
		<pubDate>Mon, 13 Jul 2009 06:36:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=111</guid>
		<description><![CDATA[Updates comming soon
]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 710px"><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="298" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/centiShot01.mov&amp;quality=false&amp;image=http://www.linghaoli.com/misc/centi/shot01.png&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /><embed id="player" type="application/x-shockwave-flash" width="700" height="298" src="../../../../ui/player.swf" allowfullscreen="false" wmode="transparent" flashvars="&amp;file=../../../../mov/centiShot01.mov&amp;quality=false&amp;image=http://www.linghaoli.com/misc/centi/shot01.png&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" name="player"></embed></object><p class="wp-caption-text">centipede project shot01</p></div>
<div class="wp-caption aligncenter" style="width: 710px"><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="298" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/centiShot02.mov&amp;quality=false&amp;image=http://www.linghaoli.com/misc/centi/shot02_p.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /><embed id="player" type="application/x-shockwave-flash" width="700" height="298" src="../../../../ui/player.swf" allowfullscreen="false" wmode="transparent" flashvars="&amp;file=../../../../mov/centiShot02.mov&amp;quality=false&amp;image=http://www.linghaoli.com/misc/centi/shot02_p.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" name="player"></embed></object><p class="wp-caption-text">centipede project shot01</p></div>
<p>Updates comming soon</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=111</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More about Occlusion(part II)</title>
		<link>http://linghaoli.com/blog/?p=99</link>
		<comments>http://linghaoli.com/blog/?p=99#comments</comments>
		<pubDate>Thu, 18 Jun 2009 02:15:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=99</guid>
		<description><![CDATA[The shot above was from the 3D collab class I helped with last quarter.
Since there were all Animation kids in their class, they needed some VSFX help.
I helped them set up almost everything such as lighting, shading, render passes, and compositing.
And a interesting stuff for me was to set up the Occlusion pass with correct [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 550px"><object id="player" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="540" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/3Dcollab.mp4&amp;quality=false&amp;image=../../../../misc/3D_collab.png&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /><embed id="player" type="application/x-shockwave-flash" width="540" height="360" src="../../../../ui/player.swf" allowfullscreen="false" wmode="transparent" flashvars="&amp;file=../../../../mov/3Dcollab.mp4&amp;quality=false&amp;image=../../../../misc/3D_collab.png&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" name="player"></embed></object><p class="wp-caption-text">3D collab class I helped with</p></div>
<p>The shot above was from the 3D collab class I helped with last quarter.</p>
<p>Since there were all Animation kids in their class, they needed some VSFX help.</p>
<p>I helped them set up almost everything such as lighting, shading, render passes, and compositing.</p>
<p>And a interesting stuff for me was to set up the Occlusion pass with correct refraction in it.</p>
<p>Usually when render the occlusion pass, we exclude all the &#8220;glass&#8221; and any other &#8220;transparency&#8221; objects from the render layer.</p>
<p>However, the master layer has been rendered with all the objects(including the refracted objects behind the machine&#8217;s glass containner in the shot above), so when it comes to the Occlusion pass, if the Occlusion haven&#8217;t been refracted, the final comp will not look correctly.</p>
<p>There are two ways to add the occlusion into the master layer.</p>
<p><strong>1</strong>. One easy way to do it is using Mental Ray&#8217;s <strong>Mia-x</strong> material, and turn on the Ambient Occlusion on:</p>
<div class="wp-caption aligncenter" style="width: 445px"><img title="mia_ao" src="http://linghaoli.com/misc/mia_ao.png" alt="AO in Mia material" width="435" height="150" /><p class="wp-caption-text">AO in Mia material</p></div>
<p>And all the occlusions will be rendered in the master layer.</p>
<p><strong>2</strong>. If user were not using Mia material, it will be a huge pain to change all the shaders to Mia materials..</p>
<p>So the second way to achieve the &#8220;occlusion with refraction&#8221; is to :</p>
<p>a. Assign the &#8220;<strong>miLabel</strong>&#8221; to objects in the scene.</p>
<p>b. <strong>Don&#8217;t exclude</strong> the glass container of the machine. Instead, assign a miLable to the glass such as 2, then set the mib_AO shader&#8217;s attribute &#8220;ID Nonself&#8221; the same as the glass&#8217;s miLabel(in this case is 2). When set up like this,  the glass container will not cause any occlusion to other objects in the scene.</p>
<p>c. Instead of connect the mib_AO shader to the surface shader directly, connect it to a <strong>mib_refract</strong> shader(can be found in the sample composition tab) like this:</p>
<div class="wp-caption aligncenter" style="width: 414px"><img title="mib_refrac" src="http://linghaoli.com/misc/mib_refract.png" alt="use mib_refract shader" width="404" height="355" /><p class="wp-caption-text">use mib_refract shader</p></div>
<p>set the Refraction value to 1(or lower than one for not 100% transparanted glass), and set the &#8220;Index of Refraction&#8221; value exactly the same as your glass shader&#8217;s IOR value in the master layer(You could even write an expression to connect this two values if you are geeky enough).</p>
<p>After this, we will get the &#8220;refracted Occlusion&#8221;:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="occ_refra" src="http://linghaoli.com/misc/occ_refra.png" alt="Result of Refracted Occlusion" width="540" height="424" /><p class="wp-caption-text">Result of Refracted Occlusion</p></div>
<p>Hope this will help.</p>
<p><strong><br />
</strong></p>
<p><strong>A little more</strong>..</p>
<p>Also, with similar set up, we can play with Occlusion even more. For example, I created the model of the feathers by overlaping poly planes with transparency maps. And with proper set up, I can render the occlusion like this:</p>
<div class="wp-caption aligncenter" style="width: 486px"><img title="feather_AO" src="http://linghaoli.com/misc/feather_occ.png" alt="AO in Mia material" width="476" height="189" /><p class="wp-caption-text">Feather AO by using similar set up</p></div>
<p>Give it a try if you want, it&#8217;s really fun ^______^.</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=99</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More about occlusion (part I)</title>
		<link>http://linghaoli.com/blog/?p=86</link>
		<comments>http://linghaoli.com/blog/?p=86#comments</comments>
		<pubDate>Tue, 16 Jun 2009 19:39:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=86</guid>
		<description><![CDATA[For example, I have a scene in the image below:
when using the MR shader mib_amb_occlusion node, if we want to render a pass that has the occlusion of the sphere rendered with out display it, normally we can just turn the sphere&#8217;s &#8220;primary visibility&#8221; off. It fits 90% percent of this kind of situations.
However, if [...]]]></description>
			<content:encoded><![CDATA[<p>For example, I have a scene in the image below:</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="screenshoot_of_occScene" src="http://linghaoli.com/misc/occ_screen.png" alt="screen shoot of the examplescene" width="540" height="362" /><p class="wp-caption-text">screen shoot of the examplescene</p></div>
<p>when using the MR shader mib_amb_occlusion node, if we want to render a pass that has the occlusion of the sphere rendered with out display it, normally we can just turn the sphere&#8217;s &#8220;primary visibility&#8221; off. It fits 90% percent of this kind of situations.</p>
<p>However, if user want not only the sphere&#8217;s occlusion be rendered, but also none of the boxes generate occlusion, it will be problem because if I turn &#8220;primary visibility&#8221; of all the boxes off, nohing will be rendered, and if not, the occlusion of sphere on boxes and the occlusion of boxes themselves will be rendered altogether, below is the <strong>undesirable result</strong> I got if just turnning the &#8220;primary visiblitiy&#8221; off:</p>
<div class="wp-caption aligncenter" style="width: 484px"><img title="primaryOff_occ" src="http://linghaoli.com/misc/occ_pri_off.png" alt="rendered image with spheres pri visibility off" width="474" height="301" /><p class="wp-caption-text">rendered image with sphere&#39;s &quot;pri visibility&quot; off</p></div>
<p>Obviously, the occlusion inbetween the gaps of the boxes are sometimes <strong>not</strong> we want&#8230;</p>
<p>This is when the <strong>&#8220;ID Inclexcl&#8221; &#8220;ID Noself&#8221;</strong> attribute come into handy.<br />
Actually, the <strong>djx blog</strong> has a really good explain to this:</p>
<p><a title="djx_about_occ" href="http://www.djx.com.au/blog/2007/05/12/ambient-occlusion-with-milabel/" target="_blank">click here</a></p>
<p>One important thing to notice is that the &#8220;<strong>miLabel</strong>&#8221; attribute is<span style="color: #ff9900;"> case sensitive</span>.</p>
<p>And for sake of  saving time, I wrote a script for assign the &#8220;miLabel&#8221; attr to all the selected objects.</p>
<p>Again, since it&#8217;s a reall small script, I wrote it with Python in Maya:</p>
<p><a title="miLabelScript" href="http://linghaoli.com/misc/scripts/ling_miLabel.html" target="_blank">Click here</a></p>
<p>Copy the code into the Python tab of the script editor and use it&#8230;.</p>
<p>After assign the miLabel to the boxes and sphere, I assign all the boxes&#8217; miLabel =<strong>3</strong>, and assign the miLabel of the sphere to <strong>1</strong>.</p>
<p>Moreover, correspondingly, assign the mib_amb_occlusion shader like this:</p>
<div class="wp-caption aligncenter" style="width: 283px"><img title="occID" src="http://linghaoli.com/misc/occ_id.png" alt="assign the ID correctly" width="273" height="90" /><p class="wp-caption-text">assign the ID correctly</p></div>
<p>Then we will get the <span style="color: #ff6600;"><strong>desired result</strong></span>:</p>
<div class="wp-caption aligncenter" style="width: 484px"><img title="occIDrender" src="http://linghaoli.com/misc/occ_id_off.png" alt="result of correct ID set up in the shader" width="474" height="301" /><p class="wp-caption-text">result of correct ID set up in the shader</p></div>
<p>With this set up, we can have only the sphere&#8217;s occlusion that affect the evironment&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A little script to add the light annotations</title>
		<link>http://linghaoli.com/blog/?p=76</link>
		<comments>http://linghaoli.com/blog/?p=76#comments</comments>
		<pubDate>Fri, 05 Jun 2009 02:06:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=76</guid>
		<description><![CDATA[Inspired by my Friend Al Torres, I wrote a script to add annotations to all the lights in the scene.
Also, if lights&#8217; names have been changed by usrs, re-run the script will update the annotations.
Since it&#8217;s very small script, and I don&#8217;t want people bother too much to install pymel, I wrote it with default [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Inspired by my Friend Al Torres, I wrote a script to add annotations to all the lights in the scene.</p>
<p style="text-align: left;">Also, if lights&#8217; names have been changed by usrs, re-run the script will update the annotations.</p>
<p style="text-align: left;">Since it&#8217;s very small script, and I don&#8217;t want people bother too much to install pymel, I wrote it with default python for Maya script.       This scriptif for usr has a lot of lights in the scene and might have a hard time to remember which light is for what&#8230;</p>
<p style="text-align: left;">Also, name the lights properly before using this script will be a good choice.</p>
<div class="wp-caption aligncenter" style="width: 550px"><img title="lights annotation" src="http://linghaoli.com/misc/lights_anno.png" alt="create annotations and updated names" width="540" height="642" /><p class="wp-caption-text">annotations added and updated</p></div>
<p style="text-align: left;">Here is the script:</p>
<p><a title="ling_addLights_annotation" href="http://www.linghaoli.com/misc/scripts/ling_annotation.html" target="_blank">ling_addLights_annotation</a></p>
<pre style="text-align: left;">Copy the codes and run in scripts editor. Hope this will help</pre>
<p><span style="color: #ff0000;">Update: </span>The last version of script has some bug: if a light in the scene has more than one children node, the script will not working due to my cheesy approach of finding the annotation node. For example:</p>
<pre style="text-align: left;">

<div class="wp-caption aligncenter" style="width: 235px"><img title="LightCamera" src="http://www.linghaoli.com/misc/lighsCam.png" alt="Sometimes when duplicating the light an annoying camera node will be created" width="225" height="235" /><p class="wp-caption-text">annoying camrea with the light </p></div></pre>
<p>Sometimes Maya attaches a camera node to a light when duplicating it, the refined version of the script will delete the camera nodes attached to the light. Also, the script will check each children node of a light, make sure there is an annotation node in it. If yes, just update the light&#8217;s name when necessary. If not, create the annotaion.</p>
<p><span style="color: #ff0000;">Here is the refined version:</span> <a title="ling_annotation_refine" href="http://linghaoli.com/misc/scripts/ling_annotation_refine.html" target="_blank">ling_annotation_refine</a></p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=76</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go Crazy with Dynamic Hair( Part II)</title>
		<link>http://linghaoli.com/blog/?p=48</link>
		<comments>http://linghaoli.com/blog/?p=48#comments</comments>
		<pubDate>Thu, 28 May 2009 11:05:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[pymel]]></category>

		<guid isPermaLink="false">http://linghaoli.com/blog/?p=48</guid>
		<description><![CDATA[Since the result for the puffer ball dosen&#8217;t look to bad, I wanted to do more with the dynamic hairs. I am taking Independent study with Prof. Bridge Gaynor, so I can free free to do what I want to achieve. The video below is the result. In this project, for the dynamic part I [...]]]></description>
			<content:encoded><![CDATA[<p>Since the result for the puffer ball dosen&#8217;t look to bad, I wanted to do more with the dynamic hairs. I am taking Independent study with Prof. Bridge Gaynor, so I can free free to do what I want to achieve. The video below is the result. In this project, for the dynamic part I am pretty satisfied. However, for the lighting and intergration part, since I had a lot of trouble with the hair cache(which is famously known as bad), I did not  have much time do make the lighting look good&#8230;. I will re-light the scene during the summer.</p>
<p>Anyway, here is the result for right now:<br />
<div class="wp-caption aligncenter" style="width: 550px"><object width="540" height="360" data="../../../../ui/player.swf" type="application/x-shockwave-flash"><param name="id" value="player" /><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/jelly_spring.flv&amp;quality=false&amp;image=../../../../misc/play_jelly.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /></object><p class="wp-caption-text">result for right now</p></div></p>
<p><strong>BG and Look development:</strong></p>
<p>I shot the BG plate at the Jepson center of Savannah, and I wanted to create a senario that things are a little different than normal. I want to create the CG jelly fishes floating and &#8220;swimming&#8221; in the air. Beside the jellyfish, I want some CG water coming down the steps. With these two major different CG elements, I need use Maya, MEL, Pymel, Houdini, which makes this project really exiting to me.</p>
<p>Here is the BG shot:</p>
<div class="wp-caption aligncenter" style="width: 330px"><img title="shot track and mathed Geo" src="http://linghaoli.com/misc/jelly_track.jpg" alt="shot with HVX200 and tracked with PFTrack" width="320" height="479" /><p class="wp-caption-text">shot with HVX200 and tracked with PFTrack</p></div>
<p>I shot the scene with HVX200 camera, tracked it with PFTrack, and created proxy geometry for houdini as collision objects for the water.</p>
<p><strong>Jelly Dynamic:</strong></p>
<p><em>Attempt 1:</em> In the beginning I planned to create dynamic hair, then use pointOnCurveInfo node to position joints, also add a expression to each joint(force the joint translate with the curve&#8217;s certain U value). Then after this, skin the pre-modeled jellyfish geometry with the number of joints&#8230;.here is a test result:</p>
<div class="wp-caption aligncenter" style="width: 330px"><img title="the first attempt" src="http://linghaoli.com/misc/jelly_joints.jpg" alt="with joints created, not very efficient way" width="320" height="240" /><p class="wp-caption-text">with joints created, not very efficient way</p></div>
<p>As people can easily imagine, this approach is very inefficient, too many non-properly used nodes such as expression node, pointOnCurveInfo node have been added into the construction history. And the playback is really slow even just with one jellyfish in the scene.</p>
<p><em>Attempt 2: </em>Instead of using joints to deform the geometry, simulate the hair curves and then loft a surface based on the curves is much easier and straigt forward. So I deleted the hand modeled geometry, twicked the script to automatically duplicate hair curves, then create a loft based on the hair curves. As a result, as long as the hair curves are dynamic, the surface is moving correspondingly.</p>
<p>here is the result:</p>
<div class="wp-caption aligncenter" style="width: 330px"><img title="lofted surface" src="http://linghaoli.com/misc/jelly_loft.jpg" alt="lofted surface version is much faster than joints skin version" width="320" height="240" /><p class="wp-caption-text">lofted surface version is much faster than joints skin version</p></div>
<p>In addition, I changed the curves from 2 skin curves to one skin curve, which will prevent the penetration issue in the later on dynamic simulation stagest(the self collide will help the hair curves reduce the likeness of penetration)</p>
<p><em>Attempt 3:</em> To get a better control of simulation, make the rest curve pre-animated or pre-defined is better. So I created a blendshape for the rest curve, and when the blend value chage from 0 to 1, the rest curve will change from close position to open position, which represent the open and close motion of the jelly skin.<br />
<div class="wp-caption aligncenter" style="width: 550px"><object width="540" height="360" data="../../../../ui/player.swf" type="application/x-shockwave-flash"><param name="id" value="player" /><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/open_close.flv&amp;quality=false&amp;image=../../../../misc/play_blend.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /></object><p class="wp-caption-text">blendshape animation</p></div></p>
<p><em>Attempt4: </em>After this, I lofted the surface, and based on the surface&#8217;s U value, I attached 600 folicles onto the surface, then each folicle has been attached a dynamic hair curve. 600 is pretty decent for the density of small curves on the edge of the skin. All these folicles and hairs are go with a new hair system that gives a seperate hair behavior control.</p>
<p>What&#8217;s more,  I added another hair system and some dynamic hairs to represent the long organic skin. Three other surfaces have been lofted based on the motion of the hair curves. Addition to this, a simple cluster and a circle as a controller created as a easy rig. As a result, the controller moves the shape node of the rest curves, causing all the dynamic system to response.</p>
<p>And here is the result:</p>
<div class="wp-caption aligncenter" style="width: 330px"><img title="with all hair systems" src="http://linghaoli.com/misc/jelly_allHair.png" alt="all hair systems for a jelly created" width="320" height="240" /><p class="wp-caption-text">all hair systems for a jelly created</p></div>
<p><em>Attemp 5: </em>For the sake of better control of simulation tweaking, I wrote the UI for the tool:</p>
<p>As user can see, I can set and key random value to the open_close value of the jelly&#8217;s skin, which brings the jelly to live. Also, to get individule jelly&#8217;s corresponding hair system and cache them, some helper funcion such as &#8220;select hair system&#8221; and &#8220;set start frame&#8221; added:</p>
<div class="wp-caption aligncenter" style="width: 481px"><img title="UI" src="http://linghaoli.com/misc/jelly_UI.png" alt="UI to get better control and simulation" width="471" height="681" /><p class="wp-caption-text">UI to get better control and simulation</p></div>
<p><strong>Final result for the simulation part:</strong><br />
<div class="wp-caption aligncenter" style="width: 550px"><object width="540" height="360" data="../../../../ui/player.swf" type="application/x-shockwave-flash"><param name="id" value="player" /><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/jelly_simu.flv&amp;quality=false&amp;image=../../../../misc/play_simu.png&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /></object><p class="wp-caption-text">playblast of dynamics</p></div><br />
<strong></strong></p>
<p><strong>Problems:</strong></p>
<p>a. The dynamic hair cach system in Maya has been offering a really bad time. I &#8216;ve tried to customize the hair cache a litlle by constructing my own cache command. However, after this, Maya would never find the correct cache file again. I searched online for a while but no good anwser&#8230;. Which make me really unhappy was, since Maya can&#8217;t find the right cache, before it go to batch render the frames, it will re-simulate all the systems. This problem has been enlarged 10 times because I set up at least 10 render passes in my maya scene. As a result, even though the local render time was 3-10 second per frame per pass in average, I could not render my sequence within 2 hours per frame on the render farm, In the end, I have batch render locally, which consumed my time should be decicated to the lighting part.</p>
<p>b. another problem is a little weird but I think is fixable:</p>
<p>I wrote all the script in Windows. It works fine and the UI works perfectly. However, when I worked on Linux, the UI dosen&#8217;t display correctly. Except all the framelayouts, I lost all the buttons, fieldgrps, and instruction texts&#8230; Weird&#8230;Will looking into it later.</p>
<p>And the here is the lighting breakdown so far:<br />
<div class="wp-caption aligncenter" style="width: 550px"><object width="540" height="360" data="../../../../ui/player.swf" type="application/x-shockwave-flash"><param name="id" value="player" /><param name="name" value="player" /><param name="flashvars" value="&amp;file=../../../../mov/jelly_layer.flv&amp;quality=false&amp;image=../../../../misc/play_layer.jpg&amp;stretching=none&amp;screencolor=000000&amp;controlbar=over&amp;skin=../../../../mov/skin&amp;" /><param name="src" value="../../../../ui/player.swf" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="false" /></object><p class="wp-caption-text">lighting breakdown</p></div></p>
<p><strong>Special Thanks:</strong><br />
I need to appreciate Prof. Bridget Gaynor and prof. Ken Huff, without their greate suggestions I would finish this with more unnecessary pains.</p>
]]></content:encoded>
			<wfw:commentRss>http://linghaoli.com/blog/?feed=rss2&amp;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
