<?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>Epic Agency &#124; LABS</title>
	<atom:link href="http://epic.net/labs/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://epic.net/labs</link>
	<description>The very own digital experiences from Epic agency</description>
	<lastBuildDate>Thu, 10 May 2012 15:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>RubyMotion: Debugging Objective-C</title>
		<link>http://epic.net/labs/?p=230</link>
		<comments>http://epic.net/labs/?p=230#comments</comments>
		<pubDate>Thu, 10 May 2012 15:05:12 +0000</pubDate>
		<dc:creator>hugues</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubymotion]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://epic.net/labs/?p=230</guid>
		<description><![CDATA[Following the release of RubyMotion we can finally talk a bit about it (if you haven&#8217;t yet, I definitively encourage you to check it out!) For one of our upcoming project (super ultra top-secret, but you can see the icon [...]]]></description>
			<content:encoded><![CDATA[<p>Following the release of <a href="http://rubymotion.com" target="_blank">RubyMotion</a> we can finally talk a bit about it (if you haven&#8217;t yet, I definitively encourage you to check it out!)</p>
<p>For one of our upcoming project (super ultra top-secret, but you can see the icon <a href="http://dribbble.com/shots/423339-Mystery-project" target="_blank">here</a>  ;) we need to mix a bit of custom Objective-C in the project. &#8220;Vendoring&#8221; the project in RM is a breeze but due to the complexity of this particular piece of code (a custom version of <a href="https://github.com/BradLarson/GPUImage" target="_blank">GPUImage</a>), NSLog is not enough for debugging.</p>
<p>Fortunately, you can use Xcode to debug the Objective-C part super easily. Just start your app in the simulator with rake and open your vendor project in Xcode.</p>
<p>From there, make sure you selected iPhone/iPad simulator as a target and don&#8217;t click on &#8220;Run&#8221;</p>
<p><img class="alignnone" title="Xcode settings" src="http://hli.be/Screen%20Shot%202012-05-10%20at%2016.54.09-evaWvKbODq.png" alt="" width="453" height="253" /></p>
<p>Open &#8220;Product &gt; Attach to process&#8221; and select your app in the process list</p>
<p><img class="alignnone" title="Attach to process" src="http://hli.be/Screen%20Shot%202012-05-10%20at%2016.56.27-c9Aq4t0S3t.png" alt="" width="812" height="712" /></p>
<p>Note that, as it runs in the simulator, your app won&#8217;t appear in the &#8220;Applications&#8221; group but in the &#8220;System&#8221; group.</p>
<p>Once done, just set your breakpoints, watches, &#8230; as you usually would. Everything should work as expected.</p>
<p>Have fun with RubyMotion, we sure do!</p>
]]></content:encoded>
			<wfw:commentRss>http://epic.net/labs/?feed=rss2&#038;p=230</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Share your beats with the Drumlet !</title>
		<link>http://epic.net/labs/?p=164</link>
		<comments>http://epic.net/labs/?p=164#comments</comments>
		<pubDate>Mon, 09 Jan 2012 06:00:20 +0000</pubDate>
		<dc:creator>fabrice</dc:creator>
				<category><![CDATA[Game]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://epic.net/labs/?p=164</guid>
		<description><![CDATA[The Drumlet is the latest music experiment from Epic.net mixing Javascript, Canvas, Web Audio and Social sharing to bring you the very first Drum Machine using these technologies. ]]></description>
			<content:encoded><![CDATA[<p><img alt="Let's play with our epic drum box!" height="500" src="http://epic.net/labs/wp-content/uploads/2012/01/drumlet-header.jpg" width="640" /></p>
<p><iframe src="http://player.vimeo.com/video/34616238?title=0&amp;byline=0&amp;portrait=0" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p><a href="http://drumlet.epic.net"><img alt="Let's play!" src="http://epic.net/labs/wp-content/uploads/2012/01/drumlet-play.jpg" style="display:block; margin:10px auto 40px;" title="Let's play!" /></a></p>
<h2 style="text-transform:uppercase;">About &laquo;&nbsp;The Drumlet&nbsp;&raquo;</h2>
<p>Everything started when discovering the <a href="https://github.com/oampo/Audiolet" title="View the source">Audiolet Javascript library</a>. Audiolet enables sound synthesis and music composition directly through the browser&#39;s Web Audio API</p>
<p>We quicky had the idea to create a small application running this technology and what&#39;s better than creating a <a href="http://en.wikipedia.org/wiki/Drum_machine" title="View the definition on Wikipedia">drum machine</a>?. One of the most famous drum machine being <a href="http://en.wikipedia.org/wiki/Roland_TR-808" title="View the famous drum machine Roland's TR-808">Roland&#39;s TR-808</a> we decided to use its samples as a basis (<a href="http://machines.hyperreal.org/manufacturers/Roland/TR-808/samples/" title="View the sample">view the sample</a>)</p>
<p>We wanted to maintain the machine&#39;s spirit, so we decided to give the Drumlet a vintage and realistic look and feel (Don&#39;t you hear transistors crackling?).</p>
<h2 style="margin-top: 30px; margin-bottom: 15px; text-transform:uppercase;">Technically</h2>
<p>Now that we know what we&#39;re looking at, we chose to start with a 9 tracks machine&nbsp;: kick, snare, tom, rim shot, clap, cow bell, cymbal, open hihat et closed hihat.</p>
<p>On the Javascript side, a track looks like this:</p>
<div style="background-color:#222222; color:#B8B8B8; font-size:13px; line-height:21px; padding:30px; margin:10px 0;"><code style="" type="javascript">var Voice = function(name, audiolet) {<br />
	&nbsp; AudioletGroup.call(this, audiolet, 0, 1);</code></p>
<p>&nbsp;</p>
<p><code style="" type="javascript">&nbsp; // Set the name<br />
		&nbsp; this.name = name;</code></p>
<p><code style="" type="javascript">&nbsp; // Set the sequence<br />
		&nbsp; this.sequence = [<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0,<br />
		&nbsp; &nbsp; 0, 0, 0, 0, 0, 0, 0, 0<br />
		&nbsp; ];</code></p>
<p><code style="" type="javascript">&nbsp; // Create an empty buffer<br />
		&nbsp; this.buffer = new AudioletBuffer(1, 0);</code></p>
<p><code style="" type="javascript">&nbsp; // Create a buffer player<br />
		&nbsp; this.player = new BufferPlayer(audiolet, this.buffer, 1, 0, 0);</code></p>
<p><code style="" type="javascript">&nbsp; // Create the sequencer<br />
		&nbsp; this.durations = new PSequence([0.25], Infinity);<br />
		&nbsp; this.pattern = new PSequence(this.sequence, Infinity);<br />
		&nbsp; // Create trigger to re-trigger the playback of samples<br />
		&nbsp; this.trigger = new TriggerControl(audiolet);</code></p>
<p><code style="" type="javascript">&nbsp; // Create a gain object to control the gain of sample<br />
		&nbsp; this.gain = new Gain(audiolet, 1.00);</code></p>
<p><code style="" type="javascript">&nbsp; // Create an upMixer object<br />
		&nbsp; this.upMixer = new UpMixer(audiolet, 2);</code></p>
<p><code style="" type="javascript">&nbsp; // Connect it all up<br />
		&nbsp; // output of trigger to input of player<br />
		&nbsp; this.trigger.connect(this.player, 0, 1);<br />
		&nbsp; // output of player to input of gain<br />
		&nbsp; this.player.connect(this.gain);<br />
		&nbsp; // output of gain to general output<br />
		&nbsp; this.gain.connect(this.upMixer);<br />
		&nbsp; // all signals will be added together when connected to the output<br />
		&nbsp; this.upMixer.connect(this.outputs[0]);<br />
		}<br />
		extend(Voice, AudioletGroup);</code></p>
</div>
<p>As you can see, a track is a AudioletGroup. And it allows us to encapsulate several elements and play a sample.</p>
<p>These 9 tracks will be connected to the &laquo;&nbsp;Audiolet&nbsp;&raquo; object in our Processor:</p>
<div style="background-color:#222222; color:#B8B8B8; font-size:13px; line-height:21px; padding:30px; margin:10px 0;"><code type="javascript">var Processor = function(sampleRate, bufferSize, bpm) {<br />
	&nbsp; // Create a new Audiolet object<br />
	&nbsp; this.audiolet = new Audiolet(sampleRate, 2, bufferSize);<br />
	&nbsp; this.audiolet.scheduler.setTempo(bpm);</code></p>
<p>&nbsp;</p>
<p><code type="javascript">&nbsp; // Scheduler events array<br />
		&nbsp; this.scheduler = [];</code></p>
<p><code type="javascript">&nbsp; // Create a gain object<br />
		&nbsp; this.gain = new Gain(this.audiolet, 1.00);</code></p>
<p><code type="javascript">&nbsp; // Create an upMixer object<br />
		&nbsp; this.upMixer = new UpMixer(this.audiolet, 2);</code></p>
<p><code type="javascript">&nbsp; // Voices array<br />
		&nbsp; this.voices = {};</code></p>
<p><code type="javascript">&nbsp; // Bassdrum<br />
		&nbsp; this.bd = new Voice(&#39;bd&#39;, this.audiolet);<br />
		&nbsp; this.bd.connect(this.gain);<br />
		&nbsp; this.voices[&#39;bd&#39;] = this.bd;</code></p>
<p><code type="javascript">&nbsp; // Snaredrum<br />
		&nbsp; this.sd = new Voice(&#39;sd&#39;, this.audiolet);<br />
		&nbsp; this.sd.connect(this.gain);<br />
		&nbsp; this.voices[&#39;sd&#39;] = this.sd;</code></p>
<p><code type="javascript">&nbsp; // Tom<br />
		&nbsp; this.tom = new Voice(&#39;tom&#39;, this.audiolet);<br />
		&nbsp; this.tom.connect(this.gain);<br />
		&nbsp; this.voices[&#39;tom&#39;] = this.tom;</code></p>
<p><code type="javascript">&nbsp; // Rim Shot<br />
		&nbsp; this.rs = new Voice(&#39;rs&#39;, this.audiolet);<br />
		&nbsp; this.rs.connect(this.gain);<br />
		&nbsp; this.voices[&#39;rs&#39;] = this.rs;</code></p>
<p><code type="javascript">&nbsp; // Clap<br />
		&nbsp; this.cp = new Voice(&#39;cp&#39;, this.audiolet);<br />
		&nbsp; this.cp.connect(this.gain);<br />
		&nbsp; this.voices[&#39;cp&#39;] = this.cp;</code></p>
<p><code type="javascript">&nbsp; // Cow Bell<br />
		&nbsp; this.cb = new Voice(&#39;cb&#39;, this.audiolet);<br />
		&nbsp; this.cb.connect(this.gain);<br />
		&nbsp; this.voices[&#39;cb&#39;] = this.cb;</code></p>
<p><code type="javascript">&nbsp; // Cymbal<br />
		&nbsp; this.cy = new Voice(&#39;cy&#39;, this.audiolet);<br />
		&nbsp; this.cy.connect(this.gain);<br />
		&nbsp; this.voices[&#39;cy&#39;] = this.cy;</code></p>
<p><code type="javascript">&nbsp; // Open HiHat<br />
		&nbsp; this.oh = new Voice(&#39;oh&#39;, this.audiolet);<br />
		&nbsp; this.oh.connect(this.gain);<br />
		&nbsp; this.voices[&#39;oh&#39;] = this.oh;</code></p>
<p><code type="javascript">&nbsp; // Closed HiHat<br />
		&nbsp; this.ch = new Voice(&#39;ch&#39;, this.audiolet);<br />
		&nbsp; this.ch.connect(this.gain);<br />
		&nbsp; this.voices[&#39;ch&#39;] = this.ch;</code></p>
<p><code type="javascript">&nbsp; // output of gain to input of the upMixer<br />
		&nbsp; this.gain.connect(this.upMixer);</code></p>
<p><code type="javascript">&nbsp; // all signals will be added together when connected to the output<br />
		&nbsp; this.upMixer.connect(this.audiolet.output);<br />
		}</code></p>
</div>
<p>After that, you only have to use the object&#39;s sequencer to play a sample at a given moment. Therefore we have a loop which will run the sequencer for our 9 tracks. On each &laquo;&nbsp;tick&nbsp;&raquo; (The interval is given by the bpm) the sample will be played (or won&#39;t) at a volume defined by the value of the current pattern.</p>
<div style="background-color:#222222; color:#B8B8B8; font-size:13px; line-height:21px; padding:30px; margin:10px 0;"><code type="javascript">var voice = null;<br />
	for(k in this.voices) {<br />
	&nbsp; voice = this.voices[k];<br />
	&nbsp; this.scheduler[k] = this.audiolet.scheduler.play([voice.pattern], voice.durations, function(pattern) {<br />
	&nbsp; &nbsp; // apply amplitude<br />
	&nbsp; &nbsp; if(pattern == 2)<br />
	&nbsp; &nbsp; &nbsp; this.gain.gain.setValue(1.00);<br />
	&nbsp; &nbsp; else if (pattern == 1)<br />
	&nbsp; &nbsp; &nbsp; this.gain.gain.setValue(0.50);</code></p>
<p>&nbsp;</p>
<p><code type="javascript">&nbsp; &nbsp; // re-trigger the sample<br />
		&nbsp; &nbsp; if(pattern &gt; 0)<br />
		&nbsp; &nbsp; &nbsp; this.trigger.trigger.setValue(1);<br />
		&nbsp; }.bind(voice));<br />
		}</code></p>
</div>
<p>Volume&#39;s variation is implemented in the &laquo;&nbsp;scheduler &raquo;&#39;s callback play function. A track sequence can therefore be defined as:</p>
<div style="background-color:#222222; color:#B8B8B8; font-size:13px; line-height:21px; padding:30px; margin:10px 0;"><code>1 &ndash; 0 &ndash; 0 &ndash; 0 &ndash; 2 &ndash; 0 &ndash; 0 &ndash; 0 &ndash; 1 &ndash; 0 &ndash; 0 &ndash; 0 &ndash; 2 &ndash; 0 &ndash; 0 &ndash; 0</code></div>
<p>Now that the audio engine is up, you only have to make things pretty and use graphical interface. To do so, we used the &laquo;&nbsp;canvas&nbsp;&raquo; technology and the <a href="http://easeljs.com/" title="View the EaselJS library">EaselJS library</a>.</p>
<h2 style="margin-top:30px; margin-bottom:15px; text-transform:uppercase;">Shortcuts</h2>
<p>To create something not only funny but also usable, we decided to use several keyboard shortcuts to help everyone creating and playing his/her own music.</p>
<p>These shortcuts are:</p>
<p style="line-height: 30px; vertical-align:top;"><img alt="Spacebar" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/spacebar.jpg" width="96" /> <span style="vertical-align:top; padding-left:5px;">(Spacebar)&nbsp;:</span> <strong style="vertical-align:top;">Play/Pause</strong><br />
	<img alt="Arrow up" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-up.jpg" style="padding-right: 5px;" width="50" /><img alt="Arrow down" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-down.jpg" width="50" /> <span style="vertical-align:top; padding-left:5px;">(Arrow up/down) :</span> <strong style="vertical-align:top;">Volume</strong><br />
	<img alt="Ctrl" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-ctrl.jpg" style="padding-right: 5px;" width="50" /> <span style="vertical-align:top; padding-right:4px;">+</span> <img alt="Arrow up" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-up.jpg" style="padding-right: 5px;" width="50" /><img alt="Arrow down" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-down.jpg" width="50" /> <span style="vertical-align:top; padding-left:5px;">(Ctrl + arrow up/down)&nbsp;:</span> <strong style="vertical-align:top;">Tempo</strong><br />
	<img alt="Delete" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-delete.jpg" style="padding-right: 5px;" width="50" /><img alt="Backspace" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-backspace.jpg" width="50" /> <span style="vertical-align:top; padding-left:5px;">(Delete &amp; backspace)&nbsp;:</span> <strong style="vertical-align:top;">Clear</strong><br />
	<img alt="Arrow left" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-left.jpg" style="padding-right: 5px;" width="50" /><img alt="Arrow right" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/arrow-right.jpg" width="50" /> <span style="vertical-align:top; padding-left:5px;">(Arrow left/right)&nbsp;:</span> <strong style="vertical-align:top;">Switch patterns</strong><br />
	<img alt="Key 1" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-1.jpg" style="padding-right: 5px;" width="39" /><img alt="Key 2" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-2.jpg" style="padding-right: 5px;" width="39" /><img alt="Key 3" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-3.jpg" style="padding-right: 5px;" width="39" /><img alt="Key 4" height="37" src="http://epic.net/labs/wp-content/uploads/2012/01/key-4.jpg" width="39" /> <span style="vertical-align:top; padding-left:5px;">(1, 2, 3, 4)&nbsp;:</span> <strong style="vertical-align:top;">Edit patterns 1, 2, 3, 4</strong></p>
<h2 style="margin-top: 30px; margin-bottom: 15px; text-transform:uppercase;">Sharing</h2>
<p>You can also share your very own tune with your friends using a unique address and maybe we&#39;ll discover you&#39;re really gifted at this!</p>
<h2 style="margin-top: 30px; margin-bottom: 15px; text-transform:uppercase;">Play</h2>
<p>Now it&#39;s time to play!<br />
	We would be really glad to hear what you can compose with it so don&#39;t hesitate to share your creations with us.</p>
<p><a href="http://drumlet.epic.net"><img alt="Let's play!" src="http://epic.net/labs/wp-content/uploads/2012/01/drumlet-play.jpg" style="display:block; margin:10px auto 40px;" title="Let's play!" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://epic.net/labs/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Digital Painting With Photoshop</title>
		<link>http://epic.net/labs/?p=145</link>
		<comments>http://epic.net/labs/?p=145#comments</comments>
		<pubDate>Tue, 21 Jun 2011 09:51:51 +0000</pubDate>
		<dc:creator>Henry</dc:creator>
				<category><![CDATA[Ressources]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[painting]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[ressource]]></category>

		<guid isPermaLink="false">http://epicagency.net/labs/?p=145</guid>
		<description><![CDATA[Because we like sharing, you’ll find this amazing book made by Epic (thanks Henry) relating theory about painting, colours, composition, lights, textures and so on with « How-to » so you can try these technique yourself and share the love.]]></description>
			<content:encoded><![CDATA[<p><img alt="Introduction au digital painting" src="http://www.epicagency.net/files/Labs.png" /></p>
<p><strong>Important : please note the pdf file is entirely in french, sorry about that for all the non french-speaking persons out there.</strong></p>
<p>When I graduated from graphic design a few years (5 to be exact) from now, I had to end my studies with a document about a subject relative to graphic design. At the time I was deeply interested in digital painting and I even wanted to make a living out of it ( quite extraordinary if you consider that today I&#39;m co-managing a digital company ). So it was no surprise to my teachers when I announced my willing to create a french theorical/practical round-up about digital painting.</p>
<p>As a matter of fact It&#39;s entirely written in french simply because it&#39;s my mother tongue and because back then, I felt a lot more confortable writing in french than in english. Moreover, at the time there was no french written good book about the subject. What a shame!</p>
<p>A few monthes later I came with this 145 pages strong book relating theory about painting, colours, composition, lights, textures and so on&#8230;and practical notes with a &quot;how-to&quot;. At the time I spent a lot of time and put all of my efforts gathering sources, exploring techniques and possibilities of this amazing quite new kind of art/design technique&#8230;</p>
<p>I always thought I would share the document someday and it looks like today is the day. Since then, a lot of things obviously changed: photoshop had at least two or three new releases and new talented artists flourished all over the world but you can nonetheless consider this document as a firm basis and a strong first attempt at getting to create your own digital paintings. Moreover, theory didn&#39;t change at all and you can always learn a lot of things about the way things are going on in the real world.</p>
<p>Please note all the illustrations and sources which are not mine and used in the document are all referred in the bibliography located at the very end of the document.Feel free to spread the document all around you and <strong>don&#39;t forget to quote us</strong> because we could always use good karma and kind words.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.epicagency.net/files/Digital_Painting_By_Epicagency.pdf"><img alt="Download it here" src="http://www.epicagency.net/files/Download.png" /></a></p>
<p>&nbsp;</p>
<p><span style="font-size: 10px;">Under a creative commons license&nbsp; : <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/" rel="license">licence Creative Commons Paternit&eacute; &#8211; Pas d&rsquo;Utilisation Commerciale &#8211; Pas de Modification 3.0 non transcrit</a>.</span><br />
	&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://epic.net/labs/?feed=rss2&#038;p=145</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Animate a 3D Model with the timeline</title>
		<link>http://epic.net/labs/?p=5</link>
		<comments>http://epic.net/labs/?p=5#comments</comments>
		<pubDate>Wed, 01 Jun 2011 12:03:23 +0000</pubDate>
		<dc:creator>karim</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://epicagency.net/labs/?p=5</guid>
		<description><![CDATA[If like us, you enjoy 3D animation, you might like what’s in this post ! It’s not magical but it’s still awesome and we’re sure that going through this case will give you tons of ideas to experiment these techniques.]]></description>
			<content:encoded><![CDATA[<p><a href="http://epicagency.net/labs/wp-content/uploads/2011/06/heroe.jpg"><img alt="" class="alignnone size-full wp-image-133" height="400" src="http://epicagency.net/labs/wp-content/uploads/2011/06/heroe.jpg" title="Animate a 3D Model with the timeline" width="640" /></a></p>
<p>We have a supa-secret client, Really really famous, but some confidential reasons prevent us from saying his name. We can&#39;t even say why we can&#39;t say his name. Take it or leave it, you&#39;ll not know.</p>
<p>Through all the mystery surrounding this case, we will try to present a project made for them anyway. All the references, logos, mentions etc were removed from the screenshots and animations below. We can just tell you that :</p>
<p>IT&#39;S ABOUT PLANES&#8230; (dear flash developers, i&#39;m talking about the flying ones, not the 3D primitives also called planes).</p>
<p>Cool huh ? Everybody like planes.</p>
<p>Well, we were asked to develop a greeting card in Augemented Reality. You know, the kind of experiment where you show a black outlined square marker to your webcam, then a magical 3d animation appears and leaves you speechless before so much awesomeness&#8230; the first time you see it at least.</p>
<p>The purpose of this case is not to tell you how to create that kind of experiment. A lot of people did it before us, with many tutorials and great explanations. If you want to learn more about Augmented Reality with a marker, and more precisely about flarToolKit used for this projet, visit this link <a href="http://saqoo.sh/a/en/flartoolkit/start-up-guide">http://saqoo.sh/a/en/flartoolkit/start-up-guide</a>.</p>
<p>Instead we will talk about a little trick that enabled us to make a good 3D animation with less effort.</p>
<h1>The concept</h1>
<p>This is a part of the storyboard we did :</p>
<p><a href="http://epicagency.net/labs/wp-content/uploads/2011/05/Scan3.jpg"><img alt="" class="alignnone size-full wp-image-15" height="381" src="http://epicagency.net/labs/wp-content/uploads/2011/05/Scan3.jpg" title="plane - story board" width="640" /></a></p>
<p>The idea was to make a box opens and places a runway. Trees and a placard appears, then the plane take off and fly in a loop, turning around a rural and snowy landscape until the user removes the marker. Which makes the plane lands and the box closes.</p>
<h1>The 3D Model</h1>
<p>We needed a nice but very simple model of the plane. In fact, it&#39;s a flash project, and even if it&#39;s the awesomest and most incredible technology invented in the world wide web, it needs light data to operate efficiently.</p>
<p>You&#39;ll find below a sketch of the plane and each part that composes it.<br />
	No 3D software was used to build the models, we made them programmatically in as3 with away3D, that allowed us to optimise the complexity and the level of details, the goal was to reduce the number of polygons while keeping a nice appearance of the whole animation.</p>
<p><a href="http://epicagency.net/labs/wp-content/uploads/2011/05/Avion1.jpg"><img alt="" class="alignnone size-full wp-image-16" height="759" src="http://epicagency.net/labs/wp-content/uploads/2011/05/Avion1.jpg" title="plane - first sketch" width="640" /></a></p>
<p>This is the model in flash, just move your mouse around to see the plane in different angles</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/biplan.swf" height="400" title="model biplan" width="640"><param name="quality" value="high" /><param name="base" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" /><param name="movie" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/biplan.swf" /><embed base="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" height="400" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/biplan.swf" title="model biplan" type="application/x-shockwave-flash" width="640"></embed></object></p>
<p>As you can see, we tried to keep the polygons count very low (36 for the plane). All cylinders were reduced to 4 faces. It may look weird, but when we reduce the plane to his final size, the result is quite acceptable. Especially since we applied detailed textures you can see below:</p>
<p><a href="http://epicagency.net/labs/wp-content/uploads/2011/05/textures.jpg"><img alt="" class="alignnone size-full wp-image-53" height="720" src="http://epicagency.net/labs/wp-content/uploads/2011/05/textures.jpg" title="textures" width="640" /></a></p>
<h1>Animate a model created programmatically</h1>
<p>Here we are. Enough talking about <span class="short_text" id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">the aesthetic</span>&nbsp;<span class="hps" title="Cliquer ici pour voir d'autres traductions">aspects of the project.</span></span> The challenge was to animate an object created programmatically from scratch.</p>
<p>For Tweets for Honor, we used the same principle. The body of the spartan was made from basic away3D cubes, placed one by one.<br />
	And we animated all his moves using the tweening engines from <a href="http://www.greensock.com/">greensock</a> (TweenLite and timelineLite mostly) which allowed us to play with the speed of each move without dealing with the frame rate. Indeed, we needed some slow motion and fastforwards which are difficult to render otherwise.</p>
<p>For this project, we decided to do things differently, at least regarding the animation.</p>
<p>We placed on the timeline different movie clips to control the 3D objects. Two planes, one for the X and Z coordinates (top view), and another one for Y coordinates (side view). We animated them as seen below :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/timeline_biplan.swf" height="300" title="Timeline biplan" width="640"><param name="quality" value="high" /><param name="movie" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/timeline_biplan.swf" /><embed height="300" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/timeline_biplan.swf" title="Timeline biplan" type="application/x-shockwave-flash" width="640"></embed></object></p>
<p>Each frame is then used to calculate the coordinates of the 3D plane. Well everything is not that easy, we sometimes needed to multiply the 2D coordinates by a coefficient, sometimes add an offset, in most cases we had to do both. That means a bunch of trials and errors. But once we had our magic formula, it became very easy to modify the 3D animation directly in the timeline.</p>
<p>We did the same for every part of the runway, the landscape, the trees and the placard, using different properties that were not necessarily obvious, like mapping the &quot;xscale&quot; of the 2D element on the &quot;y&quot; position of the corresponding 3D element.</p>
<p>This is what the landscape animation looks like, and it&#39;s totally driven with 2d movie clips placed on the timeline :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/noel2010.swf" height="400" width="640"><param name="quality" value="high" /><param name="base" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" /><param name="movie" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/noel2010.swf" /><embed base="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" height="400" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/noel2010.swf" type="application/x-shockwave-flash" width="640"></embed></object></p>
<h1>Put it all together</h1>
<p>Once all the animations are finished, it only remains to pass them to FlarToolKit, synchronize the opening and closing of the box with the detection and loss of the marker.</p>
<p>You can try it here by yourself, but you need to print the marker <a href="http://epicagency.net/labs/wp-content/uploads/2011/05/marker.pdf" target="_blank">here</a> :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/carte.swf" height="520" title="plane webcam" width="640"><param name="quality" value="high" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="window" /><param name="base" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" /><param name="movie" value="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/carte.swf" /><embed allowscriptaccess="always" base="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/" height="520" id="planeWebcam" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://epicagency.net/labs/wp-content/uploads/2011/05/swf/carte.swf" title="plane webcam" type="application/x-shockwave-flash" width="640" wmode="window"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://epic.net/labs/?feed=rss2&#038;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

