<?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/"
	>

<channel>
	<title>Brian Kadar</title>
	<atom:link href="http://www.briankadar.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.briankadar.com/blog</link>
	<description>Interactive Developer</description>
	<pubDate>Mon, 25 Jan 2010 01:02:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Daffys.com: Building the System</title>
		<link>http://www.briankadar.com/blog/2009/08/daffys-building-the-system/</link>
		<comments>http://www.briankadar.com/blog/2009/08/daffys-building-the-system/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 03:00:18 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[as3]]></category>

		<category><![CDATA[daffys]]></category>

		<category><![CDATA[demo]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.briankadar.com/blog/?p=277</guid>
		<description><![CDATA[I’m really proud of the latest site I worked on, Daffys.com. It’s bold and simple, but has a lot of interesting work under the hood. &#8230;]]></description>
			<content:encoded><![CDATA[<p>I’m really proud of the latest site I worked on, <a href="http://www.daffys.com" target="_blank">Daffys.com</a>. It’s bold and simple, but has a lot of interesting work under the hood. I thought I’d discuss some of the development process behind the site.</p>
<p>When creating a site with dynamic content, I always try to fully digest the designs before I start writing a line of code. I want to extract the rules and systems found in the design and convert them into code that can make the development process easier and more streamlined.</p>
<p>In the case of the Daffy's site, the composition was different for each section, but there was a common thread across all of them. The rules are simple, a group of rectangles are positioned relative to one another with a constant padding between them. Content would be added and removed, and each change would affect the visual composition of the site based on these rules.</p>
<p><img src="http://www.briankadar.com/blog/wp-content/uploads/daffys_home.jpg" alt="Daffys.com" title="Daffys.com" width="500" height="322" class="alignnone size-full wp-image-284" /><br/><img src="http://www.briankadar.com/blog/wp-content/uploads/daffys_grid.jpg" alt="Daffys.com " title="Daffys.com " width="500" height="346" class="alignnone size-full wp-image-283" /></p>
<p>I created a simple XML structure that defines a relationship between two objects by their anchor points and x/y spacing. Think of it as a non-linear linked chain. In the example XML below, rectangle B’s top-left corner is relative to the rectangle A’s bottom right corner. The offset node translates (x/y) the relative position.</p>
<div class="igBar"><span id="lxml-2"><a href="#" onclick="javascript:showCodeTxt('xml-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-2">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;rect</span> <span style="color: #000066;">id</span>=”A”<span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;rect</span> <span style="color: #000066;">id</span>=”B” <span style="color: #000066;">anchor</span>=”tl”<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ref</span> <span style="color: #000066;">id</span>=”A” <span style="color: #000066;">anchor</span>=”br”<span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;offset</span> <span style="color: #000066;">x</span>=”<span style="color: #cc66cc;color:#800000;">0</span>” <span style="color: #000066;">y</span>=”<span style="color: #cc66cc;color:#800000;">0</span>”<span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/rect<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The XML establishes the abstract relationships in the chain. By assigning an actual view (i.e., MovieClip) to each link in the chain, I could use the size data (concrete) in combination with the relationship data (abstract) to find the coordinates I needed to position the elements.</p>
<p>This linkage system is used on every single section of the site. In some cases, rectangles are shared across multiple systems, like when transitioning from the homepage to an interior section, the menu block is transferred from the homepage system to that of the incoming page. </p>
<p>Now when I want to add a new section, all I need to do is write an XML file. Form follows function. </p>
<p>Below is a very simple example of the linkage system in action. Roll over the rectangles and drag the corners to change their size and see the relationships. Click “Show/Hide XML” below to toggle the associated XML, which is color-coded to the rectangles in the example. </p>
<p><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script><br />
<script type="text/javascript" src="http://www.briankadar.com/blog/js/animatedcollapse.js"> 
/*********************************************** 
* Animated Collapsible DIV v2.4- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) 
* This notice MUST stay intact for legal use 
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more 
***********************************************/ 
</script> <script type="text/javascript"> 
animatedcollapse.addDiv('xml_code', 'fade=1,speed=400,hide=1');
animatedcollapse.init(); 
</script><a href="javascript:animatedcollapse.toggle('xml_code')">Show/Hide XML</a> </p>
<div id="xml_code" class="syntax_hilite" style="background-color: #f6f6f6; margin-top: 0px; margin-bottom: 1.2em; padding-bottom: 1em;">
<div style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: bold; font-style: normal;color:#777777;leading: 0px; font-size: 12px;">
&lt;rects&gt;<br />
&nbsp;&nbsp;<span style="color: #ff009a">&lt;rect id="0"&gt;</span><br />
&nbsp;&nbsp;<span style="color: #FFD914;">&lt;rect id="1" anchor="br"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ff009a">&lt;ref id="0" anchor="tr"/&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="45" y="-8"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&nbsp;&nbsp;<span style="color: #30009f">&lt;rect id="2" anchor="tl"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ff009a">&lt;ref id="0" anchor="tr"/&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="8" y="0"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&nbsp;&nbsp;<span style="color: #00a3ea">&lt;rect id="3" anchor="tl"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #30009f">&lt;ref id="2" anchor="bl"/&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="0" y="8"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&nbsp;&nbsp;<span style="color: #1b318a">&lt;rect id="4" anchor="tr"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ff009a">&lt;ref id="0" anchor="br"/&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="0" y="8"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&nbsp;&nbsp;<span style="color: #ff9800">&lt;rect id="5" anchor="bl"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ffdf1a">&lt;ref id="1" anchor="br"/&gt; </span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="8" y="0"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&nbsp;&nbsp;<span style="color: #00b15d">&lt;rect id="6" anchor="bl"&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ff9800">&lt;ref id="5" anchor="tl"/&gt;</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;offset x="0" y="-8"/&gt;<br />
&nbsp;&nbsp;&lt;/rect&gt;</span><br />
&lt;/rects&gt;
</div>
</div>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_rect_example_1596781781"
			class="flashmovie"
			width="500"
			height="400">
	<param name="movie" value="http://www.briankadar.com/blog/demos/daffys/rect_example.swf" />
	<param name="salign" value="tl" />
	<param name="wmode" value="window" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.briankadar.com/blog/demos/daffys/rect_example.swf"
			name="fm_rect_example_1596781781"
			width="500"
			height="400">
		<param name="salign" value="tl" />
		<param name="wmode" value="window" />
	<!--<![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 align="left"><a class="tt" href="http://twitter.com/home/?status=Daffys.com%3A+Building+the+System+http://tinyurl.com/qao44v" title="Post to Twitter"><img class="nothumb" src="http://www.briankadar.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Daffys.com%3A+Building+the+System+http://tinyurl.com/qao44v" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://www.briankadar.com/blog/2009/08/daffys-building-the-system/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamic UV Texture Mapping</title>
		<link>http://www.briankadar.com/blog/2009/03/dynamic-uv-texture-mapping/</link>
		<comments>http://www.briankadar.com/blog/2009/03/dynamic-uv-texture-mapping/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 02:51:36 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[3d]]></category>

		<category><![CDATA[papervision]]></category>

		<category><![CDATA[pearl jam]]></category>

		<category><![CDATA[texture]]></category>

		<category><![CDATA[uv map]]></category>

		<guid isPermaLink="false">http://www.briankadar.com/blog/?p=95</guid>
		<description><![CDATA[When working on the Pearl Jam site, I needed a way to break apart a single image into 100 segments, while minimizing the performance hit &#8230;]]></description>
			<content:encoded><![CDATA[<p>When working on the Pearl Jam site, I needed a way to break apart a single image into 100 segments, while minimizing the performance hit that comes with such a large number of objects. Instead of creating multiple BitmapData objects, I used UV texture mapping to achieve the result. </p>
<p>Working with the geometry of an object in Papervision3D can be a very daunting task; in order to do it you need an intimate knowledge of the object’s mesh structure (triangles, vertices, uvs). Instead of explaining the parts of an object's geometry here, check out this excellent <a href="http://www.dispatchevent.org/calebjohnston/papervision3d-introduction-p2/">post</a>.  </p>
<p>Starting with the basic primitives, I created a utility class that dynamically adjusts the UV texture mapping of an object. So far there are only methods for the <code>Plane</code> and <code>Cube</code> primitives. For the Cube, you can isolate individual sides (i.e., <code>Cube.FRONT</code>). The class takes into account the respective mesh structures of the primitives (number of segments, triangle order) to properly adjust the UV coordinates.</p>
<p>You can now very simply adjust the UV mapping of a Plane using the code below:</p>
<div class="igBar"><span id="lactionscript-5"><a href="#" onclick="javascript:showCodeTxt('actionscript-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-5">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #001bff; font-weight: bold;">var</span> plane:Plane = <span style="color: #001bff; font-weight: bold;">new</span> Plane<span style="color: #303130;">&#40;</span> material, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">100</span> <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #001bff; font-weight: bold;">var</span> rect:Rectangle = <span style="color: #001bff; font-weight: bold;">new</span> Rectangle<span style="color: #303130;">&#40;</span> <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #cc66cc;color:#800000;">0</span>, .<span style="color: #cc66cc;color:#800000;">5</span>, .<span style="color: #cc66cc;color:#800000;">5</span> <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">UtilsUV.<span style="color: #006600;">applyPlaneUV</span><span style="color: #303130;">&#40;</span> plane, rect <span style="color: #303130;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and for a Cube:</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showCodeTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #001bff; font-weight: bold;">var</span> cube:Cube = <span style="color: #001bff; font-weight: bold;">new</span> Cube<span style="color: #303130;">&#40;</span> materialsList, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">100</span>, <span style="color: #cc66cc;color:#800000;">100</span> <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #001bff; font-weight: bold;">var</span> rect:Rectangle = <span style="color: #001bff; font-weight: bold;">new</span> Rectangle<span style="color: #303130;">&#40;</span> <span style="color: #cc66cc;color:#800000;">0</span>, <span style="color: #cc66cc;color:#800000;">0</span>, .<span style="color: #cc66cc;color:#800000;">5</span>, .<span style="color: #cc66cc;color:#800000;">5</span> <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">UtilsUV.<span style="color: #006600;">applyCubeUV</span><span style="color: #303130;">&#40;</span> cube, rect, Cube.<span style="color: #006600;">FRONT</span> <span style="color: #303130;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The <code>Rectangle</code> parameter represents the area of the original texture that you want to be drawn, where the values are between 0 and 1. This is similar to the Rectangle’s usage in the BitmapData.draw() method. So the rectangles in the code above will display the top left quadrant of the texture; alternatively, <code>new Rectangle(.5, .5, .5, .5)</code> would display the bottom right quadrant.</p>
<p>By manipulating the UV coordinates, you can minimize the number of materials and bitmaps that you use in your project. Instead of creating multiple bitmaps/materials, you can use a single one for multiple objects, adjusting the UV mapping to vary the texture. In the Pearl Jam site, all 100 cubes use a <em>single</em> <code>BitmapData</code> and a <em>single</em> <code>BitmapMaterial</code>, providing a huge performance boost. It can also be used for basic texture animations (translation, zoom, etc.), by animating the rectangle’s properties and applying the new UV coordinates each render.</p>
<p>One cool trick is to supply negative numbers in the Rectangle object. You can get a “doubleSided” effect on an object, displaying a mirror image of the texture, by using <code>new Rectangle(0, 0, -1, 1)</code>. In Pearl Jam, the underside of the cube is using the same material as the top, but with reverse UV mapping.</p>
<p>Imported models and other custom meshes will require more specific manipulation of the UV coordinates. However, using the Plane and Cube examples, this class can easily be expanded to work with the other primitives (<code>Sphere</code>, <code>Cylinder</code>, and <code>Cone</code>.)</p>
<p><strong>Whoops</strong>. Download the class <a href="http://www.briankadar.com/blog/demos/uv-mapping/UtilsUV.as.txt" target="_blank">here</a>.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Dynamic+UV+Texture+Mapping+http://tinyurl.com/cexkgx" title="Post to Twitter"><img class="nothumb" src="http://www.briankadar.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Dynamic+UV+Texture+Mapping+http://tinyurl.com/cexkgx" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://www.briankadar.com/blog/2009/03/dynamic-uv-texture-mapping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FWA Interview</title>
		<link>http://www.briankadar.com/blog/2009/03/fwa-interview/</link>
		<comments>http://www.briankadar.com/blog/2009/03/fwa-interview/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 18:48:02 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[fwa]]></category>

		<guid isPermaLink="false">http://www.briankadar.com/blog/?p=72</guid>
		<description><![CDATA[Just sent out my interview for the FWA, officially ending my ability to edit, adjust, and completely rewrite it every 15 minutes. Quite an honor &#8230;]]></description>
			<content:encoded><![CDATA[<p>Just sent out my interview for the FWA, officially ending my ability to edit, adjust, and completely rewrite it every 15 minutes. Quite an honor to be asked to write one, but a head buried in ActionScript does not make me a poet&#8212 hopefully I was able to get some words of wisdom in. I'll be posting pieces of the interview here once it goes live, and as I remember things I left out, I'll add them in.</p>
<p><strong>March 31, 2009</strong>: It's up! Check out the interview on <a href="http://www.thefwa.com/?app=interviews&#038;id=347" target="_blank">the FWA</a>. Below are a selected bunch of the questions.</p>
<p><strong>Q. What do you do for inspiration?</strong></p>
<p>Absolutely nothing. Really. I just hope it finds me when I’m not looking, and that’s usually when I get my best ideas. I was once told that your ideas aren’t yours at all. That is, an original idea never comes out of thin air; it’s always influenced by something or someone else, whether or not you’re consciously aware of it. So when I have a problem to solve, I sit back, and let my brain do the work for me. </p>
<p><strong>Q. What do you regard as being your biggest achievement?</strong></p>
<p>During my sophomore year in college, I visited some web design shops on a class fieldtrip—they were firstborn, The Chopping Block, Organic, and a few others. A couple years later when I moved back home and unpacked my stuff, I found a business card with the name Vas Sloutchevsky on it. I tacked it on the wall above my desk, as a reminder of the kind of work I wanted to be doing.</p>
<p>Fast forward a couple years and I’m working side by side with Vas and many of the interactive pioneers I visited that day on the field trip. To me, that’s a humongous personal achievement. Hopefully I’m doing the kind of the work that had inspired me in the first place. </p>
<p><strong>Q. What did your very first site look like? Is it still online?</strong></p>
<p>I’ve noticed that most interviewees evade this question, but I’m quite proud of how Flash and I first met. Let me tell you a story…</p>
<p>It was the summer of 2000 and I was interning at a dot-com-startup called M2card, an online-centered debit card for teenagers. Based on the timeframe you can probably guess as to the company’s eventual fate. I was just a general intern, helping with market research and other fun stuff. Their website was in development by a little company called Organic, and was using this new, cutting edge “Flash” technology. And it wasn’t going to launch for another 3 months. So I asked if I could take a crack at designing an interim website. I did a few comps, they chose a direction and agreed to let me do it. Then I said I wanted to make it in Flash, but they told me it was too ambitious. Little did they know that I had downloaded the Flash 4 trial the day before.</p>
<p>Long story short, I end up wiggling my way into Flash and finishing the web site before the trial expired. They eventually bought the software and some books so the tech guys could catch up. It turned out to be good for everyone involved. I had an opportunity to dive into Flash for the first time, and the company received press for their website literally being “designed by a teenager, for teenagers.” </p>
<p>Thanks for listening, here it is:  <a href="http://www.briankadar.com/fwa/m2card/" target="_blank">http://www.briankadar.com/fwa/m2card/</a></p>
<p><strong>Q. Have you written any books, if not do you plan to?</strong> </p>
<p>I recently worked with a great developer who is an author of an AS book. I helped him out with something and jokingly asked for a 20% cut of his next book. He replied, “You may be disappointed at the numbers.”</p>
<p><strong>Q. What was the toughest thing you ever did with Flash? How long did you spend on it? Is it still online?</strong></p>
<p>About a year ago, I worked on a website that was an ambitious data visualization of the entire bible (in 3d, of course). Heavy stuff. Unfortunately, the client got in the way of six months of hard work and it never quite made it. The Starter Wife website was a huge undertaking, an ambitious 3d virtual world built on top of NBC’s very beta social networking backend—that was a big lesson on working with The Man. </p>
<p><strong>Q. Do you think Flash is here to stay?</strong></p>
<p>Not sure. This Web 2.0 (3.0…n.0) stuff is very scary for a Flash developer. Some days I think we’re toast, and every now and then you’ll see a flash site that makes a great argument for the cause. Much of the criticism of Flash comes from it being pigeonholed as annoying banner ads, and chronic misuse. When Papervision3D first broke out, there were 4,239 sites with floating rectangles, followed by 2,317 sites with a 3d globe, preceded by 1,415 sites with turning pages. I swore I’d never use it. But those are the growing pains of new technology; eventually we find ways to take something from a cool trend to a powerful tool. It’s a matter of pairing ideas with the right technology, which may or may not always be Flash (yes, it’s true)—but when it is, nothing comes close, is as exciting, or is as pervasive on the web. Except for Silverlight.* </p>
<p><strong>Q. What are your views on design/graphic school. Do you think someone can get into the field without educational experience in a school environment?</strong></p>
<p>Going to design school does not necessarily make you a designer. This field is multidisciplinary—a blend of art, mathematics, science, sociology. I think that in order to be great you need a working knowledge of all of these things; a well rounded education should make you a better problem solver. I grew up having competing interests and in the arts and sciences, so spending time in each gave me a rich arsenal for interactive work. </p>
<p><strong>Q. How have you learned so many Flash/design skills and techniques and can you offer any advice for newbies?</strong></p>
<p>It takes a long time to be good and even longer to be great; you should start now because it’s a constant game of catching up. By the time I finish writing this interview someone will have figured out a way to turn baseball cards into 3d games. Damnit. It’s the challenge of executing ideas, in tangible form, that makes the field so exciting. But one thing that helps me sleep at night is that the greatest work does not require the latest technology—it’s when the design and technology combine to make the whole greater than the sum of its parts. 1+1=3.</p>
<p><strong>Q. What is the most expensive thing you have bought in the last week?</strong></p>
<p>New York Mets tickets, many of them. Anyone who follows baseball will see that I do not invest wisely.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=FWA+Interview+http://tinyurl.com/dmck6l" title="Post to Twitter"><img class="nothumb" src="http://www.briankadar.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=FWA+Interview+http://tinyurl.com/dmck6l" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://www.briankadar.com/blog/2009/03/fwa-interview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free the mouse: HandCursor3D</title>
		<link>http://www.briankadar.com/blog/2009/03/free-the-mouse-handcursor3d/</link>
		<comments>http://www.briankadar.com/blog/2009/03/free-the-mouse-handcursor3d/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 00:37:25 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[3d]]></category>

		<category><![CDATA[demo]]></category>

		<category><![CDATA[mouse]]></category>

		<category><![CDATA[papervision]]></category>

		<guid isPermaLink="false">http://www.briankadar.com/blog/?p=36</guid>
		<description><![CDATA[One of my goals when developing the Pearl Jam game was to make the 3d experience as tactile as possible. I wanted it to feel &#8230;]]></description>
			<content:encoded><![CDATA[<p>One of my goals when developing the Pearl Jam game was to make the 3d experience as tactile as possible. I wanted it to feel like you were really touching, grasping, and moving the cubes—in these respects, the system cursor is a bit on the cold side. That’s where the HandCursor3D comes in.</p>
<p>Part of the inspiration for this idea is from one of my favorite commercials of all time—<a href="" target="_blank">HP Digital Crime Fighting</a> by <a href="http://www.gspsf.com" target="_blank">Goodby, Silverstein &#038; Partners</a>. The cursor is executed so stunningly that it becomes another actor (if not the lead) in the spot. The element of surprise is guaranteed every time—that thing we use to point and click is suddenly alive and breathing. </p>
<p>Last fall, <a href="http://www.digitalpictures.com.au" target="_blank">digitalpictures</a> created a handcursor in 3d space for <a href="http://www.saveyoursensible.com" target="_blank">saveyoursensible.com</a>, one of the first implementations of its kind. However, the cursor was only 3d when the mouse was pressed and touching one of two objects. Moving around, between, and over the objects was still a 2d experience.</p>
<p>The area between objects is <em>exactly</em> the conundrum. The traditional mouse gives us an absolute  x and y position, and it’s up to us to find the z/depth. When there’s a 3d object under the cursor, we have a point of reference to find the z position. When there’s nothing there, the result is infinite—literally. Take the analogy of shining a flashlight, you can only see the beam when there is an object in its path, otherwise it disappears into thin air.</p>
<p>My solution to the empty space is, well, to put something in it! I created an invisible sphere that surrounds the entire site—let’s call it a “forcefield” (I’ve never watched an episode of Star Trek in my life, by the way). Now when the cursor moves between the visible objects, it is technically “hitting” something, giving us that elusive z position. </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_HandCursor3D_1271650666"
			class="flashheader"
			width="590"
			height="330">
	<param name="movie" value="http://www.briankadar.com/blog/demos/handCursor3D/HandCursor3D.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.briankadar.com/blog/demos/handCursor3D/HandCursor3D.swf"
			name="fm_HandCursor3D_1271650666"
			width="590"
			height="330">
	<!--<![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><br/></p>
<p>Okay, now back to when the cursor is actually over the objects. To get that “touch” feeling, it needs to react to the shape of the object. For basic primitives like cubes and spheres that have square proportions, the <code>DisplayObject3D.lookAt()</code> method does the trick. Since the lookAt method always orients the mouse towards the origin, it gives the illusion of the cursor hugging around the corners and sides of the cubes on the site. </p>
<p>For objects with irregular and elongated shapes, the <code>lookAt()</code> illusion does not hold up as well—as you move farther from the object’s origin, the cursor plane turns perpendicular to the object. In this situation, there are a couple of options. The first, less elegant solution would be to surround the object itself in one or more invisible bounding spheres that approximate its general size and shape, making the angles less severe. </p>
<p>The second, and more accurate, solution would be to orient the cursor to the normal of the hit <code>Triangle3D</code>. Using the transform object from the core <code>Mouse3D</code> class is a good start, but I found the results to look a little strange and unnatural. </p>
<p>Since the forcefield sphere is surrounding the objects, the 2d to 3d hit test will always return a position on the sphere and never on any of the objects inside of it. So in order to know when the cursor is over one of these objects, we create a <code>ViewportLayer</code> for each object and listen to its mouse events. When a layer is rolled over, we set the interactive property of the forcefields sphere’s material to false. When no layer is rolled, we set it back to true. I added some subtle easing to the cursor position, which helps the transition between hitting the forcefield and the other objects.</p>
<p>Here is the basic usage:</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showCodeTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-8">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #001bff; font-weight: bold;">var</span> cursor:HandCursor3D = <span style="color: #001bff; font-weight: bold;">new</span> HandCursor3D<span style="color: #303130;">&#40;</span> viewport <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">scene.<span style="color: #006600;">addChild</span><span style="color: #303130;">&#40;</span> cursor <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// register object layer</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cursor.<span style="color: #006600;">registerLayer</span><span style="color: #303130;">&#40;</span> myObject.<span style="color: #006600;">container</span> <span style="color: #303130;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// register forcefield</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cursor.<span style="color: #006600;">registerForcefieldObject</span><span style="color: #303130;">&#40;</span> sphere <span style="color: #303130;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now that the basic logic is in place, there are a few more things that you can do to emphasize the effect. In the site and example here, the cursor gets the same fog treatment as the rest of the objects, a nice visual indicator of its position in z-space. Also, by toggling the <code>ViewportLayer.forceDepth</code> property, the cursor is always above the objects when hovering, but is sorted normally when it is locked in position and dragging. </p>
<p>Downlod the demo source <a href="http://briankadar.com/blog/demos/handCursor3D/handCursor3D.zip">here</a>. The class is far from perfect, but is a good start for developers looking to expand on the idea.</p>
<p><em>Note: There is some funkiness when your mouse leaves the stage and comes back. It eventually resolves itself, but I'm looking into it.</em></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Free+the+mouse%3A+HandCursor3D+http://tinyurl.com/d5rtb9" title="Post to Twitter"><img class="nothumb" src="http://www.briankadar.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Free+the+mouse%3A+HandCursor3D+http://tinyurl.com/d5rtb9" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://www.briankadar.com/blog/2009/03/free-the-mouse-handcursor3d/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Making of the Pearl Jam Ten Game</title>
		<link>http://www.briankadar.com/blog/2009/03/the-making-of-pearl-jam-ten-game/</link>
		<comments>http://www.briankadar.com/blog/2009/03/the-making-of-pearl-jam-ten-game/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 00:10:27 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[3d]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[pearl jam]]></category>

		<guid isPermaLink="false">http://www.briankadar.com/blog/?p=5</guid>
		<description><![CDATA[Every now and then a project comes along that reminds you how much fun it is to be a developer—all  the other sites and &#8230;]]></description>
			<content:encoded><![CDATA[<p>Every now and then a project comes along that reminds you how much fun it is to be a developer—all  the other sites and banner ads before it were just practice. It’s when the design, technology, and client all work together to make something that’s <a href="http://www.seattlesoundmag.com/2009/03/play-pearl-jams-ten-game/" target="_blank">seriously</a> cool. </p>
<p>There’s something very tangible about this design. It takes 3d on the web from a passive experience to a participatory sport, challenging the user to experience a website hands-on. The elements are incredibly simple—when you break it down it’s just basic geometry—but it’s <em>engaging</em>, and that’s the beauty of it.</p>
<p>That’s not to say that it’s easy for everyone to use. It’s a tough mental exercise to use your mouse, which only moves up, down, left and right (problem somewhat solved, I think), to <em>truly</em> interact in 3d space—and all while trying to solve a puzzle. So the challenge was to make the site tactile and intuitive, and I think we succeeded in doing both. I added things like the 3d hand cursor that helped position the user in the 3d space and give a more physical feeling to the experience.</p>
<p>Nevertheless, it’s still <a href="http://www.soundonthesound.com/2009/03/03/pearl-jam-playing-with-my-head/" target="_blank">fucking hard</a>—but that’s a good thing, and you get rewarded along the way with a bad ass visualizer. The average time of the site is out of this world, people are spending 30, 45 minutes, an hour on the site. Yes, some Pearl Jam fans will do anything to sneak a peek, but it shows that users are accepting the challenge of a new kind of online experience. Armando Alves (<a href="http://www.twitter.com/armandoalves/"  target="_blank">@armandoalves</a>) wrote up a <a href="http://www.asourceofinspiration.com/2009/03/03/pearl-jam-ten-special-edition-the-web-game/"  target="_blank">nice piece</a> about the site, suggesting that the current online generation is expecting higher levels of engagement on the web. To be honest, I was a bit surprised by the positive reaction of hardcore PJ fans… Here’s a snippet that only gets <a href="http://www.mamapop.com/mamapop/2009/03/pearl-jammmmmmm.html"  target="_blank">better</a>…</p>
<blockquote><p>…here's the thing. The whole thing hovers in this trippy 3-dimensional space that you can rotate any which way with your mouse, so you can actually see the board and the puzzle pieces from virtually any angle. If you were so inclined, and this is not necessarily condoned by MamaPop, Pearl Jam, or this article's author, BUT... IF you were inclined to smoke a little pot before playing the Pearl Jam Ten Game, I'd be willing to bet that you might pass a nice chunk of time…</p></blockquote>
<p>I got to work side by side with Vas Sloutchevsky, who designed the site and is one of the founding fathers of interactive design as we know it. A lot of designs come from excuses to use a certain technology, and that’s where fads arise. Vas treats things differently, and embraces the latest technologies (in this case, 3d) as tools to better display information and create more interesting interactions. By doing that, his designs become inevitable—neither the technology nor the design could exist without the other. Same goes for Pearl Jam, he didn’t design with Papervision3D in mind, but it seems as if Papervision3D was designed for it. Nothing is out of place. Inevitably, this deserves a post in and unto itself. </p>
<p>That sense of inevitability between the design and technology made the development process really exciting, and surprisingly fast. Of course, I had a little <a href="http://blog.zupko.info/"  target="_blank">help</a> from my friends to get it off the ground—and hopefully I can return the favor in short order. I had one month to finish the site (lucky for me, that month was February, the shortest of them all). Here is prototype <a href="http://www.briankadar.com/work/pearljam/proto/01/"  target="_blank">numero uno</a>. In my next posts I’ll be sharing some of the behind-the-scenes ideas and source code that I think you’ll find very useful.</p>
<p>And if you're wondering what I'm talking about: <a href="http://www.pearljamtengame.com"  target="_blank">rock on</a>.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=The+Making+of+the+Pearl+Jam+Ten+Game+http://tinyurl.com/dnheut" title="Post to Twitter"><img class="nothumb" src="http://www.briankadar.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=The+Making+of+the+Pearl+Jam+Ten+Game+http://tinyurl.com/dnheut" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://www.briankadar.com/blog/2009/03/the-making-of-pearl-jam-ten-game/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
