<?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>simppa.fi/blog</title>
	<atom:link href="http://www.simppa.fi/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simppa.fi/blog</link>
	<description>minä kaikkeudessa.</description>
	<lastBuildDate>Wed, 18 Apr 2012 09:11:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Design, observations from mistakes and reasons</title>
		<link>http://www.simppa.fi/blog/design-observations-from-mistakes-and-reasons/</link>
		<comments>http://www.simppa.fi/blog/design-observations-from-mistakes-and-reasons/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 11:09:25 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[air]]></category>
		<category><![CDATA[apexvj]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=2059</guid>
		<description><![CDATA[A couple weeks ago I released mobile version of my project APEXvj to stores. It&#8217;s made with Adobe AIR 3.2 and it works in iOS and Android. Since then I&#8217;ve been collecting feedback, reacting to those and continued to work on get it solid as possible. The first release was in many ways total disaster [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.apexvj.com/mobile/'><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/mobile_release.jpg' alt='' title='mobile_release' width='920' height='377' class='alignnone size-full wp-image-2063' /></a></p>
<p>A couple weeks ago I released mobile version of my project <a href='http://www.apexvj.com/'>APEXvj</a> to stores. It&#8217;s made with Adobe AIR 3.2 and it works in iOS and Android. Since then I&#8217;ve been collecting feedback, reacting to those and continued to work on get it solid as possible. </p>
<p>The first release was in many ways total disaster and in other hand a priceless learning experience. This post will cover that and explain the design of gadget. I would also want to make one point (oh no&#8230;). This post covers many topics so if you find one boring just skip to next. It&#8217;ll also be pretty safe from hardcore coding stuff instead there&#8217;s a lot of pretty pictures :)<br />
<span id="more-2059"></span><br />
<div class="clear"></div><div class="block_imagestack" ><a href='https://play.google.com/store/apps/details?id=air.com.apexvj.mobile'><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/available_playgoogle.jpg' alt='' title='available_playgoogle' width='247' height='167' class='alignnone size-full wp-image-2108' /></a><a href='http://itunes.apple.com/us/app/apexvj/id503525208?ls=1&amp;mt=8'><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/available_appstore.jpg' alt='' title='available_appstore' width='285' height='167' class='alignnone size-full wp-image-2107' /></a></div><div class="clear"></div><br />
<div class="block_title_small" >
		<h2>Epic fail on launch</h2>
	</div><br />
I have two devices. iPhone4 and iPhone3GS. So obviously I started to design to those. Later I got iPad2 from a colleague for testing. I didn&#8217;t have any Android devices until the UI was pretty much done. Later I got Samsung Galaxy 2 II from a colleagues husband. Nice device, but not very good for testing. It&#8217;s extremely fast and screen size vs. resolution is too close to iPhones. Anyway I had a feeling that I should get this out soon as possible and everything pretty much worked so I released apps to AppStore and GooglePlay.  </p>
<p>I heard that first 72 hours is somehow crucial and one should try to get as much traffic as possible during that time. So I sent emails to all APEXvj desktop users who gave permission. There was something like 5500 of them. Also drummed about the release at Twitter and at <a href="http://www.facebook.com/apexvj">APEXvj Facebook page</a> (~8500 dudes). All fine so far.. Then I started to get a lot of emails about the app isn&#8217;t supported on high-end android devices. Like on Galaxy S II that was my test device. :E WTF is this?? After way too much time I found <a href="http://polygeek.com/4265_air-mobile_air-for-android-manifest-settings-for-reqfivewaynav">this post</a> from <a href="https://twitter.com/#!/polyGeek">@polyGeek</a>. And it says: <em>In the -app.xml manifest file there is a setting for uses-configuration android:reqFiveWayNav=”true”. If you leave that set to the default of true then when you put your app in the Android Marketplace it will not show up for people who have a phone without a trackball – most of them.</em> YEAH AUTS!!</p>
<p>Apparently that&#8217;s pretty common newbie mistake. So put this rule deep into your memory: Make sure you have </p>
<div class="codesnip-container" >uses-configuration android:reqFiveWayNav=”false”</div>
<p>in your application description xml.</p>
<p>So if a lot of people sent me email about it didn&#8217;t worked for them it means that it didn&#8217;t work for shit loads of people. There were other issues as well. There are currently 693 Androids were APEXvj should work. This means a lot of different screen sizes and resolutions. I didn&#8217;t have this covered in first release. Not at all. For example layout elements didn&#8217;t adjust to higher resolutions. This caused UI to have too small hit areas and text was way too small. Also for example HTC Sensation has a pretty much same size screen then iPhone but resolution is huge 540&#215;980. Also the touch works differently. Apparently it&#8217;s very sensitive for touches. Not like iOS that &#8216;knows&#8217; when user is touching vs. swiping. This caused a problem where user couldn&#8217;t press any buttons. Fixed it when <a href="https://twitter.com/#!/inspirit">Eugene</a> kindly pointed it out. With more test devices I could have avoided all of this, but like I could buy my self a stack of Androids&#8230;</p>
<p>Everything is now pretty much fixed and if I found more issues I&#8217;ll fix them right away. Updating to GooglePlay takes about an hour. Gladly the iOS version worked pretty well. There the update phase is one week. Good thing it&#8217;s my project so no harm done to others :)<br />
<div class="clear"></div>
	<div  class="block_space" style="height:10px;"></div><br />
<div class="block_title_small" >
		<h2>Returning to graphics design</h2>
	</div><br />
<div class="clear"></div>
	<div  class="block_space" style="height:0px;"></div><br />
I started my digital journey as graphics designer. It was the beginning of 2000. At work I did layouts and flash animations. On my free time I was quite actively creating photoshop pictures. I remember those outstanding <a href="http://en.wikipedia.org/wiki/Flow_(psychology)">flows</a> I had with these pieces. Here are some from that period. They are quite naive, but so was the designer back then :) Anyway they were done for the right reasons. What do I mean about &#8216;right reasons&#8217;? I&#8217;ll get back to that later.<br />
<div class="clear"></div>
	<div  class="block_space" style="height:10px;"></div><br />
<img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/arts_2000.jpg' alt='' title='arts_2000' width='920' height='752' class='alignnone size-full wp-image-2130' /><br />
There are more at <a href="http://www.simppa.fi/cosmos.php" target="_blank">cosmos</a>.<br />
<div class="clear"></div>
	<div  class="block_space" style="height:10px;"></div><br />
When I was at military one &#8216;brother in arms&#8217; thought me a for-loop and I was hooked on coding. I realized that one day I could make those pictures moving. So I focused on coding for many years. At work I always had outstanding graphics designer/AD working with me. I haven&#8217;t done layouts for years. Until this winter I felt need to do that. First I redesigned this blog and now the APEXvj mobile. On APEXvj I cannot take full credit since I used some of the elements originally designed by <a href="http://www.elisanet.fi/janilansimaki/">Jani Länsimäki</a>. Never the less there are also something mine. Also this was new field for me since I have never designed anything into mobile environment. I have coded, but not designed.</p>
<p>UI is a set of playlists that can be changed by swiping. Here are &#8216;this week top 200 from SoundCloud&#8217;- and &#8216;Search&#8217;-view.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens1_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens1_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>Some of the song can be downloaded and they are collected to &#8216;Downloaded&#8217;-playlist. Also user can connect with SoundCloud. This gives ability to set song as favorite.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens2_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens2_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>Once authorization with SoundCloud is done user see their favorite and own songs in separate lists.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens3_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens3_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>Once user tap a song it starts to play. After slight delay view animates down and visualizations start. If user double taps song just starts to play. Song name is replaced with waveform that indicates load and duration. User can change the position of song by tapping the waveform. Currently playing song is written under the prev/play/next + visuals controls.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens4_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens4_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>When song is playing a info-icon is set over the waveform. By pressing that user can read more info about the track, share song, favorite and possibly download it. Download is confirmed with a popup. If user decides to download the progress is shown in popup. This is a performance thing since downloading a song takes a lot of cpu.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens5_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens5_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>User can share a song to twitter or copy url. Copying isn&#8217;t possible with all devices, but better save then sorry. That could be changed after future software updates.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens6_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens6_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>By pressing the shared url user is taken to page that shows song title and user who uploaded it. By pressing the play-button APEXvj application is opened and song is added to  &#8216;Shared to you&#8217;-list. After little delay the song starts to play with visualizations. Delay is here so that user knows what is happening. &#8216;Shared to you&#8217;-list shows 50 latest shared songs. Users can mark songs to their favorite list and download list if feels so.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens7_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens7_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>The position in view row is indicated by dots at top of view. Every list has maximum of 50 tracks shown at one time. After that there&#8217;s a pager where current page is inside large circle. Previous is at left and next at right. Left circle also leads to last page when viewing the first page. This show instantly how many pages are there. User can move to visuals by swiping down or tapping the logo-circle. Android users can kill the application by touching the quit X at top right corner.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens12_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens12_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>User can return to UI by swiping up. This logic is informed in different places. When user tap a visualization view a settings panel opens. User can adjust &#8216;cut frequency&#8217; which is in other words: &#8220;How tight the camera cut phase should be?&#8221; Also user can choose render quality and pick a color scheme.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens8_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens8_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>By default user get two visualizations. Six more can be bought from Eye Candy shop.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens9_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens9_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>In first run user can preview the visualization for 10 seconds. After that preview time is smaller. After preview they are encouraged to buy visuals. Eye Candy Shop has button that opens an in-app purchase dialog. It takes about 5 seconds to buy a visual-pack. After all sort of blood suckers I get about an euro per visual-pack minus taxes.<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens10_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens10_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>I&#8217;m planning on creating more visuals in the future. I think I&#8217;ll have few days break though :)<br />
<div class="clear"></div><div class="block_imagestack" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_left.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens11_a.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_middle.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/device_screens11_b.jpg' alt='' /><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/screen_right.jpg' alt='' /></div><div class="clear"></div></p>
<p>A couple days ago I went to toilet with camera&#8230; nothing like that! I filmed the app in different devices. It would be nice to expand this collection of &#8216;APEXvj running in different devices&#8217;. Anyway here&#8217;s APEXvj in Samsung Galaxy S II.<br />
<div class="clear"></div><div class="block_youtube_id"><iframe  src="http://www.youtube.com/embed/J6ybu5ErTN4?rel=0&amp;hd=1&amp;autoplay=0" width="800" height="450" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div><div class="clear"></div><br />
Sorry about the horrible quality. My camera is not top notch and that noise at background is a washing machine. Anyway here&#8217;s APEXvj in iPhone3GS.<br />
<div class="clear"></div><div class="block_youtube_id"><iframe  src="http://www.youtube.com/embed/t_4g-bD5r1c?rel=0&amp;hd=1&amp;autoplay=0" width="800" height="450" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div><div class="clear"></div><br />
Lastly iPhone4 which is awesome test device since its performance is horrible.<br />
<div class="clear"></div><div class="block_youtube_id"><iframe  src="http://www.youtube.com/embed/DIwvO3RPP2U?rel=0&amp;hd=1&amp;autoplay=0" width="800" height="450" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></div><div class="clear"></div></p>
<p>There it is. If you have more usability issues or some other concerns please let me know so that I can fix them.</p>
<p><div class="clear"></div>
	<div  class="block_space" style="height:10px;"></div><br />
<div class="block_title_small" >
		<h2>What about that thing doing stuff for the right reasons?</h2>
	</div><br />
The scientific fact is that universe where we live in is about 13.7 billion years old and it&#8217;ll continue to be at least next 38 billion years. My life is so extremely small piece of that. So small that it can be called nothing. This fraction of energy can be seen either significant or insignificant. Depends on point of view. In most 99.9999999&#8230;% of cases it&#8217;s insignificant. If I had a more enlightened mind I would consider it also meaningless. With that enlightened mind I could trash my selfish motives, leave all worries behind and just go with the flow. But I can&#8217;t. I don&#8217;t have that sort of mind&#8230; yet. </p>
<p>I want to be free from problems caused by <a href="http://en.wikipedia.org/wiki/Id,_ego_and_super-ego#Ego" target="_blank">ego</a> at some point. Ego causes envy, low self-esteem, fear and leads person to vicious circle of never been enough. It&#8217;s ego doing its stuff when one seeks respect from others. This is all personal growing stuff, but lately I have come to realize that ego might be doing its devious works on my codings. </p>
<p>When I was doing those photoshop pictures there wasn&#8217;t Twitter. I had no place where to show them. I did not measure &#8216;success&#8217; in RT&#8217;s or visitor counts. Did them just for my self. Just started to build something, fall into beautiful flow state where everything was easy, interesting and felt right. Afterward I was like &#8220;whoahh what happened? That was awesome&#8221;. These days I do get flows but I also always check if people RT my posts and even feel a bit sad when there&#8217;s only few of them. Shit. Social media is turning me into a narcissist idiot.</p>
<p>Denying ego issues is part of its scam. If I look back about my latest codings I see some dubious signs like &#8220;Look 1.4 million particles (in other words: Look I have skills to do that!)&#8221;. I have created stunts. That&#8217;s bullshit and not why I want do my stuff. Gladly I open sourced that code so that I don&#8217;t feel like complete douche bag now. Anyway it&#8217;s worrying. </p>
<p>For me the right reason is exploring my inner, learn and enjoy. Wrong reason is to seek for cheers, respect and all stuff coming from outside to feed my ego.</p>
<p>I want to get to right path again. So I think I won&#8217;t be releasing future codings right after I make them. I will wait for a week so that I get bored on them or might not release them at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/design-observations-from-mistakes-and-reasons/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>APEXvj &#8211; the new epoch</title>
		<link>http://www.simppa.fi/blog/apexvj_the_new_epoch/</link>
		<comments>http://www.simppa.fi/blog/apexvj_the_new_epoch/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 15:19:10 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[air]]></category>
		<category><![CDATA[apexvj]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1878</guid>
		<description><![CDATA[Here&#8217;s the first glimpse of the application. Video shown at FITC Amsterdam 2012 at the Adobe Keynote. It shows the first demo version of APEXvj. Very old but contains some of the features of the final apparatus and helps understanding this post. (UPDATE 5.3.2012 The video is longer there :/ ) http://www.youtube.com/watch?v=ZgLbjva4O2o Today I open [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.apexvj.com/mobile/" title="APEXvj on mobile"><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/apexblog_big.jpg' alt='' title='APEXvjMobile' width='920' height='377' class='alignnone size-full wp-image-1841' /></a></p>
<p>Here&#8217;s the first glimpse of the application. Video shown at FITC Amsterdam 2012 at the Adobe Keynote. It shows the first demo version of APEXvj. Very old but contains some of the features of the final apparatus and helps understanding this post. (UPDATE 5.3.2012 The video is longer there :/ )<br />
<del datetime="2012-03-05T10:25:00+00:00">http://www.youtube.com/watch?v=ZgLbjva4O2o</del></p>
<p>Today I open a new chapter in my little quest for synthesize all online music with realtime graphics. The new APEXvj mobile application is waiting for review at AppleStore and Android Market. The App will be free for all. I only ask little fee for extra visuals. Hopefully someone buys them so that I can continue this quest. In this post I&#8217;ll open up the long story behind the development and will share some technical findings and ideas I&#8217;ve came across during the process. Project was epic so will be the post.<br />
<span id="more-1878"></span><br />
<div class="block_title_small" >
		<h2>Chapter 1 - Early childhood education</h2>
	</div><br />
I was invited to Adobe&#8217;s prerelease program very early on. If I remember correct it was early summer 2010. So something like 1.5 years ago. All this Stage3D stuff was more like a glimmer in fathers eye back then. Not so much of a real thing, but we could have learned the basics back then. All the shaders and shit felt like so much work that I couldn&#8217;t get enough stamina out of me to get head around it. I had other projects going on like demo for Assembly, got married and plus to that the day job. Later on that year I did the Disconnected demo with Away3D guys. Obviously we used the Away3D and you don&#8217;t have to learn much graphics card stuff to create pretty pictures with it. Especially when I was surrounded with people who knew everything. </p>
<div class="block_image_text_float_left" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/babypaint4.jpg' alt='' title='babypaint' width='500' height='361' class='alignnone size-full wp-image-1963' /><p>All along it was obvious that I must create a next generation of APEXvj apps in GPU. Finally in Spring 2011 I took from bulls balls and started to dig in. I believe for just a little bit smarter then average people the stage3d API is easy thing to coupe. I'm not one of those. I'm a slow learner and even worse I'm one of those who needs to have fun while learning or it doesn't happen. I went there where I found the most fun; Particles. </p>
<p>It was great learning bench since with those little bastards you'll always navigate very deep at API. When optimizing one must not compromise. So I learned the API and learned how to get the most performance out of it. This phase took me something like 8 months. Obviously I drink beer, play frisbee golf and did other stuff like work in between. Oh and one baby. My son Akseli ;) (not in the picture)</p></div>
<p><div class="clear"></div>
	<div  class="block_space" style="height:0px;"></div><br />
<div class="block_title_small" >
		<h2>Chapter 2 - Missed the train? Take the next one</h2>
	</div><br />
I had a plan that I would create new APEXvj browser in stage3d and release it in first zunami when Adobe come out with the technology. Well I missed that one since I couldn&#8217;t get my skill set strong enough. Gladly they couldn&#8217;t release the Mobile AIR back then ;) So I spent endless hours with those particles and such. Trying different things to find perfect performance solutions. Finally Fall 2011 I felt like I could really do something with this technology. I managed draw a lot of stuff and fast in my iPhone4. </p>
<p>It&#8217;s easy to copy .js lib from web and do as told in tutorial. I need to know how technology smells like in the morning without a makeup before I can master it. And that happens slowly. This goes to all young devs: It is OK to spent months on some minor detail to deeply understand it.</p>
<p>Those conference speakers always say that there&#8217;s time if you want there to be. Well.. this is all bullshit. There isn&#8217;t time. There&#8217;s only you and your sorry ass bending. Weekends are decided to my wife and son, but here&#8217;s my average weekday from past 6 months. </p>
<div class="block_image_text_float_right" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/clock2.jpg' alt='' title='clock' width='300' height='152' class='alignnone size-full wp-image-1956' /><p>1. Baby awakes me up for the last time about 6 clock.<br />
 2. Some coffee and 30 or 45 minutes of personal coding.<br />
 3. To work. 8 hours of coding like a mother fucker. Advertising Jippikayjey﻿ motherfucker stuff.<br />
 4. 30-90 minutes after work personal coding.<br />
 5. Home playing with boy<br />
 6. 20:00 little man goes to sleep.<br />
 7. 20:00 - 24:00 personal coding. </p></div>
<p>If someone wants to build something good they must either risk their finance or hand over they freedom or risk their health or just take time. All of these scenarios have their minuses. Most risk their finance. I don&#8217;t want to do that. I have a mortgage and a little kid. Also I have a feeling that investor will take the freedom eventually. I choose the &#8220;take time&#8221; and make it happen slowly.<br />
<div class="clear"></div>
	<div  class="block_space" style="height:0px;"></div><br />
<div class="block_title_small" >
		<h2>Chapter 3 - Goal is empty. Why not shoot!?</h2>
	</div><div class="clear"></div>
	<div  class="block_space" style="height:0px;"></div><br />
Few weeks ago I sent a demo to Adobe people and they loved it. I received a message that they would show it in their presentations. Like they did in Amsterdam couple days ago. I thought here&#8217;s my shot. So I took some unpaid vacation and finished the application. Yay! After that during nights I&#8217;ve been creating new website for APEXvj, taking million screenshots for different purposes, fooling around with app stores and fine tuning the app. I&#8217;m the most satisfied with the result. </p>
<p>No matter if no-one buys this stuff I learned a LOT. Here are some of it I can share with you. Technical mambo nachos coming up:<br />
<div class="clear"></div>
	<div  class="block_space" style="height:40px;"></div><br />
<div class="block_title_small" >
		<h2>Mobile AIR Performance</h2>
	</div><br />
<div class="block_image_text_float_left" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/particle11.jpg' alt='' title='particle1' width='613' height='306' class='alignnone size-full wp-image-1994' /><p>Adobe Mobile AIR Stage3D is fast. Flash on mobiles have limitations and that's CPU. Also obviously GPU is not even close to desktop performance. But when done right a lot can be achieved. Here's couple things that should be keep in mind when doing particles with Mobile Stage3D. </p>
<p>Important lesson here is to define your playground. What can be done and what should be leave to future for better GPU's. Stuff shown here are just something I thought will ably. I can possible be wrong is some cases.</p></div><br />
<div class="clear"></div>
	<div  class="block_space" style="height:0px;"></div></p>
<p>A) Avoid alpha kill it&#8217;s slow. Do not do the following.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">fragmentSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; <span class="st0">&quot;tex ft0, v1, fs0 &lt;2d,linear&gt; <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Get texture pixel</span><br />
fragmentSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; <span class="st0">&quot;sub ft0, ft0, ft0.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// prepare for alpha kill</span><br />
fragmentSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; <span class="st0">&quot;kil ft0.y <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Alpha Kill red pixels</span><br />
fragmentSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; <span class="st0">&quot;mul ft0, v2, v2 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Add color</span></div>
</div>
<p>Instead use add blend and accept this as your playground. You can even ditch the z-sort in this approach.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">context3d<span class="sy0">.</span>setBlendFactors<span class="br0">&#40;</span>Context3DBlendFactor<span class="sy0">.</span>SOURCE_ALPHA<span class="sy0">,</span> Context3DBlendFactor<span class="sy0">.</span>DESTINATION_ALPHA<span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setBlendFactors<span class="br0">&#40;</span>Context3DBlendFactor<span class="sy0">.</span>SOURCE_ALPHA<span class="sy0">,</span> Context3DBlendFactor<span class="sy0">.</span>ONE_MINUS_SOURCE_ALPHA <span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>fragmentShader <span class="sy0">+</span>= <span class="st0">&quot;tex ft0, v0, fs0 &lt;2d,linear&gt; <span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
fragmentShader <span class="sy0">+</span>= <span class="st0">&quot;mul ft0, ft0, v1 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Add Colors</span></div>
</div>
<p>Don&#8217;t try to face particle planes/triangles against camera. It&#8217;s slow.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;mov vt2, vc[va0.w] <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <br />
vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;m33 vt0.xyz, vt2.xyz, vc13 &nbsp; &nbsp; <span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;mov vt0.w, vt2.w <span class="es0">\n</span>&quot;</span><span class="sy0">;</span><br />
vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;mul vt0.xyz, vt0.xyz, va3.z <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Size of particle</span><br />
vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;add vt0.xyz, vt0.xyz, vt1.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <br />
vertexSource <span class="sy0">+</span>= &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;m44 op, vt0, vc0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// transform and output vertex x,y,z</span></div>
</div>
<p>Simply keep your camera facing planes/triangles enough all the time and do only one matrix calculation in vertex shader. You can rotate z-axel as much a you like though. Accept this as playground. </p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">vertexShader <span class="sy0">+</span>= <span class="st0">&quot;m44 op, vt1, vc0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span></p>
<p>_rotationZ = move <span class="sy0">*</span> <span class="nu0">50</span><span class="sy0">;</span><br />
_rotationY = &nbsp;<a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span class="kw5">Math</span></a><span class="sy0">.</span><span class="kw7">sin</span><span class="br0">&#40;</span>move<span class="br0">&#41;</span> <span class="sy0">*</span> <span class="nu0">25</span><span class="sy0">;</span></div>
</div>
<p>Still no matter what the big challenge in mobile world will always be the big variety of devices. You don&#8217;t want to build against worst case scenario and cannot build against the best case either. If you go middle way you show your ass to every direction. Gladly there&#8217;s a solution for this. Do the trick familiar from post processing. Draw your scene into a texture and render that texture in a plane to screen. You can now set the resolution (quality) of that texture and satisfy all needs. </p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// create the texture</span><br />
<span class="kw2">var</span> <span class="kw7">bitmapData</span><span class="sy0">:</span><a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span class="kw5">BitmapData</span></a> = <span class="kw1">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span class="kw5">BitmapData</span></a><span class="br0">&#40;</span><span class="kw7">quality</span><span class="sy0">,</span> <span class="kw7">quality</span><span class="sy0">,</span> <span class="kw1">false</span><span class="sy0">,</span> 0&#215;000000<span class="br0">&#41;</span><span class="sy0">;</span><br />
postprocess_texture = context3d<span class="sy0">.</span>createTexture<span class="br0">&#40;</span><span class="kw7">bitmapData</span><span class="sy0">.</span><span class="kw7">width</span><span class="sy0">,</span> <span class="kw7">bitmapData</span><span class="sy0">.</span><span class="kw7">height</span><span class="sy0">,</span> Context3DTextureFormat<span class="sy0">.</span>BGRA<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
postprocess_texture<span class="sy0">.</span>uploadFromBitmapData<span class="br0">&#40;</span><span class="kw7">bitmapData</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="co1">// create the plane</span><br />
<span class="kw2">var</span> w<span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a> = <span class="nu0">1</span><span class="sy0">;</span><br />
<span class="kw2">var</span> h<span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a> = <span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
postprocessVertexBuffer = context3d<span class="sy0">.</span>createVertexBuffer<span class="br0">&#40;</span>4<span class="sy0">,</span> 4<span class="br0">&#41;</span><span class="sy0">;</span><br />
postprocessIndexBuffer = context3d<span class="sy0">.</span>createIndexBuffer<span class="br0">&#40;</span>6<span class="br0">&#41;</span><span class="sy0">;</span><br />
postprocessVertexBuffer<span class="sy0">.</span>uploadFromVector<span class="br0">&#40;</span>Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>&nbsp; &nbsp; &nbsp; <span class="sy0">-</span>w<span class="sy0">,</span> <span class="sy0">-</span>h<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w<span class="sy0">,</span> <span class="sy0">-</span>h<span class="sy0">,</span> 1<span class="sy0">,</span> 1<span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w<span class="sy0">,</span> h<span class="sy0">,</span> 1<span class="sy0">,</span> 0<span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sy0">-</span>w<span class="sy0">,</span> h<span class="sy0">,</span> 0<span class="sy0">,</span> 0<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">,</span> 0<span class="sy0">,</span> 4<span class="br0">&#41;</span><span class="sy0">;</span><br />
postprocessIndexBuffer<span class="sy0">.</span>uploadFromVector<span class="br0">&#40;</span>Vector<span class="sy0">.&lt;</span>uint<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>2<span class="sy0">,</span> 1<span class="sy0">,</span> 0<span class="sy0">,</span> 3<span class="sy0">,</span> 2<span class="sy0">,</span> 0<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">,</span> 0<span class="sy0">,</span> 6<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="co1">// in every frame</span><br />
context3d<span class="sy0">.</span><span class="kw7">clear</span> <span class="br0">&#40;</span> bgR<span class="sy0">,</span> bgG<span class="sy0">,</span> bgB<span class="sy0">,</span> 1 <span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setRenderToTexture<span class="br0">&#40;</span>postprocess_texture<span class="sy0">,</span> <span class="kw1">true</span><span class="sy0">,</span> 0<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span><span class="kw7">clear</span><span class="br0">&#40;</span>bgR<span class="sy0">,</span> bgG<span class="sy0">,</span> bgB<span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="coMULTI">/*<br />
Render the magic<br />
*/</span><br />
context3d<span class="sy0">.</span>setRenderToBackBuffer<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setTextureAt<span class="br0">&#40;</span> 0<span class="sy0">,</span> postprocess_texture <span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>drawTriangles<span class="br0">&#40;</span>postprocessIndexBuffer<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>context3d<span class="sy0">.</span>present<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Handling touches is also a performance matter. According to my tests it&#8217;s fastest to disable mouse right from the start and handle mouse events just from stage.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// At the root class simply decide the following</span><br />
<span class="kw1">this</span><span class="sy0">.</span><span class="kw7">mouseEnabled</span> = <span class="kw1">false</span><span class="sy0">;</span><br />
<span class="kw1">this</span><span class="sy0">.</span><span class="kw7">mouseChildren</span> = <span class="kw1">false</span><span class="sy0">;</span></div>
</div>
<p>Seed the final word where ever you think it can be used.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">public</span> final <span class="kw4">class</span> VisualCubesTunnel <span class="kw1">extends</span> AbstractVisual</p>
<p>override <span class="kw1">public</span> final <span class="kw3">function</span> <span class="kw7">render</span><span class="br0">&#40;</span>event<span class="sy0">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span></div>
</div>
<p>Avoid calling functions. No matter how painful it might be. You need to find a way to create stuff without calling methods. For example I have created all visuals so that they take context3d and other stuff from shared class, but in their render method they all do the same basic routines. For example handle camera, post-process rendering and background rendering. It isn&#8217;t the most elegant way to do but performance gain is huge. And my visual engine doesn&#8217;t call visual-classes render function. It changes the ENTER_FRAME event listener.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">public</span> <span class="kw3">function</span> setVisual<span class="br0">&#40;</span><span class="kw7">position</span><span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; currentVisualPosition = <span class="kw7">position</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>currentVisual<span class="br0">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>isPlaying<span class="br0">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">removeEventListener</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="sy0">.</span><span class="kw8">ENTER_FRAME</span><span class="sy0">,</span> currentVisual<span class="sy0">.</span><span class="kw7">render</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; currentVisual<span class="sy0">.</span>deactive<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; currentVisual = visuals<span class="br0">&#91;</span><span class="kw7">position</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; currentVisual<span class="sy0">.</span><span class="kw7">active</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>isPlaying<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">addEventListener</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="sy0">.</span><span class="kw8">ENTER_FRAME</span><span class="sy0">,</span> currentVisual<span class="sy0">.</span><span class="kw7">render</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>APEXvj mobiles UI runs smooth 60fps. This was achieved by following few basic principals. First for all I set </p>
<div class="codesnip-container" >
<div class="xml codesnip" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;depthAndStencil<span class="re2">&gt;</span></span></span>true<span class="sc3"><span class="re1">&lt;/depthAndStencil<span class="re2">&gt;</span></span></span></div>
</div>
<p> in application description xml file. This means that every frame is send to GPU and it require sending render command to stage3d in every frame. So when visual isn&#8217;t running I have a little Clear-class that does just that. </p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">override <span class="kw1">public</span> <span class="kw3">function</span> <span class="kw7">render</span><span class="br0">&#40;</span>event<span class="sy0">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; context3d<span class="sy0">.</span><span class="kw7">clear</span> <span class="br0">&#40;</span> 0<span class="sy0">.</span>047<span class="sy0">,</span> 0<span class="sy0">.</span>047<span class="sy0">,</span> 0<span class="sy0">.</span>047<span class="sy0">,</span> 1 <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; context3d<span class="sy0">.</span>present<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>Also all the scrolling between views are done by sprite.scrollRect. Which is by far the most efficient way to scroll. Plus to that all my content is set cacheAsBitmap = true and like I said before elements don&#8217;t have mouse enabled.</p>
<p>That&#8217;s all about performance at this point. Don&#8217;t worry. Epic post is not quite over yet :D<br />
<div class="clear"></div>
	<div  class="block_space" style="height:40px;"></div><br />
<div class="block_title_small" >
		<h2>Reacting to sound with just leftPeak</h2>
	</div><br />
<div class="block_image_text_float_right" ><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/03/sound1.jpg' alt='' title='sound1' width='613' height='306' class='alignnone size-full wp-image-2027' /><p>In old browser and desktop version of APEXvj I used the Sound.computerSpectrum method a lot. It has a very annoying feature in it. It fails if you have a youtube or other video open in browsers other tab. When people get that error and are asked to close other tabs they in most cases close the APEXvj. I came to a decision that this method cannot be used ever again. Alternative to that is the sound.extract() which is a failure too since it takes too much CPU to calculate FFT.</p></div><br />
So I decided that only method that I could use would be the channel.leftPeak. Which gives me a value (0-1) in every frame telling me how much music is playing in that frame. What can one do with just that? Well it can be used visually in many ways. It can be attached to light brightness. Also it can be attached to how much stuff to show in screen and with it can be infer the intensity of current phase in song.</p>
<p>To check the intensity of a song I add leftPeak value to running variable <em>move</em>. I can now use <em>move</em> for example in rotation. If song has a intensive phase it rolls faster and slower when sound cools down.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw2">var</span> <span class="kw7">leftPeak</span><span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = channel<span class="sy0">.</span><span class="kw7">leftPeak</span><span class="sy0">;</span><br />
move <span class="sy0">+</span>= <span class="kw7">leftPeak</span><span class="sy0">;</span></div>
</div>
<p>If leftPeak value reach a certain peak like 0.6 I could do a flash or something, but this doesn&#8217;t work the same in every possible song. Some songs are quieter and some are extremely intense. So I figured the following method.</p>
<p>I collect peak values from past 10 frames. Calculate the average. Check if the current value is large versus the average. This gives me the information about when song changes dramatically. According to that difference I can do several effects. Like if it&#8217;s big enough I&#8217;ll do a camera cut, a flash or post-process effect.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">averageStorage<span class="sy0">.</span><span class="kw7">shift</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
averageStorage<span class="sy0">.</span><span class="kw7">push</span><span class="br0">&#40;</span><span class="kw7">leftPeak</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw2">var</span> aveVal<span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="nu0">0</span><span class="sy0">;</span><br />
<span class="kw1">for</span><span class="br0">&#40;</span><span class="kw2">var</span> i<span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a> = <span class="nu0">0</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> averageStorageLength<span class="sy0">;</span> i<span class="sy0">++</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; aveVal<span class="sy0">+</span>=averageStorage<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw2">var</span> peakAvarage<span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = aveVal<span class="sy0">/</span>averageStorageLength<span class="sy0">;</span><br />
<span class="kw2">var</span> overaverage<span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="kw7">leftPeak</span> <span class="sy0">-</span> <span class="br0">&#40;</span>peakAvarage<span class="sy0">*</span>1<span class="sy0">.</span>45<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">if</span><span class="br0">&#40;</span>overaverage <span class="sy0">&gt;</span> agressive <span class="sy0">&amp;&amp;</span> <span class="kw7">time</span> <span class="sy0">&gt;</span> changetime <span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="coMULTI">/*<br />
do the magic<br />
*/</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>This simple but clever method gives me a perfect music video type of cuts in visuals for every type of songs. I think I&#8217;ll do all my cuts in future demos this way. :) I was so overwhelm happy when I figured this out! That point where I know when song has a peak can be used so many ways. For example in some effects I check how long it took from last peak and use that value to determine how strong the shown effect will be.</p>
<p>Anyway a lot can be done with just leftPeak and best thing about it is that it works everywhere every time. Takes zero CPU and smells like Swedish designers (good and expensive).</p>
<p>OK that&#8217;s it. Hopefully you find something interesting from this exhausting post. The next one will be the grand release post. The approval process probably won&#8217;t take more then six months :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/apexvj_the_new_epoch/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Redesign for happy new year</title>
		<link>http://www.simppa.fi/blog/redisgn-for-happy-new-year/</link>
		<comments>http://www.simppa.fi/blog/redisgn-for-happy-new-year/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 16:38:06 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Olipa kerran]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1840</guid>
		<description><![CDATA[After six years of experimenting I decided to capture all the effects and demos into video format. This way first world snobs with smartphones and tablets can view my stuff too. Site is made in flash-killer-HTML5 and it even has some flash-terminator-CSS3 stuff on it. It&#8217;s build upon WordPress and involves technologies such as php, [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.simppa.fi/blog/wp-content/uploads/2012/01/redesign4.jpg' alt='' title='redesign' width='920' height='377' class='alignnone size-full wp-image-1841' /><br />
After six years of experimenting I decided to capture all the effects and demos into video format. This way first world snobs with smartphones and tablets can view my stuff too. Site is made in flash-killer-HTML5 and it even has some flash-terminator-CSS3 stuff on it. It&#8217;s build upon WordPress and involves technologies such as php, mysql, javascript and <a href="http://lesscss.org/">less</a>. </p>
<p>The content is mostly Flash which is coded in ActionScript 3, Pixel Bender and AGAL. Used Chrome, Firefox and mainly Safari for developing and testing. Photoshop for layout and Flash IDE for vector graphics plus some Illustrator. Screenium for video capturing and Media Encoder for compressing. Videos are streamed from vimeo.com and fonts from Google. I used Coda for html/css/js/php coding, Sequel Pro for database and <a href="http://fdt.powerflasher.com/" target="_blank">FDT5</a> for AS.</p>
<p>Buzzword kids can try to categories that. :) Probably no need to point out more&#8230;</p>
<p>Anyway, you can jump between posts with arrow keys and view all flash stuff in HD video. I do recommend that you view them in realtime if you got device with flash player. They are much faster, sharper and small in file size that way.</p>
<p>Now that this project is done I&#8217;ll move on to next one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/redisgn-for-happy-new-year/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing open source evoSpicyParticleEngine</title>
		<link>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/</link>
		<comments>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 16:25:05 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1314</guid>
		<description><![CDATA[In this post I&#8217;m going to explain some of my findings when playing around with Adobe&#8217;s Stage3D and particles. I have pushed the current version of particle engine called evoSpicyParticleEngine into GitHub, will show some examples how to play with it and explain tricks used in it. &#8230; but first I want to joyously announcing [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.simppa.fi/blog/wp-content/uploads/2011/11/evospicyparticleengine1.jpg' alt='' title='evospicyparticleengine' width='920' height='377' class='alignnone size-full wp-image-1787' /></p>
<p>In this post I&#8217;m going to explain some of my findings when playing around with Adobe&#8217;s Stage3D and particles. I have pushed the current version of particle engine called evoSpicyParticleEngine into GitHub, will show some examples how to play with it and explain tricks used in it.<br />
<span id="more-1314"></span><br />
&#8230; but first I want to joyously announcing that I do not owe you shit. Nor does anyone else that open source stuff or release what ever. So if you don&#8217;t like the syntax or what ever don&#8217;t pressure me with feature requests. Get involved by forking my codes.</p>
<p>We are the most spoiled generation ever. The notorious West. At that nanosecond everything isn&#8217;t absolutely perfect we start to whine like children. One can just wonder how complaining when train schedule fails for 10 minutes sounds from majority perspective. (including those four billion people that live under $2.50 a day)<br />
How utterly ridiculous it is to whine when some extremely sophisticated technology fails to work at that precious moment one felt like using it? (e.g. Internet)<br />
Or how about whining when some refugee that came four months ago from country middle of oil war fails to pronounce the pizza delivery right?</p>
<p>Here&#8217;s a <a href="http://www.youtube.com/watch?v=8r1CZTLk-Gk" target="_blank">great sort youtube clip</a> from Conan O&#8217;Briens show related to this. </p>
<p>We face this nonsense when perspective is fucked up. Lets say we ditch the whining and preserve efforts.</p>
<p>Here&#8217;s my next effort for our playgrounds wellbeing (no more preaching):</p>
<p><strong>evoSpicyParticleEngine</strong></p>
<p>The idea behind this engine was to be able to render massive amount of moving particles. So this meant some restrictions. For example it only renders full buffers, it renders triangles instead of quads and all particles share some properties.</p>
<p>All this stuff can be find from GitHub. You&#8217;ll get links at the bottom of this gigantic post. Lets take a look from outside. This is how you render basic particles with sphere explosion movement:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// Create engine instance. (Reference to stage, stageIndex = which stage.stage3Ds to use, enableErrorChecking, set f-key as fullscren trigger)</span><br />
spicy = <span class="kw1">new</span> EvoSpicyParticleEngine<span class="br0">&#40;</span><span class="kw7">stage</span><span class="sy0">,</span> 0<span class="sy0">,</span> <span class="kw1">false</span><span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// If context3d failed</span><br />
spicy<span class="sy0">.</span>on3DFailed<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>on3DFailed<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// Get info about users GPU.</span><br />
spicy<span class="sy0">.</span>onGPUInfo<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>onGPUInfo<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// Wait until the engine is ready.</span><br />
spicy<span class="sy0">.</span>onEngineReady<span class="sy0">.</span><span class="kw7">add</span><span class="br0">&#40;</span>onEngineReady<span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>&#8230;</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">private</span> <span class="kw3">function</span> onEngineReady<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Z-Sort particles or not.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setDepthTest<span class="br0">&#40;</span><span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Texture for particles.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setTextureParticle<span class="br0">&#40;</span><span class="kw1">new</span> TextureParticleAlphaKill<span class="br0">&#40;</span>128<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// BlendMode of particles.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setBlendMode<span class="br0">&#40;</span><a href="http://www.google.com/search?q=blendmode%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:blendmode.html"><span class="kw5">BlendMode</span></a><span class="sy0">.</span><span class="kw8">NORMAL</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// How far away particles are rendered</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>zFar = <span class="nu0">30000</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Field Of View</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>fov = <span class="nu0">90</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// count : int (maximum particle count = 1398080), valueClass : IValue (settings for particles. start points, end points, speeds, colors) </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>addParticles<span class="br0">&#40;</span> &nbsp; &nbsp; <span class="nu0">139808</span><span class="sy0">,</span> <span class="co1">// Particle count</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ValueExplosionSphere<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ColorGradient<span class="br0">&#40;</span><span class="br0">&#91;</span>0x3bc1ff<span class="sy0">,</span> 0x84481b<span class="sy0">,</span> 0xFFc1ff<span class="sy0">,</span> 0x3bc1ff<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> &nbsp;<span class="co1">// Start position multipliers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">2500</span><span class="sy0">,</span> <span class="nu0">2500</span><span class="sy0">,</span> <span class="nu0">2500</span><span class="sy0">,</span> <span class="co1">// End position multipliers</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">16</span><span class="sy0">,</span> <span class="co1">// Size of single particle</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">true</span><span class="sy0">,</span> <span class="co1">// Randomize sizes or not</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="co1">// Add random value for individual speed</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// particle renderer. </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> renderer<span class="sy0">:</span>RendererLinear<span class="sy0">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>setRenderer<span class="br0">&#40;</span>renderer = <span class="kw1">new</span> RendererLinear<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> ProgramLinear<span class="br0">&#40;</span>EaseProgram<span class="sy0">.</span><span class="kw8">LINEAR</span><span class="sy0">,</span> <span class="kw1">false</span><span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="co1">// Shaders</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">0.00008</span><span class="sy0">,</span> <span class="co1">// Speed of particles</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="nu0">128</span><span class="sy0">,</span> <span class="co1">// How many particles to rebirth in every frame</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x1e1b17<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// Background color</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Move the start point</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; renderer<span class="sy0">.</span>startPoints<span class="br0">&#91;</span>0<span class="br0">&#93;</span><span class="sy0">.</span><span class="kw7">y</span> = <span class="sy0">-</span><span class="nu0">500</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// add extra start point(s) (renderer.startPoints[1])</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; renderer<span class="sy0">.</span>addStartPoint<span class="br0">&#40;</span><span class="kw1">new</span> StartPoint3D<span class="br0">&#40;</span>0<span class="sy0">,</span> 500<span class="sy0">,</span> 0<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Start rendering</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span><span class="sy0">.</span><span class="kw7">addEventListener</span><span class="br0">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="sy0">.</span><span class="kw8">ENTER_FRAME</span><span class="sy0">,</span> run<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>&#8230;</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw1">private</span> <span class="kw3">function</span> run<span class="br0">&#40;</span>event<span class="sy0">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span class="kw5">Event</span></a><span class="br0">&#41;</span><span class="sy0">:</span><span class="kw1">void</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">time</span><span class="sy0">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span class="kw5">int</span></a> = <span class="kw7">getTimer</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw7">angle</span><span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="kw7">time</span> <span class="sy0">*</span> <span class="sy0">.</span>0001<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> rad<span class="sy0">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span class="kw5">Number</span></a> = <span class="nu0">1000</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span><span class="kw7">x</span> = rad <span class="sy0">*</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span class="kw5">Math</span></a><span class="sy0">.</span><span class="kw7">sin</span><span class="br0">&#40;</span><span class="kw7">angle</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span>z = rad <span class="sy0">*</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span class="kw5">Math</span></a><span class="sy0">.</span><span class="kw7">cos</span><span class="br0">&#40;</span><span class="kw7">angle</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">.</span><span class="kw7">y</span> = <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span>lookAtPoint<span class="br0">&#40;</span>0<span class="sy0">,</span>0<span class="sy0">,</span>0<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span>camera<span class="sy0">.</span>rotationZ = <span class="kw7">time</span> <span class="sy0">*</span> <span class="sy0">.</span>01<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; spicy<span class="sy0">.</span><span class="kw7">render</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>Code above in action<br />
<a href="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticlebasic/"><img src="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticlebasic/screenshot.jpg" alt="SpicyParticleBasic" />SpicyParticleBasic</a>.</p>
<p>Another example that&#8217;s also in GitHub<br />
<a href="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticleblurperlin/"><img src="http://www.simppa.fi/experimental/as3/2011/evospicyparticleengine/spicyparticleblurperlin/screenshot.jpg" alt="SpicyParticleBlurPerlin" />SpicyParticleBlurPerlin</a>.</p>
<p>That looks easy enough?</p>
<p>Lets take a look on some of the tricks.</p>
<p><strong>Single particle</strong><br />
Like I mentioned earlier in this engine particles are triangles. The &#8216;normal&#8217; way would have them in quad that contains two triangles. That takes 4 vertices which is more then 3 and triangle can draw a particle as well.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/11/particletriangle.jpg" alt="" title="particletriangle" width="640" height="200" class="alignnone size-full wp-image-1374" /> </p>
<p>Common sense, huh? ;)</p>
<p><strong>Face particle to camera</strong><br />
This is a trick that I got idea and code examples from <a href="http://jpauclair.net/2011/07/18/massive-3d-particle-system-in-flash-molehill/">blog post</a> by Jean-Philippe Auclair who works at <a href="http://frimastudio.com/">Frima Studio</a>. It&#8217;s a great post about particles. Make sure to read it up if you haven&#8217;t already.<br />
Trick goes like this:</p>
<p>1. Precalculate a single triangle and store it to GPU. Store those register numbers (10,11,12) into individual particle position component (x, y, z, w <- right there).</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="kw2">var</span> <span class="kw7">data</span><span class="sy0">:</span>Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="sy0">-</span>1<span class="sy0">,</span> <span class="sy0">-</span>1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 10<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw7">data</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>0<span class="sy0">,</span> 1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 11<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="kw7">data</span> = Vector<span class="sy0">.&lt;</span>Number<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#91;</span>1<span class="sy0">,</span> <span class="sy0">-</span>1<span class="sy0">,</span> 0<span class="sy0">,</span> 1<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromVector<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 12<span class="sy0">,</span> <span class="kw7">data</span><span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>2. In render method create a matrix that&#8217;s invert from camera matrix and pass it on to GPU</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// CAMERA</span><br />
transformCamera<span class="sy0">.</span><span class="kw7">identity</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span><span class="kw7">position</span> = camera<span class="sy0">.</span><span class="kw7">position</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">if</span><span class="br0">&#40;</span>camera<span class="sy0">.</span>_doLookAt<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; transformCamera<span class="sy0">.</span>pointAt<span class="br0">&#40;</span>camera<span class="sy0">.</span>_renderLookAt<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Z_AXIS<span class="sy0">,</span> _up<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; camera<span class="sy0">.</span>_doLookAt = <span class="kw1">false</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationX<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Y_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationY<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Y_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformCamera<span class="sy0">.</span>prependRotation<span class="br0">&#40;</span>camera<span class="sy0">.</span>rotationZ<span class="sy0">,</span> Vector3D<span class="sy0">.</span>Z_AXIS<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
transformCamera<span class="sy0">.</span>copyToMatrix3D<span class="br0">&#40;</span>transformParticle<span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;<span class="co1">// Copy camera matrix</span><br />
transformCamera<span class="sy0">.</span><span class="kw7">invert</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// Invert camera</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="co1">// MODEL</span><br />
transformModel<span class="sy0">.</span><span class="kw7">identity</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span><span class="kw7">position</span> = <span class="kw1">this</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span>append<span class="br0">&#40;</span>transformCamera<span class="br0">&#41;</span><span class="sy0">;</span><br />
transformModel<span class="sy0">.</span>append<span class="br0">&#40;</span>transformProjection<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
context3d<span class="sy0">.</span>setProgramConstantsFromMatrix<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 0<span class="sy0">,</span> transformModel<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
context3d<span class="sy0">.</span>setProgramConstantsFromMatrix<span class="br0">&#40;</span>Context3DProgramType<span class="sy0">.</span>VERTEX<span class="sy0">,</span> 13<span class="sy0">,</span> transformParticle<span class="sy0">,</span> <span class="kw1">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>3. In vertex shader get position of stored triangle, rotate that with camera invert. Scale it to desired size and transform to world space.</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt2, vc[va0.w] <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// get vertice position from stored triangle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;m33 vt0.xyz, vt2.xyz, vc13 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span>&nbsp; &nbsp; <span class="co1">// rotate vertice with camera invert matrix</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt0.w, vt2.w <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// set proper w value from stored triangle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt0.xyz, vt0.xyz, va3.z <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; <span class="co1">// va3.z = Size of individual particle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt0.xyz, vt0.xyz, vt1.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// set new position for vertice </span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;m44 op, vt0, vc0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// transform and output vertex x,y,z</span></div>
</div>
<p>Tadaa! now it&#8217;s always facing the camera and this trick didn&#8217;t cost a penny.</p>
<p><strong>Moving particles in vertex shader</strong><br />
In AGAL vertex shader we cannot add values to vertices. Like move them a bit in x-axel in every frame. The data isn&#8217;t stored anywhere. All values must be at memory and push to GPU and then it&#8217;s just drawn. Continue movement could be done by storing movement values into a texture but we do not have access to texture in vertex shader. This a challenge and there&#8217;s a trick to get around this: We store start and end point of every vertices. Give a start time value to every particle and send constantly increasing time value to vertex shader. Then simply tween the particle position between those points according to time and start time value.</p>
<p>This way we can &#8216;rebirth&#8217; single particle by setting it&#8217;s start time value to current time value.<br />
This is how it looks like in AGAL:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;">agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mov vt1, va0 <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// vertex</span><br />
<span class="co1">// va3 = individual component for every particle</span><br />
<span class="co1">// va3.x = starttime</span><br />
<span class="co1">// va3.y = speed multiplier</span><br />
<span class="co1">// va3.z = size of particle</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;sub vt3.x, vc4.x, va3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// time &#8211; start time</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt3.x, vt3.x, va3.y <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// multiply time with move.y (to get individual speed)</span><br />
<span class="co1">// LINEAR MOVEMENT</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;sub vt6.xyz, va4.xyz, vt1.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// b &#8211; a</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt7.xyz, vt6.xyz, vt3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; <span class="co1">// movement</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt1.xyz, vt1.xyz, vt7.xyz <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> <span class="co1">// add move</span></div>
</div>
<p>And that&#8217;s how we can move <a href="http://www.simppa.fi/blog/1_point_4_million_particles/" target="_blank">1.4 million particles in flash</a>.</p>
<p><strong>Manipulate the movement</strong><br />
AGAL is not limiting language. (except that &#8216;no access to texture&#8217;-thing) It has a stack of mathematical functions. With those a lot is possible. Here&#8217;s how particle movement is eased in exponential fashion:</p>
<div class="codesnip-container" >
<div class="actionscript3 codesnip" style="font-family:monospace;"><span class="co1">// EXPO OUT</span><br />
<span class="co1">// &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; c * (-Math.pow(2, -10 * t/d) + 1) + b;</span><br />
<span class="co1">// where &nbsp; &nbsp; &nbsp; &nbsp;t = time; b = 0; c = 1; d = 1;</span><br />
<span class="co1">// so it&#8217;s &nbsp; &nbsp; &nbsp;1 * (-Math.pow(2, -10 * time/1) + 1) + 0;</span><br />
<span class="co1">// and &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; -Math.pow(2, -10 * time) + 1;</span><br />
<span class="co1">//________________________________________________________________</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;mul vt6.x, vc5.z, vt3.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// -10 * vt3.x</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;pow vt7.x, vc5.w, vt6.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// Math.pow(2, vt6)</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;neg vt7.x, vt7.x <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// -Math.pow(2, vt6)</span><br />
agalVertexSource <span class="sy0">+</span>= <span class="st0">&quot;add vt3.x, vt7.x, vc5.y <span class="es0">\n</span>&quot;</span><span class="sy0">;</span> &nbsp; &nbsp; &nbsp; <span class="co1">// -Math.pow(2, vt6) + 1</span></div>
</div>
<p><strong>Get your forks polished</strong><br />
 &#8211; <a href="https://github.com/simppafi/evoSpicyParticleEngine">evoSpicyParticleEngine at GitHub</a>. Also check those examples.</p>
<p>Hopefully you learn something from it. You can use it anyway you like. Contributing for its development by forking at GitHub is desirable. I&#8217;m slowly developing it more as time goes by. Post process filters, background and overlays are on table. Ohh and lights of course. All those are actually in my classes commented out waiting for polishing.</p>
<p>Peace and love, Simo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/introducing-open-source-evospicyparticleengine/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°80 1.4 Million particles</title>
		<link>http://www.simppa.fi/blog/1_point_4_million_particles/</link>
		<comments>http://www.simppa.fi/blog/1_point_4_million_particles/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 14:54:37 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1266</guid>
		<description><![CDATA[That&#8217;s 200 000 particle version. That might run on your browser. So like I&#8217;ve written on this blog my particle engine can move large amount of particles from A to B and I can do custom tweening algorithms for that transition. Great&#8230; what then. I realized that using perlin noise for setting the B positions [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/heartofglass.jpg' alt='HeartOfGlass' title='HeartOfGlass' width='700' height='377' class='alignnone size-full wp-image-1754' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/heart_of_glass/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34695881?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>That&#8217;s 200 000 particle version. That might run on your browser. </p>
<p>So like I&#8217;ve written on this blog my particle engine can move large amount of particles from A to B and I can do custom tweening algorithms for that transition. Great&#8230; what then. I realized that using perlin noise for setting the B positions of the particles could turn this thing look quite interesting.<br />
<span id="more-1266"></span><br />
On my OsX toy the difference between flash on browser and standalone is insane. 200 000-300 000 particles is pretty much the maximum until it won&#8217;t run smooth anymore. I wonder if this is memory related thing? or what? Who knows? Someone from Adobe might&#8230; Well anyways. Here&#8217;s the same thing exploding 1.4 million particles in 1920&#215;1200 resolution with smooth 60fps.</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/bU3z0L2zlhA?fs=1&#038;wmode=transparent&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>There are exactly <strong>1 398 080</strong> animated particles. This is the maximum amount since 64 full buffers is the limitation. It surely is enough. All the contrast will disappear because the screen is full of stuff. Still looks pretty darn rad. Especially thinking it&#8217;s Flash and dead and all..</p>
<p>Hopefully some update in the future will unleash this power for flash player in browser too.</p>
<p>&#8212; (UPDATE SOME HOURS LATER) &#8212;<br />
Here&#8217;s a 1.4 million particle demo for you to test. It&#8217;s heavy shit. Be patient. I mean it :D<br />
Also added a standalone version that you can play with your flash standalone player. That will run well in decent machine. (after unoptimized initialization)<br />
 &#8211; <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/1_4_million/">Browser version</a>.<br />
 &#8211; <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/1_4_million/standalone_1_4_million.zip">Standalone version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/1_point_4_million_particles/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°79 SpermOfSibelius</title>
		<link>http://www.simppa.fi/blog/spermofsibelius/</link>
		<comments>http://www.simppa.fi/blog/spermofsibelius/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 21:50:36 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1260</guid>
		<description><![CDATA[Prime Sperm of Sibelius. Music http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra and of course. Abandoned Sperm of Sibelius. Music http://soundcloud.com/yourhips/sibelius These are a bit heavier then last ones. Too bad if you have slow computer and you hate classic music. :/]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/primespermofsibelius.jpg' alt='PrimeSpermOfSibelius' title='PrimeSpermOfSibelius' width='700' height='377' class='alignnone size-full wp-image-1757' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/prime_sperm_of_sibelius/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34678911?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Prime Sperm of Sibelius. Music <a href="http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra">http://soundcloud.com/djlo/sibelius-finlandia-op-26-version-for-male-choir-and-orchestra</a></p>
<p>and of course.</p>
<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/abandonedspermofsibelius.jpg' alt='AbandonedSpermOfSibelius' title='abandonedspermofsibelius' width='700' height='377' class='alignnone size-full wp-image-1761' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/abandoned_sperm_of_sibelius/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34674104?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Abandoned Sperm of Sibelius. Music <a href="http://soundcloud.com/yourhips/sibelius">http://soundcloud.com/yourhips/sibelius</a></p>
<p>These are a bit heavier then last ones. Too bad if you have slow computer and you hate classic music. :/ </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/spermofsibelius/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°78 PyroTechnicsEaseExpo</title>
		<link>http://www.simppa.fi/blog/pyrotechnicseaseexpo/</link>
		<comments>http://www.simppa.fi/blog/pyrotechnicseaseexpo/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 09:47:09 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1250</guid>
		<description><![CDATA[Here&#8217;s how I can &#8216;individually&#8217; move massive amount of particles. 1. Give them start and end point. 2. Tween between those points in vertex shader. 3. Send only time value to vertex shader in every frame. No there&#8217;s no catch. The movement doesn&#8217;t have to be linear. AGAL can do this thing called mathematics and [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/PyroTechnicsExpoOut.jpg' alt='PyroTechnicsExpoOut' title='PyroTechnicsExpoOut' width='700' height='377' class='alignnone size-full wp-image-1766' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoout/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34668708?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>Here&#8217;s how I can &#8216;individually&#8217; move massive amount of particles.<br />
1. Give them start and end point.<br />
2. Tween between those points in vertex shader.<br />
3. Send only time value to vertex shader in every frame. </p>
<p>No there&#8217;s no catch. The movement doesn&#8217;t have to be linear. AGAL can do this thing called mathematics and is quite awesomely fast in it. Familiar easing functions can be rewritten into AGAL. Upper flash is an example use case of <a href="http://robertpenner.com/">Robbie</a>&#8216;s legendary ExpoOut function.</p>
<p>And here&#8217;s example of ExpoIn function.</p>
<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/PyroTechnicsExpoIn.jpg' alt='PyroTechnicsExpoIn' title='PyroTechnicsExpoIn' width='700' height='377' class='alignnone size-full wp-image-1768' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/pyrotechnics/pyrotechnics_expoin/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34666615?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/pyrotechnicseaseexpo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°77 OceanBubbles</title>
		<link>http://www.simppa.fi/blog/oceanbubbles/</link>
		<comments>http://www.simppa.fi/blog/oceanbubbles/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 17:54:59 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1240</guid>
		<description><![CDATA[I&#8217;m working on a new particle engine (evoSpicyParticleEngine). That I&#8217;ll open source when it&#8217;s ready enough. Here&#8217;s some taste of it. There are 200 000 individually moving z-sorted particles. :D I found the browser player a bit slow. Or well.. I know it sounds ridiculous to whine &#8220;it can only run some hundred thousand particles&#8230; [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/oceanbubbles.jpg' alt='OceanBubbles' title='oceanbubbles' width='700' height='377' class='alignnone size-full wp-image-1770' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/ocean_bubbles/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34663046?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>I&#8217;m working on a new particle engine (evoSpicyParticleEngine). That I&#8217;ll open source when it&#8217;s ready enough. Here&#8217;s some taste of it. There are 200 000 individually moving  z-sorted particles. :D</p>
<p>I found the browser player a bit slow. Or well.. I know it sounds ridiculous to whine &#8220;it can only run some hundred thousand particles&#8230; nyyh nyyh&#8221; when we only had few thousand couple months ago. BUT the local standalone player runs way way way faster! On my OSX it can run almost million in full hd resolution. Maybe browsers limit the power or what?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/oceanbubbles/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°76 FourSparklers</title>
		<link>http://www.simppa.fi/blog/foursparklers/</link>
		<comments>http://www.simppa.fi/blog/foursparklers/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 20:43:29 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stage3d]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1223</guid>
		<description><![CDATA[I just checked and yeah&#8230; I had almost a year break from releasing experiments. The very core content of my blog. What ever. Here&#8217;s another particle experiment. There are 87 380 balls doing their thing. I think this will lead to open source Stage3D particle engine lib and hopefully I end up adding these monsters [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/foursparklers.jpg' alt='FourSparklers' title='foursparklers' width='700' height='377' class='alignnone size-full wp-image-1773' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/foursparklers/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34661606?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>I just checked and yeah&#8230; I had almost a year break from releasing experiments. The very core content of my blog.  What ever. Here&#8217;s another particle experiment. There are 87 380 balls doing their thing. I think this will lead to open source Stage3D particle engine lib and hopefully I end up adding these monsters to Away3D someday soon too.</p>
<p>This isn&#8217;t a perfect system yet and not fully optimized. Anyway.</p>
<p>What this thing does is:<br />
1. Set start and ending points for particle vertices. (2304 in every frame)<br />
2. GPU will tween between those points.<br />
3. Plus all sort of funky stuff with colors and there&#8217;s light at the top of every particle stream. GPU will calculate distances to those and add more value to colors. As you can see.</p>
<p>Anyway that was the plan. In this case it started to behave funny when I adjusted my AGAL codes and the rule explained doesn&#8217;t fully apply anymore. So what I released here is a mistake, but I think it feels and looks great!</p>
<p><a href="http://soundcloud.com/rupert-falsch/emily-in-love-lullaby-rupert-falsch-remix">Here&#8217;s a link to that cool song.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/foursparklers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Sparkle a Moment</title>
		<link>http://www.simppa.fi/blog/sparkle-a-moment/</link>
		<comments>http://www.simppa.fi/blog/sparkle-a-moment/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 10:59:03 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[demoscene]]></category>
		<category><![CDATA[evoTinyEngine]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1143</guid>
		<description><![CDATA[You can watch it now or read this thing first. This post contains spoilers but it might help you to understand demo better. There are several ways to view this demo: 1. The blazing performance and highest quality way (recommended): a) Download the standalone player here. (NOT THE DEBUGGER) b) Download the swf + mp3 [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/demo/sparkle_a_moment/"><img src='http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkleamoment1.jpg' alt='SparkleaMoment' title='sparkleamoment' width='700' height='377' class='alignnone size-full wp-image-1778' /></a><a href="http://www.simppa.fi/demo/sparkle_a_moment/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34696579?autoplay=1&amp;api=1&amp;hd=1&amp;rel=1"><div class="icon"></div><div class="text">Video<br />capture</div></a></div><div class="clear"></div>
<p>You can watch it now or read this thing first. This post contains spoilers but it might help you to understand demo better.</p>
<p>There are several ways to view this demo:</p>
<p>1. The blazing performance and highest quality way (recommended):<br />
 a) <a href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">Download the standalone player here.</a> (NOT THE DEBUGGER)<br />
 b) <a href="http://www.simppa.fi/awaymole/sparkle/sparkle_a_moment_play_local.zip" target="_blank">Download the swf + mp3 here and open it with that player.</a></p>
<p>2. Play in browser. Great quality but not as good in performance.<br />
 a) <a href="http://www.simppa.fi/demo/sparkle_a_moment/" target="_blank">By visiting this link</a></p>
<p>3. Watch the video.<br />
 a) <a href="http://www.youtube.com/watch?v=e7NbwSnaXso&#038;hd=1">HD Video at YouTube</a></p>
<p><strong>Making of &#8216;Sparkle a Moment&#8217; by Away3D Development Team and Evoflash</strong></p>
<p>It was 18th of August when <a href="http://www.infiniteturtles.co.uk/blog/">Rob Bateman</a>, the head man of Away3D framework (the worlds most advanced open source flash 3D engine), sent me an email and asked for a demo for Robbie&#8217;s and <a href="http://twitter.com/#!/richardolsson">Richie</a>&#8216;s session at Adobe MAX 2011. We did <a href="http://www.simppa.fi/blog/making-of-disconnected/">this sort of</a> collaboration with Away3D guys last year. Although it was a insane job I was stoked to burn my self out a bit again for sake of art and passion for this sport.<br />
<span id="more-1143"></span><br />
I introduced an idea, made a little synapsis and created a <a href="http://www.simppa.fi/blog/wp-content/uploads/2011/10/moodboard.jpg" target="_blank">rough mood board</a>.<br />
<a href="http://soundcloud.com/minomus">Minomus</a> made the track for me last Spring for Assembly demo which I never coded so we had that with us from point zero. (a very good thing.)<br />
Here&#8217;s the synapsis:</p>
<p><em>&#8220;Into the endless darkness two light spheres are born. Slowly giving meaning and life to surroundings. In gentle moving light of spheres objects are showing their forms. Objects are symbols of science, history, society, evolution. nature, liquid and time. When a sphere come close to object it&#8217;ll be shown by the light of sphere and can become life. It can start levitate, sparkle, move, glow or break apart. Eventually spheres will light up everything. All is glamorous and flourishing. Suddenly spheres pop into little sparkles and disappear. Everything turn into deep endless darkness again.&#8221;</em></p>
<p>People liked it (or was too busy to dislike it) so I got a green light to do the direction again. <a href="http://www.flashonthebeach.com/" target="_blank">The Flash on the Beach</a> was closing and everybody was way too busy and could not work for demo. We had a little meet up at the conference and could pick up models for the demo. Other then that it was just drinking and fooling around. After all kind of delays we ended up creating this demo in less then two weeks. <a href="http://blog.closier.nl/" target="_blank">Fabrice Closier</a> and Richard Olsson was working with 3D models and <a href="http://www.ringo.nl/" target="_blank">Ringo Blanken</a> did examples of physics. <a href="http://www.derschmale.com/" target="_blank">David Lenaerts</a> committed a stack of his special effects and went to vacation. I tried to get things together. Worked epic hours with camera cuts, setup elements and desperately struggled to get something to screen so we could move on. Once we got things rolling the process was smooth as nylon. With this kind of abstract idea it&#8217;s very important to get something done and move on from there. It took a lot of everybody&#8217;s faith to get demo in state that it started to make at least some sort of sense. I&#8217;m quite sure it won&#8217;t make sense to most of the viewers after all, but at least we got it done!</p>
<p>Here are screenshots of scenes and some comments about them:</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_01.jpg" alt="" title="sparkle_a_moment_01" width="605" height="342" class="alignnone size-full wp-image-1144" /><br />
Sparkles are born in to darkness. Cold and warm light. You know&#8230; Symbols of Yin and yang, thermodynamics, sweet and bitter, life and death&#8230; all that kind of shit. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_02.jpg" alt="" title="sparkle_a_moment_02" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
A clock. And cogs. Symbols of time obviously, but also progress. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_03.jpg" alt="" title="sparkle_a_moment_03" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Eagle. Is a historical symbol of strength, courage, farsightedness and immortality. It is considered to be the king of the air and the messenger of the highest Gods. This is obviously nonsense as we&#8217;ll witness in near future where everything eventually vanish. (talking about the demo not 2012&#8230;) Eagle is also an animal and represents the Animalia.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_04.jpg" alt="" title="sparkle_a_moment_04" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We dive under water and what we find? no.. it&#8217;s not salmon. It&#8217;s tuna and David&#8217;s awesome realtime mirror ball. Fish is of course part of Animalia, but also very important symbol in various of religions.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_06.jpg" alt="" title="sparkle_a_moment_06" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Lunar eclipse is here to remind us of cycling nature of world. As a symbol it&#8217;s very important in all sort of nonsenses like astrology. It also looked nice with radial blur. </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_08.jpg" alt="" title="sparkle_a_moment_08" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
The train leads us to humans and society. It&#8217;s developing extremely fast. The technological progress seems invincible. It slithers through all obstacles.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_09.jpg" alt="" title="sparkle_a_moment_09" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We&#8217;ll move on to military tanks. While band plays ironic smooth jazz they drive in perfect formation. Firmly and certainly jumping off the cliff and form pile of junk.  </p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_10.jpg" alt="" title="sparkle_a_moment_10" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
We follow sparks and see Hercules, the demigod, the son of Zeus at the bottom of highest stone pole. Eventually he will fall.</p>
<p><img src="http://www.simppa.fi/blog/wp-content/uploads/2011/10/sparkle_a_moment_12.jpg" alt="" title="sparkle_a_moment_10" width="605" height="342" class="alignnone size-full wp-image-1145" /><br />
Demogod now fall into pile of stones. Gravity fade down. Sparkles vanish and void darkness continues.</p>
<p>Simply put demo is about lifespan. It&#8217;s constant property that everything has.</p>
<p>I&#8217;ve been mostly listening to these records during past two weeks while doing demo:<br />
<a href="http://open.spotify.com/album/0hvxqdv8Bg6BXIbTQFr2Sd" target="_blank">Tori Amos &#8211; Night of Hunters</a> and <a href="http://open.spotify.com/album/2JMPfwD9sExl3gzIZd9Bpk" target="_blank">Ladytron &#8211; Gravity The Seducer</a><br />
They might explain this madness a bit.</p>
<p>Big hugs to Away3D guys Rob, Richard, David and especially to Fabrice and Ringo who did a lot of work and had solution to all problems we faced during this process.</p>
<p>Ahh it feels good to have GPU support in Flash at last! Until next time&#8230;</p>
<p>Ohh and <a href="http://tv.adobe.com/watch/max-2011-develop/flash-and-3d-start-your-engines/">here&#8217;s guys shared session with Flare3D guys at Adobe MAX.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/sparkle-a-moment/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

