<?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 &#187; Experimentals</title>
	<atom:link href="http://www.simppa.fi/blog/category/experimentals/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simppa.fi/blog</link>
	<description>minä kaikkeudessa.</description>
	<lastBuildDate>Wed, 11 Jan 2012 11:10:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>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>Throwing salmon into back seat of Lada</title>
		<link>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/</link>
		<comments>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 09:53:10 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[apexvj]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoSpicyParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=1121</guid>
		<description><![CDATA[I got a change to speak for three minutes at Flash on the Beach conference few days ago. I was one of the 20 speakers that got three minutes to show something they&#8217;ve done or discovered or whatever. The lineup was pretty damn hot in this session. One could build a conference around these people [...]]]></description>
			<content:encoded><![CDATA[<div class="block_post_image" ><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/"><img src='http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/SalmonFlyingIntoLadasBackSeat.jpg' alt='SalmonFlyingIntoLadasBackSeat' title='SalmonFlyingIntoLadasBackSeat' width='700' height='377' class='alignnone size-full wp-image-1780' /></a><a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/" class="realtime"><div class="icon"></div><div class="text">Real<br />time</div></a><a class="shadowbox video" href="http://player.vimeo.com/video/34659430?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 got a change to speak for three minutes at <a href="http://www.flashonthebeach.com/" title="Flash on the Beach" target="_blank">Flash on the Beach</a> conference few days ago. I was one of the 20 speakers that got three minutes to show something they&#8217;ve done or discovered or whatever. The lineup was pretty damn hot in this session. One could build a conference around these people easily.</p>
<p>For some forsaken reason I was the last one of 20 to get into stage. So I had to wait 57 minutes behind the curtain. 57 minutes of nail eating, struggling against the pressure in my stomach and desperately meditating to keep my mental in some sort of order. The session it self went pretty well. I didn&#8217;t freeze too much. Hopefully FOTB will release videos from Elevator Pitch so I can see others stuff. They sounded really interesting behind the curtain. </p>
<p>My speech was about APEXvj of course. I&#8217;ll post video of it here if there&#8217;s gonna be one. The APEXvjDesktop is now in version 1.0 and we&#8217;ll move on to new project. We gonna get what we learned from earlier projects and build APEXvjHD with just Stage3D based effects. AWESOME! So related to that I showed this <a href="http://www.simppa.fi/experimental/as3/2011/molehillparticle/salmonflyingintoladasbackseat/" target="_blank">new Molehill experiment</a> at the end of my speech. There are 87 380 particles flying. Movements and rendering are done in GPU so it runs pretty easily in full HD.</p>
<p>Here are songs that I used in my session:<br />
 &#8211; <a href="http://www.apexvj.com/sc/?89930614" target="_blank">Ellie Goulding &#8211; Lights (Bassnectar Remix) by Bassnectar</a><br />
 &#8211; <a href="http://soundcloud.com/blumarten/blu-mar-ten-vs-erykah-badu-you-got-me-remix" target="_blank">Blu Mar Ten vs Erykah Badu &#8211; You Got Me Remix</a><br />
 &#8211; <a href="http://soundcloud.com/weareoliver/i-need-you" target="_blank">Oliver &#8211; I Need You</a></p>
<p>It was brilliant to meet so many web friends in real life. There are risks involved in these geeks + beer situations. No, it&#8217;s not that it&#8217;s only talking about coding.. ohh no, not at all. I spent several hours with <a href="http://www.derschmale.com/" target="_blank">David Lenaerts</a> talking about how we could throw all sort of fishes in to a car. Concludes are that best fish for this job is Salmon and old Lada has simply best back seat for this sort of sport. &#8220;You know what happens when shit hits the fan? -Fish hits the van&#8221;. I also witnessed chicken and ninja moves by party-<a href=" http://twitter.com/#!/nicoptere" target="_blank">@nicoptere</a> and learned some really kinky drinking games from <a href="http://twitter.com/#!/grapefrukt" target="_blank">@grapefrukt</a>. We also solved <a href="http://twitter.com/#!/jlansimaki/status/114097562276986880" target="_blank">the mathematics behind Joshua Davis&#8217;s talk</a>.</p>
<p>So it goes without saying that FOTB was simply epic experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/throwing-salmon-into-back-seat-of-lada/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°74 RaySlime</title>
		<link>http://www.simppa.fi/blog/rayslime/</link>
		<comments>http://www.simppa.fi/blog/rayslime/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 19:42:25 +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[pixelbender]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=914</guid>
		<description><![CDATA[I wanted to post these &#8216;oldies&#8217; to get them into my gallery. They are raytraced balls and some slimy turds in 1&#215;1 pixels with decent framerate. I used Pixel Bender to create them. I haven&#8217;t done much experimenting because of two reasons. 1. I&#8217;ve been coding a lot of Objective-C lately. It felt easier to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simppa.fi/experimental/as3/2010/raytracing/rayslime/"><img src="http://www.simppa.fi/experimental/as3/2010/raytracing/rayslime/screenshot.png" alt="RaySlime" /></a><br />
<a href="http://www.simppa.fi/experimental/as3/2010/raytracing/1024x576/"><img src="http://www.simppa.fi/experimental/as3/2010/raytracing/1024x576/screenshot.png" alt="RayTracing" /></a></p>
<p>I wanted to post these &#8216;oldies&#8217; to get them into my gallery. They are raytraced balls and some slimy turds in 1&#215;1 pixels with decent framerate. I used Pixel Bender to create them. I haven&#8217;t done much experimenting because of two reasons. </p>
<p>1. I&#8217;ve been coding a lot of Objective-C lately. It felt easier to return coding with whole different language. It&#8217;s still sometimes a bit frustrating to code AS3. I do typos for example with &#8216;<>&#8216;-marks and with some sort-cuts but when it comes to iPhone SDK I learned new way of typing. I also want to point out that the development tools of Apple are excellent. I should get my first App out very soon.</p>
<p>2. I joined the <a href="http://away3d.com/">Away3D group</a> to help them with new extremely secret project. I have nothing more to say about that yet :)</p>
<p>Lastly here are few Pixel Bender tricks for you:</p>
<p>How to create a loop in Pixel Bender?<br />
 &#8211; With help of clever brains of <a href="http://twitter.com/#!/MrKishi">@MrKishi</a> = <a href="http://www.simppa.fi/source/LoopMacros2.pbk">http://www.simppa.fi/source/LoopMacros2.pbk</a></p>
<p>How to make your #define&#8217;s readable?<br />
- with &#8220;\&#8221;-mark</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co2">#define method(param) foo += param; \</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foo <span class="sy0">*</span>= bar; \<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foo -= foo<span class="sy0">*</span><span class="nu0">0.1</span>;</div>
</div>
<p>And apparently you can do like this:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co2">#define col(b) float4(1.0, 1.0, b, 1.0);</span></p>
<p><span class="kw3">void</span><br />
evaluatePixel<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; dst = col<span class="br0">&#40;</span>0.5<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/rayslime/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°73 2k Something</title>
		<link>http://www.simppa.fi/blog/2k-something/</link>
		<comments>http://www.simppa.fi/blog/2k-something/#comments</comments>
		<pubDate>Thu, 13 May 2010 10:02:37 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pixelbender]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=857</guid>
		<description><![CDATA[click on them to view in full screen. I&#8217;m experimenting what can be done in 2kb with flash. The Scion was also one of those tryouts. I use Pixel Bender here and it seems to be the best tool for low bytes works. Here are couple of things I figured out while playing. You don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simppa.fi/experimental/as3/2010/2k/jump1/"><img src="http://www.simppa.fi/experimental/as3/2010/2k/jump1/screenshot.png" alt="JumpOne" /></a><br />
<a href="http://www.simppa.fi/experimental/as3/2010/2k/rounditgoes/"><img src="http://www.simppa.fi/experimental/as3/2010/2k/rounditgoes/screenshot.png" alt="RoundItGoes" /></a><br />
click on them to view in full screen.</p>
<p>I&#8217;m experimenting what can be done in 2kb with flash. <a href="http://www.simppa.fi/blog/scion/">The Scion</a> was also one of those tryouts. I use Pixel Bender here and it seems to be the best tool for low bytes works. Here are couple of things I figured out while playing. </p>
<p>You don&#8217;t need to setup the default values. Following works just fine.</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">parameter float z;</div>
</div>
<p>Also the metadata can be written like this:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="sy0">&lt;</span>languageVersion:<span class="nu0">1.0</span>;<span class="sy0">&gt;</span><br />
kernel a <span class="sy0">&lt;</span>namespace:<span class="st0">&quot;&quot;</span>;vendor:<span class="st0">&quot;&quot;</span>;version:<span class="nu0">1</span>;description:<span class="st0">&quot;&quot;</span>;<span class="sy0">&gt;</span></div>
</div>
<p>The fastes way to calculate distance between two points in PB:</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;">float2 point0 = float2<span class="br0">&#40;</span>0.0,0.0<span class="br0">&#41;</span>;<br />
float2 point1 = float2<span class="br0">&#40;</span>1.0,1.0<span class="br0">&#41;</span>;<br />
float d = <span class="kw3">length</span><span class="br0">&#40;</span>point0-point1<span class="br0">&#41;</span>; <span class="co1">//not accurate but useful enough</span></div>
</div>
<p>I&#8217;m not quite sure about this but it seems to me that it&#8217;s much faster to calculate sin(), cos(), atan() values in Flash then in PB. :) So avoid calculating same math for each pixel. </p>
<p>If someone knows more tricks please share.</p>
<p>*** [update 2010-05-14] ***</p>
<p>Here&#8217;s how to create a class function (sort of..)</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co2">#define calculate_something(pixel,x) pixel.r = 1.0/(x*.01);</span></p>
<p><span class="kw3">void</span> evaluatePixel<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
float2 p = outCoord<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
calculate_something<span class="br0">&#40;</span>outpixel,p.<span class="me1">x</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
</div>
<p>Here&#8217;s the way to do a loop in Pixel Bender</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co2">#define loop(res, i) res *= i;</span></p>
<p><span class="kw3">void</span> evaluatePixel<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
float myColor = <span class="nu0">1.0</span>;<br />
loop<span class="br0">&#40;</span>myColor, 0.5<span class="br0">&#41;</span>; <span class="co1">//myColor = 0.5</span><br />
loop<span class="br0">&#40;</span>myColor, 0.5<span class="br0">&#41;</span>; <span class="co1">//myColor = 0.25</span><br />
loop<span class="br0">&#40;</span>myColor, 0.5<span class="br0">&#41;</span>; <span class="co1">//myColor = &#8230;so on.</span><br />
loop<span class="br0">&#40;</span>myColor, 0.5<span class="br0">&#41;</span>;<br />
loop<span class="br0">&#40;</span>myColor, 0.5<span class="br0">&#41;</span>;<br />
outpixel = float3<span class="br0">&#40;</span>myColor,0.0,0.0<span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/2k-something/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°72 Scion</title>
		<link>http://www.simppa.fi/blog/scion/</link>
		<comments>http://www.simppa.fi/blog/scion/#comments</comments>
		<pubDate>Mon, 03 May 2010 17:07:56 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=853</guid>
		<description><![CDATA[My sister just had her first child and I&#8217;m reading Darwin.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simppa.fi/experimental/as3/2010/scion/"><img src="http://www.simppa.fi/experimental/as3/2010/scion/screenshot.png" alt="Scion" /></a><br />
My sister just had her first child and I&#8217;m reading Darwin. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/scion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Laboratory output n°71 ParticleYou</title>
		<link>http://www.simppa.fi/blog/particleyou/</link>
		<comments>http://www.simppa.fi/blog/particleyou/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 06:29:12 +0000</pubDate>
		<dc:creator>simo</dc:creator>
				<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[evoCunningParticleEngine]]></category>
		<category><![CDATA[Experimentals]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.simppa.fi/blog/?p=844</guid>
		<description><![CDATA[Your webcam in depth. Black at back white at front. Works best in a bit darker room.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.simppa.fi/experimental/as3/2010/particleyou/"><img src="http://www.simppa.fi/experimental/as3/2010/particleyou/screenshot.png" alt="ParticleYou" /></a><br />
Your webcam in depth. Black at back white at front.</p>
<p><a href="http://www.simppa.fi/experimental/as3/2010/littlegreenmen/"><img src="http://www.simppa.fi/experimental/as3/2010/littlegreenmen/screenshot.png" alt="LittleGreenMen" /></a><br />
Works best in a bit darker room.</p>
<p><a href="http://www.simppa.fi/experimental/as3/2010/goldenwave/"><img src="http://www.simppa.fi/experimental/as3/2010/goldenwave/screenshot.png" alt="GoldenWave" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simppa.fi/blog/particleyou/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

