<?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>Romain Guy &#187; Flash</title>
	<atom:link href="http://www.curious-creature.org/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.curious-creature.org</link>
	<description></description>
	<lastBuildDate>Sun, 19 Feb 2012 02:23:43 +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>Flash Catalyst and Flash Builder 4</title>
		<link>http://www.curious-creature.org/2009/06/16/flash-catalyst-and-flash-builder-4/</link>
		<comments>http://www.curious-creature.org/2009/06/16/flash-catalyst-and-flash-builder-4/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 05:50:06 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=653</guid>
		<description><![CDATA[I&#8217;ve been following the development of Flash Catalyst, formerly known as Thermo, ever since it was announced and I was really happy when Adobe finally released Flash Catalyst beta 1 earlier this month. I played with it a little and I am really excited by what this tool will become. To give Catalyst a try, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been following the development of Flash Catalyst, formerly known as <em>Thermo</em>, ever since it was announced and I was really happy when Adobe finally released <a href="http://labs.adobe.com/technologies/flashcatalyst/">Flash Catalyst beta 1</a> earlier this month. I played with it a little and I am really excited by what this tool will become.</p>
<div style="text-align: center;"><a href="http://progx.org/users/Gfx/FlashCatalyst.png"><img src="http://progx.org/users/Gfx/FlashCatalyst_small.png" alt="Flash Catalyst" /></a></div>
<p>To give Catalyst a try, I decided to write a very simple application to search for photos on Flickr. After 10 minutes in Photoshop, 15 minutes in Catalyst and 15 minutes in Flash Builder 4 I had a working application and I had written only a dozen lines of code.</p>
<p>Despite its qualities, Flash Catalyst has a long way to go. I know this is only the first beta of a 1.0 product but here is a short list of what limitations I encountered after writing a few simple applications:</p>
<ul>
<li>The tool sometimes doesn&#8217;t feel responsive; I kind of expected this from an Eclipse-based Flex-based application in full screen mode on a 30&#8243; monitor.</li>
<li>All sizes and positions are hardcoded in absolute coordinates. The lack of support for layouts will definitely make Catalyst a lot less interesting for stand-alone AIR apps.</li>
<li>There are only a few properties you can manipulate for each widget.</li>
<li>Round-tripping between Catalyst and Flash Builder is worrisome if you&#8217;re not careful.</li>
<li>Integration with Photoshop is definitely lacking and far from what was announced (or at least I thought was announced.)</li>
</ul>
<p>The Photoshop integration is the only real issue I have with Catalyst. You can apparently use Illustrator or Fireworks but these are tools I&#8217;m not very familiar with. This also means getting new licenses because only CS4 is supported (too bad for my CS3 copy of Illustrator.)</p>
<p>I can&#8217;t wait to see what Flash Catalyst 1.0 will end up becoming and what Adobe has in store for the future releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2009/06/16/flash-catalyst-and-flash-builder-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Filtering a Bitmap using pixels shaders in Flex</title>
		<link>http://www.curious-creature.org/2008/12/17/filtering-a-bitmap-using-pixels-shaders-in-flex/</link>
		<comments>http://www.curious-creature.org/2008/12/17/filtering-a-bitmap-using-pixels-shaders-in-flex/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 20:58:04 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/?p=535</guid>
		<description><![CDATA[Almost two years ago, I talked about using OpenGL pixel shaders in Swing to fast-process bitmaps. I also explained this effect in a little more details in my book Filthy Rich Clients (follow the link to download the source code). A while ago Adobe announced Hydra, now known as Pixel Bender, a pixel shader engine/language [...]]]></description>
			<content:encoded><![CDATA[<p>Almost two years ago, I talked about <a href="http://www.curious-creature.org/2007/02/20/fast-image-processing-with-jogl/">using OpenGL pixel shaders in Swing</a> to fast-process bitmaps. I also explained this effect in a little more details in my book <a href="http://filthyrichclients.org/">Filthy Rich Clients</a> (follow the link to download the source code).</p>
<p>A while ago Adobe announced Hydra, now known as Pixel Bender, a pixel shader engine/language for the Flash platform. Pixel Bender is available as a stand-alone application known as the <a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit">Pixel Bender Toolkit</a> or as part of the Flash 10 player. You can also leverage Pixel Bender shaders with the newly released Flex 3.2 SDK. Looking at the presentations I really liked the language Adobe came up with. It&#8217;s very similar to GLSL but offers a few interesting features like parameters metadata and dependent values. I recently found a few minutes to play with Pixel Bender in the context of a Flex application and recreated the bloom effect I wrote in Java/GLSL.</p>
<p>The code is pretty simple, a lot simpler than with Java, JOGL and GLSL actually. Let&#8217;s start with the fun stuff and look at the shader itself:</p>
<pre class="prettyprint">&lt;languageVersion: 1.0;&gt;
kernel BrightnessThreshold
&lt;
    namespace : "CuriousCreature";
    vendor : "Romain Guy";
    version : 1;
    description : "brightness threshold";
&gt;
{
    parameter float threshold
    &lt;
        minValue: float(0.0);
        maxValue: float(1.0);
        defaultValue: float(0.5);
    &gt;;

    input image4 image;
    output pixel4 outputPixel;

    void evaluatePixel()
    {
        outputPixel = sampleNearest(image, outCoord());

        float3 luminanceVector = float3(0.2125, 0.7154, 0.0721);
        float luminance = dot(luminanceVector, outputPixel.rgb);
        luminance = max(0.0, luminance - threshold);
        outputPixel.rgb *= sign(luminance);
    }
}
</pre>
<p>The code is pretty simple, straightforward and very similar to the GLSL implementation. Interestingly, this shader could be optimized by creating the luminance vector only once using the <code>evaluateDependents()</code> function. Unfortunately, Flash 10 does not support this function, only the Pixel Bender Toolkit does.</p>
<p>Here is now the Flex code to apply the shader on a bitmap. Note that this is much more complicated than what you would do to apply the shader on a button for instance. The purpose of this code is to load an image and then apply the shader on a copy of that image. The program thus end up with the original image and the filtered result.</p>
<pre class="prettyprint">
[Embed(source="assets/images/logo.png")]
var SourceImage:Class;

[Embed(source="assets/shaders/BrightnessThreshold.pbj")]
var ThresholdShader:Class;

// Load the bitmap and its data
var bitmap:Bitmap = new SourceImage();
var data:BitmapData = bitmap.bitmapData;

// Load the shader
var brightnessShader:Shader = new Shader();
brightnessShader.byteCode = new ThresholdShader();
brightnessShader.data.threshold.value = [0.75];

// Create a new bitmap to hold the filter result
var filtered:BitmapData = new BitmapData(data.width, data.height);
filtered.applyFilter(data, data.rect, new Point(), new ShaderFilter(brightnessShader));
</pre>
<p>If instead you want to apply the filter directly on a component, like an image or a panel, the code becomes simpler. The following snippet comes from the MXML file:</p>
<pre class="prettyprint">
&lt;mx:Script&gt;
    &lt;![CDATA[
        [Embed(source="assets/shaders/BrightnessThreshold.pbj", mimeType="application/octet-stream")]
        private var ThresholdShader:Class;

        private function createFilters():void {
            var shader:Shader = new Shader();
            shader.byteCode = new ThresholdShader();
            shader.data.threshold.value = [0.75];

            myWidget.filters = [new ShaderFilter(shader)];
        }
    ]]&gt;
&lt;/mx:Script&gt;
</pre>
<p>The code is very similar to the previous snippet but this time, the shader is applied as a filter onto the widget itself. I believe that the code could be simpler with Flex Gumbo by passing the new instance of <code>ThresholdShader</code> directly to the <code>ShaderFilter</code> instead of going through an intermediate <code>Shader</code> object.</p>
<p>Even though this example is not very useful, it gives a glimpse of what cool things should be doable with Pixel Bender, Flash and Flex. The only real issue I can see is that shaders rendered in Flash are not executed by the GPU. These shaders do take advantage of multiple cores though and really fly on modern machines with 2 or more cores.</p>
<p>Oh and apparently you can use Pixel Bender shaders as filters in Photoshop CS4. I&#8217;ve been waiting for an easy way to write my own filters for quite a long time, I&#8217;m sold! Something else really cool about Pixel Bender: it was designed to let you process generic data, not just images. That means you can easily take advantage of multiple cores for your number crunching operations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2008/12/17/filtering-a-bitmap-using-pixels-shaders-in-flex/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Graphics Benchmark</title>
		<link>http://www.curious-creature.org/2008/04/09/graphics-benchmark/</link>
		<comments>http://www.curious-creature.org/2008/04/09/graphics-benchmark/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 02:21:22 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Swing]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/2008/04/09/graphics-benchmark/</guid>
		<description><![CDATA[Chet just wrote a very interesting blog about graphics benchmark, and BubbleMark in particular, used to compare various RIA runtimes performance. I highly recommend reading it.]]></description>
			<content:encoded><![CDATA[<p>Chet just wrote a <a href="http://graphics-geek.blogspot.com/2008/04/off-bubblemark.html">very interesting blog</a> about graphics benchmark, and BubbleMark in particular, used to compare various RIA runtimes performance. I highly recommend reading it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2008/04/09/graphics-benchmark/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A New Blog</title>
		<link>http://www.curious-creature.org/2008/02/22/a-new-blog/</link>
		<comments>http://www.curious-creature.org/2008/02/22/a-new-blog/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 07:01:06 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[UI Design]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/2008/02/22/a-new-blog/</guid>
		<description><![CDATA[Chet Haase, a good friend and fellow co-author, just opened his new blog. I won&#8217;t spoil you the surprise but you might be interested to know what Chet is up to nowadays :)]]></description>
			<content:encoded><![CDATA[<p><em>Chet Haase</em>, a good friend and fellow <a href="http://www.filthyrichclients.org">co-author</a>, just <a href="http://graphics-geek.blogspot.com/">opened his new blog</a>. I won&#8217;t spoil you the surprise but you might be interested to know what Chet is up to nowadays :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2008/02/22/a-new-blog/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>More Awesomeness From Adobe</title>
		<link>http://www.curious-creature.org/2007/10/02/more-awesomeness-from-adobe/</link>
		<comments>http://www.curious-creature.org/2007/10/02/more-awesomeness-from-adobe/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 23:12:54 +0000</pubDate>
		<dc:creator>Romain Guy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[UI Design]]></category>

		<guid isPermaLink="false">http://www.curious-creature.org/2007/10/02/more-awesomeness-from-adobe/</guid>
		<description><![CDATA[Adobe just released the AIF Toolkit which lets you create GPU-accelerated visual effects by using some sort of a pixel shader programming language. Apparently this technology, Hydra, will be included in Flash. Hmm, time to learn Flash and Flex more deeply?]]></description>
			<content:encoded><![CDATA[<p>Adobe just released the <a href="http://blogs.adobe.com/jnack/2007/10/adobe_unveils_h.html">AIF Toolkit</a> which lets you create GPU-accelerated visual effects by using some sort of a pixel shader programming language. Apparently this technology, Hydra, will be included in Flash. Hmm, time to learn Flash and Flex more deeply?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.curious-creature.org/2007/10/02/more-awesomeness-from-adobe/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

