<?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>Antti Kupila. Flash Gordon on steroids! &#187; Pixel Bender</title>
	<atom:link href="http://www.anttikupila.com/category/pixel-bender/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anttikupila.com</link>
	<description>Personal blog, portfolio &#38; online playground</description>
	<lastBuildDate>Tue, 29 Nov 2011 14:05:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Pixel Bender levels example</title>
		<link>http://www.anttikupila.com/flash/pixel-bender-levels-example/</link>
		<comments>http://www.anttikupila.com/flash/pixel-bender-levels-example/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 23:38:30 +0000</pubDate>
		<dc:creator>Antti</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://www.anttikupila.com/?p=106</guid>
		<description><![CDATA[Pixel Bender is huge and is going to be even bigger once Flash player 10 officially is out (and spreads a bit so that we can start using it in commercial projects). I just love it when Adobe constantly lower the restrictions on creativity A lot of the examples we see online for Pixel Bender [...]]]></description>
			<content:encoded><![CDATA[<p>Pixel Bender is huge and is going to be even bigger once Flash player 10 officially is out (and spreads a bit so that we can start using it in commercial projects). I just love it when Adobe constantly lower the restrictions on creativity <img src='http://www.anttikupila.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A lot of the examples we see online for Pixel Bender (previously codenamed Hydra) are crazy visual effects. While they&#8217;re amazing for certain visual effects (mostly due to the processing speed), finding real life use is harder. I&#8217;ve had the need for a similar-to-photoshop levels filter multiple times, if nothing else for preprocessing a bitmap for further analysis. Turns out creating something like this with Pixel Bender is really simple and even better; it&#8217;s blazing fast.</p>
<p>If you&#8217;ve read my previous articles you know that I&#8217;ve already <a href="http://www.anttikupila.com/flash/my-take-on-hydra/?search=hydra">written a prototype for the levels filter</a> (geesh, it&#8217;s almost <em>a year</em> ago!). Well, back then Pixel Bender was called Hydra and the code written isn&#8217;t compatible with today&#8217;s version anymore. I addition to that we weren&#8217;t able to export stuff, it just ran in the Hydra toolkit. Today I updated the code and exported it as a .pbj that can be used in Flash.</p>
<p>I&#8217;ve made a small example with a couple example images with the contrast reduced. You&#8217;ll need Flash player 10 to play with it. If all you see is white <a href="http://labs.adobe.com/downloads/flashplayer10.html" rel="external">download the plugin from Adobe labs</a>.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_levels_325865557"
			class="flashmovie"
			width="515"
			height="503">
	<param name="movie" value="http://www.anttikupila.com/flash/pb_levels/levels.swf" />
	<param name="flashvars" value="filter=http://www.anttikupila.com/flash/pb_levels/levels.pbj&#038&amp;images=http://www.anttikupila.com/flash/pb_levels/central_park.jpg,http://www.anttikupila.com/flash/pb_levels/times_square.jpg,http://www.anttikupila.com/flash/pb_levels/restroom.jpg" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.anttikupila.com/flash/pb_levels/levels.swf"
			name="fm_levels_325865557"
			width="515"
			height="503">
		<param name="flashvars" value="filter=http://www.anttikupila.com/flash/pb_levels/levels.pbj&#038&amp;images=http://www.anttikupila.com/flash/pb_levels/central_park.jpg,http://www.anttikupila.com/flash/pb_levels/times_square.jpg,http://www.anttikupila.com/flash/pb_levels/restroom.jpg" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>A couple pointers on the example: Clicking a histogram will automatically balance it. Double clicking will reset it to 0-255. Clicking the image will load a new image. In photoshop you can choose to either modify the luminosity or the individual channels. Here i enabled you to modify both at the same time, but this means that if you modify all 4, the automatic mapping won&#8217;t be correct anymore (the histogram in the bottom left corner will show the result of this). I could make it understand this, but since it&#8217;s just a proof of concept i think this is fine. Also gamma isn&#8217;t supported at the moment.</p>
<p>The source is of course available:</p>
<ul class="list">
<li><a href="http://www.anttikupila.com/flash/pb_levels/levels.pbj">levels.pbj</a> (file to load in flash)</li>
<li><a href="http://www.anttikupila.com/flash/pb_levels/levels.pbk">levels.pbk</a> (source for levels filter)</li>
<li><a href="http://www.anttikupila.com/flash/pb_levels/pb_levels.zip">pb_levels.zip</a> (everything, including the example with the source)</li>
</ul>
<p>Do you have other real life uses for Pixel Bender?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anttikupila.com/flash/pixel-bender-levels-example/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

