<?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>UnitZeroOne</title>
	<atom:link href="http://unitzeroone.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://unitzeroone.com/blog</link>
	<description>by Ralph Hauwert, Creative Developer, Consultant</description>
	<lastBuildDate>Mon, 21 Nov 2011 09:31:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WebP decoder for Flash.</title>
		<link>http://unitzeroone.com/blog/2011/11/20/webp-decoder-for-flash/</link>
		<comments>http://unitzeroone.com/blog/2011/11/20/webp-decoder-for-flash/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 14:58:45 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=609</guid>
		<description><![CDATA[Nothing much here, but I thought I&#8217;d share a handy little library to decode WebP in Flash. Here&#8217;s two demo&#8217;s : Lena and V for Vendetta, both encoded using the webp binaries provided here. It&#8217;s a small wrapper around the &#8230; <a href="http://unitzeroone.com/blog/2011/11/20/webp-decoder-for-flash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://unitzeroone.com/blog/wp-content/uploads/webplogo.jpg"><img class="alignnone size-full wp-image-616" title="webplogo" src="http://unitzeroone.com/blog/wp-content/uploads/webplogo.jpg" alt="" width="640" height="227" /></a></p>
<p>Nothing much here, but I thought I&#8217;d share a handy little library to decode WebP in Flash. Here&#8217;s two demo&#8217;s : <a href="http://unitzeroone.com/labs/webp/index.html">Lena</a> and <a href="http://unitzeroone.com/labs/webp/index.html?file=V.webp">V for Vendetta</a>, both encoded using the webp binaries provided <a href="http://code.google.com/speed/webp/download.html">here</a>.</p>
<p>It&#8217;s a small wrapper around the <a href="http://git.chromium.org/gitweb/?p=webm/libwebp.git">WebP library</a> ported with Alchemy. The port is pretty easy to do using <a href="http://labs.adobe.com/technologies/alchemy/">Alchemy</a>, aside from some issues with the Alchemy toolchain pretending to be a normal gcc toolchain; it enables some x86 asm code for cpu identification in the webp code, which obviously won&#8217;t work in Flash. After those issues are resolved getting up and running is easy.</p>
<p>However, I&#8217;d figure I&#8217;d post this as I have seen several requests for making webp work in Flash.</p>
<p>Although webp decoding isn&#8217;t there natively om the FlashPlayer, this should help you a long way. Read further for an example on usage and download of the swc.</p>
<p>As for this blog; due to time constraints I find myself not being able to update it regularly, even though I want to. Also, as I do a lot more tech then just Flash these days, I&#8217;m looking for a way to post experiments in other technologies, without the daunting task of making a full scale blogpost about it&#8230;.more on that when I figured it out.</p>
<p><span id="more-609"></span></p>
<p>Download <a title="WebPLib download" href="http://www.unitzeroone.com/download/WebPLib.swc" target="_blank">webplib.swc</a>.</p>
<pre class="brush: as3; title: ; notranslate">
public class Main extends Sprite
{
	[Embed(source=&quot;V.webp&quot;, mimeType=&quot;application/octet-stream&quot;)]
	private const WebPImageClass:Class;

	public function Main()
	{
		stage.scaleMode = StageScaleMode.NO_SCALE;
		stage.align = StageAlign.TOP_LEFT;
		init();
	}

	private function init():void
	{
		WebPLib.init();//Only needs to be called once.
		var bitmapData:BitmapData = WebPLib.decode(new WebPImageClass() as ByteArray);
		addChild(new Bitmap(bitmapData));
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/11/20/webp-decoder-for-flash/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Unity3D &amp; Flash</title>
		<link>http://unitzeroone.com/blog/2011/09/01/unity3d-flash/</link>
		<comments>http://unitzeroone.com/blog/2011/09/01/unity3d-flash/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 21:39:40 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=593</guid>
		<description><![CDATA[If you wonder why it&#8217;s silent in here again; same old, same old; I&#8217;ve been busy. So many things happened this year, most of them very good. Workwise, I have joined the brilliant minds at Unity Technologies to work on &#8230; <a href="http://unitzeroone.com/blog/2011/09/01/unity3d-flash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_597" class="wp-caption aligncenter" style="width: 650px"><a href="http://unitzeroone.com/blog/wp-content/uploads/shadowgun-20110620010221042_640w.jpeg"><img src="http://unitzeroone.com/blog/wp-content/uploads/shadowgun-20110620010221042_640w.jpeg" alt="shadowgun in game" title="shadowgun in game" width="640" height="426" class="size-full wp-image-597" /></a><p class="wp-caption-text">An image of ShadowGun a game made by Madfingers, using Unity.</p></div>
<p>If you wonder why it&#8217;s silent in here again; same old, same old; I&#8217;ve been busy. So many things happened this year, most of them very good. Workwise, I have joined the brilliant minds at <a href="http://unity3d.com/">Unity Technologies</a> to work on further expanding the reach of Unity. Today is exiting, because <a href="http://blogs.unity3d.com/2011/09/01/unity-and-flash-a-sneak-peek/">over on the Unity blog</a>, there is a first public sneak peek of our progress. Let us know what you think !</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/09/01/unity3d-flash/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Jump Flood Voronoi for WebGL</title>
		<link>http://unitzeroone.com/blog/2011/03/22/jump-flood-voronoi-for-webgl/</link>
		<comments>http://unitzeroone.com/blog/2011/03/22/jump-flood-voronoi-for-webgl/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 14:21:55 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=579</guid>
		<description><![CDATA[A small experiment to familiarize myself a bit more with webgl&#38;canvas and a quick post to show a this experimental WebGL toy. Video here and on the full post, Live demo for newer WebGL enabled browsers here. Code isn&#8217;t exactly &#8230; <a href="http://unitzeroone.com/blog/2011/03/22/jump-flood-voronoi-for-webgl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://unitzeroone.com/blog/wp-content/uploads/lenavoronoi.jpg"><img class="aligncenter size-full wp-image-580" title="Lena Voronized" src="http://unitzeroone.com/blog/wp-content/uploads/lenavoronoi.jpg" alt="" width="640" height="429" /></a>A small experiment to familiarize myself a bit more with webgl&amp;canvas and a quick post to show a this experimental WebGL toy. <a href="http://vimeo.com/21343002" target="_blank">Video here</a> and on the full post, <a href="http://unitzeroone.com/labs/jfavoronoi/" target="_blank">Live demo</a> for newer WebGL enabled browsers <a href="http://unitzeroone.com/labs/jfavoronoi/" target="_blank">here</a>. Code isn&#8217;t exactly production ready. Comments and compatibility notices welcome!</p>
<p><a href="http://www.comp.nus.edu.sg/~tants/jfa.html" target="_blank">JFA Voronoi Paper by Guodong Rong and Tiow-Seng Tan.</a></p>
<p><span id="more-579"></span></p>
<p><iframe src="http://player.vimeo.com/video/21343002" width="640" height="480" frameborder="0"></iframe>
<p><a href="http://vimeo.com/21343002">WebGL / Canvas &#8211; Jump Flood Voronoi Experiment.</a> from <a href="http://vimeo.com/unitzeroone">Ralph Hauwert</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/03/22/jump-flood-voronoi-for-webgl/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Demo Video of WebM being decoded by Flash.</title>
		<link>http://unitzeroone.com/blog/2011/01/21/demo-video-of-webm-being-decoded-by-flash/</link>
		<comments>http://unitzeroone.com/blog/2011/01/21/demo-video-of-webm-being-decoded-by-flash/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 18:18:40 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=565</guid>
		<description><![CDATA[Demo Video of WebM being decoded by Flash. from Ralph Hauwert on Vimeo. This is a little side project I have been playing with. I&#8217;m porting google&#8217;s libvpx using Adobe Alchemy to run WebM in Flash Player 10, which doesn&#8217;t &#8230; <a href="http://unitzeroone.com/blog/2011/01/21/demo-video-of-webm-being-decoded-by-flash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/19037862" width="640" height="475" frameborder="0"></iframe></p>
<p><a href="http://vimeo.com/19037862">Demo Video of WebM being decoded by Flash.</a> from <a href="http://vimeo.com/unitzeroone">Ralph Hauwert</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><strong> </strong>This is a little side project I have been playing with. I&#8217;m porting google&#8217;s libvpx using Adobe Alchemy to run WebM in Flash Player 10, which doesn&#8217;t support the format natively yet. Because it&#8217;s not much more then a small and experimental side project, I quickly made a video to show it&#8217;s progress up until now. Monday the new part in <a href="http://unitzeroone.com/blog/2011/01/16/the-particle-sessions-part-one-is-this-it/">the Particle Sessions</a> will appear.</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/01/21/demo-video-of-webm-being-decoded-by-flash/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Particle Sessions : Part One, Is this it ?</title>
		<link>http://unitzeroone.com/blog/2011/01/16/the-particle-sessions-part-one-is-this-it/</link>
		<comments>http://unitzeroone.com/blog/2011/01/16/the-particle-sessions-part-one-is-this-it/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 21:03:03 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[pixelbender]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=437</guid>
		<description><![CDATA[Part One of the Particle Session kicks off with looking at a system similar, but simpler then this Bloom particle experiment (music made for it by the fantastic artist Rich Bologna, thank you again for it, Rich!). We&#8217;ll be taking slow steps &#8230; <a href="http://unitzeroone.com/blog/2011/01/16/the-particle-sessions-part-one-is-this-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://unitzeroone.com/blog/wp-content/uploads/thestrokes.jpg"><img class="alignnone size-full wp-image-442" title="The Strokes - Is This It" src="http://unitzeroone.com/blog/wp-content/uploads/thestrokes.jpg" alt="" width="640" height="379" /></a></p>
<p>Part One of the Particle Session kicks off with looking at a system similar, but simpler then <a href="http://unitzeroone.com/labs/bloom/">this Bloom particle experiment</a> (music made for it by the fantastic artist <a href="http://www.richbologna.com/">Rich Bologna</a>, thank you again for it, Rich!). We&#8217;ll be taking slow steps of optimizations and at the end have a get prepared for the next level. To be able to get up to speed with the working of the <a href="http://unitzeroone.com/labs/particleVideo/" target="_blank">video particles</a>, we&#8217;ll start from the beginning and work our way up. For that reason, we&#8217;ll start very simple and look at a basic unoptimized particle system with next to zero functionality, and modify the code for performance.</p>
<p><span id="more-437"></span></p>
<p><strong>Basis : The Particle</strong></p>
<p>The opening picture of this post is the album cover of <a href="http://www.youtube.com/watch?v=f1vvUec71v8" target="_blank">The Strokes &#8211; Is This It</a>. It being one of my favorite albums, I have listened to it many times, but never noticed what the <a href="http://www.google.com/images?q=particle+collision&amp;um=1&amp;ie=UTF-8&amp;source=og&amp;sa=N&amp;hl=en&amp;tab=wi&amp;biw=1267&amp;bih=1103">cover really was</a>. It&#8217;s amazing &amp; inspiring what imagery one can get from science. Now put on your headphones and listen to that album while reading this post.</p>
<p>Over the last years I&#8217;ve more and more started enjoying introductory books about theoretical physics. In complete honesty, it wasn&#8217;t even that long ago that I didn&#8217;t know that the <a href="http://en.wikipedia.org/wiki/Boson">Boson</a> in the <a href="http://en.wikipedia.org/wiki/Higgs_boson">Higgs Boson</a> wasn&#8217;t the other guy discovering it, next to <a href="http://en.wikipedia.org/wiki/Peter_Higgs">Mr.Higgs</a>. You know, like the <a href="http://en.wikipedia.org/wiki/Comet_Hale-Bopp">Hale-Bopp comet</a> was discovered by <a href="http://en.wikipedia.org/wiki/Alan_Hale_(astronomer)">Hale</a> &amp; <a href="http://en.wikipedia.org/wiki/Thomas_Bopp">Bopp</a>.</p>
<p>Luckily for us and this post, we don&#8217;t need to deal with <a href="http://en.wikipedia.org/wiki/Wave%E2%80%93particle_duality">wave particle duality</a> and <a href="http://en.wikipedia.org/wiki/Quantum_entanglement">quantum entanglement</a>, but we can achieve seeming complexity by using simplicity.</p>
<p><strong>Getting started : Simplicity &amp; Complexity</strong></p>
<p>The simple core particle we will be using in this session get its complexity from its display of large numbers of them, not from per instance properties. To illustrate that, let&#8217;s start off with a simple particle object in AS3</p>
<pre class="brush: as3; title: ; notranslate">
package com.unitzeroone.particlesessions
{
	import flash.display.BitmapData;

	public class Particle {
		public var x:Number;
		public var y:Number;
		public var velX:Number;
		public var velY:Number;

		public function Particle(x:Number, y:Number, velX:Number, velY:Number) {
			this.x = x;
			this.y = y;
			this.velX = velX;
			this.velY = velY;
		}
	}
}
</pre>
<p>As you can see, this particle object is pretty simple, and it contains the core properties we really need to make them move. Its position stored in x and y, and its velocity stored in velX and velY. For the case of this post it&#8217;s more then enough to do what we want.</p>
<p>I do want to point out two things about the simplicity of this. First of all, we express all values in absolute x and y. For the positions, this would be called a <a href="http://en.wikipedia.org/wiki/Cartesian_coordinate_system">cartesian system</a>. In some cases it might be handier to express velocity as a <a href="http://en.wikipedia.org/wiki/Polar_coordinate_system">polar coordinates</a>, but performance reasons we&#8217;ll keep them like this.</p>
<p><strong>OOP (s)</strong></p>
<p>It&#8217;s very common within the AS3 industry to &#8220;objectify&#8221; everything in nicely wrapped classes first and think about performance later. In the case of our particle and a classic &#8220;update&#8221; loop as seen in game engines, the most natural feeling way to implement the particle&#8217;s moving behaviour for the particle is as follows.</p>
<pre class="brush: as3; title: ; notranslate">
package com.unitzeroone.particlesessions
{
	import flash.display.BitmapData;

	public class Particle {
		public var x:Number;
		public var y:Number;
		public var velX:Number;
		public var velY:Number;

		public function Particle(x:Number, y:Number, velX:Number, velY:Number) {
			this.x = x;
			this.y = y;
			this.velX = velX;
			this.velY = velY;
		}

		public function updateAndDraw(toBitmapData:BitmapData):void
		{
			this.x += velX;
			this.y += velY;
			toBitmapData.setPixel(this.x,this.y,0xFFFFFF);
		}
	}
}
</pre>
<p>This is a very logical thing to do and is suitable for most things, especially in larger code bases, it certainly helps in readability. It also matches many things you&#8217;ll see in OOP and AS3 books. Like car.drive() or lasership.shoot() or avatar.updatePosition(). From a pure OO perspective, it makes sense. From a performance perspective, this isn&#8217;t as good though. We&#8217;ll tackle that in a bit.</p>
<p><strong>Main</strong></p>
<p>Now, let&#8217;s say we&#8217;d have a very simple Main class to run this system, as such :</p>
<pre class="brush: as3; title: ; notranslate">
package {

import flash.display.StageScaleMode;
import flash.display.StageAlign;
import com.unitzeroone.particlesessions.Particle;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;

	public class MainOne extends Sprite {
		private var bitmap : Bitmap;
		private var bitmapData : BitmapData;
		private var particles:Array;

		public function MainOne(){
			init();
		}

		private function init():void
		{

			//Create a canvas to draw too
			bitmapData = new BitmapData(500,400,false,0x000000);
			bitmap = new Bitmap(bitmapData);
			addChild(bitmap);

			//Create a set of random particles with a random velocity
			particles = new Array();
			for(var i:int = 0; i&lt;=1000; i++){
				particles.push(new Particle(Math.random()*500,Math.random()*400,Math.random()*2-1,Math.random()*2-1));
			}
			//Wait to be added to stage
			addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
		}

		private function onEnterFrame(event : Event) : void
		{
			//Clear the stage
			bitmapData.fillRect(bitmapData.rect,0x000000);

			//Lock the bitmapdata, while we are updating it.
			bitmapData.lock();

			//Draw particles
			var p:Particle;
			var l : int = particles.length;
			for(var i:int = 0; i&lt;l; i++){
				p = particles[i];
				p.updateAndDraw(bitmapData);
			}

			//We are done updating, unlock the bitmapdata
			bitmapData.unlock();
		}

		private function onAddedToStage(event : Event) : void
		{
			//If added to stage, set stage properties and start listening to the global enterframe.
			stage.frameRate = 30;
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
		}
	}
}
</pre>
<p>For clarity sake I&#8217;ve omitted a couple of things, but this code runs. If you run it, you&#8217;ll see bunch of particles moving at a constant speed, moving offscreen. Our simplest of simple particle system works, so now we can start looking at performance and why we need to change the structure for performance.</p>
<p><strong>Performance, the small issues</strong></p>
<p>If you aware of performance caveats within Flash, you&#8217;ll immediately notice a couple of things, amongst which the lesser problems like for instance;</p>
<pre class="brush: as3; title: ; notranslate">bitmapData.fillRect(bitmapData.rect,0x000000);</pre>
<p>A lesser known fact about this piece of code is that the property rect of the bitmapdata is not a static read-only rect, but that every time you query this property a new rect is instantiated. Instantiation is rather expensive in the AVM2, but in this case, it&#8217;s called once per frame, thus not a major issue. Still it&#8217;s unneeded. Keep this in mind when you do many things per frame with bitmapdata.rect. In general, keep in mind that instantiation &amp; allocation is expensive.</p>
<p>If you ever had one of those swf&#8217;s which seemed to hickup every now and then, chances are that it is the garbage collector kicking in. It doesn&#8217;t have to be one specific place where you are instancing to many objects, it might be more then one. So keep things clean from the beginning. Also keep in mind that many small performance losses will result in one big one.</p>
<p><strong>The larger performance costs</strong></p>
<p>There&#8217;s multiple things we can optimize in this piece of code. For now let&#8217;s keep it a bit simple and look at the larger issues, where we get the most gain. One of the main issues is how we store and access the individual particles.</p>
<pre class="brush: as3; title: ; notranslate">particles = new Array();</pre>
<p>We currently store them in an (as always in ActionScript) untyped array. If we&#8217;d like to keep the &#8220;storage&#8221; an array like structure, we would be better off using a Vector for storage, but we can get it even a bit faster by using a <a href="http://en.wikipedia.org/wiki/Linked_list">linked list</a> instead. For the purposes of this simple particle system, that data structure is enough, as we are only going to linearly iterate over the particle set in one direction. This is called a singly linked list.</p>
<p>Let&#8217;s have a look at how that works.</p>
<p><strong>Linked List</strong></p>
<p>First, we modify our Particle class, to contain a link to the next particle in the list, by adding this to its properties.</p>
<pre class="brush: as3; title: ; notranslate">public var next:Particle;</pre>
<p>Then we modify the Main class to instanciated the particles like this :</p>
<pre class="brush: as3; title: ; notranslate">
var particle:Particle;
var previousParticle:Particle;
for(var i:int = 0; i&lt;=1000;i++){
	particle = new Particle(Math.random() * 550, Math.random() * 400, Math.random() * 2 - 1, Math.random() * 2 - 1);
	particle.next = previousParticle;
	previousParticle = particle;
}
firstParticle = particle;
</pre>
<p>For every particle we create we store a reference to the previous particle in that particle. Then when we are done with the loop we keep a reference to the last created particle. That particle refers to the particle created before that, and so on, until we reach the first particle which has no reference to any particle.</p>
<p>We now update the drawloop to do the following;</p>
<pre class="brush: as3; title: ; notranslate">
var p : Particle = firstParticle;
while (p) {
	p.updateAndDraw(bitmapData);
	p = p.next;
}
</pre>
<p><strong>Final(ly) ?</strong><br />
Using a linked list instead of an Array helped, but we can even more performance for free, by adding the “final” keyword to the particle class.</p>
<pre class="brush: as3; title: ; notranslate">final public class Particle {</pre>
<p>You would use the final keyword normally to prevent classes from being subclassed, but there is an interesting piece about final in <a href="http://onflex.org/ACDS/AS3TuningInsideAVM2JIT.pdf">Flash AS3 and AVM2 performance tuning</a>, which by now is an aged document. In this case it indicates that sealing classes using the final keyword helps the AVM because the properties are already resolved and bound.</p>
<p>I find that in Flash Player 10.1 the advantage is less noticable then 10 and before, but it still has a slight performance gain on my machine, although I&#8217;ve heard it been debated more then one time. It seems to me also that some platforms/architectures benefit more then others. My naive way of thinking about it is that if you&#8217;re not going to subclass it anyway, you might as well finalize it. Simplicity.</p>
<p><strong>Function calling</strong><br />
It may seem obvious to call a method of an object (like with car.drive()), but if you want maximum performance you should avoid function calls. With this in mind, let’s take another look at our draw loop :</p>
<pre class="brush: as3; title: ; notranslate">
var p : Particle = firstParticle;
while (p) {
	p.updateAndDraw(bitmapData);
	p = p.next;
}
</pre>
<p>The updateAndDraw call here is the costliest thing in the main loop. Not because what it does, but because it is a function. In general, function calling is always going to have some form of overhead, but in the case of Flash / AVM2 / AS3, the cost is exceptionally high. Although this situation has improved with Flash 10.1, the overall hit of just calling a function inside the loop is way to high to be acceptable if we want to achieve high numbers of particles.</p>
<p><strong>Inlining</strong></p>
<p><a href="http://en.wikipedia.org/wiki/Inline_expansion">Inlining</a> is something a compiler does for for you to replace a method call with the actual functionality in place of the function call.</p>
<p>AS3 does not have an inline keyword natively, and the compiler wouldn&#8217;t know what to do with it. <a href="http://blog.joa-ebert.com/">Joa Ebert&#8217;s</a> <a href="http://code.google.com/p/apparat/">Apparat tool suite</a>, written in <a href="http://www.scala-lang.org/">Scala</a>,provides amongst other incredibly handy things a way <a href="http://blog.joa-ebert.com/2010/05/26/new-apparat-example/">to do inlining in AS3</a>. I highly recommend using it for larger projects where code style and performance are important. I actually also would highly recommend it for any project where performance is a priority. For this instance though, let&#8217;s go to a simpler solution first.</p>
<p>We&#8217;ll remove the updateAndDraw method from the particle class and make our main loop look like this.</p>
<pre class="brush: as3; title: ; notranslate">
var p : Particle = firstParticle;
while (p) {
	p.x += p.velX;
	p.y += p.velY;
	bitmapData.setPixel(p.x,p.y,0xFFFFFF);
	p = p.next;
}
</pre>
<p>Yay. For now you&#8217;ll have to take my word for it, but this is faster. (later on in this series will prove this with benchmark tests, I wanted to avoid this post just being a bunch of charts and performance graphs).</p>
<p><strong>Yet another function call.</strong></p>
<p>While looking at this new snippet, immediately you&#8217;ll notice another function call in our mainloop.</p>
<pre class="brush: as3; title: ; notranslate">bitmapData.setPixel(p.x,p.y,0xFFFFFF);</pre>
<p>The bitmapData.setPixel is yet another function call being called as many times as there are particles. What&#8217;s important to note though is that Flash native API calls are faster then calls to methods in non &#8220;api&#8221; classes. So although the bitmapdata.setpixel call is costing us more then it should, it still not costs as much as calling a method on one of your objects.</p>
<p>Still, there is cost associated to this function call, and we can avoid it by inlining the method again. setPixel() is an incredibly handy utility function though, so we need to replace its functionality by a piece of code which mimicks its behaviour. Also, we need to write to the bitmapdata&#8217;s data by hand.</p>
<p>I&#8217;m not going to jump into using Alchemy / FastMemory just yet, so for now we&#8217;re going to use the next fastest accessible type that is available in AS3. Vector.</p>
<p><strong>Drawing to a Vector instead</strong></p>
<p>One can avoid drawing to a bitmap using setPixel and use a faster way to do so using a Vector object. While certainly not the fastest way to write to a bitmapdata, it&#8217;s probably the fastest way to do it in pure actionscript without any external tools. In comparison to using setPixel in our main loop, it should be a very good performance improvement.</p>
<p>One of the things setPixel did for us was bounds checking. Since we won&#8217;t use it anymore, we need to do it ourselves, so that we don&#8217;t write to a position in the vector that is outside of the bounds of the vector. At the same time, we&#8217;ll use this to resolve another issue. The particles were randomly flying offscreen. Instead of that we&#8217;ll respawn them at their starting position. We&#8217;ll add these properties to the particle class.</p>
<pre class="brush: as3; title: ; notranslate">
final public class Particle  {

		public var x:Number;
		public var y:Number;
		public var velX:Number;
		public var velY:Number;
		public var spawnX:Number;
		public var spawnY:Number;
		public var next:Particle;

		public function Particle(x:Number, y:Number, velX:Number, velY:Number) {
			this.spawnX = this.x = x;
			this.spawnY = this.y = y;
			this.velX = velX;
			this.velY = velY;
		}
}
</pre>
<p>And here is our main renderloop :</p>
<pre class="brush: as3; title: ; notranslate">
private function onEnterFrame(event : Event) : void
		{
			// Clear the stage
			bitmapData.lock();
			bitmapData.fillRect(bitmapRect, 0x000000);
			var vec:Vector.&lt;uint&gt; = bitmapData.getVector(bitmapRect);

			var w : int = bitmapRect.width;
			var h : int = bitmapRect.height;
			// Access particles and draw them
			var p : Particle = firstParticle;
			while (p) {
				p.x += p.velX;
				p.y += p.velY;
				if(p.x &gt; w || p.x &lt; 0){
					p.x = p.spawnX;
				}
				if (p.y &gt; h || p.y &lt; 0) {
					p.y = p.spawnY;
				}
				vec[int(w*int(p.y) + int(p.x))] = 0xFFFFFFFF;
				p = p.next;
			}
			bitmapData.setVector(bitmapRect, vec);
			bitmapData.unlock();
		}
</pre>
<p>While this setup is still far from optimal from a performance perspective, we&#8217;ve got a reasonably fast way to render 10 to 20k particles to screen.</p>
<p>One note here is the bitmapData.getVector and setVector.<br />
This still isn’t that optimized &#8211; the function call “BitmapData.getVector” creates a new Vector object every time we call it, and as you know, creating objects takes CPU and memory allocation. Ideally the function should allow us to pass it a pre-existing vector object for it to populate with data. There are a couple of examples of this throughout the Flash API&#8217;s, and I truly hope Adobe will address these in future versions of the Flash Player. The benefit here of using getVector is that we can quickly clear the entire vector. Or if you would play around with this, you could not fillrect the bitmapdata and blur it slightly every frame.</p>
<p>For reference, what we have now looks like this, and can be download as source here: <a class="downloadlink" href="http://unitzeroone.com/blog/wp-content/plugins/download-monitor/download.php?id=1" title="Version1 downloaded 635 times" >MainOneVersionOne (635)</a></p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="MainOne" width="640" height="400" align="center" name="MainOne">
      <param name="movie" value="http://unitzeroone.com/blog/wp-content/uploads/MainOne1.swf" />
      <param name="align" value="center" />
      <param name="name" value="MainOne" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://unitzeroone.com/blog/wp-content/uploads/MainOne1.swf" width="640" height="400" align="center" name="MainOne">
      <!--<![endif]-->
        </p>
<p>What, you don\&#8217;t have Flash ? And you are still reading my blog ? Kudos to you!</p>
<p>
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<p><strong>So far, simple enough, right ?</strong></p>
<p><span style="color: #000000;">I&#8217;ve kept everything quite simple so far to illustrate a couple of mostly obvious performance hints, and to set a frame of reference for the follow up article, part two. Technically this solution is far from the optimal solution to run particles. But for experimenting with moving the particles in a more interesting fashion, its good enough for Part One of this series. The benefit is that we can still express all the code in ActionScript. We&#8217;ll add a little bit of PixelBender in the mix to get comfortable with it and use it as an example of manipulating data with PixelBender.</span></p>
<p><span style="color: #000000;"><strong>Velocity Field ?</strong></span></p>
<p><span style="color: #000000;">Visually this example is completely boring, so let&#8217;s make it a bit more interesting. We&#8217;ll start by making the particles move to a background pattern. We&#8217;ll use some perlin noise and pixelbender to generate a <a href="http://en.wikipedia.org/wiki/Vector_field" target="_blank">vector field</a> for the particles to read from.</span></p>
<p><span style="color: #000000;">We&#8217;ll use a vector similar to the vector we are using to draw to the bitmapdata we did earlier, and mix in some perlin noise to convert grayscale perlin noise to velocities to be quickly looked up by the particles. We start by adding some code to the Main class, let&#8217;s start with the init method.</span></p>
<p><span style="color: #000000;"> </span></p>
<pre class="brush: as3; title: ; notranslate">
private function init():void
{
	//Get some perlin noise in grayscale to read in our pixelbender filter.
	var perlinMap:BitmapData = new BitmapData(WIDTH, HEIGHT, false, 0x000000);
	perlinMap.perlinNoise(128, 128, 6, 123456, true, false,7,true);

	//Load the embedded shader bytearray into a new shader.
	var velocityConverterShader : Shader = new Shader(new VelocityConverter() as ByteArray);
	var velocityConverterFilter : ShaderFilter = new ShaderFilter(velocityConverterShader);

	//Create a new temporary bitmapdata to write the filter result too.
	var perlinVelocityMap : BitmapData = perlinMap.clone();
	perlinVelocityMap.applyFilter(perlinMap, perlinMap.rect, perlinMap.rect.topLeft, velocityConverterFilter);

	// And get the result into a fastly readable vector
	velocityVector = perlinVelocityMap.getVector(perlinVelocityMap.rect);

	//Nicely dispose of the memory used by the two bitmapdata's.
	perlinVelocityMap.dispose();
	perlinMap.dispose();

	//Create a canvas to draw too
	bitmapData = new BitmapData(WIDTH, HEIGHT, false, 0x000000);
	bitmapRect = bitmapData.rect;
	bitmap = new Bitmap(bitmapData);
	addChild(bitmap);

	//Initialize the particles and keep them as a linked list.
	var particle:Particle;
	var previousParticle:Particle;
	for(var i:int = 0; i&lt;=1000;i++){
		particle = new Particle(Math.random() * WIDTH, Math.random() * HEIGHT, Math.random() * 2 - 1, Math.random() * 2 - 1);
		particle.next = previousParticle;
		previousParticle = particle;
	}
	firstParticle = particle;

	//Wait to be added to stage
	addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
</pre>
<p><span style="color: #000000;">As you can see we added some code and a new property to our mainclass, to hold a reference to a &#8220;velocity vector&#8221;. This Vector will contain values much like colors. There&#8217;s many ways to get pixelbender to output data. To be able to read the data quickly in our mainloop, we need a vector again. So the easiest way to get a vector with uint&#8217;s from a pixelbender is to actually let it render to a bitmapdata. </span></p>
<p><span style="color: #000000;">The reason we are using 2 bitmapdata&#8217;s is that it&#8217;s significantly cheaper to instanciate them yourself and pass them, then to pass 1 bitmapdata for pixelbender to use as input and output, as it will allocate a block of memory for the output in any case. This way it&#8217;s faster and we have more control.</span></p>
<p>After the pixelbender filter has done it processing, we simple do a getVector on the bitmapdata to get the result into a Vector.&lt;uint&gt;.</p>
<p><strong>A tiny bit of pixelbending</strong></p>
<p>To get familiar with pixelbender kernels, we&#8217;re going to use one to calculate the data in our velocity field with. The pixelbender filter is one of a very simple kind, let&#8217;s have a look at it. It only has one input and it samples four pixels for every pixel it evaluates. Sampling from data within the Pixelbender is quite heavy, but for now we will only run this filter during the initialization of our swf. It might be fast enough to run every frame even.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;languageVersion : 1.0;&gt;

kernel VelocityConverter
&lt;   namespace : &quot;com.unitzeroone&quot;;
    vendor : &quot;UnitZeroOne&quot;;
    version : 1;
&gt;
{
    input image4 src;
    output pixel4 dst;

    void
    evaluatePixel()
    {
        const float halve = 0.5;
        const float3 offsets = float3(0.0,1.0,-1.0);//We'll swizzle these around in our sampling.
        float4 left = sampleNearest(src,outCoord()-offsets.zx);
        float4 right = sampleNearest(src,outCoord()-offsets.yx);
        float4 top = sampleNearest(src,outCoord()-offsets.xz);
        float4 bottom  = sampleNearest(src,outCoord()-offsets.xy);

        //We'll store the slopes in green and blue, the two lower bytes in the vector.
        dst.r = 0.0;// We don't need to set r, but on some older flash players this caused bugs.
        dst.g = ((left.b-right.b)*halve)+halve;//Get the slope value between left and right, and normalize to 0-1
        dst.b = ((top.b - bottom.b)*halve)+halve;//Get the slope value between top and bottom and normalize to 0-1
        dst.a = 1.0;//We're using four channels, because we use shaderfilter.

    }
}
</pre>
<p>What this filter does is that it calculates the so called <a href="http://en.wikipedia.org/wiki/Finite_difference" target="_blank">central difference</a> for every pixel, using its connecting neighbours and store them back into the color channels. Let&#8217;s look at its input and output to have a visual reference before discussing it further.</p>
<p>The input &amp; output.</p>
<p><a href="http://unitzeroone.com/blog/wp-content/uploads/input.jpg"><img class="aligncenter size-full wp-image-517" title="Perlin Noise Input" src="http://unitzeroone.com/blog/wp-content/uploads/input.jpg" alt="" width="640" height="480" /></a><a href="http://unitzeroone.com/blog/wp-content/uploads/output.jpg"></a></p>
<p><a href="http://unitzeroone.com/blog/wp-content/uploads/output.jpg"><img class="aligncenter size-full wp-image-518" title="output" src="http://unitzeroone.com/blog/wp-content/uploads/output.jpg" alt="" width="640" height="480" /></a></p>
<p><span style="color: #000000;">Although that wikipedia page about the central difference might have scared you off, all in all what it does is very simple. For every pixel you look at the connecting neighbours in both directions and you look at the difference between that and store that. Note that we are normalizing the value, so that the maximum negative value of -1 and the maximum value of +1 fit in a range 0 to 1. This way we can read these values later on in our mainloop. We store the result for the difference on the horizontal axis in the green channel and the result for the vertical axis in the blue channel, hence the blue green teint of the image.</span></p>
<p><span style="color: #000000;">It&#8217;s good to note that PixelBender really makes these types of image calculations fast and simple. Long before PixelBender we had to do this using combinations of filters and copy channels to do this quickly enough. <a href="http://unitzeroone.com/flashexamples/bumpMapping/" target="_blank">My first experiment with fast bumpmapping</a> from a <a href="http://unitzeroone.com/blog/2006/03/28/flash-8-example-3d-bumpmapping-using-filters-source-included/" target="_blank">long, long time ago</a> used that way of doing it. When I started working on Papervision3D it resulted in <a href="http://unitzeroone.com/papervision/paperPlanet/Main.html" target="_blank">this experiment</a>.</span></p>
<p><span style="color: #000000;"><strong>Making things move</strong></span></p>
<p><span style="color: #000000;">Now that we have this new set of data, how do we make our particles dance to it ? The reason we wrote too a vector uint is so that we can read from it quickly. But we store the data in two different channels, being blue and green. Let&#8217;s take that data out and manipulate our particles velocities using it.</span></p>
<p><span style="color: #000000;">Our main loop will look something like this;</span></p>
<pre class="brush: as3; title: ; notranslate">
while (p) {
	//Add the current velocity to the particle position
	p.x += p.velX;
	p.y += p.velY;

	//Keep the particles in bounds
	if(p.x &gt; w || p.x &lt; 0){
		p.x = p.spawnX;
	}
	if (p.y &gt; h || p.y &lt; 0) {
		p.y = p.spawnY;
	}

	//Calculate the new position index;
	pos = (w*int(p.y) + int(p.x));

	//Draw the pixel
	vec[pos] = 0xFFFFFFFF;

	// Read the velocityfield at the new particles position
	var velocities : int = velocityVector[pos];
	var velXU : int = ((velocities&gt;&gt;8)&amp;0xFF)-127.5;
	var velYU : int = ((velocities)&amp;0xFF)-127.5;

	//Add a fraction of the position velocity to the current velocity
	p.velX += velXU*.073;
	p.velY += velYU*.073;

	// Dampen the current particle velocity
	p.velX = p.velX*.99;
	p.velY = p.velY*.99;

	p = p.next;
}
</pre>
<p>This bit of actionscript :</p>
<pre class="brush: as3; title: ; notranslate">
var velXU : int = ((velocities&gt;&gt;8)&amp;0xFF)-127.5;
var velYU : int = ((velocities)&amp;0xFF)-127.5;
</pre>
<p>If your unfamilar with <a href="http://en.wikipedia.org/wiki/Mask_(computing)" target="_blank">masking</a> and <a href="http://en.wikipedia.org/wiki/Bitwise_operation" target="_blank">bitwise operations</a>, this might look slightly strange. But if you have worked with colors using setPixel before, you might be familiar with the pattern here. Basically we extract the &#8220;color&#8221; as output by PixelBender from the green and blue channel. I put color in quotes there, because it&#8217;s not what we use it for. We simple use the byte packing into uint&#8217;s as a way to quickly access one value in a vector (which is the heaviest), and then unpack it into two of its components. A uint in Flash is 32 bit, so it contains 4 bytes. In theory we have 2 bytes left for storing other data. More on that in part two.</p>
<p>And it does almost exactly the opposite of what this did in the pixelbender loop :</p>
<pre class="brush: plain; title: ; notranslate">
dst.g = ((left.b-right.b)*0.5)+0.5;
dst.b = ((top.b - bottom.b)*0.5)+0.5;
</pre>
<p>The only difference is that pixelbender treats the color value as a range between 0-1 and that our actionscript values will now be filled with a value between -127.5 and 127.5. We handle putting the particle velocities to reasonable values by multiplying them by a rather small value. Play around with the values if you like.</p>
<p>To assure that the particles don&#8217;t pick up an infinite speed we dampen it by multiplying by a value near to one, as to only slightly lower it every loop.</p>
<pre class="brush: as3; title: ; notranslate">
p.velX = p.velX*.99;
p.velY = p.velY*.99;
</pre>
<p><strong>So is it magical yet ? </strong></p>
<p>If we look at what it looks like now with a thousand particles, we see this:</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="MainOneTwo" width="640" height="480" name="MainOneTwo">
      <param name="movie" value="http://unitzeroone.com/blog/wp-content/uploads/MainOne2.swf" />
      <param name="name" value="MainOneTwo" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://unitzeroone.com/blog/wp-content/uploads/MainOne2.swf" width="640" height="480" name="MainOneTwo">
      <!--<![endif]-->
        Still here without Flash huh ? You\&#8217;re persistent ! 
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

<p>So, no it&#8217;s still rather uninteresting. Although our particles do seem to have to taken up a life on their own.</p>
<p><strong>Adding complexity by adding the numbers</strong></p>
<p>The particles seem to settle in areas, and the randomness of their movement and location is worsened by the fact that they are moving over perlin noise, where the noise part of that implies it&#8217;s somewhat random.</p>
<p>As I said at the beginning of this post, part of the percieved complexity of a particle system is in its numbers. What happens if we replace the perlin noise by a picture and add a lot more particles, let&#8217;s say 20.000 ? And then tweak the values a bit ?</p>
<p><a href="http://www.unitzeroone.com/particlesessions/pSessionsOne/" target="_blank">Click here</a> to see what that looks like.</p>
<p>Get the source here : <a class="downloadlink" href="http://unitzeroone.com/blog/wp-content/plugins/download-monitor/download.php?id=3" title=" downloaded 716 times" >Session One Final Source (716)</a></p>
<p><strong>Closing and what will follow</strong></p>
<p><span style="color: #000000;">The length of this simple introductory Session One already got way out of hand, so it&#8217;s time to close for this session, which means that unfortunately Alchemy is saved for next week. We&#8217;ve covered the basics of a reasonably performant particle system in pure, directly compilable AS3.</span></p>
<p><span style="color: #000000;">To continue this series and make the example code do a lot more then it does now, we need to start diving much deeper in PixelBender and the Alchemy-memory within Flash Player. We&#8217;ll be able to increase the number of particles to a much higher count then 20.000 of them using these techniques and hopefully be able to fully understand why and how. Along the way we&#8217;ll be able to look at how these technologies function inside the Flash Player.</span></p>
<p><span style="color: #000000;">Hopefully, we&#8217;ll polish up this example to a point where it&#8217;s starting to become interesting to look at. You&#8217;d be surprised to see how close we are to achieving something like the <a href="http://unitzeroone.com/labs/particlehd/" target="_blank">Particle Reactor</a> with the current source code. But to be able to fully explain ways of using PixelBender and Alchemy, we need about another time the length of this post. </span></p>
<p><span style="color: #000000;">Until then, I would love to see your experiments based upon the source code above. If you do happen to do anything with it, please send it over and if there is enough response, maybe we&#8217;ll add it to next the post. I&#8217;ll give you some hints; dynamic vector fields, colors, trails.</span></p>
<p>I would like to thank <a href="http://sebleedelisle.com/" target="_blank">Seb Lee-Delisle</a> for reviewing this post and helping me to get it cleaner, better and more to the point. Another big thank you to <a href="http://techblog.floorplanner.com/" target="_blank">Tim Knip</a> for reading and pointing out the missing explanations.</p>
<p>I would also greatly appreciate any feedback on this article from you. I&#8217;m new to writing large articles / tutorials like this, and would love to hear what you think and what you would like to see.</p>
<p><span style="color: #000000;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/01/16/the-particle-sessions-part-one-is-this-it/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>The Particle Sessions : Prologue</title>
		<link>http://unitzeroone.com/blog/2011/01/14/the-particle-sessions-prologue/</link>
		<comments>http://unitzeroone.com/blog/2011/01/14/the-particle-sessions-prologue/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 21:24:13 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Particles]]></category>
		<category><![CDATA[Random Thoughts]]></category>
		<category><![CDATA[2d]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[pixelbender]]></category>
		<category><![CDATA[video particles]]></category>

		<guid isPermaLink="false">http://unitzeroone.com/blog/?p=431</guid>
		<description><![CDATA[Last week I reveiled my plan to revive this blog and start getting regular posts on here again. It had been cooking for a while and I had decided that the first thing to do to revive the blog was &#8230; <a href="http://unitzeroone.com/blog/2011/01/14/the-particle-sessions-prologue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Pi : Math vs Numerology" href="http://unitzeroone.com/labs/particleVideo/#YldowmD89ng" target="_blank"><img class="alignnone size-full wp-image-432" title="max" src="http://unitzeroone.com/blog/wp-content/uploads/max.jpg" alt="We've got the gun Max!" width="620" height="273" /></a></p>
<p>Last week I reveiled <a href="http://unitzeroone.com/blog/2011/01/06/reviving-this-blog/" target="_blank">my plan</a> to revive this blog and start getting regular posts on here again. It had been cooking for a while and I had decided that the first thing to do to revive the blog was to start with a long overdue post about particles, mainly sparked because of the interest in the Bloom Particles (<a href="http://unitzeroone.com/labs/bloom/" target="_blank">mirror without preloader</a>) I did for the unfortunately cancelled <a href="http://www.letitbloom.com/" target="_blank">Bloom conference</a>. The other part was that I really wanted to get it out and get particles out of my system for a while. I had promised to post about this for quite some time, but with the blog not being used, it was a daunting task. It turns out I find it much harder to make blogposts then little experiments. This post is about that. I apologize up front for it being a bit of a personal story before anything else. It is however, the start of &#8230;</p>
<p><span id="more-431"></span></p>
<p><strong>The Particle Sessions</strong></p>
<p>I decided I wanted to take and expand and continue on what I explained in my Skunkworks talk (video of that talk <a href="http://vimeo.com/14935297">at FFK here</a>), where I used this example to show how simple these systems work in ActionScript and how something can create seemingly visual complexity with fairly simple and atomic code. But since this is not a 1 hour long session, but a blog, I can dive much deeper in the technical parts. Never truly 100% happy about the code in the Bloom piece, I had since then already done a couple of new things which particles. I slightly elaborated on that  and my other distractions in my session titled <a href="http://www.flashonthebeach.com/sessions/index.php?pageid=2188" target="_blank">&#8220;The Discontinuity&#8221; at Flash on the Beach</a> in a combination of Cinder and Flash Experiments (experiments one and two). That session was taped and will hopefully find it&#8217;s way online as a video soon, in the mean time <a href="http://vimeo.com/18618285" target="_blank">watch some of the fantastic speakers here</a>. I wanted to include the newer things in that talk. I&#8217;ll be posting multiple things here, and bundle them under the name, the Particles Sessions.</p>
<p><strong>The Discontinuity</strong></p>
<p>As I stated in my previous post, I&#8217;ve decided to take it easy with the conferences this year. The title I chose for that Flash on the Beach talk, was indeed pre-concieved. Taking a bit off from that would free up some time for the blog and experiments too; I have been thinking about what I want to communicate through this blog and how it can substitute what I normally talk about at conferences. I had decided that for the first particle post, I wanted not only to use another simple example of particles to explain particles, but to explain many facets of Flash, ActionScript, Pixelbender, Alchemy and creative development in general.</p>
<p><strong>The Distractions</strong></p>
<p>So I set out writing a new version of the fairly simple particles for the blog. In a fractal-like twist, what happened is that I for the 4th time I started exploring particles by writing code for this &#8220;tutorial&#8221; and then getting entirely distracted with just playing around with it. It&#8217;s the creative part about development I truly love. Play, learn and play. The side effect of toying around with ideas is that mostly you fail and every now and then find something interesting and new to play with. But in both instances you learn valuable lessons. This time this play lead me to something similar, yet new. What I failed at was the original goal of getting the blog post finally done.</p>
<p><strong>Quasimondo : &#8221; Have you tried it with video yet ? &#8220;</strong></p>
<p>After writing the new example code, I felt it was missing something and I showed it to <a href="http://www.quasimondo.com/">Mario Klingemann</a>, who while discussing it said : &#8220;Have you tried it with video yet ?&#8221;. The code wasn&#8217;t well suited for that, and I didn&#8217;t think much of it, but as a quick distraction and experiment, I started hacking the nicely clean particle code to do some video. It didn&#8217;t work well in the first instance, but after a little bit more of code cluttering and quick hacks it worked nicely. Then I added in some of <a href="http://www.bit-101.com/blog/" target="_blank">Keith Peters&#8217;s</a> <a href="http://www.minimalcomps.com/" target="_blank">minimalcomps</a> way to quick (they&#8217;re so easy to put in, I didn&#8217;t really do it nicely) and put it online and <a href="http://twitter.com/unitzeroone" target="_blank">tweeted it</a>. I then started looking at my blog and found it was broken. Who thought digital things would break out of lack of maintenance ?</p>
<p><strong>Even more distractions</strong></p>
<p>What happened with the particles experiment somewhat surprised me. I didn&#8217;t see it as a particular different thing of what I normally play around with and execution could have been way better. But the particle video experiment quickly got some strangely high amounts of hits. Most of them from Twitter, StumbleUpon, Reddit and Hackernews. At this point, my website has trafficked near 1Tb worth of data of that experiment, and amassed a for this site truly staggering amount of visitors. I started checking the comments out.</p>
<p>With very positive reviews, one thing stood out; I had preselected 3 videos and put those in, to show the effect on different video&#8217;s. But based on the feedback of above mentioned blogs, people wanted to be able to select their own videos. In my mind I had a small part of the following Saturday aside to actually write the particles post, but instead used that time to add in quick, hacked and <a href="http://unitzeroone.com/labs/particleVideo/#oHg5SJYRHA0">experimental support for YouTube</a>. It&#8217;s been working pretty stable. But again I failed at finishing the particles post.</p>
<p><strong>The Fail, not again.</strong></p>
<p>So after mutilating the code yet more I had now running a bandwidth eating experiment on my website, but no blogpost, the goal which started this to begin with. The normal work week hit and I do also enjoy working on <a href="http://www.aviary.com/" target="_blank">Aviary</a>, which has priority. I ended up using pieces of time normally wasted on <a href="http://www.callofduty.com/" target="_blank">CoD:BO</a> to write snippets of code and chunks of explanatory text. It became apparent one post wouldn&#8217;t be enough alone, and I&#8217;ve decided to make it into a series. This is to be thorough and an actual reference towards the technologies and ideas used, rather then quickly touching upon something. The prologue alone had almost become to long for one post and had been going to a couple of revisions.</p>
<p>Yesterday I had a quick peek at compiling a WebM decoder for Flash using Alchemy and the opensource <a href="http://www.webmproject.org/code/" target="_blank">libvpx</a>, which contains the VP8 codec. Although it does work in the form of a very early form of their examples running using swfbridge, it&#8217;s quite slow at this point in time. I was tempted to not post anything about the particles again and play with it more this night. But I decided I didn&#8217;t want to fail again, so particles first. WebM can wait.</p>
<p>Next Monday you can expect the first post surrounding the technical details of a simple but fast particle system in Flash. I&#8217;ll start out explaining the bloom particles, it&#8217;s working and it&#8217;s flaws. And then we&#8217;ll start looking at (yet again) combining Alchemy and Pixelbender to make a faster version of that. We&#8217;ll dive deep into the details of Alchemy and some experiments to combine them with Pixelbender.</p>
<p>This post is also way of forcing myself to get Part 1 of this multipart part series neatly together this weekend. And finally get particles of my todo list and out of my system for a while&#8230;unless I get distracted. My apologies for the delay.</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/01/14/the-particle-sessions-prologue/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Reviving this blog</title>
		<link>http://unitzeroone.com/blog/2011/01/06/reviving-this-blog/</link>
		<comments>http://unitzeroone.com/blog/2011/01/06/reviving-this-blog/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 21:38:28 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Random Thoughts]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=364</guid>
		<description><![CDATA[Hello there, and welcome again. So, this blog post at the beginning of 2011 is a result of my New Years resolution, which is to revive my blog to a fully functional and lively place. I apologize for it being &#8230; <a href="http://unitzeroone.com/blog/2011/01/06/reviving-this-blog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://unitzeroone.com/blog/wp-content/uploads/317BCM-welcome-doormat-lg2.jpg"><img class="alignnone size-full wp-image-422" title="317BCM-welcome-doormat-lg" src="http://unitzeroone.com/blog/wp-content/uploads/317BCM-welcome-doormat-lg2.jpg" alt="" width="614" height="378" /></a></p>
<p>Hello there, and welcome again. So, this blog post at the beginning of 2011 is a result of my New Years resolution, which is to revive my blog to a fully functional and lively place. I apologize for it being mostly deserted. I left it alone since May 2010. Most of the reason behind the blog falling behind was that year&#8217;s fault really, not mine.</p>
<p><span id="more-364"></span></p>
<p>It was a good year. I started doing a project for <a href="http://www.aviary.com/">Aviary</a> and was honored to speak at many great conferences of the web industry. One of the most note worthy events for me personally was also to be part of <a href="http://tv.adobe.com/show/flash-camp-tokyo/">Adobe<strong> </strong>FlashCamp<strong> </strong>Tokyo</a> and <a href="http://www.fitc.ca/events/about/?event=108">Seoul</a>. It was a great trip and a privilege to hang out with such heroes as <a href="http://www.mikechambers.com/blog/">Mike Chambers</a>, <a href="http://www.quasimondo.com/">Mario Klingemann</a>, <a href="http://blog.theflashblog.com/">Lee Brimelow</a> and <a href="http://jot.eriknatzke.com/">Erik Natzke</a>. You can see Lee&#8217;s video report of that trip in <a href="http://vimeo.com/11147444">Flasher Magazine 3 on Vimeo</a>. (<a href="http://dougmccune.com/blog/">Doug McCune</a> is alive and well, despite what that video says).</p>
<p>Looking ahead, this year promises to be an equally great year. In the Flash space, one of my long time wishes, <a href="http://labs.adobe.com/technologies/flash/molehill/">GPU support for Flash</a> is on the shortlist for a public beta in this year. More on that in a later blog. Privately, many things are happening and I&#8217;m loving it. Let&#8217;s just say that good times are ahead.</p>
<p>As for the reasoning for why this year my blog will get updated on a regular basis; this year I&#8217;ll take it easy on the conferences. I&#8217;m not saying I won&#8217;t be speaking or going to any, but this year has so many things going on for me (both work and private) that I decided to at least take it easy for a while. How long that &#8220;while&#8221; is, I haven&#8217;t decided.</p>
<p>I&#8217;ll miss all the great people, but at the same time this will give me more time to focus, work and enjoy life. Also for this reason, I&#8217;ve decided the blog will be the main form of sharing information and hopefully share useful work and thoughts.</p>
<p>As I started thinking about topics, I realized I still had quite a backlog of things still to put out there publicly and decided to tackle them one by one. My last talk, aptly named <a href="http://www.flashonthebeach.com/sessions/index.php?pageid=2188">&#8220;The Discontinuity&#8221;</a> at <a href="http://flashonthebeach.com/">Flash on the Beach in Brighton</a> has ran exactly one time, with some still in progress work, which I&#8217;d like to talk about. Also, things like <a href="http://unitzeroone.com/labs/flashModPlug/">FlashModPlug</a> and my <a href="http://sourceforge.net/projects/rocket/develop">GNURocket</a> implementation are still to be publicized. About that GNURocket client implementation, 2010 was also the year of a true demoscene contribution, in the form of <a href="http://vimeo.com/16126716">Area Unstable (video)</a> <a href="http://pouet.net/prod.php?which=56106">(pouet download)</a>. This was made together with <a href="http://www.sanderfocus.nl/v4/">Sander.Focus (graphics)</a> and <a href="http://twitter.com/gloom303">Gloom303 (music,sync)</a>.</p>
<p>I&#8217;ve also branched out to doing iOS development and working on experiments using both <a href="http://www.openframeworks.cc/">OpenFrameworks</a> and <a href="http://libcinder.org/">Cinder</a>. So there&#8217;s many things still to blog about this year. But, one thing at a time, so I decided to work through a backlog and start with some Flash particle experimentation. My next post, due tomorrow, will outline the working and technicalities about this thing; <a href="http://unitzeroone.com/labs/particleVideo/">Rendering Video with White Particles (Flash)</a><strong>.</strong></p>
<p><strong>[Update, the blog gave up on me, and I had to reinstall it. Here's my blog in it's new form].</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2011/01/06/reviving-this-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Player 10.1 pre-release on Nexus One</title>
		<link>http://unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/</link>
		<comments>http://unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/#comments</comments>
		<pubDate>Wed, 12 May 2010 22:35:55 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[10.1]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[flash3d]]></category>
		<category><![CDATA[flashmodplug]]></category>
		<category><![CDATA[libmodplug]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[nexus one]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=352</guid>
		<description><![CDATA[Nexus One running Flash Player 10.1 from Ralph Hauwert on Vimeo. This is a video of the Nexus One with a pre-release version of Adobe Flash Player 10.1. It does not represent the final quality of the Flash Player on &#8230; <a href="http://unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" 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=11695816&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=11695816&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong><a href="http://vimeo.com/11695816">Nexus One running Flash Player 10.1</a></strong> from <strong><a href="http://vimeo.com/unitzeroone">Ralph Hauwert</a></strong> on <strong><a href="http://vimeo.com">Vimeo</a></strong>.</p>
<p>This is a video of the <a href="http://www.google.com/phone/?hl=en&amp;s7e=" target="_blank"><strong>Nexus One</strong></a> with a pre-release version of <strong><a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank">Adobe  Flash Player 10.1</a></strong>. It does not represent the final quality of the Flash  Player on this specific device. But it&#8217;s pretty good as is!</p>
<p>This is the Nexus One running 2 demos. First a Nexus one specific  version of the &#8220;<strong><a title="Milkyball" href="http://www.unitzeroone.com/labs/vertexmap/" target="_blank">Milkyball</a></strong>&#8220;, which is adjusted in resolution and  screensize.</p>
<p>Second a non-adjusted version of <a href="http://unitzeroone.com/labs/flashModPlug/#Mortimer%20Twang-Burning%20chrome%20end.mod" target="_blank"><strong>FlashModPlug</strong></a>, an experimental project I&#8217;m currently  working on. It&#8217;s a port and wrapper of <strong><a href="http://modplug-xmms.sourceforge.net/">LibModPlug</a></strong>, running inside the  Flash Player through <a href="http://labs.adobe.com/technologies/alchemy/" target="_blank"><strong>Adobe Alchemy</strong></a>.</p>
<p>Conclusion 10.1 on the Nexus is really, really fast!</p>
<p>(go to <a href="http://vimeo.com/11695816" target="_blank"><strong>vimeo</strong></a> for the full resolution version). (<a href="http://unitzeroone.com/labs/vertexMapNexus/" target="_blank"><strong>link to nexus demo</strong></a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Dear Steve,</title>
		<link>http://unitzeroone.com/blog/2010/01/27/dear-steve/</link>
		<comments>http://unitzeroone.com/blog/2010/01/27/dear-steve/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 22:57:17 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Random Thoughts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[letterfromafriend]]></category>
		<category><![CDATA[steve]]></category>
		<category><![CDATA[stevejobs]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=330</guid>
		<description><![CDATA[Long time no see! I&#8217;ve been busy, sorry. First off all, I want to congratulate you on the great show today. Wow, that iPad is truly one of those things everyone is going to want to have, like your previous &#8230; <a href="http://unitzeroone.com/blog/2010/01/27/dear-steve/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Apple Fail" src="http://www.unitzeroone.com/images/appleFail.jpg" alt="" width="430" height="252" /></p>
<p>Long time no see! I&#8217;ve been busy, sorry. First off all, I want to congratulate you on the great show today. Wow, that iPad is truly one of those things everyone is going to want to have, like your previous successes with the iPod and iPhone. I take my hat off for that! And wow, what a lead up to the show. Probably the first hype of 2010. And do you guys know how to keep a secret and then give a great show unveiling it.</p>
<p>That being said, I felt as an avid Apple products user as well as your friend, (you know I own a total of 3 Macbooks, a plethora of Airports and have converted nearly my entire family to buy one of those nice machines of yours) (actually it was <a href="http://www.gskinner.com" target="_blank"><strong>Grant</strong></a> who got me into buying one) it&#8217;s my duty to inform you that I think something went wrong during your presentation. When you were showing the web capabilities of the iPad, something was missing in it&#8217;s browser (see screen-shot above). As your keynote and product presentations are normally flawless (ah, well, maybe not always), I think you might have missed this one.</p>
<p>You touted the iPad&#8217;s (great product name, btw) web capabilities as being <a href="http://www.youtube.com/watch?v=Nx7v815bYUw" target="_blank"><strong>amazing, perfect, you know, the regular Apple thing</strong></a>. But during the presentation I couldn&#8217;t help but notice that little &#8220;missing plugin&#8221; logo we all know from the iPhone. Now, I was thinking that this might have been one of those very exotic plugins of back in the day, like Director or Realplayer. But, as it turned out, the missing plugin was the Flash Player.<br />
<span id="more-330"></span></p>
<p>As you&#8217;ve started the introduction to the iPad with a reference to Netbooks, and we can safely say that most netbooks support Flash, I think we are both safe to assume that to be on par with those netbooks, the minimum you should have is a fully featured browser?<br />
I mean, this is not some kind of small screen device with limited capabilities in terms of performance and graphics. It&#8217;s a fully featured machine ? Be it with that amazing iPhone touch interface. And be it in a slightly new package intended for true casual and business use. (Honestly, you kind of confused me, games and reading books ? I thought the gaming generation didn&#8217;t read and vice-versa, ah we&#8217;ll talk about that after you write me back on this letter).</p>
<p>Anyway, I think it must have been a demonstration error, because it seemed like the iPad didn&#8217;t support Flash?</p>
<div class="wp-caption alignnone" style="width: 440px"><img src="http://www.unitzeroone.com/images/myHeroes.jpg" alt="" width="430" height="211" /><p class="wp-caption-text">Mythhackers.</p></div>
<p>Ok, now, who am I kidding. I know you&#8217;re a perfectionist. And you&#8217;re a man of subtle remarks too. Between you and me, you can admit it. We both know that little missing plugin logo wasn&#8217;t an accident. I think we both know why you did it. It must have been your kind of humor, getting back at that little prank  <a href="http://www.youtube.com/watch?v=ZNtTfFDena4" target="_blank"><strong>Kevin and Johnny of Adobe pulled on you at Adobe MAX</strong></a>. (see picture above too). You have to admit, that was funny. Man, we all laughed about that one. But hey, I always think that if they&#8217;re teasing you, they must want your attention. All in all, they didn&#8217;t mean any harm.</p>
<p>(I do agree with you that they should&#8217;ve spent some more cash on the explosion effect in the video, being the maker of some of the most premiere video effect software out there, but hey, it was a good prank video, executed very well).</p>
<p>Now, given some of the <strong><a href="http://www.eeggs.com/tree/1141.html" target="_blank">easter eggs in Mac OS X</a></strong>, which essentially is your baby, through that other thing you did, with that next-cube thing you were so enthousiastic about back in the day, I take it you have a fair amount of subtle humor in you. It always reflects in your letters and I always have to laugh when I think about how you made that joke about a mouse only needing one button. But, as always, there&#8217;s a time for fun and a time for seriousness. And you seriously can&#8217;t mean that the full featured web browser doesn&#8217;t support the biggest plugin out there?</p>
<p>If you do mean it, I can understand why. I&#8217;ve never really bought that, &#8220;Flash is too slow for the iPhone&#8221; story you told everyone at that party. I also know for a fact that <a href="http://www.openscreenproject.org/partners/current_partners.html" target="_blank"><strong>RIM, Nokia, Samsung, NVidia and all those guys</strong></a> also didn&#8217;t believe it.</p>
<p>And yeah, I know that little stunt Adobe pulled with compiling directly from Flash to iPhone isn&#8217;t the same as running it in the browser, but hey, it is the output of Flash running on an iPhone. And surely there&#8217;s a lot of content which can now be readily available in the App store. And if that puny little ARM processor in an iPhone can, then surely that incredible piece of custom silicon you so proudly called the Apple A4 can. (it&#8217;s ARM too, right?).</p>
<div class="wp-caption alignnone" style="width: 440px"><img src="http://www.unitzeroone.com/images/flashOnIphone.jpg" alt="" width="430" height="264" /><p class="wp-caption-text">Your nightmare ?</p></div>
<p>Ahh, going off track, I was saying that I understood why you would not want Flash. I know having rich, web enabled apps which don&#8217;t go through the App store can be a scary thought, food for nightmares. I know you&#8217;ve had a thing for nightmares, especially after Monster&#8217;s inc. But Steve, I have to tell you. A device which is intended for casual and easy use with all the slickness Apple always brings, but doesn&#8217;t support so much web content? Come on, what will the people think? Those netbooks you called slow and PC-ish, can run Flash, but Apple&#8217;s state of the art technology can&#8217;t?</p>
<p>Yeah, I know it&#8217;s hard to have that piece of proprietary software running so much content essentially being a separate platform, while having no control over it. But that&#8217;s why Kevin and Johhny where throwing those jokes at you. They want to help you, really. And again between you and me, isn&#8217;t it true that you&#8217;re always selling computers when those guys at Adobe come up with a new version of their creativity software?</p>
<p>I would like to also come with a more serious note, as your friend, I know I can remind you of this one. Do you remember that when I was still using a PC, we were always talking sh*t about those guys at Microsoft for dominating the market? About how they pulled that monopoly thing on Netscape with that &#8220;lovely&#8221; (I still remember the word you had for it) browser we all still despise, Internet Explorer. And what they did to Real by bundling that Mediaplayer? Well, as it turns out, they kind of ran into some <a href="http://en.wikipedia.org/wiki/European_Union_Microsoft_competition_case" target="_blank"><strong>anti-trust issues with the European Union</strong></a>. I hear it was quite costly for Bill. While I agree the iPhone was a completely different thing, you can&#8217;t bring out a computer and expect everyone to think it&#8217;s just a big iPhone and then pull all that stuff off that our friend at Microsoft once did, right?</p>
<p>Yeah, yeah, I know what you&#8217;re going to say. Flash is proprietary too and there should be an open alternative to it. But honestly, in terms of open initiatives competing with it, it seems those HTML5 guys are still not ready for it, and although having H.264 video support native to the browser is nice, it hardly replaces what Flash can do right now. Not to mention all that content already being offered by Flash, people can&#8217;t see on the magnificent iPad. If pure HTML5 content is even 1% of that, we both know that would be a lot. I do feel you should be open to any plugin, honestly, so the guys at MS/Silverlight and Unity3D, for instance, also get a shot. All in all, it&#8217;s your product&#8217;s users who are going to suffer for it otherwise. Now, as I&#8217;ve made my living building Flash apps, of course I am biased, but doesn&#8217;t every developer deserve a fair shot?</p>
<div class="wp-caption alignnone" style="width: 440px"><img class=" " src="http://www.unitzeroone.com/images/steveAsIRememberYou.jpg" alt="" width="430" height="414" /><p class="wp-caption-text">You&#39;re the man!</p></div>
<p>You were always this idealist, but this thing is making you look like you are just plain greedy, at the cost of your end users, not being able to access all web content. Give me back the idealist Steve, I love that guy! (I&#8217;ve included an old picture of you to remind you of that man).</p>
<p>Now, you know I do admire that you&#8217;re not like all those others and you&#8217;re doing things your way (and it seems to work), I think you&#8217;re going down the wrong path on this one, or this might have been just an error. If it was, just fix it before release, and we&#8217;ll keep it between you and me.</p>
<p>Sincerest Regards, your friend,<br />
Ralph.</p>
<p><em>(quick note, can you make Johnathan stop saying the word Magical, every time he&#8217;s talking about one of the products he designs ? Frankly, it&#8217;s a bit annoying. And he&#8217;s not designing unicorns or leprechauns.)</em><br />
<em><br />
(quick note 2 : if you do manage to talk to Kevin or Shantanu at the next party, ask them if their engineering people can talk to your engineering people about that video hardware support and performance issues, I think it would make many of our friends happy).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2010/01/27/dear-steve/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>PixelBender Raytracer &amp; Milkyball</title>
		<link>http://unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/</link>
		<comments>http://unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 09:30:37 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash3d]]></category>
		<category><![CDATA[pixelbender]]></category>
		<category><![CDATA[raytrace]]></category>
		<category><![CDATA[triangle3d]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=319</guid>
		<description><![CDATA[Milkyball, a further extension of my Triangle3D experimentation, used in my presentation of end 2009. Click on the shape to see the magic vertexmap. PixelBender + Flash raytracer. Work in progress. I posted both of these earlier on my twitter &#8230; <a href="http://unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unitzeroone.com/labs/vertexmap/" target="_blank"><img class="alignnone" title="Milkyball" src="http://www.unitzeroone.com/images/Milkyball.jpg" alt="" width="430" height="244" /></a></p>
<p>Milkyball, a further extension of my Triangle3D experimentation, used in my presentation of end 2009. Click on the shape to see the magic vertexmap.</p>
<p><a href="http://unitzeroone.com/labs/raytrace2/" target="_blank"><img class="alignnone" title="Raytrace" src="http://www.unitzeroone.com/images/raytrace.jpg" alt="" width="430" height="216" /></a></p>
<p>PixelBender + Flash raytracer. Work in progress.</p>
<p>I posted both of these earlier on <a href="http://www.twitter.com/unitzeroone/" target="_blank">my twitter</a> (@unitzeroone), but they didn&#8217;t make the blog as of yet. More details in future posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

