<?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; Flex</title>
	<atom:link href="http://www.smart-page.net/blog/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smart-page.net/blog</link>
	<description>C++ / C# / Py / Actionscript ... &#039;My God. It&#039;s full of stars!&#039;</description>
	<lastBuildDate>Thu, 23 Jun 2011 00:14:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sing like HAL with the Flash Player 10.1</title>
		<link>http://www.smart-page.net/blog/2009/12/30/sing-like-hal-with-the-flash-player-101/</link>
		<comments>http://www.smart-page.net/blog/2009/12/30/sing-like-hal-with-the-flash-player-101/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:49:29 +0000</pubDate>
		<dc:creator>flashgordon</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Flash Player 10.1]]></category>
		<category><![CDATA[Microphone]]></category>
		<category><![CDATA[Pitch]]></category>

		<guid isPermaLink="false">http://www.smart-page.net/blog/?p=670</guid>
		<description><![CDATA[<a href="http://www.smart-page.net/blog/2009/12/30/sing-like-hal-with-the-flash-player-101/" title="Sing like HAL with the Flash Player 10.1"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/10_11.dbpgxcadusn6skwc80csg08ks.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="Sing like HAL with the Flash Player 10.1" style="float:left;padding:0 10px 10px 0;" ></a>Of course everybody remembers the scene from 2001 when Dave Bowman removes HAL´s memory banks. While being shut down HAL sings the song &#8216;daisy&#8217; and his voice continuously pitches down while his &#8216;mind fades&#8217;. With this little test app you can sing like HAL! &#8230;provided you installed the Flash Player 10.1 beta and have a [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.smart-page.net/blog/2009/12/30/sing-like-hal-with-the-flash-player-101/" title="Sing like HAL with the Flash Player 10.1"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/10_11.dbpgxcadusn6skwc80csg08ks.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="Sing like HAL with the Flash Player 10.1" style="float:left;padding:0 10px 10px 0;" ></a><p>Of course everybody remembers the scene from <a href="http://de.wikipedia.org/wiki/2001_%E2%80%93_Odyssee_im_Weltraum" target="_blank">2001</a> when Dave Bowman removes HAL´s memory banks.</p>
<p>While being shut down HAL sings the song &#8216;daisy&#8217; and his voice continuously pitches down while his &#8216;mind fades&#8217;.<br />
<strong><br />
<a href="http://www.smart-page.net/as3/sp_mictest/" target="_blank">With this little test app you can sing like HAL!</strong></a></p>
<p><span id="more-670"></span><br />
&#8230;provided you installed the <a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank">Flash Player 10.1 <del datetime="2010-11-23T01:39:09+00:00">beta</del></a> and have a microphone handy.</p>
<p>Yes 10.1 &#8211; as the new year is coming, so is the next subversion step of the flash player, bringing among other features video playback and p2p/streaming enhancements.<br />
The beta2 has been released at the 17th December and brought also the long-awaited <a href="http://labs.adobe.com/downloads/flashplayer10.html" target="_blank">debug version</a>. </p>
<p>But aside from the global error handling, the new feature I was looking forward to the most is the access to binary data coming from the microphone.</p>
<p>This will allow to develop a bunch of pretty interesting applications that make use of voice input &#8211; like voice recognition for example.</p>
<p>This little demo records data from the mic and plays it with an adjustable speed offset, pitching the sound. </p>
<p><embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="320" height="140" src="http://www.smart-page.net/as3/sp_mictest/flash10_1_mic_test.swf" /><br />
<br/><br />
You can <a href="http://www.smart-page.net/as3/sp_mictest/srcview" target="_blank">download the source here.</a></p>
<p><del datetime="2010-11-23T01:39:09+00:00">Note: to be able to compile the project you need to download the updated &#8220;<a href="http://labs.adobe.com/downloads/flashplayer10.html#pgswc" target="_blank">playerglobal.swc</a>&#8220;.<br />
</del></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smart-page.net/blog/2009/12/30/sing-like-hal-with-the-flash-player-101/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>SmartReLight &#8211; relighting with Pixel Bender</title>
		<link>http://www.smart-page.net/blog/2009/12/27/smartrelight-relighting-with-pixel-bender/</link>
		<comments>http://www.smart-page.net/blog/2009/12/27/smartrelight-relighting-with-pixel-bender/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 15:57:15 +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[Normals]]></category>
		<category><![CDATA[PixelBender]]></category>
		<category><![CDATA[Relighting]]></category>
		<category><![CDATA[SmartReLight]]></category>
		<category><![CDATA[Video post]]></category>

		<guid isPermaLink="false">http://www.smart-page.net/blog/?p=642</guid>
		<description><![CDATA[<a href="http://www.smart-page.net/blog/2009/12/27/smartrelight-relighting-with-pixel-bender/" title="SmartReLight &#8211; relighting with Pixel Bender"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/smartrelight.3itd6eb870qvdwc88ocswkwc0.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="SmartReLight &#8211; relighting with Pixel Bender" style="float:left;padding:0 10px 10px 0;" ></a>Relighting is an interesting method that is often used in video post production pipelines. Given the vector of its surface normal, it is possible to calculate the brightness of each pixel by a pseudo 3D lightning system. Checkout the demo of SmartReLight! As the &#8216;object space&#8217; &#8211; or &#8216;material&#8217; normal’s have to be known, relighting [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.smart-page.net/blog/2009/12/27/smartrelight-relighting-with-pixel-bender/" title="SmartReLight &#8211; relighting with Pixel Bender"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/smartrelight.3itd6eb870qvdwc88ocswkwc0.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="SmartReLight &#8211; relighting with Pixel Bender" style="float:left;padding:0 10px 10px 0;" ></a><p>Relighting is an interesting method that is often used in video post production pipelines.</p>
<p>Given the vector of its surface normal, it is possible to calculate the brightness of each pixel by a pseudo 3D lightning system.</p>
<p><a href="http://www.smart-page.net/as3/sp_smartrelight" target="_blank"><strong>Checkout the demo of SmartReLight!</strong></a><br />
<br/><br />
<span id="more-642"></span><br />
As the &#8216;object space&#8217; &#8211; or &#8216;material&#8217; normal’s have to be known, relighting is mostly used within the post process of CG generated images or videos.</p>
<p>It’s a convenient way to archive great lighting and gives the artist most control as he can tune it in real-time without having to re- render the footage for every adjustment.</p>
<p>As you can see from this example, the complete lighting is done by the shader using only a color pass and the object normal’s:</p>
<p><img class="alignnone size-full wp-image-648" title="smartrelight2" src="http://www.smart-page.net/blog/wp-content/uploads/2007/05/smartrelight2.jpg" alt="smartrelight2" width="680" height="170" /><br />
<br/><br />
This implementation is fairly simple as it doesn´t support reflections and refractions like <a href="http://www.minning.de/software/normality" target="_blank">Normality</a> , but its fast and does the job &#8211; and what better way to get through the last cold days of the year than playing half an hour with Pixel Bender?</p>
<p>It’s also possible to relight already lighted sources to some extend, by not using the color- , but an already phong- shaded pass:</p>
<p><embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" width="680" height="350" src="http://www.smart-page.net/as3/sp_smartrelight/SmartReLight_Shadertest.swf" /><br />
<br/><br />
You can <a href="http://www.smart-page.net/as3/sp_smartrelight/SmartReLight.zip">download SmartReLight here</a> and the <a href="http://www.smart-page.net/as3/sp_smartrelight/srcview" target="_blank">source of the demo</a> including the shader <a href="http://www.smart-page.net/as3/sp_smartrelight/srcview" target="_blank">here</a>.<br />
<br/><br/></p>
<h3>Compiling PB shaders at runtime</h3>
<p>Last but not least a short but very interesting story:</p>
<p>Recently I was asked if it was possible to compile a PB shader at runtime.</p>
<p>Given it some thought &#8211; why not?</p>
<p>And as it turned out the hell of a chap Nicolas Canasse already <a href="http://ncannasse.fr/projects/pbj?version=232" target="_blank">took care of that matter</a>.<br />
There is also already an <a href="http://www.jamesward.com/2009/04/29/announcing-pbjas-an-actionscript-3-pixel-bender-shader-library/" target="_blank">AS3 port</a> by James Ward.<br />
<br/><br/></p>
<h3>All the best for 2010 !</h3>
]]></content:encoded>
			<wfw:commentRss>http://www.smart-page.net/blog/2009/12/27/smartrelight-relighting-with-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<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/plugins/yet-another-photoblog/YapbThumbnailer.php?post_id=471&amp;w=200&amp;h=150&amp;zc=1" 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 [...]]]></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/plugins/yet-another-photoblog/YapbThumbnailer.php?post_id=471&amp;w=200&amp;h=150&amp;zc=1" 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>
	</channel>
</rss>

