<?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>Zach Archer Blog &#187; Flash</title>
	<atom:link href="http://blog.zacharcher.com/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zacharcher.com</link>
	<description>This blog is GO!</description>
	<lastBuildDate>Fri, 09 Jul 2010 23:02:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Aquatic Sound Generator in Flash</title>
		<link>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/</link>
		<comments>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 18:07:48 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Synth]]></category>
		<category><![CDATA[aquasound]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[formant]]></category>
		<category><![CDATA[fs1r]]></category>
		<category><![CDATA[generative]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=219</guid>
		<description><![CDATA[Here's something from the vaults. Aquasound was built with these requirements in mind: Generate sounds that aquatic animals might make Sounds can be "combined" somehow Sounds can emote This was never used in production. I wonder if I could turn this into something? Like a paid iPhone app? ;) Double-click the envelopes to add/remove control [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zacharcher.com/lab/aquasound/aquasound.swf"><img class="aligncenter" title="Aquasound" src="http://zacharcher.com/lab/aquasound/aquasound_pic.png" alt="" width="432" height="405" /></a></p>
<p>Here's something from the vaults. Aquasound was built with these requirements in mind:</p>
<ul>
<li>Generate sounds that aquatic animals might make</li>
<li>Sounds can be "combined" somehow</li>
<li>Sounds can emote</li>
</ul>
<p>This was never used in production. I wonder if I could turn this into something? Like a paid iPhone app? ;)</p>
<p>Double-click the envelopes to add/remove control points. Drag lines up &amp; down to change their curviture. The best feature is the "Combine With" dropdown, which splices the current sound with your selection. Also the "Emote" menu will play sounds with different expression.</p>
<p>The audio algorithm is reverse-engineered from <a href="http://blog.zacharcher.com/2009/01/05/synth-review-the-head-exploding-fs1r/">my beloved FS1R</a>. I generated formants in two ways (toggle the "Tonal" checkbox to hear both), the "atonal" version is closer to ring modulation than actual formants. It's more fun if you don't understand what the controls are doing, but if you insist: Pitch controls the overall pitch of the sound. Freq controls the center frequency of the formant (like a bandpass filter). LFOFreq and LFOWeight control a low-frequency sine wave, which can be applied to other controls via their "___LFOAmt" curves. Amp is amplitude, Width is formant width (think: width of the bandpass filter), Skirt adds distortion. Each voice has two formant generators, check "Formant Active" to enable them.</p>
<p>May all your bloops and crackles be happy ones!</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;title=Aquatic Sound Generator in Flash' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;title=Aquatic Sound Generator in Flash' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;title=Aquatic Sound Generator in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Aquatic Sound Generator in Flash+http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Aquatic Sound Generator in Flash&amp;uri=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash 3D: A change of heart?</title>
		<link>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/</link>
		<comments>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:31:40 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=173</guid>
		<description><![CDATA[Yesterday, I posted a damning critique of Flash's native 3D. Today I noticed that if you right-click on yesterday's SWF and show the redraw regions, you can see that it's redrawing the contents of the entire stage, even though I put the scene in a scrollRect. Is it seriously rendering a scene that's thousands of [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I posted <a href="http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/">a damning critique of Flash's native 3D</a>.</p>
<p>Today I noticed that if you right-click on <a href="http://zacharcher.com/lab/20090831_3d/09b_touch_to_glow.swf">yesterday's SWF</a> and show the redraw regions, you can see that it's redrawing the contents of the entire stage, even though I put the scene in a scrollRect. Is it seriously rendering a scene that's thousands of pixels wide before displaying it ?!?!?!? Oh, no. No they DIDN'T.</p>
<p>Today I ported the scene to the <a href="http://away3d.com/">Away3D</a> rendering engine. Here's the result:</p>
<p style="text-align: center;"><a href="http://zacharcher.com/lab/20090831_3d/10_away3d_follow.swf"><img class="aligncenter" title="Away3D screenshot" src="http://zacharcher.com/lab/20090831_3d/p/10_screenshot.png" alt="" width="453" height="339" /></a></p>
<p>It's beautiful, and provides access to low-level drawing routines, light sources, normal maps, ... It was speedy at first, then slowed down considerably when I added the glowing floors. (Each glow is 16+ triangles right now, for various reasons including: I can't render objects in my own custom order.) This makes <a href="http://zacharcher.com/lab/20090831_3d/09test.html">yesterday's version look performant</a>, I'm reluctant to admit.</p>
<p>Possible next steps:</p>
<ul>
<li>Reduce the native 3D rendering area, see if performance improves?</li>
<li>Grow beyond Flash, embrace the future and try <a href="http://unity3d.com/">Unity 3D</a>?</li>
<li>Dump this project, finish that iPhone game I started, make a million dollars in 2 weeks?</li>
</ul>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;title=Flash 3D: A change of heart?' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;title=Flash 3D: A change of heart?' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;title=Flash 3D: A change of heart?' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Flash 3D: A change of heart?+http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Flash 3D: A change of heart?&amp;uri=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash 3D makes me sad</title>
		<link>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/</link>
		<comments>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 11:43:05 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[3d]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=164</guid>
		<description><![CDATA[I've been dabbling with Flash 10's native 3D support. Try my engine: Click to set the focus. Use the arrow keys to move. Touch blocks to illuminate. I'm disappointed with two things: 1). How much time is required to create a 3D engine, even a grid-based one like mine. I've been wrestling this project for [...]]]></description>
			<content:encoded><![CDATA[<p>I've been dabbling with Flash 10's native 3D support. Try my engine:</p>
<p><a href="http://zacharcher.com/lab/20090831_3d/09b_touch_to_glow.swf"><img class="aligncenter" title="Blue LEDs" src="http://zacharcher.com/lab/20090831_3d/p/09_screenshot.png" alt="" width="428" height="324" /></a></p>
<p>Click to set the focus. Use the arrow keys to move. Touch blocks to illuminate.</p>
<p>I'm disappointed with two things:</p>
<p>1). How much time is required to create a 3D engine, even a grid-based one like mine. I've been wrestling this project for 4+ hours every day, for a week. I feel like I must be lagging behind, but there are ten thousand things that will go wrong when developing in 3D. The paradigm is uniquely punishing, there are always edge cases where some polygons aren't drawn correctly. This project hasn't been a joy.</p>
<p>Also:</p>
<p>2). <strong>Flash's native 3D is not suited for a high-performance application like this one.</strong> It would be fine if I was only spinning a few DisplayObjects in space. However, the scene above displays up to 125 Bitmaps simultaneously. (Light all 25 bulbs (3 Bitmaps each), stand in the corner facing them, and the 25-segment walls.) 125 Bitmaps would be child's play in OpenGL. But after you light a few blocks, Flash Player chokes pretty hard.</p>
<p><a href="http://zacharcher.com/lab/20090831_3d/09c_glow_blendmode.swf">Here's another version that uses a BlendMode on the lightbulbs</a>. It looks great, but its performance is even less acceptable.</p>
<p><a href="http://zacharcher.com/lab/20090831_3d/02.swf">Here's an early version that uses my own 3D computations, and the Graphics API</a>. Also it has a limited field of view, which I widened for the latest builds. The performance is surprisingly high. I abandoned my custom 3D <a href="http://zacharcher.com/lab/20090831_3d/04.swf">when I reached this point</a>; drawing lines around each cube face was expensive, so I switched to Bitmaps, and the native 3D.</p>
<p>The cube faces are set to width &amp; height of 100. However, the bitmaps are higher resolution, a 200x200 region is shown. They're being downsampled at 100x100 before they're rendered, not by my choice.</p>
<p>At runtime, I get periodic warnings like these:</p>
<blockquote><p>Warning: 3D DisplayObject will not render.  Its dimensions (8238, 1628) are too large to be drawn.</p></blockquote>
<p>What?! How is this happening? I swear that any blocks behind the camera are being removed from the Stage. (Actually, this is difficult to verify. If I shrink the scene, Flash magically applies the 3D perspective with a weird projection, and distorts everything in Lovecraftian dimensions.) Please, Adobe, tell me that you're not rendering the scene at 8000 pixels wide, then scaling it down to my 700x400 window, frame after frame?</p>
<p>Also note that you, the developer, are responsible for drawing the DisplayObjects in the correct depth order (farthest to nearest), Flash doesn't handle it automatically. This is known as "<a href="http://en.wikipedia.org/wiki/2.5D">2.5D</a>", and it's wildly inconvenient.</p>
<p>So, I'm pretty disappointed with Flash 10's native 3D. Even with my limited 3D experience, I dislike how it renders the scene (<a href="http://summitprojectsflashblog.wordpress.com/2009/05/19/flash-10-cs4-native-3d-blurry/">I'm not alone in this</a>) and the performance is obviously sub-par. This technology will not bring 3D games to the web, it <em>cannot</em>.</p>
<p>I need to decide whether to endure its shortcomings for 4 more weeks, or if I should abandon this project altogether. There are moments when you realize you've outgrown something you used to love, and this may be one of mine.</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;title=Flash 3D makes me sad' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;title=Flash 3D makes me sad' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;title=Flash 3D makes me sad' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Flash 3D makes me sad+http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Flash 3D makes me sad&amp;uri=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synthetic Speech in Flash</title>
		<link>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/</link>
		<comments>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 10:46:44 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Synth]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[linear predictive coding]]></category>
		<category><![CDATA[lpc]]></category>
		<category><![CDATA[speech]]></category>
		<category><![CDATA[synthesis]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=161</guid>
		<description><![CDATA[EDIT: I made an iPhone version, "Metal Mouth", with lots of features. Here it is on YouTube and the iTunes Store! Recently, I learned about Linear Predictive Coding ("LPC"). This technique is used in classic arcade games (such as Gauntlet) and the Speak &#38; Spell to synthesize speech. Here's my first attempt at LPC speech [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>EDIT:</strong> I made an iPhone version, "Metal Mouth", with lots of features. Here it is on <a href="http://www.youtube.com/watch?v=g2NwVMjrY2o">YouTube</a> and the <a href="http://itunes.apple.com/us/app/metal-mouth/id348741365?mt=8">iTunes Store</a>!</em></p>
<p>Recently, I learned about <a href="http://en.wikipedia.org/wiki/Linear_predictive_coding">Linear Predictive Coding ("LPC")</a>. This technique is used in classic arcade games (such as <em>Gauntlet</em>) and the <em>Speak &amp; Spell</em> to synthesize speech.</p>
<p>Here's my first attempt at LPC speech in Flash: (click &amp; explore)</p>
<p><a href="http://zacharcher.com/lab/20090827_lpc_speech/LPCsynth.swf"><img class="aligncenter" title="LPC harness" src="http://zacharcher.com/lab/20090827_lpc_speech/lpc_harness.png" alt="" width="236" height="254" /></a></p>
<p>It's great, except for one tiny problem: It sounds horrific. Can you feel the cold, robotic love? This voice will stalk your nightmares.</p>
<p>The phonemes were derived from an unrehearsed recording of my voice. I'm confident that it can be improved. Note that direct LPC encodings of my voice, <a href="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3">such as this one</a>, sound more acceptable.</p>
<p><em><strong>EDIT:</strong> I made an iPhone version, "Metal Mouth", with lots of features. Here it is on <a href="http://www.youtube.com/watch?v=g2NwVMjrY2o">YouTube</a> and the <a href="http://itunes.apple.com/us/app/metal-mouth/id348741365?mt=8">iTunes Store</a>!</em></p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;title=Synthetic Speech in Flash' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;title=Synthetic Speech in Flash' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;title=Synthetic Speech in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Synthetic Speech in Flash+http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Synthetic Speech in Flash&amp;uri=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
<enclosure url="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3" length="264600" type="audio/mpeg" />
		</item>
		<item>
		<title>Fractal Transform, made with Pixel Bender</title>
		<link>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/</link>
		<comments>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 09:06:11 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[pixel bender]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=79</guid>
		<description><![CDATA[I made a Pixel Bender filter that performs Julia Set transformations on images. It looks great when it animates, the colors morph and twist like mathematical slime. Try it (Flash Player 10 required): JuliaTile.swf Source code: julia_tile_src.zip. Pixel Bender code is in src/shader/. The default image is Seattle's Space Needle. You can upload custom images. [...]]]></description>
			<content:encoded><![CDATA[<p>I made a Pixel Bender filter that performs Julia Set transformations on images. It looks great when it animates, the colors morph and twist like mathematical slime. Try it (Flash Player 10 required): <a href="http://zacharcher.com/lab/20081229_julia_filter/JuliaTile.swf">JuliaTile.swf<br />
</a></p>
<p><a href="http://zacharcher.com/lab/20081229_julia_filter/JuliaTile.swf"><img class="alignnone" title="Julia Set sample" src="http://zacharcher.com/lab/20081229_julia_filter/julia_sample.png" alt="" width="357" height="393" /></a></p>
<p>Source code: <a href="http://zacharcher.com/lab/20081229_julia_filter/julia_tile_src.zip">julia_tile_src.zip</a>. Pixel Bender code is in <code>src/shader/</code>.<a href="http://zacharcher.com/lab/20081229_julia_filter/julia_tile_src.zip"><br />
</a></p>
<p>The default image is Seattle's Space Needle. You can upload custom images. Very large images may set your processor on fire.</p>
<p><span id="more-79"></span>Parameters: <strong>Iterations</strong> sets how many times the Julia formula is applied per pixel. The iteration increments appear smooth, not stepped, because the code tweens across the destination coordinates of the two nearest iterations. <strong>Complex X&amp;Y</strong> are the real &amp; imaginary values of the transform constant. <strong>Bias X&amp;Y</strong> is something I hacked in, it skews the coordinates in a linear way, becoming more intense with each iteration.</p>
<p>The <strong>Fill Types</strong> are as follows:</p>
<ul>
<li>0: Pixels out of range are transparent; no fill.</li>
<li>1: Repeats the nearest edge pixel.</li>
<li>2: Repeats the source image, mirroring every other copy to create a smooth transition.</li>
<li>3: Repeats the source image without mirroring.</li>
</ul>
<p>The filter needs more features before it's "done", hopefully it's still enjoyable. The Pixel Bender code took about 30 minutes to write; the Flex wrapper took much longer.</p>
<p>Despite its limited feature set, Pixel Bender is pretty cool. My only misgiving is that Pixel Bender's runtime performance is never as good as I hope. I have another filter in the works that mimics NTSC television artifacts, but the performance is abysmal. The code can still be optimized; stay tuned.</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;title=Fractal Transform, made with Pixel Bender' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;title=Fractal Transform, made with Pixel Bender' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;title=Fractal Transform, made with Pixel Bender' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Fractal Transform, made with Pixel Bender+http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Fractal Transform, made with Pixel Bender&amp;uri=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flocking</title>
		<link>http://blog.zacharcher.com/2008/06/01/flocking/</link>
		<comments>http://blog.zacharcher.com/2008/06/01/flocking/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 02:40:29 +0000</pubDate>
		<dc:creator>Zach</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[birds]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flocking]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://blog.zacharcher.com/?p=18</guid>
		<description><![CDATA[AI for Game Developers has a chapter on flocking, and I thought I'd try it: Click to play! It's not polished, but it lets you explore different flocking behaviors. Here's what the controls do: count The number of "birds" in the simulation. alignmentRadius Birds rotate to match the direction of their neighbors. This parameter changes [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/AI-Game-Developers-David-Bourg/dp/0596005555/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1212373628&amp;sr=8-1">AI for Game Developers</a> has a chapter on <a href="http://en.wikipedia.org/wiki/Flocking_%28behavior%29">flocking</a>, and I thought I'd try it:</p>
<p><a href="http://zacharcher.com/lab/20080601_flocking/FlockingTest.swf"><img src="http://zacharcher.com/lab/20080601_flocking/flocking.png" alt="" /></a></p>
<p><a href="http://zacharcher.com/lab/20080601_flocking/FlockingTest.swf">Click to play!</a> It's not polished, but it lets you explore different flocking behaviors. Here's what the controls do:</p>
<p><span id="more-18"></span></p>
<ul>
<li><strong>count</strong> The number of "birds" in the simulation.</li>
<li><strong>alignmentRadius</strong> Birds rotate to match the direction of their neighbors. This parameter changes how far away they can "see". Larger values tend to align the entire flock; small values let the flock break apart.</li>
<li><strong>separationRadius</strong> Birds try to avoid colliding with nearby walls and other birds. They will turn and simultaneously hit the brakes. This number controls their stopping distance.</li>
<li><strong>peripheralVision</strong> Birds have a blind spot behind them. When this slider is maximized, the birds will have no blind spot, and will see 360 degrees.</li>
<li><strong>turnSpeed</strong> The speed at which birds turn.</li>
<li><strong>brakePedal</strong> Birds will slow down to avoid colliding. When this slider is minimized, the birds will never use their brakes.</li>
<li><strong>travelSpeed</strong> The top speed of the birds.</li>
<li><strong>Scatter</strong> and <strong>Randomize</strong>: Try them and see...</li>
</ul>
<p>If you want access to the code, the SubVersion repository is open: <a href="http://dev.zacharcher.com/svn/flocking_test/">http://dev.zacharcher.com/svn/flocking_test/</a></p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://blog.zacharcher.com/2008/06/01/flocking/&amp;title=Flocking' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://blog.zacharcher.com/2008/06/01/flocking/&amp;title=Flocking' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/06/01/flocking/&amp;title=Flocking' title='Reddit' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a href='http://twitter.com/home/?status=Flocking+http://blog.zacharcher.com/2008/06/01/flocking/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Flocking&amp;uri=http://blog.zacharcher.com/2008/06/01/flocking/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a>  <a title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/06/01/flocking/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.zacharcher.com/2008/06/01/flocking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
