<?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://www.unitzeroone.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unitzeroone.com/blog</link>
	<description>A blog written by Ralph Hauwert, freelance developer&#38;consultant, specialized in realtime visualisation, 3D and application development. Currently working on Aviary.com.</description>
	<lastBuildDate>Mon, 07 Jun 2010 17:03:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash Player 10.1 pre-release on Nexus One</title>
		<link>http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/</link>
		<comments>http://www.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 this specific device. But it's pretty good as is!
This is the Nexus One running [...]


Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/' rel='bookmark' title='Permanent Link: Goodbye, Papervision.'>Goodbye, Papervision.</a> <small> Last week at Flash on the Beach I had...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/' rel='bookmark' title='Permanent Link: Help me test! Flash VSync and Screen Tearing.'>Help me test! Flash VSync and Screen Tearing.</a> <small> So, here's a post where I am asking you,...</small></li></ol>]]></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's pretty good as is!</p>
<p>This is the Nexus One running 2 demos. First a Nexus one specific  version of the "<strong><a title="Milkyball" href="http://www.unitzeroone.com/labs/vertexmap/" target="_blank">Milkyball</a></strong>", 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'm currently  working on. It'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>


<p>Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/' rel='bookmark' title='Permanent Link: Goodbye, Papervision.'>Goodbye, Papervision.</a> <small> Last week at Flash on the Beach I had...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/' rel='bookmark' title='Permanent Link: Help me test! Flash VSync and Screen Tearing.'>Help me test! Flash VSync and Screen Tearing.</a> <small> So, here's a post where I am asking you,...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Dear Steve,</title>
		<link>http://www.unitzeroone.com/blog/2010/01/27/dear-steve/</link>
		<comments>http://www.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'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, [...]


No related posts.]]></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'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'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'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'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't help but notice that little "missing plugin" 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'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'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't read and vice-versa, ah we'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'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're a perfectionist. And you're a man of subtle remarks too. Between you and me, you can admit it. We both know that little missing plugin logo wasn'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're teasing you, they must want your attention. All in all, they didn't mean any harm.</p>
<p>(I do agree with you that they should'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's a time for fun and a time for seriousness. And you seriously can't mean that the full featured web browser doesn't support the biggest plugin out there?</p>
<p>If you do mean it, I can understand why. I've never really bought that, "Flash is too slow for the iPhone" 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't believe it.</p>
<p>And yeah, I know that little stunt Adobe pulled with compiling directly from Flash to iPhone isn't the same as running it in the browser, but hey, it is the output of Flash running on an iPhone. And surely there'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'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't go through the App store can be a scary thought, food for nightmares. I know you've had a thing for nightmares, especially after Monster'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'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's state of the art technology can't?</p>
<p>Yeah, I know it'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's why Kevin and Johhny where throwing those jokes at you. They want to help you, really. And again between you and me, isn't it true that you'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 "lovely" (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't bring out a computer and expect everyone to think it'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'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'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's your product's users who are going to suffer for it otherwise. Now, as I've made my living building Flash apps, of course I am biased, but doesn'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've included an old picture of you to remind you of that man).</p>
<p>Now, you know I do admire that you're not like all those others and you're doing things your way (and it seems to work), I think you'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'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's talking about one of the products he designs ? Frankly, it's a bit annoying. And he'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>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2010/01/27/dear-steve/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>PixelBender Raytracer &amp; Milkyball</title>
		<link>http://www.unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/</link>
		<comments>http://www.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[3d]]></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 (@unitzeroone), but they didn't make the blog as of yet. More details in future posts.


Related posts:Triangle3D : [...]


Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li></ol>]]></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't make the blog as of yet. More details in future posts.</p>


<p>Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2010/01/20/pixelbender-raytracer-milkyball/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Bloom</title>
		<link>http://www.unitzeroone.com/blog/2009/12/01/bloom/</link>
		<comments>http://www.unitzeroone.com/blog/2009/12/01/bloom/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 14:12:05 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bloom]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=307</guid>
		<description><![CDATA[
(people who want to know more would refresh after seeing the pieces in full)


No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.letitbloom.com/#ralph"><img class="alignnone" title="Bloom" src="http://www.unitzeroone.com/images/bloomScreen.jpg" alt="" width="430" height="231" /></a></p>
<p>(people who want to know more would refresh after seeing the pieces in full)</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/12/01/bloom/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Help me test! Flash VSync and Screen Tearing.</title>
		<link>http://www.unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/</link>
		<comments>http://www.unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 13:55:40 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Random Thoughts]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[tearing]]></category>
		<category><![CDATA[vsync]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=311</guid>
		<description><![CDATA[
So, here's a post where I am asking you, the Flash community, for a hand. Any of it is truly appreciated and will hopefully get some attention and maybe even a solution to a problem which has been in around in Flash since as long as I can remember; screen tearing.
First, what does tearing mean [...]


Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://www.unitzeroone.com/images/tearing.jpg" alt="" width="430" height="294" /></p>
<p>So, here's a post where I am asking you, the Flash community, for a hand. Any of it is truly appreciated and will hopefully get some attention and maybe even a solution to a problem which has been in around in Flash since as long as I can remember; screen tearing.</p>
<p>First, what does tearing mean in this context ? <a href="http://en.wikipedia.org/wiki/Screen_tearing" target="_blank"><strong>Read this wikipedia article</strong></a>. In this case, it's a visual split along a vertical line in a Flash movie. It's been a known issue with Flash since quite some time (always as far as I know), with improvements over several Flash player versions, but I haven't had to deal with it much lately....until now. I'm in a project where this visual artefact is a major distraction from the content and the experience.</p>
<p>All in all, this seems to be the cause (at least, my analysis of it) of tearing in this case; Flash internally rasterizes a screen, and pushes it to the screen buffer. Internally, this should be synced to your display refresh (60hz or 72hz, for instance), so that the buffer doesn't get updated halfway through the videocard building up the frame. But on some browsers and platforms it does update during the video card frame refresh, resulting in two rendered frames being displayed at once (or better; 1 frame being updated to the next while drawing to screen), with an optically visible vertical split visible between the two frames. This problem has been around for a long time. It's more prone to show up in content with "tall" items in it, fast frame rates with large portions of the screen moving, and during horizontal scrolling of displayobjects.</p>
<p>The picture above shows the problem in action. It's a picture taken using a regular camera pointed at the screen, as this problem doesn't show up in screencapture software. It shows two different frames of the testing movie; both a black and white square, updated halfway through the screen. While the position of where the slicing happens changes, in many single frames, 2 frames will be displayed at the same time.</p>
<p>I'm seeing problems with the latest 10 Player on Windows XP (Firefox), Mac OS X (Firefox, safari doesn't but "stutters), and Windows 7. All in all, this is a graphical issue which has been around for a long time and should be solved. It's definitely a Flash Player bug and with FlashPlayer 10.1 around the corner, I would really love to see this fixed. As well as being hopeful for finding a solution for current player/browser configurations. But testing results are varying and that's where I am asking you for help, by running 2 flash movies and posting the results to my comments.</p>
<p>Over the last days I've been frantically testing several configurations and options, I would hope force vsync with the flash screen buffer, amongst which the following :</p>
<ul>
<li>Adding a video at 30fps to the stage (no result)</li>
<li>Adding system text to the display list (seems to work on windows xp)</li>
<li>Several configurations of stage.invalidate() and Event.RENDER (no result)</li>
<li>Different drawing / caching methods.</li>
<li>Wmode="direct" for flash player embed options. (result across the board!)</li>
</ul>
<p>The last option is the only thing which seems to work on all testing configurations, but comes at a cost. Switching to wmode="direct" seems to force vsyncing and this would adhere to what has been said about direct wmode:</p>
<p><strong><em>"This mode tries to use the fastest path to screen, or direct path if you will. In most cases it will ignore whatever the browser would want to do to have things like overlapping HTML menus or such work. A typical use case for this mode is video playback. On Windows this mode is using DirectDraw or Direct3D on Vista, on OSX and Linux we are using OpenGL. Fidelity should not be affected when you use this mode." </em><a href="http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html" target="_blank"><em>[Link to Tinics blog]</em></a></strong></p>
<p><em><strong>"Hardware offscreen buffer<br />
Software renderer, perfect fidelity" <a href="http://web.me.com/jeroendendunnen/downloads/max2008/documents/develop/Flash_Player_Internals-Jim_Corbett-final_v2.ppt" target="_blank">[link to Jim Corbett's presentation (ppt)]</a></strong></em></p>
<p>As opposed to the wmode="gpu" flag, which moves rasterization to the videocard (at a hight cost in most content cases, also altering the appearance of your content depending on the videocard), this option still uses the Flash Software Rasterizer to build up content for the screen. But on both my Mac and PC testing this comes at a performance cost of several frames per second, up to about 15fps on larger screens (1280x768). Also, I'm not sure about the results of this on machines with no gpu. (mostly, cheap on board graphic chipsets, which share system memory). While most of the time, your content type might vary in terms of results with either GPU enabled wmodes, in this test that shouldn't be an issue.</p>
<p>Obviously, abusing wmode="direct" to force vsyncing on the Flash Player isn't ideal, but it seems to work. In an effort to survey the results of this, I've built a very simple test swf. What I'd like you to do is run both swfs and copy the text field of both and paste them in my comments. Although I'm already in contact with Tinic about this, there's currently no JIRA bug describing the problem. With the results you have, I'd like to put up an official bug there, and use your results to describe what systems are impacted.</p>
<p>Firefox seems to be the main culprit. Since FF 3 there have been a number of big issues with Flash and Firefox; for instance, in some cases a right click on the flash player will cause the updated areas in the Flash movie to render as an opaque rectangle with the background color. In another case, Flash doesn't respond to rollover events and doesn't even render without a mouse click occuring.</p>
<p>Please help me and hopefully Adobe identify and fix this problem, by running these tests. Here's what you should do :</p>
<ul>
<li>Run both movies</li>
<li>Look for tearing. Typically, in these test, instead of steady flickering, you'll see a moving vertical tear between the black and white area. It is essentiall you identify tearing correctly, so make sure you know what it looks like (picture above is a still). The effect of tearing shows even better on my mac, when you move the firefox window so that the flash movie intersects your screenborder, halfway splitting vertically through the flash movie).</li>
<li>Copy and paste the textfield contents when the test is done, on both tests to my comments. Fill in the required 2 fields, and if you can, what type of graphics hardware your machine has.</li>
<li>Send this link to other people who are willing to test (and be part of the solution, making Flash a better place!).</li>
</ul>
<p><a href="http://unitzeroone.com/labs/tearing/opaque/FlashTearing.html" target="_blank"><strong>Test with wmode opaque</strong></a></p>
<p><a href="http://unitzeroone.com/labs/tearing/direct/FlashTearing.html" target="_blank"><strong>Test with wmode direct</strong></a></p>
<p><strong>[WARNING : if you are prone to visually induced epileptic fits, this might induce one. Don't run it then]</strong></p>
<p>(don't forget to post to the comments).</p>


<p>Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/' rel='bookmark' title='Permanent Link: Triangle3D : Small Flash 10 3D demo.'>Triangle3D : Small Flash 10 3D demo.</a> <small> Over the last days I've spent some time twittering...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/11/30/help-me-test-flash-vsync-and-screen-tearing/feed/</wfw:commentRss>
		<slash:comments>220</slash:comments>
		</item>
		<item>
		<title>Triangle3D : Small Flash 10 3D demo.</title>
		<link>http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/</link>
		<comments>http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 17:23:10 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[User Groups]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash3d]]></category>
		<category><![CDATA[triangle3d]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=298</guid>
		<description><![CDATA[





Over the last days I've spent some time twittering back and forth with Eugene. His supershape demo is very cool and we spent some time 'tweeting' about shaders. This lead me to upload and twitter one of my experiments which I used as part of my FOTB / MAX presentation. Judging by the huge number [...]


Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/' rel='bookmark' title='Permanent Link: Flash Player 10.1 pre-release on Nexus One'>Flash Player 10.1 pre-release on Nexus One</a> <small> Nexus One running Flash Player 10.1 from Ralph Hauwert...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/' rel='bookmark' title='Permanent Link: Goodbye, Papervision.'>Goodbye, Papervision.</a> <small> Last week at Flash on the Beach I had...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl class="wp-caption alignnone" style="width: 440px;">
<dt class="wp-caption-dt"><a href="http://www.unitzeroone.com/labs/Triangle3DOld/Alt.html"><img title="Triangle3DMorph" src="http://www.unitzeroone.com/images/Triangle3DMorph.jpg" alt="Screenshot from the realtime Flash3D demo." width="430" height="234" /></a></dt>
</dl>
</div>
<p><a href="http://www.unitzeroone.com/labs/Triangle3DOld/"><img class="alignnone" src="http://www.unitzeroone.com/images/Triangle3DMorphOriginal.jpg" alt="" width="430" height="195" /></a></p>
<p>Over the last days I've spent some time <a href="http://www.twitter.com/UnitZeroOne" target="_blank"><strong>twittering</strong></a> back and forth with <a href="http://blog.inspirit.ru" target="_blank"><strong>Eugene</strong></a>. His <strong><a href="http://blog.inspirit.ru/?p=364" target="_blank">supershape demo</a></strong> is very cool and we spent some time 'tweeting' about shaders. This lead me to upload and twitter one of my experiments which I used as part of my FOTB / MAX presentation. Judging by the huge number of retweets it seems people enjoyed it a lot, so I figured that it was worth a blog post. I started working on this experiment a while back after toying around with OpenGL, OpenFrameworks and audio reactive shapes and that inspired me to do something similar in Flash. This is an unfinished demo as it lead me to pursue something else, at which point I stopped working on it.</p>
<p>In the session where this came from, specifically this part, I shared information about the path of yet another demo, where this experiment led me too. Some of you who attended Flash on the Beach, might recall it from the Adobe keynote, where it was aptly named "milky ball".  I'll present on it one more time on the 3rd of December at the <strong><a href="http://www.adobeusergroupxl.nl" target="_blank">AUG XL event</a></strong>, in Amsterdam. I'll post more of the session's demos with explanation, when I have the time.</p>
<p>I do want to clarify that the code base I've created for this, which I currently call Triangle3D, is not to be a new Papervision3D, Away3D, Alternativa3D, Infinity3D, Sandy3D, Null3D or Yogurt3D (I'm probably missing a couple, sorry, have your way in the comments). It's my experimental playground of classes to play around, with no care for architecture restrictions or a generalized API. It's all about me playing and enjoying. Pure experimentation of what can be achieved with Flash 3D and hoping to find something beautiful in it.</p>
<p><a href="http://www.unitzeroone.com/labs/Triangle3DOld/" target="_blank"><strong>Orignal unfinished demo</strong></a></p>
<p><a href="http://www.unitzeroone.com/labs/Triangle3DOld/Alt.html" target="_blank"><strong>Demo with adjusted lightmaps from my new mirrorball.</strong></a></p>
<p><a href="http://www.flickr.com/photos/unitzeroone/4102372725/" target="_blank"><strong>(here's the shot of the mirrorball, on flickr).</strong></a></p>
<p>The music track is Sixtyten by Boards of Canada.</p>


<p>Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/' rel='bookmark' title='Permanent Link: Flash Player 10.1 pre-release on Nexus One'>Flash Player 10.1 pre-release on Nexus One</a> <small> Nexus One running Flash Player 10.1 from Ralph Hauwert...</small></li><li><a href='http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/' rel='bookmark' title='Permanent Link: Goodbye, Papervision.'>Goodbye, Papervision.</a> <small> Last week at Flash on the Beach I had...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/11/17/triangle3d-small-flash-10-3d-demo/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Adobe User Group NL XL</title>
		<link>http://www.unitzeroone.com/blog/2009/10/28/adobe-user-group-nl-xl/</link>
		<comments>http://www.unitzeroone.com/blog/2009/10/28/adobe-user-group-nl-xl/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:41:33 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=295</guid>
		<description><![CDATA[
My favorite Adobe User Group does it again! And how! At the threshold of end of the year, on the 3rd December, the dutch AUG in co-operation with Adobe presents to you a full XL event. With the popularity of the normal meetings rising and rising and these event being of an exceptional level for [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://adobeusergroupxl.nl/"><img class="alignnone" title="Adobe Usergroup XL" src="http://www.unitzeroone.com/images/augxl.jpg" alt="" width="430" height="121" /></a></p>
<p>My favorite Adobe User Group does it again! And how! At the threshold of end of the year, on the 3rd December, the dutch AUG in co-operation with Adobe presents to <strong><a href="http://adobeusergroupxl.nl/" target="_blank">you a full XL event</a></strong>. With the popularity of the normal meetings rising and rising and these event being of an exceptional level for any type of usergroup, this time, the lid is fully blown off!</p>
<p>The XL event will bring some great national and international speakers to the stage; Dave August of <a href="http://www.ooo-ii.com/"><strong>OOOii</strong></a> will talk about his use of Flash in JJ Abram's Star Trek, as well as his creative input to movies such as Fast &amp; Furious. Tobias Mannewitz of <a href="http://karakterconcept.com/" target="_blank"><strong>Karakter</strong></a> will be there and with work on projects for Spellbound, EA Games and SCEE this promises to be a session not to miss! Anita and Geoff from <a href="http://www.champagnevalentine.com/" target="_blank"><strong>Champagne Valentine</strong></a> will amongst other great things talk about an interactive music video they created for Placebo.  Adobe will give you insights in their products and tooling with such international renowned speakers / evangelists as <a href="http://www.sergejespers.com"><strong>Serge Jespers</strong></a>, <a href="http://blogs.adobe.com/jlevmedia" target="_blank"><strong>Jason Levine</strong></a> and <a href="http://www.mad.com.au/" target="_blank"><strong>Paul Burnett</strong></a>. If that's not enough, Niko Stumpo of <a href="http://www.hanazuki.com" target="_blank"><strong>Hanazuki </strong></a>will be talking about the studio's new work together with Mark Barzinski of <a href="http://www.barcinski-jeanjean.com" target="_blank"><strong>Barzinski and Jean Jean</strong></a>. Dirk Groten of <a href="http://www.layar.com" target="_blank"><strong>Layar</strong></a> fame will be talking about the Layar platform, something I'm looking forward to find out more about. Last but hopefully not least, I was honored to get an invitation to speak, and I will be talking about my latest forays into realtime flash.</p>
<p><span id="more-295"></span></p>
<p>This lineup is already stellar, with more names to come and be added to the list! Combine that with the friendly atmosphere and a great place to extend your network, learn and enjoy, this is an event not to be missed. Even if this is run by the <strong>dutch </strong>usergroup, I wouldn't be surprised if people come in from all over, as this XL event truly is XL. Be there! And if you do, make sure you say hi!</p>
<p>Get more information at the <a href="http://adobeusergroupxl.nl/" target="_blank"><strong>XL webpage</strong></a>, <a href="http://twitter.com/adobeusergroup" target="_blank"><strong>follow the AUG on twitter</strong></a>, and order the <a href="http://adobeusergroupxl.nl/tickets" target="_blank"><strong>insanely low priced tickets here</strong></a>.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/10/28/adobe-user-group-nl-xl/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Goodbye, Papervision.</title>
		<link>http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/</link>
		<comments>http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 10:47:58 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[papervision]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=290</guid>
		<description><![CDATA[
Last week at Flash on the Beach I had an announcement regarding me and Papervision3D. While some people took that as a hint to the release of PapervisionX, the actual news was a bit more sad. After pondering on this for a while, I made the rather big and tough decision to leave the Papervision3D [...]


Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/' rel='bookmark' title='Permanent Link: Flash Player 10.1 pre-release on Nexus One'>Flash Player 10.1 pre-release on Nexus One</a> <small> Nexus One running Flash Player 10.1 from Ralph Hauwert...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="PapervisionLogo" src="http://www.unitzeroone.com/images/pv3dlogo.jpg" alt="" width="430" height="205" /></p>
<p>Last week at <a href="http://www.flashonthebeach.com/"><strong>Flash on the Beach</strong></a> I had an announcement regarding me and <a href="http://www.papervision3d.org" target="_blank"><strong>Papervision3D</strong></a>. While some people took that as a hint to the release of PapervisionX, the actual news was a bit more sad. After pondering on this for a while, I made the rather big and tough decision to leave the Papervision3D team. As many of you couldn't be in the session, since the room was packed and as I heard later, many, many people not being able to come in from the line outside. Next to that many of you not able to come out to FOTB, this post is to ellaborate on my decision and explain it to all of you.</p>
<p><strong><span id="more-290"></span>A great experience<br />
</strong></p>
<p>I've been on the Papervision3D team for around 3 years in total. Only weeks after it's first closed alpha release, I joined the effort. All in all it was a great ride and I had an enormous amount of fun working on the project. Mind you, contrary to what some people believe, Papervision3D is not a company, there is no steady revenue and there is no direct income from it. It's an opensource project, with all the team members contributing out of fun, love and a feel for our great community. With the team, we have been able to deliver a solid, fun and easy to use 3D API for the Flash Platform. While Papervision3D certainly wasn't the first Flash 3D engine, many of it's features where and it's ease of use propelled the name to the top-ranking name in Flash 3D engines.  Along with that, Papervision3D helped putting Flash 3D solidly on the map for companies and individuals, making Flash 3D a tool accepted and available within the creative palette. I'm very proud to have been part of that and very grateful for all the valuable and nice feedback from the community. When I started on the project, it was only me, <a href="http://rockonflash.wordpress.com/" target="_blank"><strong>John Grden</strong></a> and founder <a href="http://www.carlosulloa.com/" target="_blank"><strong>Carlos Ulloa</strong></a> working on it. With time the team grew, changed composition and we also got more and more community input. These days, the team has grown to a rather large size, we got many blogs and sites dedicated to the engine and a vibrant community working with and on the engine. There's nothing to describe how proud I am of achieving that together with my fellow team members.</p>
<p><strong>Building engines</strong></p>
<p>Over time, I've spent more and more time in creating and architecting the core of 3D engines. With Papervision3D, this was the 1.7, 1.9 and 2.0 core of the engine. For PapervisionX I've taken that even further, creating the entire core architecture and implementing the many things I've learned over the years. But next to Papervision3D, I've also built multiple engines in my commercial effort as a freelancer, and have greatly enjoyed doing so. During my FOTB presentation, I showed <a href="http://www.annefrank.org/content.asp?PID=897&amp;LID=2" target="_blank"><strong>a video of the Anne Frank Virtual House</strong></a>, for which I was commissioned to build the 3D engine by <a href="http://lbi.lostboys.nl/" target="_blank"><strong>LBi / Lost Boys</strong></a> and the <a href="http://www.annefrank.org/content.asp?pid=1&amp;lid=2" target="_blank"><strong>Anne Frank Foundation</strong></a>. For the project I worked closely together with Floris Drupsteen of <a href="http://www.biqini.nl/"><strong>Biqini</strong></a>, the 3D modeller on this project, who did an awesome job of building the actual 3D models. It was an all in all great experience to build an engine on that scale and I'm proud to have been part of that effort. Considering the goal of the effort, it was a very meaningful implementation of a 3D engine to me, and an honor to be part of that effort.</p>
<p>With me stopping to work on the Papervision3D project, this is certainly not the end of me building 3D engines. Rather a rehash on how and why I do that. First and foremost, I will keep in chipping in the community effort, through this blog and upcoming projects to be released in the opensource domain. Also, commercially, I see myself building graphical / 3D engines, when possible, for a while to come too. All in all, I just love building the graphical engines for projects, hence also my self-given titel; "visual programmer". With no noticable big difference in what I do, there is a question remaining.</p>
<p><strong>Why ?</strong></p>
<p>There's a couple of reasons to the exact why of me leaving. First and foremost, this is a personal choice on my side, has nothing to do with my feelings towards the engine or the other team members. An important factor for me, things have to do with momentum. The engine has had an incredible amount of momentum over the years, and that pushes me to work on such a project even harder. Currently the project is a bit lower on momentum, which doesn't help me either. I think it's important to know I've been working on the engine many, many hours over the last years, and at some point you get to some fatigue of working on the same thing for a while. With the success of the engine and the personal success of my fellow team members, all of us have gotten more busy on the commercial side of things. This means less time goes into the project, which in turns into less momentum for the entire project, which in turn leaves me less "pushed" to do more. Considering the enormous amount of pressure from people on the outside, this wasn't good for me either. On the other side, this change in team composition, with me leaving, gives room for other people to full-fill that position and get new ideas, new work and new momentum going. All in all, I think it will do the engine good.</p>
<p>Next to momentum, another important reason for me was the goal of building an opensource 3D engine. With many people doing awesome experiments and examples / implementations of the engine, it really gives me a natural high to see how it's beeing used. But next to that I'm also looking to create beautiful things myself. Now, I'm not anything near a real visual designer, I like to see myself as one who builds the tools and technology to help enable these experiences. But I want to be part of something which will lead to beauty in visuals, story telling and emotion of the experience. Without a doubt many Papervision3D powered experiences can be classified as beautiful experiences, but most of the time, just building the engine means that they use the technology, but you are not directly involved in that process of creation. I really feel I need to work on projects which will give me a more direct link to the artists, or even more closely enabling artists. One of the projects I have recently joined is the <a href="http://rhondaforever.com/" target="_blank"><strong>Rhonda Forever project.</strong></a> Certainly very different as a tool to people, my job within the team is very similar to what I did for Papervision3D. For Rhonda I'm building the online drawing viewer for the project. The change for me there is that I will be working directly with it's creative community and seeing results of that effort in a more tangible/graphical way.</p>
<p>Wanting to create visual beauty also means that for me, there was a decisive direction to take. The work you do is the work that defines you within the industry and that in turn gets you the next big job. With me wanting to do more directly involved work on creating things with beauty, but my work mostly being hidden in technical solutions like for instance Papervision3D, I wanted to expand my working area to more visual beauty and become more part of that side of the process. The only way to do that is by just start doing it, finding people to work with and changing that direction. This one of my first steps towards that. With a renewed sense of freedom, I'm hoping to work on projects more closely and be part of the actual implementation more, rather then being part of a tool that enables people to do that, but not being part of the creation of the end result.</p>
<p>Community wise; I'm still there. I am pondering on some of the directions. Along with doing more work with and on OpenFrameworks and Rhonda, I will still build 3D things for the Flash Platform. What I can release, will be released through this blog. With the 3D Flash community having considerably grown from near to nothing to an almost distinct part of the industry, I will be part of it. Also, I'm looking forward to build technology which spans and extends all the available 3D engines, rather then just focusing on one engine.</p>
<p><strong>PapervisionX</strong></p>
<p>One thing I'm not entirely sure of as of yet, is what to do with the PapervisionX code base. Built entirely from scratch by me and <a href="http://www.floorplanner.nl"><strong>Tim Knip</strong></a>, this project really has part of my soul in it. It's been exclusively me and Tim working on it, with plans to have the rest of the team start on it a while back. Currently, that hasn't happened yet and the engine is not ready for release and officially not part of the Papervision3D code base. In other words; it's mine and Tim's. While I'd love to release it at some point in time, currently it's not ready for that and with me leaving the team, it's most likely not going to be released under that name, if released at all. I might decide together with Tim to donate it to the Papervision3D project, but currently I'm not sure on that decision yet; as there would have to be a considerable effort to make it stable for release. As it is unfinished now and publishing source code is somewhat a personal thing when most of it is yours, I'd think this is not what should be done right now. As I am going to pursue my own goals for the time being, this decision might take a while.</p>
<p>I will discuss with the team and Tim closely to see what can be done in the future, but for now, I don't think it should be released. It might also be better for the team to work on it's own Flash 10 compatible version of the engine.</p>
<p><strong>Triangle3D</strong></p>
<p>Another engine I showed at FOTB was my personal experimental 3D engine Triangle3D. Not at all meant to compete with any of the 3D engine, rather to be my own basis for experimenting with Flash and 3D, this engine might be released through this blog in the nearer future. Again, this is not me splitting off from the team and doing my own thing, this is more or less just giving the community my personal playground for Flash 3D. The engine is far from feature complete, and honestly, I don't want to focus on that. Rather just build it as I go and need something. This engine will most likely form the basis for my commercial 3D efforts too, as a custom based engine is almost always going to be more focussed on the specific implementation then a more generalized 3D engine API.</p>
<p><strong>Thanks</strong></p>
<p>All in all, in regards of the Papervision3D project, I would like to thank my fellow team members for all the good times. I would like to thank the community for their beautiful implementations and experiments as well as feedback. You make it all happen! Lastly, as a special member of the team, I would like to thank founder Carlos Ulloa for having me on board in the first place. It's been a great ride, and I'm sure we'll be riding our race cars for quite some time, even if we have to build them ourselves.</p>


<p>Related posts:<ol><li><a href='http://www.unitzeroone.com/blog/2010/05/12/flash-player-10-1-pre-release-on-nexus-one/' rel='bookmark' title='Permanent Link: Flash Player 10.1 pre-release on Nexus One'>Flash Player 10.1 pre-release on Nexus One</a> <small> Nexus One running Flash Player 10.1 from Ralph Hauwert...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/09/28/goodbye-papervision/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Source : Better Flash 10 3D interaction : ArcBall</title>
		<link>http://www.unitzeroone.com/blog/2009/09/08/source-better-flash-10-3d-interaction-arcball/</link>
		<comments>http://www.unitzeroone.com/blog/2009/09/08/source-better-flash-10-3d-interaction-arcball/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:15:04 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2.5d]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[arbcall]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=269</guid>
		<description><![CDATA[
With the addition of the 2.5d API in Flash 10, lot's of developers now have even easier access to basic 2.5D environments. But with those new capabilities and API's new challenges for developers arise. Famously, Flash 10 doesn't do the Z-Sorting natively. When Lee Brimelow asked me if I could send him an easy solution [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="My artistic rendering." src="http://www.unitzeroone.com/images/ArcBallPostImage.jpg" alt="" width="430" height="430" /></p>
<p>With the addition of the 2.5d API in Flash 10, lot's of developers now have even easier access to basic 2.5D environments. But with those new capabilities and API's new challenges for developers arise. Famously, Flash 10 doesn't do the Z-Sorting natively. When <a href="http://theflashblog.com/" target="_blank"><strong>Lee Brimelow</strong></a> asked me if I could send him an easy solution for that, I sent him the <a href="http://theflashblog.com/?p=470" target="_blank"><strong>SimpleZSorter</strong></a>. Which he in turn used to paste my profile picture on as much as possible planes, but more significantly, <a href="http://gotoandlearn.com/play?id=92" target="_blank"><strong>use for this tutorial</strong></a>.</p>
<p>Althought the name Simple would imply something a bit away from a PerfectZSorter (which, technically, has some challenges considering the 2.5D API and the player performance, don't ask), the thing which astounded me was the amount of feedback. Sure, more people had asked me for such a solution and this simple little tool did it for them most of the time.</p>
<p>But considering the simplicity of the SimpleZSorter and the amount of feedback I got on it (even if I didn't publish on it myself) made clear that although the 2.5D API of Flash 10 opened up loads of opportunities for developers and designers a like, some of the simpler issues aren't addressed by it, whist there is clearly a need for it. That need can be addressed and with this post I'm hoping to do a another small part.</p>
<p><strong>The ArcBall</strong></p>
<p>One of the questions which people have been asking me about for in relation to using the 2.5D API, is (loosely combined) "How do I rotate things in 3D correctly with the mouse".As this question came more and more, I've also realized how fundamental this is to our community. With Flash 10 we have native realtime (2.5D) 3D, but with realtime comes interactivity. And what use is it for users to have a 3D interface, while the controls are not intuitive ? At that point 3D becomes a worse experience, rather then a better. While this solution won't address every issue with that, it most certainly addresses one, 3D rotation dragging.</p>
<p><span id="more-269"></span>Native 3D interaction might be new to Flash, but it certainly isn't new to Flash 3D, or 3D in general for that matter. And the problem of having a user rotate an object with a mouse has been addressed before in numerous different ways. So luckily the wheel doesn't need any inventing. The wheel I chose for to address this problem is called an <strong><a title="ArcBall Paper" href="http://portal.acm.org/citation.cfm?id=155312" target="_blank">ArcBall</a></strong>, first proposed by Ken Shoemake.  Now if you want to read that paper go ahead, but let me define this in flashers <span style="text-decoration: line-through;">layman</span> terms.</p>
<p><strong>The Problem</strong></p>
<p>Let's first have a look at the problem as I've seen examples of code of people and derived it to this "problem" example. Drag the cube to rotate it.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Main_1126310680"
			class="flashmovie"
			width="430"
			height="430">
	<param name="movie" value="http://www.unitzeroone.com/labs/arcball/wrong/example/Main.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.unitzeroone.com/labs/arcball/wrong/example/Main.swf"
			name="fm_Main_1126310680"
			width="430"
			height="430">
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Although the mouse dragging does offer some feeling of control, you'll find it difficult to rotate it in a natural intuitive way, to let's say to the front of one of those colored planes. Here's what's happening here in that code, and what I've been seeing most.</p>
<pre class="actionscript"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>isDragging<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
boxSprite.<span style="color: #006600;">rotationX</span> = mouseY;
boxSprite.<span style="color: #006600;">rotationY</span> = mouseX;
<span style="color: #66cc66;">&#125;</span></pre>
<p>This is example is the most common and is responsible for the example above. Now, the problem here is that it doesn't take into account the local object transformation, as well as the dragging coordinates. As the object rotates around it's axis, so do it's axis change. Also, as the dragging goes on, we don't take into account the 2D coordinate versus it's 3D transformation dragging start and final output. All in all it ends up being a bit messy.</p>
<p><strong>The Solution</strong></p>
<p>Here's the solution using the ArcBall class. Drag to rotate.<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Main_1175730116"
			class="flashmovie"
			width="430"
			height="430">
	<param name="movie" value="http://www.unitzeroone.com/labs/arcball/correct/example/Main.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.unitzeroone.com/labs/arcball/correct/example/Main.swf"
			name="fm_Main_1175730116"
			width="430"
			height="430">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><strong>The solution, the complex part<br />
</strong></p>
<p>As you can see / feel, object rotations now feel much more direct and natural. But what is this magic ? First off all, the class is fully Flash 10, and uses it's native methods and features, where available for this solution. To explain it as simple as possible, as you click and start dragging on the cube, a sphere is established. This virtual sphere, around the object is then used to establish a point in 3D space on the sphere. As you are dragging, your actually rotating other points on the sphere. From these angular differences on the sphere, we can derive a new transform matrix for the object.</p>
<p>The hard part is in the establishing the rotational angles from those 2 coordinates on a sphere. A well proven way to do that (and the only form I have seen in ArcBall implementations, so far), is using <strong><a title="Quaternions are scary" href="http://en.wikipedia.org/wiki/Quaternion" target="_blank">Quaternions (go ahead, read it now, all of it, I dare you)</a></strong>. Quaternions are complex things (pun intended). Now Quaternions are a bit daunting to start at and at this point I would be lying if I said I fully understand them. I'm not the only one who finds them scary, quoting <strong><a title="Keith is scared" href="http://www.bit-101.com/blog/?p=2339#comments" target="_blank">Keith Peters / Bit-101</a></strong> ; "<em>Oh no. Vector3D’s w is the second most scary w in the world.</em>" (I wonder what the first is, Keith ?).</p>
<p><strong>Quaternions and Flash 10</strong></p>
<p>If you are looking for the clearcut solution and implementation of my class for it, skip this part, otherwise, read on, enjoy.</p>
<p>The reference to the <em>w</em> in that quote is also a reference to the <span style="text-decoration: line-through;">complex component</span> real component of the quaternion, where the xyz are complex numbers. <a href="http://en.wikipedia.org/wiki/Complex_number" target="_blank"><strong>Yes, complex numbers (I dare you again)</strong></a> and their appliance is where stuff does get scary for most of us. The great thing about the Flash 10 3D and geom API is that there is a partial native support for quaternions, next to having a vector with x,y,z and w components. For instance, this:</p>
<pre class="actionscript">matrix3D.<span style="color: #006600;">decompose</span><span style="color: #66cc66;">&#40;</span>OrientationStyle.<span style="color: #006600;">QUATERNION</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Which will return a Vector of 3 Vector3D's, which are in order translation, rotation, and scale. When using the quaternion orientation style, the rotation will be filled with a Vector3D with it's x,y,z,w values nicely filled; a quaternion. While this is something we could have handled ourselves (decomposing a matrix to it's components using quaternions), it's great Flash 10 has it. Less code, less size and it's faster then doing it with your own defined functions.</p>
<p>This ArcBall implementation relies heavily on that piece of code and some added code to do some additional stuff with the quaternions (multiply doesn't seem to be available native). Now while I'm not enough of an authority to try and explain quaternions, the applications for them in 3D rotation are numerous, most famously, the first thing which will get mentioned when talking about the topic of <a href="http://en.wikipedia.org/wiki/Gimbal_lock" target="_blank"><strong>Gimbal lock</strong></a>, which is a problem most encountered by astronauts and people developing 3D applications (see! us developers <strong>do</strong> have something in common with astronauts, we're now doing rocket science!).</p>
<p>That being said, on a wider look on Quaternions, for example, Both <a href="http://blog.zupko.info/?p=150" target="_blank"><strong>Andy Zupko</strong></a> and <a href="http://pv3d.org/2008/12/29/quaternion-explorer/" target="_blank"><strong>John Lindquist</strong></a> have done some nice articles on the subject and it's appliances in <a href="http://blog.papervision3d.org" target="_blank"><strong>Papervision3D</strong></a>. Papervision3D, running from Flash 9 and higher, has it's own Quaternion implementation, as Flash 9 doesn't support it natively.</p>
<p><strong>Deriving an easy solution for all</strong></p>
<p>While the solution to ArcBalls using Quaternions isn't even that hard, I still felt the problem should be abstracted a bit more, with an easy one stop solution for all. After all, the reason I got that much feedback on the SimpleZSorter, is clearly because people actually use it. Why do people use it ? My estimate is, it addresses a real problem and it's simple to implement. And while that might cause a little overhead, and make it less flexible, it works for people looking for a simple solution. Here's how that was implemented.</p>
<pre class="actionscript">SimpleZSorter.<span style="color: #006600;">sortClips</span><span style="color: #66cc66;">&#40;</span>boxSprite,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Simple enough right ? So for the abstraction of the ArcBall something similar made sense.<br />
Using the ArcBall class (and getting your correct dragging rotations up and running in no time) works like this.</p>
<pre class="actionscript">arcBall = <span style="color: #000000; font-weight: bold;">new</span> ArcBall<span style="color: #66cc66;">&#40;</span>boxSprite<span style="color: #66cc66;">&#41;</span>;</pre>
<p>Now you can drag this object, and get nice, intuive rotations from it. There are a bunch of options to use;</p>
<pre class="actionscript">arcBall = <span style="color: #000000; font-weight: bold;">new</span> ArcBall<span style="color: #66cc66;">&#40;</span>boxSprite, useRadius, radius<span style="color: #66cc66;">&#41;</span>;</pre>
<p>If you set the useRadius argument to true, and set radius to a specific value for that object (think about a sphere which completely encapsulates the object you have, it's bounding sphere, see my beautiful artistic rendering at the top of this post), the bounding sphere used per dragging action is the same size. When that option is left set to false, the point on the sphere is derived from the click in 3D space on that object and thus speed might vary, depending where the user start the drag.</p>
<p>Because the ArcBall class automatically adds listeners to the object, and automatically enables dragging on it, you need a way to switch it off when it's not wanted.</p>
<pre class="actionscript">arcBall.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;
<span style="color: #808080; font-style: italic;">//To enable it again</span>
arcBall.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</pre>
<p>So, that's it. I hope it helps you in getting a better experience for the end user. Since this is an abstraction for ease of use and much more can be done, the entire code base for both examples and the ArcBall under the <strong><a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a></strong>; essentially, do with it what you want, if it breaks anything, it's not my fault. Let me know what you think.</p>
<p>Lastly a mention of sources which helped me with getting this right; <a href="http://rainwarrior.thenoos.net/dragon/arcball.html" target="_blank"><strong>rainwarrior</strong></a>, <a href="http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48"><strong>NeHe</strong></a>, <a href="http://processing.org/hacks/hacks:arcball" target="_blank"><strong>processing</strong></a>. Sharing works!</p>
<p><strong>Sources</strong></p>
<p><a href="http://www.unitzeroone.com/labs/arcball/arcball.zip"><strong>ArcBall (just the sources for use).</strong></a></p>
<p><a href="http://www.unitzeroone.com/labs/arcball/RotationWrong.zip"><strong>RotationWrong (sources for the first example, incorrect drag rotation)</strong></a></p>
<p><a href="http://www.unitzeroone.com/labs/arcball/RotationArcBall.zip"><strong>RotationArcBall (sources for the second example, correct dragging using the ArcBall class)</strong></a></p>
<p>[Update 8/9/2009]</p>
<p>Little update on the quaternion explanation.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/09/08/source-better-flash-10-3d-interaction-arcball/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>A PV3D book : Papervision3D Essentials</title>
		<link>http://www.unitzeroone.com/blog/2009/09/03/papervision3d-essentials/</link>
		<comments>http://www.unitzeroone.com/blog/2009/09/03/papervision3d-essentials/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:23:47 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=261</guid>
		<description><![CDATA[
I normally don't delve into book reviews or endorsements; and I won't go there just yet with this post. But I do want to get your attention for the first released Papervision3D book; Papervision3D Essentials.
Written by Jeff Winder and Paul Tondeur, this elaborate, 13 chapter book looks great for anyone wanting to learn or deepen [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Papervision3D essentials" src="http://www.unitzeroone.com/images/bookCover.jpg" alt="" width="430" height="230" /></p>
<p>I normally don't delve into book reviews or endorsements; and I won't go there just yet with this post. But I do want to get your attention for the <a title="Order the book" href="http://www.packtpub.com/papervision3d-essentials/book" target="_blank"><strong>first released Papervision3D book; Papervision3D Essentials</strong></a>.</p>
<p>Written by <strong><a title="Jeff Winder's blog" href="http://jeffwinder.blogspot.com/" target="_blank">Jeff Winder</a></strong> and <a title="Paul Tondeur's blog" href="http://www.paultondeur.com/" target="_blank"><strong>Paul Tondeur</strong></a>, this elaborate, 13 chapter book looks great for anyone wanting to learn or deepen their knowledge of the Papervision3D API and Engine. Congratulations to both authors for getting it released! Great job!</p>
<p>Although I haven't recieved my (<em>[total disclosure]</em> free, thank you guys), copy for review yet, the book looks promising, if you can judge it by these two free online chapters, about <strong><a title="Lines3D chapter" href="http://www.packtpub.com/article/3d-vector-drawing-and-text-papervision3d-part2?utm_source=sl_papervision_abr1_0809&amp;utm_medium=content&amp;utm_campaign=sanjiv" target="_blank">Lines3D</a></strong> and <a title="VectorVision Chapter" href="http://www.packtpub.com/article/3d-vector-drawing-and-text-papervision3d-part1" target="_blank"><strong>VectorVision</strong></a>.</p>
<p>As one of the core members of <a title="Papervision3D" href="http://blog.papervision3d.org" target="_blank"><strong>Papervision3D</strong></a> and having architectured and written rather large portions of the Papervision 2 Engine, for me personally it's amazing to see a project like this. It's documenting code that the team has been writing over the years and getting it on paper, along with an explanation and examples is something huge to me, as well as being huge for people wanting to start or already experienced with the engine! Having recieved multiple mails full of questions and additional bug fixes (as have other members of the team) from Paul and Jeff, I can assure they have been thorough in reviewing &amp; examplifying the Papervision code base.</p>
<p>In a way, that's a very odd feeling; an obscure function which might have been thought up and written at 2pm at night (which during the initial dev of Papervision3D 1.7, 1.9 and 2.0 was rule, rather then exception), might now have gotten an explanation in the book.</p>
<p>One thing the project has been lacking the most though, was a paper resource to look things up; and that has now arrived!</p>
<p>I will blog a more thorough review after having recieved and read the book. Can't wait to see this book as a piece of tangible material and actually hold it!</p>
<p>[UPDATE]</p>
<p>Another free chapter <strong><a title="external models chapter" href="http://www.packtpub.com/files/5722-papervision-3d-sample-chapter-8-external-models.pdf" target="_blank">has emerged as PDF</a></strong>. Chapter 8; modelling and importing to Papervision3D.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/09/03/papervision3d-essentials/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>A quick look and thoughts on Silverlight 3.</title>
		<link>http://www.unitzeroone.com/blog/2009/07/10/a-quick-look-and-thoughts-on-silverlight-3/</link>
		<comments>http://www.unitzeroone.com/blog/2009/07/10/a-quick-look-and-thoughts-on-silverlight-3/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 15:51:42 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=252</guid>
		<description><![CDATA[
Microsoft released Silverlight 3. So it's time for Silverlight on my Flash blog ? Heresy ?  No, not really.
I'm not going to do an intro to Silverlight here, I guess you all know what it is, or what it is proposed to be. As a developer, I'm naturally interested in platforms available to me or [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Silverlight logo." src="http://www.unitzeroone.com/images/silverlight_detail.jpg" alt="" width="430" height="190" /></p>
<p>Microsoft released Silverlight 3. So it's time for Silverlight on my Flash blog ? Heresy ?  No, not really.</p>
<p>I'm not going to do an intro to Silverlight here, I guess you all know what it is, or what it is proposed to be. As a developer, I'm naturally interested in platforms available to me or in a similar area to what I work in. Therefore, Silverlight has my attention. Not because I believe it's a Flash killer, not because I think a bag of Microsofts cash will come my way, not because I want to destroy Silverlight, but because it's a technology which plays in the same realm as my professional environment. Surely being Flash Platform developer, I'm biased. The platform that has allowed me to earn my professional living and have so much fun is clearly my favorite any day. But let's have a look anyway.</p>
<p><span id="more-252"></span></p>
<p><strong>Silverlight vs Flash</strong></p>
<p>I've always found the developer oriented marketing message for Silverlight somewhat confusion. One moment it has nothing to do with the realm of Flash, the other it's the designated Flash killer, and I find myself hosting heated discussions from both camps. It's been confusing. Personally, I've had a look at SL1, 1.1 and left it there. During those tests I found it was still very young technology and a far cry from the capabilities from my personal favorite platform, Adobe Flash.</p>
<p>I remember the first release site for Silverlight, and it left me confused if I was watching a commercial for a snowboard brand or a new web technology. Things seem clearer now, Silverlight clearly has an ambition towards what Flash is, but currently still isn't. Neither towards end users or developers. What has happened with the release of SL3 ?</p>
<p><strong>Features</strong></p>
<p>Now in it's 3rd iteration, the Silverlight team seems to be playing catch up and there's an akward similarity between Silverlight 3 and Flash 8/9/10. Let's look at a selection (these are the biggest though) of the features added, and how they translate to the world of Flash.</p>
<p>I'd like to get one thing out of the way as an older feature; Silverlight 1.1 - .NET support / Translates losely into ActionScript AS2 to AS3. A far better runtime for code in both cases.</p>
<p><strong>- Silverlight Perspective3D - Flash 10 Perspective 3D</strong><br />
Well, with both players now doing 2.5D "postcards in space" natively, it's up to third party developers to build the 3D frameworks. Good thing I like that kind of stuff a lot. Before, it didn't seem possible to build anything like Papervision3D on a usable level for Silverlight, but I think that with 3.0 we might finally see some competition coming from the Silverlight camp, now that they can actually control bitmap content ?</p>
<p><strong>- Silverlight PixelShader API's - Flash 10 PixelBender &amp; Flash 8/9 Bitmap Effects</strong><br />
I'm not entirely sure if Silverlight PixelShader API's are GPU accelerated or not. Flash 10 Pixelbender surely isn't. So far I haven't seen a running version of Silverlight PixelShader API yet, but hoping someone will fill me in. The ability to write 'real' HLSL for it seems enticing. Currently I don't think there's enough demo's online on the Silverlight side, but it would be interested to see where that goes.</p>
<p><strong>- Silverlight Cached Compositing - Flash 8/9 gpu assist (fullscreen, mac) and Flash 10 GPU / Direct WMODE.</strong><br />
Somewhat similar to each other, Silverlight Cached compositing seems to be a combo of using the GPU for rendering as well as good old, cacheAsBitmap. I'd be interested to hear from both camps how far integration goes. From a developer perspective to both platform, both seem to just be a "switch" to be turned on, no control.</p>
<p><strong>- Silverlight Bitmap API &amp; BitmapCaching- Flash 8 Bitmaps and .cacheAsBitmap</strong><br />
Silverlight gets my favorite Flash 8 feature. Bitmaps. WriteAble bitmap is similar to BitmapData and allows for richer effects and graphics to be created by the developer. BitmapCaching is surprisingly similar in even name to .cacheAsBitmap, which allows the developer to reduce the overhead of rasterizing components of which the visual state has not changed.</p>
<p><strong>- Silverlight LocalConnection API - Flash 6 LocalConnection API</strong><br />
What's there too say ? Player instance talking to Player instance. I actually assumed this was already inside Silverlight, but hey, now they do. Seems to be related with Silverlight endeavours on the Desktop (think AIR, but a little less well featured).</p>
<p><strong>- Silverlight Application Model Enhancements - Flash 9/10 FileReference API</strong><br />
Again, this seems to be related to MS preparing Silverlight to jump to the desktop, although this feature is available in both Flash and it's desktop brother AIR.</p>
<p><strong>- Silverlight Assembly Caching - Flex Framework / Flash 9 RSL Caching.</strong><br />
Storing chunks of frameworks on the client so they don't have to be loaded in everytime for every site / platform. Not sure how cross platforms silverlight solution is. Neither do I know how to erase that cache with SL3.</p>
<p><strong>- Silverlight Network Monitoring API - AIR ServiceMonitor, SocketMonitor and URLMonitor</strong><br />
Again, a feature for SL jumping to Desktop, this allows you to see if you're connected to the cloud or not. AIR is a little more extensive with it, Flash has no implicit features.</p>
<p><strong>- Silverlight Application Frameworks - Seems to be a code base like the Flex SDK</strong><br />
Application Frameworks loosely relates to what we call the Flex framework, and the enhancements on that for SL3 seems be very minor. Flex2 - Flex 3 - Flex 4 (gumbo) steps seem much bigger.</p>
<p><strong>- Silverlight UIFrameworks Enhancements - Flex SDK / Flash Components</strong><br />
Well, not much to say here either, UIFrameworks seems to be playing catch up it with Flash / Flex UI Components (the latter to be most precise).</p>
<p><strong>- Silverlight Text Improvements - Flash 8/9/10 text improvements</strong><br />
Although the new Text Rendering engine for Flash 10 is a huge step, the Silvlerlight of things looks more like the new control over text rendering like the one we got in Flash 8-9. Flash text layouting seems to be far ahead on this one.</p>
<p><strong>- Silverlight Animation Easing Effects - Flash - Robert Penner, anyone ? Combined with some mx.easing.</strong><br />
Again, this was a feature I thought to be native Silverlight already, but it is just introduced now. As with the early days with Flash easing, I hope people see how to leverage this for a better UI, and not an experience of windows and things shooting by, rendering the UI useless.</p>
<p><strong>A strange coincidence</strong>....</p>
<p>A lot of similarity between new SL3 features and Flash 8-9-10 features, right ?<br />
Now, none of this is a coincidence. All these features are surprisingly similar to some of the new features we've seen appearing in Flash over the last 4 years. In a way, you can say SL is still playing catch-up. In the new feature set I see no real innovative RIA / Plugin features that really distinct Silverlight. That being said, SL plugin is still not as feature rich as Flash 10 is currently. Seeing what Microsoft has done in 3 versions, one could asses that they are moving very fast on the plugin feature front. But there are some things consider here. First of all, Silverlight obviously is learning it's lessons and features from Flash. I'm yet to be amazed by a novel Silverlight feature. Another thing to consider is that Silverlight 1, 1.1 and 2 compared to Flash had virtually no installed base, and backwards compatibility of all features and API's doesn't seem to be retained. Compare that with a Flash Player with more then 10 years of history and still be entirely backwards compatible.</p>
<p><strong>Plugin stability</strong></p>
<p>Stability wise, my experience with the SL plugin have been less then good. Browser crashes, followed by content not running (I'm still looking to see working demos of most of the new features online, which run on my mac too, anyone ?). The experience of years of Flash Player seems to be owning Silverlight here. With content behaving differently between my both Macbook Pro's, ubiquity doesn't seem to be the strong point of Silverlight; I'd say this would be me only, but my twitter feed tells me differently today.</p>
<p><strong>Video</strong></p>
<p>One thing which is worth mentioning in Silverlight's favor is the accelerated video rendering. Flash 9 / Moviestar (9.0.115) introduced fullscreen acceleration to allow for smoother feedback, but the acceleration mentioned for Silverlight seems to be decoding based. VC-1 is supported by graphic card manufacturers, so this would mean the actual decoding is done on the GPU, allowing the plugin to offload that work from the CPU. In that same area, DRM for VC-1 seems to be pretty sturdy too.</p>
<p><strong>Tools</strong></p>
<p>On the tools front, I can't say that much, since the Microsoft tools for building Silverlight content still don't run native on Mac OS. From back in the day, I can still say the Visual Studio IDE is one of the best Microsoft products, but beyond that, I have no experience with their new tools. I hear integration with Photoshop is pretty good. In a way tools and development language will also greatly influence the people using them, in turn influencing the output created for the end users. Flash is still a very nice melee of designers, actionscript developers coming from a design backend, and hardcode java developers turned Flexer (just to name a few sub categories). At any conference we always get a nice melee of peope all with their own angle and usage of the platform. This really reflects in all the different content being produced for the platform, where I'm still waiting to see that diversity in the Silverlight universe.</p>
<p><strong>Some personal ideas</strong></p>
<p>Now, although SL is making some progress on their own feature front, they are still behind. But in the end it's about the end user experience, and this is where Microsoft clearly failed in this context. Their <a href="http://seethelight.com/" target="_blank"><strong>see the light</strong></a> website is less then optimal, if I put it mildly. Seemingly infite loading time, followed by a horrendous design and user experience, leaving me wondering where all those megabytes of preloaded content went.I wonder if this is a trend amongst all SL content, as I've yet to not see one of those dead ugly SL preloader circles. This is the site which is supposed to showcase Silverlight, but it is it own worst advertising. Maybe they can get a Flasher to redo the seethelight.com website.</p>
<p><em>[UPDATE 11th July 2009]</em></p>
<p>Apparently, I'm not the only one who didn't find seethelight.com up to par, after seeing the light, microsoft removed it, linking directly to the html version (in the Silverlight version, this was linked as "reduced experience"). Now, we get the "reduced experience" by default. Let's hope they come with something to replace it, and be a real showcase for Silverlight.</p>
<p><em>[/UPDATE]</em></p>
<p><strong>Silverlight is good for Flashers too.</strong></p>
<p>All in all, Silverlight is good for everyone. It means competition in the field of rich internet plugins. Yes, there are more. But these are the 2 big companies playing and competing in that field. (I really don't think Sun is a real contender in this area yet). And general logic would say that with competition, both products will be more rapidly developed and improved. Which, for us developers and end users is only a good thing. With SL3 being just out, we'll just have to see how many developers adopt it and how many content providers are willing to take the jump on a non-ubiqitous plugin and how steep the adoption slope will be. In terms of catching up,in my opinion it's still Microsoft's move (even with SL3), but the incremental step they did for this version looks promising for the future. At which point we can all look forward to Flash 11, Flash on devices and mobile to compete with that.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/07/10/a-quick-look-and-thoughts-on-silverlight-3/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Ideas worth taking credit for. The TED augmented reality hoax.</title>
		<link>http://www.unitzeroone.com/blog/2009/06/23/ideas-worth-taking-credit-for-the-ted-augmented-reality-hoax/</link>
		<comments>http://www.unitzeroone.com/blog/2009/06/23/ideas-worth-taking-credit-for-the-ted-augmented-reality-hoax/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 16:04:48 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=239</guid>
		<description><![CDATA[
I just stumbled upon this very short TED talk by Chris Hughes. In his presentation Chris Hughes shows of an "Augmented Reality demo using Adobe Flash!". In an exited tone he talks about how he wrote a piece of software (!) to allow the replacement of a "2D Barcode" with something "really, really cool" using [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="Chris on stage claiming credit at TED." src="http://www.unitzeroone.com/images/ps_chrishughes2.jpg" alt="" width="500" height="333" /></p>
<p>I just stumbled upon this <strong><a title="TED Talk by Chris Hughes" href="http://www.ted.com/talks/chris_hughes_demos_easy_augmented_reality.html?awesm=on.ted.com_1A&amp;utm_campaign=ted&amp;utm_content=site-basic&amp;utm_medium=on.ted.com-copypaste&amp;utm_source=direct-on.ted.com" target="_blank">very short TED talk by Chris Hughes</a></strong>. In his presentation <a href="http://www.spazout.com"><strong>Chris Hughes</strong></a> shows of an "Augmented Reality demo using Adobe Flash!". In an exited tone he talks about how <strong>he wrote a piece of software (!)</strong> to allow the replacement of a "2D Barcode" with something "really, really cool" using nothing but Adobe Flash!</p>
<p>In reality he hardly wrote any software, rather did he do a pretty standard and in my opinion a very ugly implementation of Papervision3D and FLARToolkit,<a href="http://www.google.com/search?q=flartoolkit+papervision3d+tutorial&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a" target="_blank"><strong> for which tutorials can be found online quite easily</strong></a>.</p>
<p><span id="more-239"></span></p>
<p>Why is this worth blogging ? Well, as a Papervision3D core developer, personally I'm offended for someone taking credit for both the <a href="http://blog.papervision3d.org"><strong>Papervision3D</strong></a> and the libspark project's <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en"><strong>FLARToolkit</strong></a> libaries, none of which he has had any hand in. He's essentially taking credit for 100's of hours of work by both the Papervision3D and the Libspark team. With the <a href="http://www.ted.com/"><strong>TED conference</strong></a> headline being "Ideas worth spreading", which implies the sharing of knowledge and ideas. Both Papervision3D and FLARToolkit are opensource projects, with exactly that in mind. And both of them get ripped off by Chris Hughes, who not only fails to cite his sources, but takes credit for it by saying the following things on the TED stage :</p>
<p><em>"......I wrote a piece of software ...... "</em></p>
<p><em>"Oh, no, it does not quite stop there.......[]......another bit of the technology we managed to introduce here......"</em></p>
<p>With both statement not only failing to mention the actual technology and projects, <a href="http://www.spazout.com" target="_blank"><strong>Chris Hughes</strong></a> but actually taking credit for it. Disgusting. But hold on, to cite Chris himself, "it does not quite stop there"....<a href="http://blog.ted.com/2009/02/interview_with.php"><strong>in the followup interview on TED.cm</strong></a> <a href="http://www.spazout.com"><strong>Chris Hughes</strong></a> states the following :</p>
<p><em>"So what you've seen today is a Flash port of an existing project. There's a project out there known as ARToolKit. Unbelievably awesome. It's a university research project. Folks ported it from C, which is what it's written on, onto Java. And then we took the Java port and made it work in Flash."</em></p>
<p>That last piece of that sentence is very interesting "<em>we took the java port and made it work in Flash</em>". Let's make it easy. No you didn't. You took a port named FLARToolkit, and used it in your project. (here's the sources to his demos, which show Papervision3D and FLARToolkit).</p>
<p>So what did Chris Hughes do for him to take credit on a TED Stage ? Most likely, he followed a tutorial like this one from <a href="http://www.gotoandlearn.com/play?id=105" target="_blank"><strong>the FlashBlog</strong></a>, then gathered all his courage and energy to work with 2 opensource projects and take credit for it.</p>
<p>One more quote from <a href="http://www.spazout.com/" target="_blank"><strong>Chris Hughes</strong></a> here :</p>
<p>"<em>It's open source. Everything I do is about being very open.</em>"</p>
<p>Openness at a conference like TED would be giving urls, credit and a clear explanation of what you did. Right now you're just taking full credit for work done by 2 software team's hundreds (if not thousands of hours) of work, for your own credit.</p>
<p>I hope the <a href="http://www.ted.com"><strong>TED conference</strong></a> takes the proper steps to avoid people like <a href="http://www.spazout.com/" target="_blank"><strong>Chris Hughes</strong></a> standing upon on a stage, presenting other people's work as their own, purely for their own glory. I'm disgusted by this.</p>
<p>[EDIT]</p>
<p>To avoid any confusion, looking back at this hastly and angrily typed post, I want to clarify that most of the work he's demoing which makes this so awesome is the FLARToolkit project. <a href="http://blog.papervision3d.org"><strong>Papervision3D</strong></a> is used for visualization, but I'm guessing most of the awe is for the FLARToolkit project, which is done mainly by <a href="http://saqoosha.net/"><strong>saqoosha</strong></a>.</p>
<p>[UPDATE]</p>
<p>The TED conference has removed the video from the Talks page, and is in the process of removing subsequent posts, as a response to the contreversy around Chris his talk. I do feel a rectification of the statement "<em>And then we took the Java port and made it work in Flash." </em>is still missing, since this is just clearly not true.</p>
<p>I have a lot of feeling towards this kind of presentation of other peoples work without proper accreditation and honestly, I do feel the real victim here is Saqoosha / LibSpark. <strong><a href="http://saqoosha.net">Saqoosha </a></strong>has posted a blog around this, unfortunately only in japanese.</p>
<p>I'm sorry for the uproar and feeling some people have of this being a witch hunt, or the feeling this was instigating "get your pitchforks and torches out". That was not the intent of my blogpost. I feel that injustice was done, and it wasn't publicly rectified. As this blogpost was part of the reasoning behind the removal of the video of the TED pages, I do feel it served the proper purpose and in that specific result hit it's goal.</p>
<p>It wasn't my intent to be insulting, or publicly binding Chris Hughes to a stake. Rather this was a way to rectify the injustice which was done to the original developers of the source code he displayed, and took credit for. I apologize for any of my wording which is that strong above and as such removing it would be wrong. Rather then doing that, I'll leave it up and apologize for too strong wording or instigation of a witch hunt. What I won't apologize for is pointing out this issue and subsequently asking attention for it.</p>
<p>[UPDATE2]</p>
<p>I have just been in an enlightning IM discussion with Keith Peters / Bit-101.  In this discussion Keith pointed something out I feel I am at fault at. I've could have contacted Chris personally to ask him for a public correction of both his talk and the interview. Instead, I first wrote this post and then mailed Chris later, after any reply from his side stayed out.</p>
<p>I've got no excuse for this and I am at fault for not contacting him directly first. I apologize for that towards Chris Hughes.</p>
<p>[UPDATE3]</p>
<p>Upon further investigation, TED.com have decided to completely retract the entire speech, naming it "misleading".</p>
<p>[UPDATE4 25/06/09]</p>
<p>With TED having researched the grounds of these allegations and subsequently removing the video and retracting the entire thing, Chris Hughes still wants to pass this off as a fluke. I have yet to see an updated blogpost, or a reply to my emails. As such, let me make it perfectly clear for the last time, for future reference.</p>
<p>Chris Hughes took <a href="http://www.mikkoh.com/blog/?p=182" target="_blank">Mikko Haapoja's tutorial</a> on using FLARToolkit and Papervision3D, two open source projects he was not involved in at all. Then he did some slight modification of the tutorials, not adding, or extending anything and recompiled the examples. He then went on stage saying "He programmed" etc...</p>
<p>In reality, he passed someone else's work off as his own, without giving attribution or even mentioning the projects, rather just claiming credit for it in an interview, and obfuscating what he did both online and in his presentation. </p>
<p>End of story.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/06/23/ideas-worth-taking-credit-for-the-ted-augmented-reality-hoax/feed/</wfw:commentRss>
		<slash:comments>95</slash:comments>
		</item>
		<item>
		<title>Another scream on Flash, Alchemy Memory and compilers.</title>
		<link>http://www.unitzeroone.com/blog/2009/05/22/another-scream-on-flash-alchemy-memory-and-compilers/</link>
		<comments>http://www.unitzeroone.com/blog/2009/05/22/another-scream-on-flash-alchemy-memory-and-compilers/#comments</comments>
		<pubDate>Fri, 22 May 2009 16:31:32 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=221</guid>
		<description><![CDATA[
Before I start, I want to explain the timeline which led to this blog post. This was supposed to become a post of being able to get much faster access to bytearray's through ActionScript, by (ab)using the Alchemy memory opcodes. I spent quite some time trying to build a swc library which would allow you [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="The Scream" src="http://www.unitzeroone.com/images/TheScream.jpg" alt="" width="430" height="190" /></p>
<p>Before I start, I want to explain the timeline which led to this blog post. This <strong>was</strong> supposed to become a post of being able to get much faster access to bytearray's through ActionScript, by (ab)using the Alchemy memory opcodes. I spent quite some time trying to build a swc library which would allow you to do just that. Only to learn that you can't build a generalized API for this in ActionScript. It just can't work out with the current ActionScript compiler technology; here's the story of why.</p>
<p><span id="more-221"></span><strong>Leveling the field between Alchemy, Haxe and Actionscript</strong></p>
<p>The reason I set out to do this, is because I found it somewhat strange that the only language in the row above that is not able to access the faster memory, is the platform's native language, ActionScript. I could use many strong terms for this, but it is what it is. So why not change this myself ? Surely adding a piece of custom built (byte) code, should be able to allow access to this hidden gem ? I had discussed this option with Joa before and it seemed to be a viable path. So why not do it ? A good thing to note in the mention above is that Haxe has already implemented this. Read Nicolas his post about haxe <strong><a title="Haxe Memory" href="http://www.ncannasse.fr/blog/virtual_memory_api" target="_blank">flash.Memory</a></strong>.</p>
<p><strong>Compiling inline ABC with Alchemy's asc.jar, a bit different.</strong></p>
<p>As I posted earlier about Alchemy, one of it's advantages is the fact that Flash Player 10 has an implementation for actionscript byte code opcodes that are currently not supported within the ActionScript API. These opcodes allow for faster access to 1 bytearray inside the player, which you can set by accessing ApplicationDomain.currentDomain.domainMemory.</p>
<p>Strangely enough, that is actually opened up to AS API, presumably to allow for "regular" ActionScript access to the Alchemy memory. The actual opcodes have no ActionScript equivalent though.</p>
<p>Since Alchemy boils C code down to ActionScript, how does it obtain access to these opcodes ? The answer lies in the compiler which comes with Alchemy. The asc.jar in the /bin package allows for so called "inline asm".  This type of code looks something like the following.</p>
<pre class="actionscript">__asm<span style="color: #66cc66;">&#40;</span>op<span style="color: #66cc66;">&#40;</span>0xD2<span style="color: #66cc66;">&#41;</span>,op<span style="color: #66cc66;">&#40;</span>0xD1<span style="color: #66cc66;">&#41;</span>,op<span style="color: #66cc66;">&#40;</span>0x3A<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>This code can be put anywhere, and the opcodes will be added to the abc bytestream. Great huh ? So, ideally, we would just switch out our asc.jar in our Flex install directory, and we could just start doing this. Well. NO.<br />
Compc, which is used for actionscript project compilation isn't compatible with this special asc.jar. Not too worry, we can get around this, more on that later.</p>
<p><strong>Discovering special memory opcodes</strong><br />
Although at the first release of Alchemy, these special memory opcodes where somewhat ellusive, by now there's loads of information on that. Most specific info comes from Adobe Alchemy's creator, Scott Petersen, in his presentation <strong><a href="http://llvm.org/devmtg/2008-08/Petersen_FlashCCompiler.pdf">FlashCCompiler (pdf).</a></strong></p>
<p>Now, armed with these special opcodes, writting an API around it shouldn't be to hard, so let's go at it.</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setFastMem<span style="color: #66cc66;">&#40;</span>byteArray : ByteArray<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
 currentDomain.<span style="color: #006600;">domainMemory</span> = byteArray;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> writeByte<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">position</span>:uint, value:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
__asm<span style="color: #66cc66;">&#40;</span>op<span style="color: #66cc66;">&#40;</span>0xD2<span style="color: #66cc66;">&#41;</span>,op<span style="color: #66cc66;">&#40;</span>0xD1<span style="color: #66cc66;">&#41;</span>,op<span style="color: #66cc66;">&#40;</span>0x3A<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Ha, yes, combined with the Alchemy asc.jar, this code works, and translates out into working bytecode! So, now by calling writeByte, we are using one of the opcodes to write an opcode into the FastMem. Great! When I had all the opcodes to work, I forgot to do one thing, which I should have known and could have saved me a lot of time. Benchmark it. Instead, I first wanted to figure out a way to distribute this, so developers could easily do this.</p>
<p><strong>The long path from .abc to .swc</strong><br />
Now, when using the asc.jar, we can not compile a swc directly, since the asc.jar is incompatible with the compc compiler.<br />
It's only able to output a swf, or the abc bytecode for that class.<br />
What I went and did was examine the gcc script in the alchemy/achacks folder. Interestingly, the gcc script is a replacement for the normal gnu gcc compiler, written in c. It handles the steps for alchemy to go from c to llvm to actionscript to swf/swc distibutable. Even more interesting is HOW alchemy creates a swc, if you use the -swc compiler option. You'd think there would be some magic going on there, but instead it is not so magic at all. When compiling to a swc file, the compiler extracts the abc data from the previously compiled swf using a script called GetABC2.pl, and then replaces the code in an existing .swf file which is in the achacks directory, using PutABC2.pl.</p>
<p>A thing to note about that .swf file it uses, is that the file is an uncompressed .swf, marked in the header by FWS. These are getting more and more rare, since most swf files are compressed these days, and start with CWS instead. This is mostly common knowledge. Now, the problem here is that I wanted to replace that template.swf by my own....only to find out there's no documented way of compiling a swf file without compression. To make matters worse, the perl helper scripts seem to have a bug, where they do not work with compressed files. Although these scripts can be patched, that's not what I wanted to spend my time on, so I went my own route.</p>
<p><strong>Injecting bytecode</strong><br />
Instead, I wrote a little air app, which scanned a swf for the DoABC tag, (id 82), and replaced it with my own ABC bytecode. This involved changing the size tags of both the swf and the tag, and saving it out again. It took little time, but in the end it worked like a charm, and I could now generate my own swf's with custom inject ABC bytecode, great! Now I needed to get this swf into a .swc file.</p>
<p><strong>SWC and zip, a little tip</strong><br />
As most of you would know, as SWC file is nothing more then a .zip file, normally containing a library.swf and a catalog file. In my naive thought I would just unzip the swc, replace the library with my abc injected library and things would work. Not so. I'll save you the hours of pondering on this, but as it turns out, when using the Mac OS X finder, and unzipping it through that, leaves you with something crippled; what I don't know. So here's a good tip, if you want to unzip and rezip a SWC, do so using the terminal / unzip &amp; zip. Really, I wish someone had blogged about this, because it drove me crazy, ending up with Flex Builder saying "can't load swc", even if I didn't change anything in the .swc, just uncompressed and compressed it again. I caught on to that quite fast, but the fact it was the uncompressing the swc which was the problem, took me a little while to realize.</p>
<p><strong>It works! Now let's benchmark</strong><br />
As I said before, with some logical reason and benchmarking before I went on a spent a lot of time on bytecode injectors, build scripts and swc compilation, I could have saved myself a lot of time. The reason why I wanted to have this distributable was the entire reason to do so, so I didn't want to go on, without knowing how to get from a special __asm .as file to a working .swc. In the end it was all in vain. When I started benchmarking this, the result was disappointing.</p>
<p>The FastMem bytearray, and the special functions I had built for it, where nearly 2x SLOWER then just using ByteArray.writeByte(). And then I figured it out. I have forget to think about the overhead of calling a function in ActionScript. Since a built in function is much faster then an actionscript function, the overhead of calling that function far outweighed the faster access speed to the data.</p>
<p>So it ended up in a failed experiment. That's ok. Failing is a way of learning, and during this process I learned a lot of new things. But in this case, the biggest lesson wasn't how to inject bytecode, use the asc.jar, write your own swc compilation pipeline. It was that with the current compiler for ActionScript, it's just not possible to use the FastMem opcodes in a easy and generalized way.<br />
<strong><br />
The difference between the compilers<br />
</strong></p>
<p>Now, the saddening conclusion is that I wasn't able to build a FastMemory.swc that all Flash developers could use. The more alarming conclusion I take from this, that the problem doesn't just resides in the compiler not having any way to do so, but the fact that it's due to missing features other compilers already have, leaving ActionScript developers behind.</p>
<p>Haxe is able to pull the exact same thing off. With Nicolas his work on the flash.Memory api, you can select a bytearray, and get very fast read and write access. So why isn't this possible with ActionScript ? The Haxe compiler supports inlining. For those unfamiliar with this, this allows you to keep portable and reusable functions, while the compiler inserts these functions directly in the place they are called. So you're not actually calling function, you are essentially inserting a piece of code inside your code. This eliminates the overhead of the function call during the compilation phase.</p>
<p>The reason this does work within Alchemy is that it not only supports inlining (less important in this case), but the Alchemy code actually is processed before hand by the llvm compiler with ActionScript target. Even further, within Alchemy, your code lives inside the reserved fast memory, and access to for instance malloc'ed pieces of memory are inside this memory.</p>
<p><strong>Conclusion and final shout out to Adobe</strong></p>
<p>This leaves ActionScript behind. Not because of the language, just because of the compilers. ActionScript doesn't support inlining, nor does the compiler do any optimizing steps. We could start modifying our own asc.jar and doing this, but with the Flex SDK being opensource, it's still not legal to modify the asc.jar and release, essentially making that step useless to do.</p>
<p>All in all, ActionScript isn't able to target it's own platform as well as both Haxe and Alchemy. Sure, you can insert optimized hand written bytecode in performance critical places, but at that point, why shouldn't I just switch to using Haxe or Alchemy ?  In my opinion, both have their downsides.</p>
<p>Alchemy is great, but as it's currently in beta, it's not even an industry standard. Sure, C as a language is, but Alchemy just isn't. Also, when using Alchemy, even the smallest piece of code results in a huge .swc because of all the standard C library code. All in all, it's amazing Alchemy runs this fast considering all the steps the code takes before it actually runs on your machine.</p>
<p>Haxe is a work of genius. It's a great compiler, I like the language and I specifically love the .abc format it contains, allowing me to write bytecode inside the Flash runtime and executing it. In my book, that's awesome. As of today, <strong><a href="http://ncannasse.fr/blog/haxe_for_iphone" target="_blank">Haxe can even target the iPhone</a></strong> ! The language is great and has many features ActionScript lacks. It baffles me how one man army nicolas can single handedly write a language and a multi target compiler, and in many respects stay on top of the ActionScript compiler.</p>
<p>My first problem with Haxe is just that. The one man army. Should nicolas decide he doesn't feel like it anymore, the platform is dead. Sure, there's more people working on it, but in it's core it seems to be that nicolas is the driving force. My second problem is that although there is a huge pool of ActionScript developers, which can work together within the industry standard called ActionScript. There's not even near that many people who've even touched haxe, let alone the number of developers who are able to call themselves "Haxe Professionals".</p>
<p>Instead, I'll stick with ActionScript for now, and hand roll my optimized code using pure abc, haxe or Alchemy, which ever suits the purpose best. But the necessity to do so leaves me wondering what the state of ActionScript and it's compilers is. Should we start building our own ActionScript compiler ? Add our own features to the language ?</p>
<p><strong>[EDIT]</strong></p>
<p>What I failed to mention is that due to the overhead the asc.jar added to the bytecode (some return's and at every function a getlocal0 + pushscope I didn't need) I eventually switched from using that to moving to Haxe with it's Haxe format library. One of the supported formats is ABC, and I ended up using that to create my own .abc bytecode, injecting that instead of the asc.jar output. Again, I'm not saying either Haxe or Alchemy are bad tools, I'm just saying currently ActionScript is lagging behind.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/05/22/another-scream-on-flash-alchemy-memory-and-compilers/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>More play with Alchemy : Lookup table effects.</title>
		<link>http://www.unitzeroone.com/blog/2009/04/06/more-play-with-alchemy-lookup-table-effects/</link>
		<comments>http://www.unitzeroone.com/blog/2009/04/06/more-play-with-alchemy-lookup-table-effects/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 09:11:04 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[FITC]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=212</guid>
		<description><![CDATA[
After the overwhelming response of posting the sources of 300.000 pixels with Alchemy and Pixelbender, I thought it would be nice to post some more from my session at FITC Amsterdam.
First let's take a look at what people have done in response of the previous sources.
Yonatan Offek - Sierpinski Particles
Peter Nitsch - Alchemy Particles
David Lenaerts [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unitzeroone.com/labs/alchemyLookupTable/"><img class="alignnone" src="http://www.unitzeroone.com/images/lutEffect.jpg" alt="" width="430" height="140" /></a></p>
<p>After the overwhelming response of posting the sources of 300.000 pixels with Alchemy and Pixelbender, I thought it would be nice to post some more from my session at FITC Amsterdam.</p>
<p>First let's take a look at what people have done in response of the previous sources.</p>
<p><a href="http://www.zozuar.org/pub/sierpinski-pusher/Main.swf" target="_blank"><strong>Yonatan Offek - Sierpinski Particles</strong></a></p>
<p><a href="http://www.peternitsch.net/blog/?p=166" target="_blank"><strong>Peter Nitsch - Alchemy Particles</strong></a></p>
<p><a href="http://www.derschmale.com/2009/03/23/experimenting-with-alchemy-of-smoke-milk-and-ink/"><strong>David Lenaerts - Smoke, Milk and Ink</strong></a></p>
<p><a href="http://www.rozengain.com/blog/2009/04/02/alchemy-experiment-incredibly-fast-plasma/" target="_blank"><strong>Dennis Ippel - Incredibly fast Plasma</strong></a></p>
<p><a href="http://blog.joa-ebert.com/2009/04/03/massive-amounts-of-3d-particles-without-alchemy-and-pixelbender/" target="_blank"><strong>Joa Ebert - Massive amounts of 3D particles without Alchemy and Pixelbender</strong></a></p>
<p>All the work in that list is incredible, but for this post, I'm most interested in the last 2. Joa's work on getting AS3 up to speed with my Alchemy demo (Joa's demo is actually faster then the Alchemy version on my machine) is incredible. And it also proves the one thing I tried to convey in my blog post <a href="http://www.unitzeroone.com/blog/2008/11/28/adobe-alchemy-is-it-actionscript-heresy/"><strong>Adobe Alchemy, is it ActionScript Heresy ?</strong></a>.</p>
<p><span id="more-212"></span></p>
<p>Joa's optimization relies mostly on a linked list implementation to iterate over the particles, and using the <strong><a href="http://www.mikechambers.com/blog/2008/08/19/using-vectors-in-actionscript-3-and-flash-player-10/" target="_blank">Flash 10 Vector type</a></strong> to allow for faster access to write to screen. Another speed improvement over the Alchemy version is not using Pixelbender, but having both rotation and projection done in the same loop as drawing to screen. All in all, his result on this is pretty awesome.</p>
<p>Again, writing highly optimized ActionScript should enable you to do the same speedwise as Alchemy compiled code. There's at least one definitive advantage which Alchemy has in that case. The first advantage in Alchemy lies is the fast ByteArray access (which currently only Alchemy and <strong><a href="http://www.ncannasse.fr/blog/virtual_memory_api" target="_blank">Haxe</a></strong> can use).</p>
<p>The second advantage is why I think we should have a better AS3 compiler. It is the use of a more advanced compiler. This reduces the need to *highly* optimize your code, although I'd always recommend doing that in any case. My demo's here are meant of examples on how to use Alchemy, rather then to get the last bit of performance out. That, we'll leave to PapervisionX work.</p>
<p>Now, as I said, for this post we would be looking at two of the responses on my earlier Alchemy demo, the second one being Dennis Ippel's Fast Plasma effects. Plasma effects and Lookup Table efffects aren't too different. <strong><a href="http://mrdoob.com/81/Flash_10_Shaders_Plane_Deformations" target="_blank">Ricardo Cabello</a></strong> did some experiments with them earlier, using Pixelbender. I worked on taking this type of effect and implementing it using Alchemy. Since that I had already done some experiments with them earlier, I thought it would be nice to release the sources, and see what you guys do with them. Maybe Joa feels like another shot of doing the same with ActionScript ?</p>
<p><a href="http://unitzeroone.com/labs/alchemyLookupTable/" target="_blank"><strong>Example</strong></a></p>
<p><strong><a href="http://unitzeroone.com/labs/alchemyLookupTable/lookupEffect.zip" target="_blank">Source</a></strong></p>
<p>Play around, let me know what you do with it, and make sure you check out Mr. Quilez his webpage, specifically, the article on <a href="http://iquilezles.org/www/articles/deform/deform.htm"><strong>Plane Deformations</strong></a>, where part of this code is derived from. If you want to optimize more, you *could* read <strong><a href="http://www.kebby.org/articles/h14a2.html" target="_blank">Kebby's article F***ing learn to code again</a></strong>.</p>
<p>One more observation  : the difference between running this on Firefox on a Mac and just running it in the FlashPlayer is huge, even bigger then normal. Could someone from Adobe finally explain this ?</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/04/06/more-play-with-alchemy-lookup-table-effects/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Flash 10, Massive amounts of 3D particles with Alchemy (source included).</title>
		<link>http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/</link>
		<comments>http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 15:26:12 +0000</pubDate>
		<dc:creator>UnitZeroOne</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.unitzeroone.com/blog/?p=201</guid>
		<description><![CDATA[
Pushing around +300.000 3D particles, realtime, on screen, using Flash ? No problem, if you are using Adobe Alchemy &#38; PixelBender to compile and run your code!
During my session "professionally pushing pixels" at FITC Amsterdam this year, amongst other things, I talked about how to best utilize parts of the Flash Player to get top [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a title="See the demo." href="http://www.unitzeroone.com/labs/alchemyPushingPixels/" target="_blank"><img class="alignnone size-full wp-image-202" title="pushingpixels" src="http://www.unitzeroone.com/blog/wp-content/uploads/2009/03/pushingpixels.jpg" alt="pushingpixels" width="430" height="140" /></a></p>
<p>Pushing around +300.000 3D particles, realtime, on screen, using Flash ? No problem, if you are using Adobe Alchemy &amp; PixelBender to compile and run your code!</p>
<p>During my session "<em>professionally pushing pixels</em>" at FITC Amsterdam this year, amongst other things, I talked about how to best utilize parts of the Flash Player to get top performance. This is one of the examples I showed. What you are seeing in this example, is +300.000 particles being 3D transformed, projected and draw to 2D. And it does so at quite a good framerate (well, it'll depend on your machine too).</p>
<p>So, how do we achieve this ? The answer is a combination of PixelBender and Alchemy.</p>
<p><span id="more-201"></span></p>
<p><strong>First, let's look at the 3D transformation and projection.</strong></p>
<p>Flash 10 has a number of native features to allow for 3D transformation and projection. You'll find that this is a combination of using the Vector, Vector3D, Matrix3D, PerspectiveProjection, etc. Although these features are great, we can't use them in combination with Alchemy easily. I'll explain why later, for now, let's look at an alternative method to do the projection.</p>
<p>Where oh where in the Flash Player do we have a method of doing very fast math ? The answer is; pixelbender! Although Pixelbender is normally used for image based manipulation, you can make it do any type of number-crunching which is able to be executed in parallel and without loops.</p>
<p>To calculate rotations and projecting our 3D data, we use Pixelbender in "ShaderJob" mode. When using pixelbender in image based mode, it operates in 8 bits per channel. Thankfully, when using it with a ShaderJob, it allows 32 bits precision per channel for the data processing. Since 8 bit precision wouldn't be enough for this example, we use a shaderjob.</p>
<p>The VertexProjector pixelbender kernel, included with the source is a simple way of transforming and projecting vertices (representing particles, in this case) in 3D space. We feed this kernel a bytearray of x,y,z paired data, and execute the shaderjob. It then returns the data as a bytearray, in px, py, pz format.</p>
<p><strong>Drawing things to screen.</strong></p>
<p>Now we have all the 2D projected 3D data, we need to draw things to screen, and we have to do so as quickly as possible. This step is traditionally called rasterization. In AS3, you're most likely to use getPixel when drawing on a per pixel basis. Doing so in a loop for 300.000 pixels turns out to be very slow. The solution for this would be to optimize that loop as much as possible. Either by writing your own bytecode, or maybe writing your own post-processor for you code, before you compile. But we don't have too, since Adobe Alchemy exists.</p>
<p>As you can read in <strong><a href="http://www.unitzeroone.com/blog/2008/11/28/adobe-alchemy-is-it-actionscript-heresy/" target="_blank">my earlier post</a></strong> about Adobe Alchemy, I openly questioned why it was so speedy, as compared to regularly compiled ActionScript 3 code. Although the answer is rather complex, the combination of C Based code, the LLVM compiler and "Alchemy Virtual Memory" are the base of this. The large difference between Alchemy compiled actionscript and regular compiled Actionscript can be further explained by the regular AS3 compiler not doing any optimisation. This example shows off those performance increases.</p>
<p>One thing to worry about when using Alchemy in your ActionScript projects is marshalling. You can read Branden Hall's post on Alchemy <strong><a href="http://www.automatastudios.com/2008/11/21/understanding-adobe-alchemy/" target="_blank">for more info on that</a></strong>. Since we wouldn't be able to marshal 300.000 vertices from a Vector.&lt;Number&gt; in AS3 to our alchemy code, we need to find a better solution. This is exactly why we are using Pixelbender and more-over, the bytearray data.</p>
<p>It is possible to manipulate the memory Alchemy uses in the runtime. This memory is represented as an AS3 ByteArray object. If we directly write and get our data from this memory block, no marshalling is needed. Although this means not all things can be done this way, for some things, this can be very useful. For instance, getting large blocks of data, like images and bytearrays of coordinates.</p>
<p>Getting all these 3D particles to screen is simply 1 inner loop. While we would normally call setPixel for that, in Alchemy code, we don't have that luxury. Instead of that, we write directly to our screenbuffer memory, which is represented as a set of int's. Here, one more problem comes into play. <a href="http://en.wikipedia.org/wiki/Endianness" target="_blank"><strong>Endianess</strong></a>, defines the byte ordering for a set of data. Alchemy uses little-endianess for it's internal memory representation. Specificall, it uses a small class called LEByteArray. This class extends ByteArray and ensures no changes are made to the endianess of the memory. Makes sense, since otherwise your code would blow up.</p>
<p>Writing to the screen is then a piece of cake. We take the alchemy processed data from it's memory, and write it to a bitmapdata using the formerly much less usable setPixels() command. It's amazing to see how fast this is.</p>
<p>Look at the <strong><a href="http://www.unitzeroone.com/labs/alchemyPushingPixels/" target="_blank">example here</a></strong>, and download <strong><a href="http://www.unitzeroone.com/labs/alchemyPushingPixels/alchemyParticlePusher.zip" target="_blank">the full sourcecode</a></strong> here. As you can see from the example, the difference between doing this with regular ActionScript versus Alchemy nears a 5 fold speed increase.</p>
<p>Thanks to <strong><a href="http://bit-101.com" target="_blank">Keith Peters</a></strong>, for providing me with the 3D Strange Attractor code! And additional thanks to <strong><a href="http://mrdoob.com" target="_blank">Mr.Doob</a></strong> for the stats object.</p>
<p>In future I'll be posting more demos of the technology. Amongst which there will be one appliance for the future version of Papervision3D, <a href="http://blog.papervision3d.org/2009/03/16/papervisionx-what-it-is-and-what-it-isnt/" target="_blank"><strong>PapervisionX</strong></a>.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
	</channel>
</rss>
