<?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>Zachernuk.com &#187; as3</title>
	<atom:link href="http://www.zachernuk.com/tag/as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zachernuk.com</link>
	<description>The desk of Brandel Zachernuk</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:36:14 +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>Soundoid Audio Synthesizer v0.5!</title>
		<link>http://www.zachernuk.com/2011/03/28/soundoid-audio-synthesizer-v0-5/</link>
		<comments>http://www.zachernuk.com/2011/03/28/soundoid-audio-synthesizer-v0-5/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 10:49:51 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[buzz]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[rebirth]]></category>
		<category><![CDATA[seq]]></category>
		<category><![CDATA[sequencer]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[synth]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=837</guid>
		<description><![CDATA[Confused? Click The green Help button! 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_AidanSynth2_2088740945"
			class="flashmovie"
			width="800"
			height="600">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2011/03/AidanSynth2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2011/03/AidanSynth2.swf"
			name="fm_AidanSynth2_2088740945"
			width="800"
			height="600">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> After my tinkerings with sound output and processing, my Friend Aidan got inspired to embark on a more ambitious project of creating a simple music sequencer and invited me to participate.  A large portion of our free hours since then have been [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Confused? Click The green Help button! </strong></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_AidanSynth2_489939370"
			class="flashmovie"
			width="800"
			height="600">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2011/03/AidanSynth2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2011/03/AidanSynth2.swf"
			name="fm_AidanSynth2_489939370"
			width="800"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>After my tinkerings with <a href="http://www.zachernuk.com/2011/02/24/dynamic-sound-in-as3/">sound output</a> and processing, my Friend <a href="http://aidan.rfm.co.nz/blog/">Aidan</a> got inspired to embark on a more ambitious project of creating a simple music sequencer and invited me to participate.  A large portion of our free hours since then have been devoted doing that.  We&#8217;ve been really impressed &#8211; even without particular attention to efficiency, it seems that even Flash can take pretty much everything we throw at it!</p>
<p>Both have us have tinkered around in music sequencers for over a decade  now.  We started with <a href="http://en.wikipedia.org/wiki/ReBirth_RB-338">ReBirth RB338</a> and <a href="http://en.wikipedia.org/wiki/Jeskola_Buzz">Jeskola Buzz</a>, so we&#8217;re very familiar with the expectations for what needs to go into this type of app.  It has been fascinating to shift from simply using a sequencer to considering how it should actually work!  There are so many questions around application design that have remained theoretical until now, where we&#8217;ve run across them almost by accident. There are some questions that are much harder than they would first appear &#8211; When something is a dial vs. when it can be a slider, how to guide a user through the most important feature of an application etc.  Other things that people often get wrong are laid bare as lazy mistakes &#8211; Load/Save effects and a failsafe when the application gets too processor-intensive, say.</p>
<p>Anyway, do not be fooled by its sleek, refined appearance! This application is very much a work in progress, and part of the fun of working on it is deciding what happens next.  If you have any ideas, let us know!</p>
<p><a href="http://www.zachernuk.com/wp-content/2011/03/matrixbig.jpg"><img class="alignnone size-full wp-image-853" title="matrixbig" src="http://www.zachernuk.com/wp-content/2011/03/matrixbig.jpg" alt="" width="747" height="455" /></a></p>
<p>(this is what it should look like)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2011/03/28/soundoid-audio-synthesizer-v0-5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dynamic sound in AS3</title>
		<link>http://www.zachernuk.com/2011/02/24/dynamic-sound-in-as3/</link>
		<comments>http://www.zachernuk.com/2011/02/24/dynamic-sound-in-as3/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 00:11:41 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[hci]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[sfx]]></category>
		<category><![CDATA[sine]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[waveform]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=821</guid>
		<description><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Dynamicsound_1264111647"
			class="flashmovie"
			width="600"
			height="400">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2011/02/Dynamicsound.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2011/02/Dynamicsound.swf"
			name="fm_Dynamicsound_1264111647"
			width="600"
			height="400">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> Warning: Setting the squareness below 0 will result in a much louder sound than anything else, so be aware that you might need to turn the volume down! I&#8217;ve been reading a textbook called Human-Computer Interaction. It&#8217;s an excellent and extensive primer on the subject for someone [...]]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Dynamicsound_497616528"
			class="flashmovie"
			width="600"
			height="400">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2011/02/Dynamicsound.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2011/02/Dynamicsound.swf"
			name="fm_Dynamicsound_497616528"
			width="600"
			height="400">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><strong><span style="color: #800000;">Warning:</span></strong> Setting the squareness below 0 will result in a much louder sound than anything else, so be aware that you might need to turn the volume down!</p>
<p>I&#8217;ve been reading a textbook called <a href="http://www.hcibook.com">Human-Computer Interaction</a>. It&#8217;s an excellent and extensive primer on the subject for someone who hasn&#8217;t studied it formally in the past, although at nearly 8 years old it can&#8217;t be expected to be up-to-date on everything  in the field.  At first I thought that one of those areas was the use of sound in HCI, though when I thought more about it, I realized that sound is almost always an afterthought &#8211; in games, and especially in applications.</p>
<p>One of the reasons that sound-based UI isn&#8217;t explored more is that an interface that uses pre-recorded sound samples is limited in the number of ways that those samples can be used to convey information. Sound can be <em>generated on </em> the computer, though, so I decided to look at where more fine-grained feedback could be given to a user through sounds that can be modified at will to reflect even minor changes.  In order to do that I had to put together a system that would be able to generate a wide range of sounds that can take a range of parameters, and what you see before you is the initial result of that exploration.  Source code can be provided if desired.  I&#8217;m hoping to use this generative sound output in the near future &#8211; stay tuned!</p>
<p><img class="alignnone" src="http://www.zachernuk.com/wp-content/2011/02/tn.png" alt="" width="256" height="256" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2011/02/24/dynamic-sound-in-as3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing Broadband IO</title>
		<link>http://www.zachernuk.com/2010/11/13/developing-broadband-io/</link>
		<comments>http://www.zachernuk.com/2010/11/13/developing-broadband-io/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 02:11:18 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[doodles]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[mic]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[singstar]]></category>
		<category><![CDATA[spectral]]></category>
		<category><![CDATA[spectrum]]></category>
		<category><![CDATA[voice]]></category>
		<category><![CDATA[voiceprint]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=675</guid>
		<description><![CDATA[This is the game!  No keys, no mouse &#8211; just whistle to move the cat up and down.  The higher the pitch, the higher the balloon, and the lower the pitch, the lower.  Try to catch the yellow dots and see how far you can get! NOTE: This requires Flash player 10.1, a very recent update &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>This is the game!  No keys, no mouse &#8211; just whistle to move the cat up and down.  The higher the pitch, the higher the balloon, and the lower the pitch, the lower.  Try to catch the yellow dots and see how far you can get!</p>
<p>NOTE: This requires <a href="http://labs.adobe.com/downloads/flashplayer10.html">Flash player 10.1</a>, a very recent update &#8211; if it isn&#8217;t working, chances are <a href="http://labs.adobe.com/downloads/flashplayer10.html">you&#8217;ll have to grab it from here</a>.  Due to feedback issues you might want to mute your system while it&#8217;s playing.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Singstart-1_1263329810"
			class="flashmovie"
			width="620"
			height="400">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2010/11/Singstart-1.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2010/11/Singstart-1.swf"
			name="fm_Singstart-1_1263329810"
			width="620"
			height="400">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p><span style="color: #800000;">UPDATE</span>: This also suffers from the &#8216;default input device&#8217; problem that my webcam <a href="http://www.zachernuk.com/experiments">experiments</a> experience &#8211; in order to get this to work, you&#8217;ll need to open the &#8216;settings&#8217; panel by right-clicking and selecting the microphone icon.</p>
<div id="attachment_696" class="wp-caption alignnone" style="width: 294px"><a href="http://www.zachernuk.com/wp-content/2010/11/mic-settings.gif"><img class="size-full wp-image-696" title="mic-settings" src="http://www.zachernuk.com/wp-content/2010/11/mic-settings.gif" alt="" width="284" height="195" /></a><p class="wp-caption-text">Select this section and check that the right mic is selected.</p></div>
<p>I just got back from <a href="http://www.animfxnz.com/index.php">AnimFX </a>10 this weekend, and it was a fantastic experience!  It was a great opportunity to learn about what Zynga thinks about their games, how Popcap manages to polish the way it does and what the pipeline for making a film like Avatar looks like.  I&#8217;ve taken lots of notes on the sessions and will do a more complete write-up of the sessions that I have something to say about, but for now I&#8217;d like to thank the speakers and the GAV NZ Trust for putting on such a great show, and all the attendees from all around NZ and Australia -it&#8217;s fantastic to know that there is such a talented and interesting community of people here working on such fun stuff!</p>
<p>Since the first time I started thinking about game design (admittedly only in about 2004), I have been interested in what happens when you break convention.  How do you make a first-person shooter from the perspective of a blind person?  How can you play a game without moving a mouse or pressing any buttons?  What do we have access to that we could try to read information from that people can use in a game? The bandwidth, or amount of information that can be transmitted back and forth between a computer and a person is determined by the Input-Output systems available (IO).  In future, we will hopefully have access to facial recognition, galvanic skin response and, eventually, brainwaves &#8211; although at this point it&#8217;s anybody&#8217;s guess how to make sense of them!</p>
<p>In the meantime, without bolting extra sensors on to a computer system, the range of input mechanisms is somewhat more limited.  We can at least play around with what&#8217;s generally available, though.   One thing that I&#8217;ve always been interested in is making use of voice input to play a game &#8211; and not necessarily a game about singing, either.  The way I see it, the voice can represent at least three different values at once (pitch, volume and &#8216;envelope&#8217; &#8211; basically <a href="http://en.wikipedia.org/wiki/Formant">the vowel sound</a>).  In theory, you&#8217;d be able to control each aspect independently, and have a continuous, three-dimensional mode of input even before you touched a button!   If people got precise with it, it could be a way of learning how to form certain sounds, develop a sense of rhythm, or learn perfect pitch &#8211; It&#8217;s a long shot but there&#8217;s only one way to find out!</p>
<div class="wp-caption alignnone" style="width: 441px"><a href="http://en.wikipedia.org/wiki/Spectrogram"><img src="http://upload.wikimedia.org/wikipedia/commons/6/6c/Dolphin1.jpg" alt="" width="431" height="324" /></a><p class="wp-caption-text"> Spectrogram of Dolphin Clicks, Whistles, and whines (Wikipedia)</p></div>
<p>As a starting point, the relatively recent update of Adobe Flash Player to version 10.1 has exposed the actual waveform data that gets taken in from a microphone feed.  This means that we can start trying to look at that wave data and look not just at the volume, but <em>everything </em> about it.  I&#8217;ve made a super-simple prototype that takes in the voiceprint, picks the loudest overtone and lets us see it.  In this case I have made it specify the altitude of an hilarious cat, which is trying to catch all the goodies it can.  Whistle high to push the cat-balloon up, low to make it go down low, and anywhere in between to reach the height that a pitch corresponds to.  I&#8217;d love to hear what you think of the concept!</p>
<p>By default, Mac computers have a number of &#8216;microphone devices&#8217; attached like &#8216;firewire&#8217; &#8211; make sure the selected mic is something like &#8216;built-in&#8217;.</p>
<p>A couple of things that come to me from the limited testing I have done:</p>
<p>1. Quite a lot of people can&#8217;t actually whistle.  The choice to use whistling as a driver is not out of malice, but because it&#8217;s such a &#8216;pure&#8217; waveform. I&#8217;m going to try and increase the sensitivity of the analysis so that singing would work too.</p>
<p>2.  I got quite a lot better at estimating pitch after playing the thing for 5-10 minutes.  Having such a direct mapping, with visual feedback about how close an attempt is to the actual goal seems to make it a lot easier to estimate my error as a whistler.</p>
<p>3.  I can&#8217;t make it to more than about 25 points without cracking up from the silliness of it all.  With a little more variety in the goals and the kinds of interactions and I think we&#8217;ll be on to a winner!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/11/13/developing-broadband-io/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A paper doll&#8230; made of paper!</title>
		<link>http://www.zachernuk.com/2010/09/05/a-paper-doll-made-of-paper/</link>
		<comments>http://www.zachernuk.com/2010/09/05/a-paper-doll-made-of-paper/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 08:50:34 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[dance]]></category>
		<category><![CDATA[doll]]></category>
		<category><![CDATA[paper]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pins]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[printout]]></category>
		<category><![CDATA[split pin]]></category>
		<category><![CDATA[theuglydance]]></category>
		<category><![CDATA[ugly]]></category>
		<category><![CDATA[uglydance]]></category>
		<category><![CDATA[Webcam]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=628</guid>
		<description><![CDATA[A friend recently linked to a site called &#8220;The Ugly Dance&#8220;, which is a dynamic music video for a swedish rock band.  The music is okay, but what really got me is how much fun manipulating the paperdoll / ragdoll character that they display on screen, and thought &#8220;it would be great if you could [...]]]></description>
			<content:encoded><![CDATA[<p>A friend recently linked to a site called &#8220;<a href="http://www.theuglydance.com">The Ugly Dance</a>&#8220;, which is a dynamic music video for a swedish rock band.  The music is okay, but what really got me is how much fun manipulating the paperdoll / ragdoll character that they display on screen, and thought &#8220;it would be great if you could print that character out and play with it too!&#8221;  In Qatar last year I did a bit of experimentation with sending Sprite/ Movieclip data straight through to the printer without displaying them on screen,  and with the numerous webcam experiments I have done I&#8217;m pretty confident about taking cam data and putting it into sprites or bitmaps.  The only thing missing from being able to produce a good, jointed paper doll that could just be printed out &#8211; especially one that could work without having to buy split pins.</p>
<p>It was an idle thought, until the other night when I found I couldn&#8217;t sleep, so I came up with this model for a paper split pin, and I decided to try it out this afternoon.. the result is what you see before you!</p>
<p><img class="alignnone size-medium wp-image-630" title="paperdoll" src="http://www.zachernuk.com/wp-content/2010/09/paperdoll-300x300.jpg" alt="paperdoll" width="300" height="300" /></p>
<p>It turned out to take a lot longer than I had anticipated &#8211; the pins do work and they are quite tight, but you need to assemble them with a pair of tweezers.  That said, though, it was only printed on 90GSM inkjet paper.. I would like to try it on heavier stock to see if it makes it easier. In the meantime though, If you&#8217;d like to try for yourself, though, The PDF Download is here: <a href="http://www.zachernuk.com/wp-content/2010/09/paperguy.pdf">Brandel Zachernuk&#8217;s Paperguy v0.01</a>.  If anyone finds a use for it or makes any modification, I&#8217;d love to see it!</p>
<p><a href="http://www.zachernuk.com/wp-content/2010/09/paperdoll-icon.jpg"><img class="alignnone size-full wp-image-629" title="paperdoll-icon" src="http://www.zachernuk.com/wp-content/2010/09/paperdoll-icon.jpg" alt="paperdoll-icon" width="415" height="229" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/09/05/a-paper-doll-made-of-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webcam support in Unity3d &#8211; via Flash!</title>
		<link>http://www.zachernuk.com/2010/08/25/webcam-support-in-unity3d-via-flash/</link>
		<comments>http://www.zachernuk.com/2010/08/25/webcam-support-in-unity3d-via-flash/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 12:33:47 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[Webcam]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[aquiris]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[interoperability]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[texture]]></category>
		<category><![CDATA[texture2d]]></category>
		<category><![CDATA[u3dobject]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=603</guid>
		<description><![CDATA[I like Unity and I like being able to play with the webcam as input.  Unfortunately, Webcam support within Unity &#8211; in particular, webcam support in the browser plugin for Unity &#8211; isn&#8217;t really possible out of the box.  I&#8217;ve written a (somewhat naive) implementation using the Aquiris u3dobject framework &#8211; click here to see it [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_608" class="wp-caption alignnone" style="width: 468px"><a href="http://zachernuk.com/temp/camInput/"><img class="size-full wp-image-608" title="superman" src="http://www.zachernuk.com/wp-content/2010/08/superman.jpg" alt="superman" width="458" height="344" /></a><p class="wp-caption-text">The possibilities are terrifying.</p></div>
<p>I like Unity and I like being able to play with the webcam as input.  Unfortunately, Webcam support within Unity &#8211; in particular, webcam support in the browser plugin for Unity &#8211; isn&#8217;t really possible out of the box.  I&#8217;ve written a (somewhat naive) implementation using the<a href="http://code.google.com/p/aquiris-u3dobject/"> Aquiris u3dobject</a> framework &#8211; <a href="http://zachernuk.com/temp/camInput/">click here to see it in action! </a> (I should also warn you that it seems to be somewhat (read:extremely) unstable when the video stream is being passed through &#8211; On Windows it seems to run at 10fps at an absolute maximum with the video stream on, on Mac it fares even worse.. fun to see though!)</p>
<p>A guy at Doncaster College has <a href="http://www.fusedworks.com/blog/development/688">managed to get a similar system up and running</a>, although it doesn&#8217;t seem to work for people behind a proxy. (Any similarity between their solution and mine is because they&#8217;re both based on the Aquiris sample system. The Doncaster people seem to be using a <em>localconnection</em> to get the texture transferred, which sounds promising;  Mine is just passing things through the web page, and transferring the pixel data in an extremely sub-optimal way.  Each pixel&#8217;s value, for example Ox FF FF FF (white) is converted to the ASCII string &#8220;255:255:255&#8243;, passed through the JS and converted to Unity-native colour values (1.0f,1.0f,1.0f).  It&#8217;s roundabout but I found that there were incompatibilities in the byte-array representations of bitmaps between Flash and Unity, and since the middle JS stage is created as a script, so the string has to be valid there too.</p>
<p>It&#8217;s still a far cry from the the <a href="http://honeydefender.millsberry.com/augmentedreality/">totally direct form of Webcam input</a> that appears to be possible with a commercial license &#8211; I&#8217;ll definitely be looking into how that one works.  Even so, it represents a terrific way to leverage some of the functionality of Flash without having to re-create it in Unity &#8211; whether that functionality be webcam support or related to other aspects of Flash&#8217;s functionality like p2p network connections, microphone support or having a reasonable hook into local storage for a persistent session.  I&#8217;m hoping to make good use of this bridge soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/08/25/webcam-support-in-unity3d-via-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More laser cuttings + an automatic shape generator in the works?</title>
		<link>http://www.zachernuk.com/2010/07/27/more-laser-cuttings-an-automatic-shape-generator-in-the-works/</link>
		<comments>http://www.zachernuk.com/2010/07/27/more-laser-cuttings-an-automatic-shape-generator-in-the-works/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 01:39:26 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[3mm]]></category>
		<category><![CDATA[acrylic]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[belt]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[cubes]]></category>
		<category><![CDATA[cutting]]></category>
		<category><![CDATA[enclosure]]></category>
		<category><![CDATA[feelspace]]></category>
		<category><![CDATA[finger joint]]></category>
		<category><![CDATA[laser]]></category>
		<category><![CDATA[MDF]]></category>
		<category><![CDATA[motor]]></category>
		<category><![CDATA[ponoko]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=598</guid>
		<description><![CDATA[I went to Ponoko yesterday and picked up my next set of cut materials &#8211; after my first design didn&#8217;t factor the cut width into the calculations at all I might have overcompensated, but only very very slightly &#8211; and now I know that the way to correct for it is as simple as an [...]]]></description>
			<content:encoded><![CDATA[<p>I went to Ponoko yesterday and picked up my next set of cut materials &#8211; after my first design didn&#8217;t factor the cut width into the calculations at all I might have overcompensated, but only very very slightly &#8211; and now I know that the way to correct for it is as simple as an &#8216;offset path&#8217; command.  If anyone is interested I can put up a video tutorial showing where the options are in Illustrator and Inkscape. I am especially pleased with the enclosure!</p>
<h2>The Car</h2>
<p>I have the mk.2  car back!  It went together very well, though it was perhaps too tight in some places &#8211; the short loops and forks that hold the drive wheels to the gears needed to be shaved a little.  I added 0.1mm to the perimeter of all the shapes, and on thinking about it, it seems likely that it should have been more like 0.08 mm or so.  Needing to make adjustments that tiny is a strange business indeed!</p>
<p>Anyway, here is the finished product in all its lasered glory:</p>
<p><a href="http://www.flickr.com/photos/brandelf/"><img class="alignnone" src="http://farm5.static.flickr.com/4126/4831972265_7b87ff2833.jpg" alt="" width="500" height="333" /></a></p>
<p>This time there were only two things amiss:  First, I didn&#8217;t account for the width of the AA batteries in the bottom compartment in <em>addition</em> to the holder for the power transfer gear, so it can only hold 1x AA in the bottom bay and 2x AA in the top &#8211; although you could probably pack a bunch of those squishy Lithium ion batteries in with no problem.  The other problem lies in trying to make the design too cramped &#8211; on each side, one wheel is attached directly to the motor, and one wheel is attached via a wooden axle, to a point behind the motor that powers the opposite side.  The current design is so compact, though, that there isn&#8217;t really enough room behind the motor for a solid fixture, and it has a tendency to fall off.</p>
<p>Widening the design by 3mm would solve both of those problems and the whole plan would stay well within the 181 x 181 mm limits set by Ponoko though, so I&#8217;m pretty pleased with the design.  Ideally I&#8217;d like to be able to keep the base design small enough that it can form the basis of a miniature robotics platform, and be able to have room on a P1 board to put holders for sensors or a small robotic arm. Stay tuned!</p>
<h2>Arduino Enclosure</h2>
<p>I also needed to make an enclosure for the Arduino Duemilanove as part of another project I&#8217;ve been tinkering with. After looking online I found surprisingly few examples anywhere &#8211; in particular a total absence of  compact, fully-enclosing cases, so I designed one and got it cut.  At first I was going to get it made in 3mm MDF as well but Heather suggested that an acrylic would be more pleasing and I agree.  It looks like this:</p>
<p><a href="http://www.flickr.com/photos/brandelf/"><img class="alignnone" src="http://farm5.static.flickr.com/4083/4831929119_a3b02998a9.jpg" alt="" width="500" height="333" /></a></p>
<p>There are pass-through holes for the three holes in the Duemilanove board,  so it could be bolted to another object.  I offset the pats for this design by 0.1mm as well, and unfortunately, acrylic is a lot more brittle than MDF, which has meant a couple of small parts snapping off when I tried to force them.  Other than that, though, the design is perfect and the tightness has meant it keeps together really well!</p>
<p><a href="http://www.flickr.com/photos/brandelf/"><img class="alignnone" src="http://farm5.static.flickr.com/4090/4831930539_fa04ab8bcf.jpg" alt="" width="500" height="333" /></a></p>
<p>The other good thing about sticking the Arduino in an enclosure is that you can stick other things to it &#8211; in this case I wanted to guarantee the orientation and position of a compass module on top of the unit, which is encased in the small box on top.</p>
<p>Once I made the enclosure design (and was able to verify that it actually works), I decided that it would be worth looking into making the interlocking parts more automatically.  I was inspired by <a href="http://www.flickr.com/photos/generated/tags/cubes/">Jared Tarbell&#8217;s Cubes</a> to start thinking about how to generate the map automatically.  It&#8217;s still very much a sketch, but the principle is straightforward enough to automate most &#8211; if not all- of the process.</p>
<p>Lay out the lines of a shape by clicking, adjust the tooth width with the slider and hit &#8216;clear&#8217; to clear the shape.  Enjoy!</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_BoxDrawer_300630044"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2010/07/BoxDrawer.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2010/07/BoxDrawer.swf"
			name="fm_BoxDrawer_300630044"
			width="600"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/07/27/more-laser-cuttings-an-automatic-shape-generator-in-the-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital sand</title>
		<link>http://www.zachernuk.com/2010/03/17/digital-sand/</link>
		<comments>http://www.zachernuk.com/2010/03/17/digital-sand/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 03:07:20 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[doodles]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[doodle]]></category>
		<category><![CDATA[emergent]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[sand]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=400</guid>
		<description><![CDATA[As I have mentioned earlier, what excites me most about gaming &#8211; and computers in general &#8211; is the capability for simulation. If we create a system that obeys the same rules as reality, we can use that system to better understand reality. Not only that, it allows us to test out new theories and [...]]]></description>
			<content:encoded><![CDATA[<p>As I have mentioned earlier,  what excites me most about gaming &#8211; and computers in general &#8211; is the capability for simulation. If we create a system that obeys the same rules as reality, we can use that system to better understand reality.  Not only that, it allows us to test out new theories and ask  &#8220;what would happen if things were a little different?&#8221;</p>
<p>The complexity of the thing you simulate doesn&#8217;t have to be much either.  The term &#8220;computer simulation&#8221; often evokes imagery of simulating enormous and complex systems &#8211; weather patterns or the turbulence flow from a large-scale atomic detonation &#8211; but simulation can be useful on a more modest scale too.  In University, a friend of mine threw together a blackjack simulation.  He wanted to see the patterns of how well a virtual player does when it follows hard-and-fast rules &#8211; refusing cards over a total of 16, 18 and so on.* The first programmable computer, the Z3, ran at a staggering 10 Hertz &#8211; roughly one <em>billionth </em>of the speed of a modern computer.  Even at that speed, though, it brought the science of aviation forward by a decade through simulating wing flutter at rates of execution that were previously impossible to reach.</p>
<p>The example I often use to explain my fascination with simulation is this:  Imagine a child&#8217;s sand-pail at a beach.  Imagine the light dusting of sand it gets from a long day of use.  The smoothness at the joints, the build-up inside any detailing and under the lip.  Now imagine taking the bucket away and leaving the sand &#8211; the suggestion of form but not the form itself.  Next to impossible in reality, but in a simulation, once you have the base action down, setting things to on or off is the easiest thing in the world.</p>
<p><a href="http://www.zachernuk.com/wp-content/2010/03/sandy.PNG"><img class="alignnone size-full wp-image-407" title="sandy" src="http://www.zachernuk.com/wp-content/2010/03/sandy.PNG" alt="sandy" width="293" height="274" /></a></p>
<p>I&#8217;ve been using this example of the sand and the bucket for years now, and recently I decided to actually do something about it &#8211; make a sand simulation that can show you what I mean, rather than just telling people about it.  Here it is! Just move the mouse around on the play field to shift the sand.  If you want extra options for playing with the sand fall or changing the pen size, open the options panel.  Many thanks to Aidan of <a href="http://aidan.rfm.co.nz/blog/">Shade and Prime</a> for the fantastic elevation visualizer.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SandDisplacer_672806154"
			class="flashmovie"
			width="400"
			height="600">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2010/03/SandDisplacer.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2010/03/SandDisplacer.swf"
			name="fm_SandDisplacer_672806154"
			width="400"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>iPhone app, anyone?</p>
<p>*  While it might seem like this is a less-than-useful endeavour to use computers for, I&#8217;m sure we can all agree that it is better to test a virtual player losing virtual money than trying it at your local casino.  In fact, after finding that there is no foolproof approach to blackjack, he gave up on it altogether and started putting his money in the stock market&#8230; you win some, you lose some.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/03/17/digital-sand/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extrusion shapes in Papervision</title>
		<link>http://www.zachernuk.com/2010/02/20/extrusion-shapes-in-papervision/</link>
		<comments>http://www.zachernuk.com/2010/02/20/extrusion-shapes-in-papervision/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 03:51:32 +0000</pubDate>
		<dc:creator>Brandel Zachernuk</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[custom geometry]]></category>
		<category><![CDATA[extrude]]></category>
		<category><![CDATA[extrusion]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[papervision]]></category>
		<category><![CDATA[polygon]]></category>
		<category><![CDATA[pv3d]]></category>
		<category><![CDATA[triangle3d]]></category>
		<category><![CDATA[vertex]]></category>
		<category><![CDATA[vertex3d]]></category>

		<guid isPermaLink="false">http://www.zachernuk.com/?p=393</guid>
		<description><![CDATA[As part of the early phase of experimentation in a potential project, I started fiddling with creating custom geometry in pv3d, rather than tweaking the vertices of existing primitives.    The results so far aren&#8217;t perfect, but they&#8217;re looking good: I&#8217;m not sure whether this is re-creating functionality that other people have already put into [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the early phase of experimentation in a potential project, I started fiddling with creating custom geometry in pv3d, rather than tweaking the vertices of existing primitives.    The results so far aren&#8217;t perfect, but they&#8217;re looking good:</p>
<p><a href="http://www.zachernuk.com/wp-content/2010/02/Extrusion-shapes.png"><img class="alignnone size-medium wp-image-396" title="Extrusion-shapes" src="http://www.zachernuk.com/wp-content/2010/02/Extrusion-shapes-296x300.png" alt="Extrusion-shapes" width="296" height="300" /></a></p>
<p>I&#8217;m not sure whether this is re-creating functionality that other people have already put into papervision, but it was a lot of fun! There are some issues with shaded materials, but so far I have bitmap- and colour materials displaying and it&#8217;s looking good.  You can try it for yourself!  Like the pale text says &#8211; click in the window to add a vertex, press space to close the shape.  It seems to work even on pretty low-powered machines, so give it a try!</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Ribbons-earclip_2042759875"
			class="flashmovie"
			width="400"
			height="600">
	<param name="movie" value="http://www.zachernuk.com/wp-content/2010/02/Ribbons-earclip.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.zachernuk.com/wp-content/2010/02/Ribbons-earclip.swf"
			name="fm_Ribbons-earclip_2042759875"
			width="400"
			height="600">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.zachernuk.com/2010/02/20/extrusion-shapes-in-papervision/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

