<?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>Smart-Page.net &#187; AO</title>
	<atom:link href="http://www.smart-page.net/blog/tag/ao/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smart-page.net/blog</link>
	<description>C++ / C# / Actionscript / Py ... &#039;My God. It&#039;s full of stars!&#039;</description>
	<lastBuildDate>Tue, 27 Jul 2010 21:35:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Realtime SSAO with After Effects and Pixel Bender</title>
		<link>http://www.smart-page.net/blog/2009/10/05/realtime-ssao-with-after-effects-and-pixel-bender/</link>
		<comments>http://www.smart-page.net/blog/2009/10/05/realtime-ssao-with-after-effects-and-pixel-bender/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 07:00:58 +0000</pubDate>
		<dc:creator>flashgordon</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[After Effects]]></category>
		<category><![CDATA[AFX]]></category>
		<category><![CDATA[AO]]></category>
		<category><![CDATA[Pixel Bender]]></category>
		<category><![CDATA[Screen Space Ambient Occlusion]]></category>
		<category><![CDATA[Smart SSAO]]></category>
		<category><![CDATA[SSAO]]></category>

		<guid isPermaLink="false">http://www.smart-page.net/blog/?p=471</guid>
		<description><![CDATA[<a href="http://www.smart-page.net/blog/2009/10/05/realtime-ssao-with-after-effects-and-pixel-bender/" title="Realtime SSAO with After Effects and Pixel Bender"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/sp_ssao.7aora230sz48sk0ogck8wc4k4.h9fw4mcunnwo4cowc8k4840k.th.jpeg" width="200" height="150" alt="Realtime SSAO with After Effects and Pixel Bender" style="float:left;padding:0 10px 10px 0;" ></a>Screen Space Ambient Occlusion or SSAO is a method to compute an approximated AO pass in real-time! 
This is done by using the depth information of a 3D object or scene that has been stored from the Z-(depth) buffer of the renderer.
Go ahead and try the interactive demo or see a video example!


The technique was [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.smart-page.net/blog/2009/10/05/realtime-ssao-with-after-effects-and-pixel-bender/" title="Realtime SSAO with After Effects and Pixel Bender"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/sp_ssao.7aora230sz48sk0ogck8wc4k4.h9fw4mcunnwo4cowc8k4840k.th.jpeg" width="200" height="150" alt="Realtime SSAO with After Effects and Pixel Bender" style="float:left;padding:0 10px 10px 0;" ></a><p>Screen Space Ambient Occlusion or <a href="http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion" target="_blank">SSAO</a> is a method to compute an approximated <a href="http://en.wikipedia.org/wiki/Ambient_occlusion" target="_blank">AO</a> pass in real-time! </p>
<p>This is done by using the depth information of a 3D object or scene that has been stored from the Z-(depth) buffer of the renderer.</p>
<p><b>Go ahead and try the <a href="http://www.smart-page.net/as3/sp_smartssao">interactive demo</a> or see a <a href="http://www.vconverter.de/?file=smartssao" target="_blank">video example!</a></b><br />
<br/><br />
<span id="more-471"></span></p>
<p>The technique was introduced 2007 at Siggraph by <a href="http://www.crytek.com/" target="_blank">Crytek Studios</a> and is becoming an often used feature within next generation live-3d engines or cg/video post applications.</p>
<p>After playing with the ray traced inside-out AO and having to realize that it´s not quite doable with Pixel Blender, I turned to SSAO and quickly got some nice results.</p>
<p>In short it´s all about importance sampling. </p>
<p>SmartSSAO looks up the depth information of 12 surrounding samples and checks if they get occluded to average the AO value.<br />
<img style="margin-top:10px; margin-bottom:5px;" src="http://www.smart-page.net/blog/wp-content/uploads/2009/10/sp_ssao3.jpg" alt="sp_ssao3" title="sp_ssao3" width="680" height="142" class="alignnone size-full wp-image-680" /></p>
<p>The disadvantages lie in the nature of SSAO being &#8220;screen spaced&#8221; which means that it can´t take objects from the off into account, and the result has to be blurred to reduce the inevitable noise.<br />
Also there is no ray bouncing, so classic AO is visually superior &#8211; but hey&#8230; who can argue with &#8220;real-time&#8221;?</p>
<p><strong><a href="http://www.vconverter.de/?file=smartssao2" target="_blank">View another video</a></strong> of the buffer and the solo SSAO pass without/with blurring.<br />
<span style="color: #ff6600;"><em>Please note that those strange looking anomalies on the buddahs arms originate from the badly ranged zmap I produced in a hurry.</em></span><br />
<br/><br />
<strong>To sum it all up:</strong></p>
<p>SSAO makes it possible to have AO in places where it normally isn´t possible &#8211; e.g. real-time engines (yes &#8211; even for Flash/Papervision), or within a video post process.</p>
<p>All that’s needed is the Zbuffer of a 3D rendering.<br />
<br/></p>
<p><strong>You can download the Shader <a href="http://www.smart-page.net/as3/sp_smartssao/SmartSSAO.zip" target="_blank">here </a>or get it packed with an <a href="http://www.smart-page.net/as3/sp_smartssao/SmartSSAO_example.zip" target="_blank">AFX example</a>.<br />
</strong><br/><br />
<i>Hint: As said before, the SSAO pass needs to be blurred in order to clear out the emerging noise &#8211; but don´t overdo it, as the blurring will &#8220;bleed&#8221; the result over to unwanted areas.<br />
This could be targeted by a special SSAO blur filter that would again have to take the depth map into account. </i><br />
<br/><br />
<em><a href="http://www.vconverter.de/?file=smartssao2" target="_blank">Click here to see this screenshot as video</a></em><br/><br />
<strong><img class="alignnone size-full wp-image-504" title="sp_ssao2" src="http://www.smart-page.net/blog/wp-content/uploads/2009/10/sp_ssao2.jpg" alt="sp_ssao2" width="700" height="401" /><br />
</strong></p>
<p><strong><span style="color: #ff6600;"><em><br />
Update:</em></span></strong></p>
<p>I feel like I should adress the X,Y-offset params of the filter which can be used to tweak the &#8220;shadow direction&#8221;.<br />
&#8220;Shadow direction&#8221; in quotes as (SS)AO is all about indirect lightning so this is a real &#8220;tweak&#8221; or an unrealistic param &#8211; which I thought might come in handy in some cases.</p>
<p>I was asked if the shader was performant enaugh for flash &#8211; and even if it looks a bit ugly codewise as I had to get rid of a loop &#8211; it surely is.</p>
<p>So I updated the package and made this small <a href="http://www.smart-page.net/as3/sp_smartssao" target="_blank"><strong>interactive flex demo</strong></a> :</p>
<p><embed style="margin-left:50px;" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="570" height="500" src="http://www.smart-page.net/as3/sp_smartssao/SmartSSAO_Shadertest.swf" /><br />
Be sure to try unchecking &#8220;color SSAO?&#8221; and &#8220;show SSAO?&#8221; to get an impression.</p>
<p>You can grab the source <strong><a href="http://www.smart-page.net/as3/sp_smartssao/srcview/index.html" target="_blank">here</a></strong>.</p>
<p><strong><span style="color: #ff6600;"><em><br />
Update 2:</em></span></strong></p>
<p>The filter now features an additional sampling radius parameter which controls the dispersion and allows to adjust it to the desired level of detail &#8211; this should also make it more useable for papervision.</p>
<p>I hope this little experiment will be of use to somebody out there and would love to hear any suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smart-page.net/blog/2009/10/05/realtime-ssao-with-after-effects-and-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GPU based Raytracing with Pixel Bender and After Effects</title>
		<link>http://www.smart-page.net/blog/2009/09/27/gpu-based-raytracing-with-pixel-bender-and-after-effects/</link>
		<comments>http://www.smart-page.net/blog/2009/09/27/gpu-based-raytracing-with-pixel-bender-and-after-effects/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 10:29:44 +0000</pubDate>
		<dc:creator>flashgordon</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[After Effects]]></category>
		<category><![CDATA[Ambient Occlusion]]></category>
		<category><![CDATA[AO]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Pixel Bender]]></category>
		<category><![CDATA[Raytracing]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.smart-page.net/blog/?p=426</guid>
		<description><![CDATA[<a href="http://www.smart-page.net/blog/2009/09/27/gpu-based-raytracing-with-pixel-bender-and-after-effects/" title="GPU based Raytracing with Pixel Bender and After Effects"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/afx1.bvtxxmsuo4gkogg404kgs8c4g.h9fw4mcunnwo4cowc8k4840k.th.jpeg" width="200" height="150" alt="GPU based Raytracing with Pixel Bender and After Effects" style="float:left;padding:0 10px 10px 0;" ></a>Since some years the idea of harnessing the power of modern graphic cards for 2D/3D applications has become more and more popular.
Today we find GPU support in many CG applications like Photoshop or After Effects.
But first the fun part: Watch a video raytraced with PB and AFX!
 The chaos group is even working on a [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.smart-page.net/blog/2009/09/27/gpu-based-raytracing-with-pixel-bender-and-after-effects/" title="GPU based Raytracing with Pixel Bender and After Effects"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/afx1.bvtxxmsuo4gkogg404kgs8c4g.h9fw4mcunnwo4cowc8k4840k.th.jpeg" width="200" height="150" alt="GPU based Raytracing with Pixel Bender and After Effects" style="float:left;padding:0 10px 10px 0;" ></a><p>Since some years the idea of harnessing the power of modern graphic cards for 2D/3D applications has become more and more popular.</p>
<p>Today we find GPU support in many CG applications like Photoshop or After Effects.</p>
<p><b>But first the fun part: <a href="http://www.vconverter.de/?file=rt_aa_ao" target="_blank">Watch a video raytraced with PB and AFX!</a></b></p>
<p><span id="more-426"></span> The <a href="http://www.chaosgroup.com" target="_blank">chaos group</a> is even working on a GPU based real time version of Vray &#8211; a widely used modern GI raytracer.</p>
<p>In fact GPU shading is often more performant plus it quasi &#8216;adds&#8217; an unused/inactive processor.</p>
<p>One could argue that Pixel Bender doesn´t quite fit the term as its mostly run in software mode (on the CPU) &#8211; for<br />
example when executing a PB shader in Flash or rendering it with AFX&#8230; for now.</p>
<p>But PB is still young and the prospect of being able to run it within multiple adobe platforms (Flash,PS,AFX) is very compelling.</p>
<p>When I saw <a href="http://www.subblue.com/blog/2009/9/20/quaternion_julia" target="_blank">Tom Beddard´s PB port</a> of Keenan Crane&#8217;s genius julia set tracer, I remembered that I had planned to get into PB GPU raytracing once I got around <a href="http://mike.newgrounds.com/news/post/156863" target="_blank">Mike Welsh´s PB raytracer</a>.</p>
<p>So I spend some time with it, created a scene similar to &#8216;<a href="http://www.smart-page.de/as3d/sp_theeye/" target="_blank">The Eye&#8217;</a> and added viewport controls as well as anti aliasing.</p>
<p>The result can be viewed <a href="http://www.vconverter.de/?file=rt_aa_ao" target="_blank">here</a>.</p>
<p><em>Rendertime was 3:10 on a Q6600 for 4700 frames.</em></p>
<p>And <a href="http://www.smart-page.net/as3/sp_smartray/SmartRayTracer.pbk" target="_blank">here</a> is the modified shader.</p>
<p>I also fiddled around with adding an inside-out AO (<a href="http://en.wikipedia.org/wiki/Ambient_occlusion" target="_blank">ambient occlusion</a>) pass but wasn´t able to get satisfying results.<br />
It even almost fried my GPU in the process so in conclusion it’s doable but sadly not practical.</p>
<p><img class="alignnone size-full wp-image-443" title="ao2" src="http://www.smart-page.net/blog/wp-content/uploads/2009/09/ao2.jpg" alt="ao2" width="426" height="210" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smart-page.net/blog/2009/09/27/gpu-based-raytracing-with-pixel-bender-and-after-effects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
