<?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>zero point nine</title>
	<atom:link href="http://www.zeropointnine.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zeropointnine.com/blog</link>
	<description>lee felarca - personal flash/actionscript work</description>
	<lastBuildDate>Mon, 30 Aug 2010 23:23:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Parsons MFA Design + Technology</title>
		<link>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/</link>
		<comments>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:42:56 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[other]]></category>
		<category><![CDATA[mfadt]]></category>
		<category><![CDATA[parsons]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=705</guid>
		<description><![CDATA[I just wanted to mention that at the end of the month I&#8217;ll be taking a happily anticipated break from the commercial grind and going back to school, to the Parsons MFA Design &#038; Technology program. 
I&#8217;m looking forward to posting new and hopefully interesting things here as I progress through the program, the time [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to mention that at the end of the month I&#8217;ll be taking a happily anticipated break from the commercial grind and going back to school, to the Parsons MFA Design &#038; Technology program. </p>
<p>I&#8217;m looking forward to posting new and hopefully interesting things here as I progress through the program, the time during which I aim to broaden the scope of my personal sandbox and make experimentation a full-time vocation. But hopefully without losing any of the snark.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>homescreen 3D &#8211; an OpenGL Android program launcher</title>
		<link>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/</link>
		<comments>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 05:50:07 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opengl es]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=631</guid>
		<description><![CDATA[Video demonstrating my first &#8220;experiment&#8221; with the Android Market. An answer to a question nobody asked, namely: &#8220;What if you made an Android program launcher in 3D?&#8221;

It was, to be frank, a gigantic pain in the ass coding the motion for this, since there seems to be no Tweener-like class written in Java (Java, not [...]]]></description>
			<content:encoded><![CDATA[<p>Video demonstrating my first &#8220;experiment&#8221; with the Android Market. An answer to a question nobody asked, namely: &#8220;What if you made an Android program launcher in 3D?&#8221;</p>
<div style="text-align:center; padding-top:11px; padding-bottom:5px;"><object width='560' height='420'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=13795092&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=13795092&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='560' height='420'></embed></object><div style='text-align:right'><a href='http://vimeo.com/13795092'>vimeo link</a></div></div>
<p>It was, to be frank, a gigantic pain in the ass coding the motion for this, since there seems to be no Tweener-like class written in Java (Java, not processing&#8230;). Anyone know of one?</p>
<p>Built using <a href="/blog/a-3d-framework-for-android-min3d/">min3D</a>.</p>
<table border="0" style="margin-left:auto;text-align:right;">
<tr>
<td>
&nbsp;<a href="market://search?q=pname:com.zeropointnine.homeScreen3d">free version</a><br />
<img src="/blog/assets/qr_homescreen3dFree.png" border="0" /><br/>&nbsp;
</td>
<td width="30"></td>
<td>
&nbsp;<a href="market://search?q=pname:com.zeropointnine.homeScreen3dFull">almost-free version</a><br />
<img src="/blog/assets/qr_homescreen3dFull.png" border="0" /><br/>:T
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Announcing &#8220;min3D&#8221;, a 3D framework for Android</title>
		<link>http://www.zeropointnine.com/blog/a-3d-framework-for-android-min3d/</link>
		<comments>http://www.zeropointnine.com/blog/a-3d-framework-for-android-min3d/#comments</comments>
		<pubDate>Thu, 06 May 2010 03:32:31 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[opengl es]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=573</guid>
		<description><![CDATA[
Why yes, that is the Earth revolving around the planet JupiterView the code for this example.Note how the &#8220;onEnterFrame&#8221; function is only 8 lines long.

Update:Download min3D sample app(Android v1.5 or higher)
This post announces a 3D framework/library-in-progress I&#8217;ve been writing for Android, written in Java with OpenGL ES. Between the names min3d, modest3d, and llama3d, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<div class="vimeoBox" style="padding-left:20px; padding-top:20px; padding-bottom:20px; width:264px;"><object width='264' height='440'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=11508316&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=11508316&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='264' height='440'></embed></object><div style='text-align:right'><a href='http://vimeo.com/11508316'>vimeo link</a></div>
<div><em>Why yes, that is the Earth revolving around the planet Jupiter</em><br/><br/><a href="http://code.google.com/p/min3d/source/browse/trunk/sampleProjects/min3dSampleProject1/src/min3d/sampleProject1/ExampleRotatingPlanets.java" target="_blank">View the code for this example.</a><br/>Note how the &#8220;onEnterFrame&#8221; function is only 8 lines long.</div>
</div>
<div style="text-align:center;"><br/><b>Update:</b><br/><a href="http://code.google.com/p/min3d/downloads/list" target="blank">Download min3D sample app</a><br/>(Android v1.5 or higher)</div>
<p>This post announces a 3D framework/library-in-progress I&#8217;ve been writing for Android, written in Java with OpenGL ES. Between the names <em>min3d</em>, <em>modest3d</em>, and <em>llama3d</em>, I&#8217;ve gone with <em>&#8220;min3d&#8221;</em> for being the least self-deprecating while still conveying an appropriate level of expectation that I&#8217;m comfortable with. :)</p>
<p>I&#8217;ve gone legit by putting it up on <a href="http://code.google.com/p/min3d/" target="_blank"><b>Google Code</b></a> (first time for everything, etc.). While just an early build, it should at the very least be useful for educational purposes if like me you&#8217;re just starting down the Android path. </p>
<p>My aim while building this was to make a library that required no extra massaging of model data on its way to being used by OpenGL. To that end, data can be created and manipulated directly on the <code>ByteBuffers</code> that are used by OpenGL, without the need for any intermediating (ie, redundant) data structures. And hopefully wrapped in such a way that&#8217;s still relatively easy to use.</p>
<p>But this approach also imposes some important restrictions. The maximum number of vertices and faces of an <code>Object3d</code> is fixed after instantiation, and the dynamic addition/removal of vertex or face elements is currently not supported. If/when implemented, these operations will have to be much more costly than, say, with a linked list. But unavoidable, as far as I can tell.</p>
<p>Here&#8217;s what&#8217;s currently implemented through the API (all conventional stuff&#8230;)</p>
<p><span id="more-573"></span></p>
<ul class="normalList">
<li>Vertex index lists</li>
<li>Per-vertex colors</li>
<li>Vertex normals</li>
<li>Texture mapping</li>
<li>Light source (just the one, for now)</li>
<li>Camera class, with view frustrum settings</li>
<li>Object scale, euler rotation, and translation properties as expected</li>
<li>Object children that inherit parent&#8217;s transform properties</li>
<li>Ability to render a subset of an object&#8217;s list of faces</li>
<li>Triangle or point rendermodes (just the two, for now)</li>
<li>A few canned object primitives</li>
</ul>
<p>Code examples showing how to actually use &#8220;min3d&#8221; in its current form can be found through the <a href="http://code.google.com/p/min3d/" target="_blank">project home page</a> on Google Code by checking out the source with SVN, and going through the <a href="http://code.google.com/p/min3d/source/browse/#svn/trunk/sampleProjects/min3dSampleProject1/src/min3d/sampleProject1" target="_blank">sampleProjects/</a> directory.</p>
<p>In the immediate future, I&#8217;d like to be able to at least add a light manager and a 3d-file format importer, and definitely test and debug more thoroughly. If anyone is interested in collaborating on or even picking up this project, <a href="mailto:felarca_@_yahoo_dot_com">please let me know</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/a-3d-framework-for-android-min3d/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Android Red Bouncing Ball</title>
		<link>http://www.zeropointnine.com/blog/android-red-bouncing-ball/</link>
		<comments>http://www.zeropointnine.com/blog/android-red-bouncing-ball/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 21:15:03 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=545</guid>
		<description><![CDATA[Download (for devices running Android v2.1)
As the geek sits down to learn a new programming language or new programming platform, the first thing he or she must do is learn to make a program that successfully prints the words &#8220;Hello, world!&#8221; to the screen. 
The main significance of this first minor feat as it relates [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:15px; padding-bottom:5px;"><strong><a href="/blog/assets/RedBouncingBall.apk">Download</a></strong> (for devices running Android v2.1)</div>
<p>As the geek sits down to learn a new programming language or new programming platform, the first thing he or she must do is learn to make a program that successfully prints the words &#8220;Hello, world!&#8221; to the screen. </p>
<p>The main significance of this first minor feat as it relates to the programmer is not epistemological, technical, or temporal, but psychological. Crossing the &#8212; shall we call it the  <em>&#8220;Hello world&#8221; threshold</em>? &#8212; brings with it the realization of the existence of a universe of infinite possibilities. But also the burden and intolerable vertigo that comes with that sense of unlimited freedom.</p>
<p>For, alas, there is no standard &#8220;second program&#8221; for the geek aspirant to sit down to write. The programmer is on her own. Of the potentially infinite paths that lie in front of her, which will she choose?</p>
<p>Actually though, the most common second program chosen with pedagogical motives in mind &#8212; I would submit &#8212; would be that venerated bouncing ball, colored <code>0xFF0000</code>. If you come from a Flash background, you probably know of it well.</p>
<p>Here&#8217;s mine, on the Android platform- <span style="color:#f8f8f8">(Sure wish I could&#8217;ve used Flash 10.1&#8230; ;)</span></p>
<div style="text-align:center; padding-top:11px; padding-bottom:5px;"><object width='560' height='420'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=11116168&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=11116168&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='560' height='420'></embed></object><div style='text-align:right'><a href='http://vimeo.com/11116168'>vimeo link</a></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/android-red-bouncing-ball/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using NativeProcess in AIR 2 for screencaps</title>
		<link>http://www.zeropointnine.com/blog/using-nativeprocess-in-air-2-for-screencaps/</link>
		<comments>http://www.zeropointnine.com/blog/using-nativeprocess-in-air-2-for-screencaps/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 02:15:45 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=498</guid>
		<description><![CDATA[
Download installable AIR fileRequires AIR 2 Beta 2 Runtime +Windows .NET v3.5
My aim here was to get familiar with AIR 2&#8217;s new capability of interacting with external processes&#8217; standard streams.
One useful way of learning how to use a new feature is to proceed directly to trying to abuse it. 
To that end, this AIR application [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><a href="/blog/assets/NativeProcessTest_Installer.zip"><img border="0" src="/blog/assets/NativeProcessTest_t.jpg" alt="Thumbnail" /><br/><br/><strong>Download installable AIR file</a></strong><br/><em style="font-size:10px">Requires AIR 2 Beta 2 Runtime +<br/>Windows .NET v3.5</em></div>
<p>My aim here was to get familiar with AIR 2&#8217;s new capability of interacting with external processes&#8217; standard streams.</p></div>
<p>One useful way of learning how to use a new feature is to proceed directly to trying to abuse it. </p>
<p>To that end, this AIR application takes in a fairly continuous stream of uncompressed binary image data from a native process&#8217; standard output. My hope was to get real-time screen capture updates into AIR at a decent frame rate.</p>
<p>Details and source code after the break&#8211;</p>
<p><span id="more-498"></span></p>
<p><strong>The native process</strong></p>
<p>For my &#8220;native process,&#8221; I created a Windows .NET application written in C#. When asked, it takes a screen capture of the desktop and sends the image data through the process&#8217; standard output. For various reasons, I chose to set it up as a Windows form rather than as a plain vanilla console or as a real system service. The <a href="/blog/assets_code/NativeProcessTest_Form1.cs.txt" target="_blank">relevant C# code</a> is only a few dozen lines long. One interesting function there is <code>bitmapToBytes()</code>, which converts a bitmap into a byte array in the correct format for Flash to be able to apply it directly to a BitmapData without any further (costly) conversion. </p>
<p><strong>The AIR application</strong></p>
<p>On the &#8220;client-side,&#8221; the Flash AIR application has little to do. It simply sends a command to the native process, telling it to take a screen grab, along with image dimension and offset parameters. Because the client takes in the resulting stream of data in packets whose length should not be assumed to be of any given size, it needs to know where in the data a new image starts and where it ends. So it checks the stream for an arbitrary 4-byte start code as well as a termination code. When the transfer is complete, it just applies the resulting data, collected over time into a ByteArray, using <code>BitmapData.setPixels()</code>. It then requests a new image, and so on.</p>
<p><strong>Performance considerations</strong></p>
<p>On a mid-range quad-core PC using 1280&#215;1024 images (5MB per uncompressed frame), I&#8217;m getting about 8 frames per second, or 125ms per frame. The time it takes for the 5MB image to transfer through the standard stream is about 65ms, or 50% of the total time for one iteration; without setting up an honest benchmark test, it&#8217;d be unfair and/or impolitic to declare that AIR represents a bottleneck here, so &#8230; yeah.</p>
<p>The AIR app eats up about 2/3 of one CPU core using the runtime&#8217;s main application thread. The remaining 1/3 represents the amount of time the AIR app has to wait while the native process constructs the screengrab. If the app were re-architected in such a way that the native process always has a new screencap queued up and ready to send &#8211; leading to little or no idle time between request and response &#8211; the AIR app would easily soak a full CPU core. Since the AIR app is doing little of significance besides reading the process&#8217;s standard stream and collecting that info into a byte array, it appears that merely handling large amounts of stdout data is quite costly. </p>
<p>Of course, AIR 2 isn&#8217;t even final yet. Nevertheless, I thought these preliminary findings were interesting. (This build targets Beta 2, which is the most recent public beta of AIR 2; compiling and running it against the most recent non-public beta of the SDK and runtime dated April 9, 2010 gave the same results.)</p>
<p><strong>Source files</strong></p>
<p>Setting up a native process for use with AIR 2 is well documented so I didn&#8217;t bother commenting on that here. However, the included source is I believe a good starting point for adapting to whatever native process craziness you may be cooking up&#8230; </p>
<div style="margin-left:35px; padding-top:10px; padding-bottom:10px;">
<a href="/blog/assets/NativeProcessTest_Installer.zip"><strong>AIR application</strong></a> (requires <a href="http://labs.adobe.com/downloads/air2.html" target="_blank">AIR 2 Beta 2 runtime</a> and <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325fd-ae52-4e35-b531-508d977d32a6&#038;displaylang=en" target="_blank">.NET v3.5 for Windows</a>)<br />
<a href="/blog/assets_code/NativeProcessTest.as.txt" target="_blank"><strong>Main AS3 class file</strong></a><br />
<a href="/blog/assets_code/NativeProcessTest_Form1.cs.txt" target="_blank"><strong>Main C# class file </strong></a><br />
<a href="/blog/assets_code/NativeProcessTest_projectfiles.zip"><strong>Full project source</strong></a> (Flash Builder 4 + Visual Studio 2008)
</div>
<p>For another implementation of AIR 2 screen capture, see <a href="http://corlan.org/2009/11/30/magnifying-glass-air-2-application-or-how-to-communicate-with-a-java-program-from-air/" target="_blank">this post by Mihai Corlan</a>, also with source, using Java. There are also a few other related examples out there as well.</p>
<p class="creacom">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/" target="_blank">Creative Commons Attribution 3.0 License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/using-nativeprocess-in-air-2-for-screencaps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Fun With Texture Projection</title>
		<link>http://www.zeropointnine.com/blog/more-fun-with-texture-projection/</link>
		<comments>http://www.zeropointnine.com/blog/more-fun-with-texture-projection/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 22:09:51 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash 3d]]></category>

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

Here I&#8217;m just expanding upon the &#8216;texture extraction&#8217; idea posted before. This version maps video onto 3D objects in a much more direct manner by using ray-casting, like the examples in the last several posts. 
Controls:

Mouse rotates object
Mouse drag moves object
[SPACE] remaps the texturing of the 3d object
[ENTER] cycles through different 3D primitives
[H] shows full [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><img style="cursor: pointer" onclick="javascript:showBox('TextureExtractarFun',800,600, '444444',this);" src="/blog/assets/TextureExtractarFun_t.jpg" alt="Thumbnail - Click me" /></div>
<p>Here I&#8217;m just expanding upon the &#8216;texture extraction&#8217; idea posted <a href="/blog/augmented-reality-texture-extraction-experiment/">before</a>. This version maps video onto 3D objects in a much more direct manner by using ray-casting, like the examples in the last several posts. </div>
<p><em>Controls:</em></p>
<ul style='margin-left:15px;'>
<li>Mouse rotates object</li>
<li>Mouse drag moves object</li>
<li>[SPACE] remaps the texturing of the 3d object</li>
<li>[ENTER] cycles through different 3D primitives</li>
<li>[H] shows full list of kludgey hotkey controls</li>
</ul>
<p><em>Update with video (8/25/2010)</em>:</p>
<div style="text-align:center; padding-top:11px; padding-bottom:5px;"><object width='560' height='420'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=14401231&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=14401231&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='560' height='420'></embed></object><div style='text-align:right'><a href='http://vimeo.com/14401231'>vimeo link</a></div></div>
<p>Although this piece dispenses with the encumbrances of an AR marker or any application-like functionality, I think the method being used here has some potentially interesting uses for an augmented reality-based design application. (Or for more whimsical uses like &#8220;upload-your-face&#8221; done in 3D). I&#8217;ve disabled backface detection, so the imagery gets mapped on all sides of the object rather than just the camera-facing polys, which makes it more visually interesting. Live demo above requires webcam. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/more-fun-with-texture-projection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Augmented Reality Texture Extraction Experiment</title>
		<link>http://www.zeropointnine.com/blog/augmented-reality-texture-extraction-experiment/</link>
		<comments>http://www.zeropointnine.com/blog/augmented-reality-texture-extraction-experiment/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 00:57:11 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash 3d]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=400</guid>
		<description><![CDATA[This is an AR-based experiment that enables the user to lift textures from real-world objects in live video and apply them onto 3D objects that are overlayed on top of them. Only box primitives are supported here, but the general idea could be extended to other types of 3D primitives or potentially even more complex [...]]]></description>
			<content:encoded><![CDATA[<p>This is an AR-based experiment that enables the user to lift textures from real-world objects in live video and apply them onto 3D objects that are overlayed on top of them. Only box primitives are supported here, but the general idea could be extended to other types of 3D primitives or potentially even more complex objects with some clever image compositing and UV mapping. </p>
<div style="text-align:right; padding-top:11px; padding-bottom:5px;"><object width='560' height='420'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id=6660264&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id=6660264&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='560' height='420'></embed></object><div style='text-align:right'><a href='http://vimeo.com/6660264'>vimeo link</a></div></div>
<div class="paragraph1">
<div class="imageright" style="text-align:right; font-size:10px;"><img style="cursor: pointer" onclick="javascript:showBox('TextureExtractAR',800,600, '444444',this);" src="/blog/assets/TextureExtractAR_t.jpg" alt="Thumbnail - Click me" /><br/>Click for live demo</div>
<p>Click the image on the right to run a live version of the experiment, in case you have the patience to suffer thru the quick-and-dirty hotkey-based UI. </p>
<p><strong>Print the AR marker</strong> (<a href="/blog/assets/TextureExtractAR_marker.pdf" target="_blank">PDF</a> | <a href="/blog/assets/TextureExtractAR_marker.png" target="_blank">PNG</a>) and point your webcam at it. </p>
<p>It&#8217;s running Saqoosha&#8217;s (feature-incomplete) <a href="http://www.libspark.org/log/as3/FLARToolKit/branches/alchemy" target="_blank">Alchemy branch</a> of the FLAR Toolkit, along with Papervision3D.
</div>
<div style="clear:right;"/>
<p>In the future, it would be nice to figure out is how to apply bilinear filtering to the &#8216;deperspectivized&#8217; textures. I could also add a feature to export the textured 3d objects into a 3D file format (probably OBJ) if there&#8217;s any interest. </p>
<p>Conceptually, this piece builds on <a href="/blog/video-projector-effect-advanced/">these</a> <a href="/blog/video-projector-effect/">two</a> video projection tests, and is a modest implementation of one of the themes from <a href="/blog/a-few-ideas-for-augmented-reality/">this post</a> of ideas for augmented reality.
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/augmented-reality-texture-extraction-experiment/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Keyboard Mousebutton Replacement Utility (.NET)</title>
		<link>http://www.zeropointnine.com/blog/keyboard-mousebutton-replacement-utility-net/</link>
		<comments>http://www.zeropointnine.com/blog/keyboard-mousebutton-replacement-utility-net/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 05:25:38 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[dot net]]></category>
		<category><![CDATA[sourcecode]]></category>
		<category><![CDATA[Lots of work]]></category>
		<category><![CDATA[not much payoff]]></category>

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

This one&#8217;s pretty niche: A small Windows utility that emulates the left and right mousebuttons using the keyboard. Specifically, using the right Windows key and the right Alt key.

Why? Because I use a MacBook Pro running exclusively in PC-mode, and I can&#8217;t stand how the mouseclick is implemented with its button-less trackpad. So yeah, pretty [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><img src="/blog/assets/KeyboardMouseButtons_t.png" alt="Screenshot" /></div>
<p>This one&#8217;s pretty niche: A small Windows utility that emulates the left and right mousebuttons using the keyboard. Specifically, using the right Windows key and the right Alt key.
</p></div>
<p>Why? Because I use a MacBook Pro running exclusively in PC-mode, and I can&#8217;t stand how the mouseclick is implemented with its button-less trackpad. So yeah, pretty niche&#8230;</p>
<p>Sorry, no UI to change the hotkey assignments. If you&#8217;re comfortable with C#.NET, the source code is included in the zip file. It may be useful to examine if you&#8217;re interested in learning (1) how to capture keystrokes globally in Windows or (2) how to generate mouse operations programmatically, using some dreadful-looking Windows API interop code that I tried to learn as little as possible about in order to get to work.</p>
<p><a href="/blog/assets/KeyboardMouseButtons.zip"><b>Download</b></a> (source included)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/keyboard-mousebutton-replacement-utility-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complex Spotlight Shadow Caster for Papervision3D</title>
		<link>http://www.zeropointnine.com/blog/complex-spotlight-shadow-caster-in-papervision3d/</link>
		<comments>http://www.zeropointnine.com/blog/complex-spotlight-shadow-caster-in-papervision3d/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 03:01:32 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[flash 3d]]></category>
		<category><![CDATA[sourcecode]]></category>

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

Simulates the projection of shadows coming from a spotlight light source onto irregular surfaces. In the supplied example, an animated MD2 model (from Quake 2) is casting a shadow onto the inside of a sphere. Supported parameters include shadow color, alpha, blur, falloff and texture map size, as well as position, rotation and field of [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><img style="cursor: pointer" onclick="javascript:showBox('shadowcaster',780,780, '444444',this);" src="/blog/assets/shadowcaster_t.jpg" alt="Thumbnail - Click me" /></div>
<p>Simulates the projection of shadows coming from a spotlight light source onto irregular surfaces. In the supplied example, an animated MD2 model (from Quake 2) is casting a shadow onto the inside of a sphere. Supported parameters include shadow color, alpha, blur, falloff and texture map size, as well as position, rotation and field of view. This evolves out of the projection work posted previously.</p></div>
<p><strong>Source:</strong></p>
<p><a href="/blog/assets_code/SpotlightShadowCasterManager.as.txt" target="_blank">SpotlightShadowCasterManager.as</a></p>
<p><strong>Usage:</strong></p>
<p>After instantiating the manager &#8211;</p>
<pre>	_shadowCaster = new SpotlightShadowCasterManager();</pre>
<p>&#8211; assign one or more DisplayObject3D&#8217;s that will block the light from the spotlight:</p>
<pre>	_shadowCaster.registerShadowCasterObject(myMesh);</pre>
<p>Then register one or more meshes that can have shadows cast upon it with <code>registerShadowCasterObject</code>. As the second argument, you must supply a <code>BitmapMaterial</code> utilized by the mesh on which the manager will draw the shadows. Usually, you&#8217;ll want to create a <code>CompositeMaterial</code>, with the <code>BitmapMaterial</code> most likely at the top of the stack. It might look something like this:</p>
<pre>	var compositeMaterial = new CompositeMaterial();
	compositeMaterial.addMaterial( new ColorMaterial(0x888888) );
	var mat:BitmapMaterial = new BitmapMaterial( new BitmapData(1,1) );
	// .. the bitmapdata will get overwritten,
	//    but must contain _something_
	var sphere:TriangleMesh3D = new Sphere(compositeMaterial, 1000);

	_shadowCaster.registerShadowReceiverObject(sphere, mat);</pre>
<p>To update the shadow textures, call</p>
<pre>	_shadowCaster.update();</pre>
<p>&#8211; probably in your <code>onEnterFrame</code> or <code>onRenderTick</code> function.</p>
<p>That&#8217;s enough to get going. From there, it&#8217;s just a matter of adjusting the projector&#8217;s position and orientation in relation to the objects in your scene with the properties <code>projectorPosition</code>, <code>projectorPitch</code>, and <code>projectorRoll</code>. Check the source for the various configurable properties like blur, alpha, color, etc.</p>
<p><strong>Limitations, bugs:</strong></p>
<p><span id="more-366"></span>- As described above, objects must be manually assigned to be either a &#8216;caster&#8217; or a &#8216;receiver&#8217;. These roles aren&#8217;t determined dynamically by the class itself.</p>
<p>- Only one level of shadows is supported. Adding an arbitrary number wouldn&#8217;t be difficult, just cumbersome to manage under the current system, and increasingly expensive.</p>
<p>- Unfortunately, a &#8217;shadow receiver&#8217; object can&#8217;t have its own texture in addition to the one used to cast shadows onto, at least not in a way that looks decent. The reason is that a 3d object in Papervision3D has only one set of UV texture data and the shadow texture overwrites this with every update.</p>
<p>- There&#8217;s undoubtedly a less expensive way to do the raycasting/projection in the main math routine in the private function <code>updateMesh</code>. If you&#8217;re adept at this kind of thing, please send your improvements!</p>
<p>- Ugly and obvious artifacts show up on the &#8216;projectable&#8217; textures when the spotlight is rotated 90 degrees away them. (You may have already noticed this in the previous two projection experiment posts).  Again, I&#8217;d love any solutions anyone has for this.</p>
<p class="creacom">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/" target="_blank">Creative Commons Attribution 3.0 License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/complex-spotlight-shadow-caster-in-papervision3d/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Video Projector Effect, Advanced</title>
		<link>http://www.zeropointnine.com/blog/video-projector-effect-advanced/</link>
		<comments>http://www.zeropointnine.com/blog/video-projector-effect-advanced/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 03:15:22 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[flash 3d]]></category>

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

This version handles arbitrary rotations, field of view / focal length, and uses correct math; the previous example faked it somewhat, doing everything basically with 2D math (but why admit to that? :). I found it twice as difficult getting to this point compared to the version posted a few days ago. It turns out [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><img src="/blog/assets/ProjectorEffectAdv_t.jpg" onclick="javascript:showBox('ProjectorEffectAdv',780,780, '444444',this);" alt="Thumbnail - Click me" style="cursor: pointer" /></div>
<p>This version handles arbitrary rotations, field of view / focal length, and uses correct math; the <a href="/blog/video-projector-effect">previous example</a> faked it somewhat, doing everything basically with 2D math (but why admit to that? :). I found it twice as difficult getting to this point compared to the version posted a few days ago. It turns out that when you want to rotate more than 90 degrees around the x-axis, it&#8217;s good to make friends with quaternions, if only superficially.</p>
<p>And it&#8217;s interactive this time. By the way, is it not a royal pain to design an interface to control more than two axes in Flash for the web?</p>
<p>There&#8217;s still a lot that could be done right / better with this: backface culling (already tried and failed); frustrum culling; per-triangle alpha based on distance and angle to simulate light intensity; per-triangle focus/blur based on distance, maybe (but probably not); a more straightforward way to implement video; shadows&#8230; Basically, anything short of building a renderer-inside-a-renderer.</p>
<p>Bonus points for identifying the band to whom the set list pictured in the third image belongs.</p>
<p>Sorry, still no source.<br />
<br/>&nbsp;
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/video-projector-effect-advanced/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
