<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Everyday Flash</title>
	
	<link>http://www.everydayflash.com/blog</link>
	<description>Creative use of technology. A blog about 3D Flash and Actionscript by Bartek Drozdz</description>
	<lastBuildDate>Tue, 23 Jun 2009 15:28:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/EverydayFlash" type="application/rss+xml" /><item>
		<title>My presentation at Warsaw Flash Camp 2009</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/zwj9sOcBnAg/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/06/23/warsaw-flash-camp-2009/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 14:51:51 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[News & Events]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[adobe user group]]></category>
		<category><![CDATA[flash camp]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[warsaw]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=367</guid>
		<description><![CDATA[
On June 9th the Polish Adobe User Group organized a Flash Camp in Warsaw. It was the first meeting of this kind in Poland. I had the privilege to be one of the speakers. It was a one day event featuring 6 sessions all related to Flash &#038; Flex. It aroused great interest in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/28455087@N08/sets/72157619452685259/detail/" title="More pictures from Warsaw Flash Camp 2009"><img src="http://farm4.static.flickr.com/3644/3650817392_a7e749d0a8_o.jpg" width="520" height="294" alt="More pictures from Warsaw Flash Camp 2009" border="0"/></a></p>
<p>On June 9th the <a href="http://www.g-media.pl/aug/">Polish Adobe User Group</a> organized a <strong><a href="http://www.g-media.pl/aug/flashCamp/index.html">Flash Camp</a></strong> in Warsaw. It was the first meeting of this kind in Poland. I had the privilege to be <strong>one of the speakers</strong>. It was a one day event featuring <strong>6 sessions</strong> all related to Flash &#038; Flex. It aroused great interest in the local Flash Community and <strong>more than 300 people</strong> attended  </p>
<p>We kicked off in the morning with a very comprehensive presentation by <a href="http://www.webkitchen.be/">Serge Jespers</a> on the Flash Platform. Serge went through a lot of interesting projects including some of the best <a href="http://www.webkitchen.be/2009/04/29/the-power-of-the-flash-platform-part-2-augmented-reality/">Augmented Reality</a> examples. He also showcased his favorite AIR applications. Apparently AIR is not used only for Twitter clients! But seriously, I neglected this technology so far, but I promised myself to fix this in the near future. I&#8217;m looking for some ideas for a simple AIR app now&#8230; a Collada viewer maybe?</p>
<p>Next, the Platform Evangelist from Poland, <a href="http://www.riaspace.net/">Piotr Walczyszyn</a> gave us an insightful presentation on <strong>Flash Catalyst and the new Flash Builder</strong>. I use FDT to do all my Flash stuff for some time now, so all the things he presented were totally new to me. I must say I was surprised how fast and efficient the new workflow is. Things like working directly with <strong>PSD files in Catalyst</strong> look great (how many hours have I spent &#8220;cutting&#8221; PSD files and importing them into Flash!) He build a complete application connected to a database without writing a single line of code! It was amazing&#8230; and a bit frightening too ;)</p>
<p><a href="http://nordicnets.com/main/">Wojtek Ptak</a> made a great presentation about building <strong>large scale RIA&#8217;s</strong>. Usually this kind of applications are not my primary interest but Wojtek showed us some really inspiring stuff and it was a pleasure to listen to him speaking.</p>
<p>Unfortunately I could not attend the other sessions, because I was rehearsing my own. It was my first public presentation, so I was pretty excited but also a bit nervous, especially that I did not expect such a huge crowd. </p>
<p>During my session, I focused on <strong>3D in Flash</strong> (of course!). By showing some new and old demos I tried to explain the <strong>fundamental concepts of 3D graphics</strong> and how they are <strong>implemented in Actionscript</strong>. After my session I had a few minutes to answer some questions. Most of them were about <strong><a href="http://blog.papervision3d.org">Papervision3D</a></strong>, and the nature of those questions clearly showed that they were coming from <strong>very experienced developers</strong>. I did my best to answer all of them.</p>
<p>Overall it was a great experience, and I&#8217;d like to thank the organizers for inviting me. I like the idea of public speaking. It&#8217;s a great way to share some thoughts and knowledge, but also, most importantly, to meet interesting people. I feel it nicely complements my blogging experience, so from now on I&#8217;ll be looking for more speaking opportunities.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=zwj9sOcBnAg:WruW3dxtl9c:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=zwj9sOcBnAg:WruW3dxtl9c:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=zwj9sOcBnAg:WruW3dxtl9c:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/zwj9sOcBnAg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/06/23/warsaw-flash-camp-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/06/23/warsaw-flash-camp-2009/</feedburner:origLink></item>
		<item>
		<title>Unity3D is awesome!</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/bSTyFuvs5g0/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/05/27/flash-vs-unity3d/#comments</comments>
		<pubDate>Wed, 27 May 2009 10:55:52 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[unity3d]]></category>
		<category><![CDATA[3d games]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[macbook pro]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=289</guid>
		<description><![CDATA[
How I learned to stop worrying about plugin penetration and love Unity3D
I started this blog almost 2 years ago with an idea to explore the world of 3D in Flash and learn new stuff on the way. I quickly fell in love with Papervision3D. It offered a whole new world of possibilities for someone like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unity3d.com" title="Lerpz character from Unity 3D Game Tutorial" ><img src="/unity3d/lerpz.jpg" border="0" width="520"/></a></p>
<p><strong>How I learned to stop worrying about plugin penetration and love Unity3D</strong></p>
<p>I started this blog almost 2 years ago with an idea to explore the world of <strong>3D in Flash</strong> and learn new stuff on the way. I quickly fell in love with <a href="http://blog.papervision3d.org/">Papervision3D</a>. It offered a whole new world of possibilities for someone like me &#8211; bored with buttons &#038; dropdowns and not particularly interested in building Flex-type applications. </p>
<p>Unfortunately the <strong>performance limitations</strong> of Flash Player prevented me from going far beyond the demos I posted on this blog. Creating a solid piece of <strong>3D in Flash</strong>, with a decent frame rate is either <strong>impossible</strong> or requires an insane amount of code optimization. It often means resorting to <strong>low level programming</strong>. I think it is  dangerous, because it&#8217;s easy to loose track of the overall picture then. I feel that this is what happened to me the last few months.</p>
<p>I sure heard about <a href="http://unity3d.com/">Unity3D</a> before, but, as it often happens, I did not have time to take a closer look. I applied for the Unity 2.5 beta test program back in February. I was accepted and got a 30-day copy of the software. What happened next? I <strong>opened it only once</strong> before the trial expired. </p>
<p>It&#8217;s just hard to move to another software/platform when you are so <strong>completely immersed in Flash</strong>. Unity3D ended on my perpetual to-do list alongside with so many other things. I am sure many of you feel the same way.</p>
<p><strong>A new toy</strong></p>
<p>Recently I bought a <strong>Macbook Pro</strong>. My first Mac ever! A friend suggested that I move all my projects and workspace to the Mac immediately to make the transition fast. Unfortunately I had some difficult and urgent projects to finish, and ultimately I decided to stick with Flash on the PC for a while. </p>
<p>I had to do something with the Mac then&#8230; and that&#8217;s where <a href="http://unity3d.com/">Unity3D</a> comes in. Additionally, this time I decided to buy a license, thinking that spending those 150 EUR extra will make me even more motivated.</p>
<p>After just a few hours I was amazed. <strong>And I mean AMAZED!</strong> You can check the <a href="http://unity3d.com/gallery/live-demos/tropical-paradise.html">Tropical Paradise demo</a> if you haven&#8217;t seen it yet, download the <a href="http://unity3d.com/unity/download">trial copy</a> and start exploring the <a href="http://unity3d.com/support/resources/tutorials/3d-platform-game">3D Game Tutorial</a> to see what I mean. </p>
<p>It&#8217;s not only how fast the 3D rendering is. Unity3D has a very intuitive interface organized around a simple and clear concept. I can literally see myself doing 3D games in a matter of weeks from now. Doesn&#8217;t take long to realize the <strong>sad truth that Flash is far behind</strong> in almost every aspect.</p>
<p><strong>The myth of high penetration</strong></p>
<p>I do not want to do a list of pros and cons or some Flash vs. Unity3D comparison here. For a person who wants to do 3D for the web <strong>Unity3D is the winner by knockout</strong> and it makes no sense to elaborate on the subject. </p>
<p>However, there is one common argument against Unity3D. It&#8217;s the <strong>low penetration</strong> rate of the web plugin. While Flash Player is at 98%, <strong>Unity3D is probably at < 1%</strong>. Aye! That sounds bad, doesn&#8217;t it? I thought so too, but I made some thinking and researched a bit. Now please consider these points:</p>
<ul>
<li>Unity3D plugin is only <strong>~4MB</strong> and it&#8217;s installation is seamless. In most cases, it doesn&#8217;t even require browser restart. Thanks to this it has a <strong>high successful-install rate</strong>, which means it&#8217;s share of the market will be quickly growing. You can read a whole article on this topic <a href="http://blogs.unity3d.com/2008/03/31/thoughts-on-browser-plugin-penetration/">here</a>.</li>
<li>Content created with Unity3D can be <strong>visually and interactively much superior</strong> to anything you can do with Flash. This will convince people that the little extra effort required to install the plugin is worth it.</li>
<li><strong>Most important argument</strong>: people access content from different devices. There are mobile phones, consoles, multi-touch interfaces etc. PC is no longer the king. Unity3D can be published for two of the most successful platforms out there: <strong>iPhone and Wii</strong>. &#8220;Web penetration&#8221; has no practical meaning in this case.</li>
</ul>
<p>So, if you think Unity3D is not worth looking at because of the low penetration of the web plugin, think again!</p>
<p>This blog note may seem emotional. It is! I feel I have discovered the <strong>perfect technology</strong>, that I have been looking for and I just wanted to share. Now I need to master Unity3D as quickly as possible. On my way I will certainly discover it&#8217;s flaws&#8230; it must have some. Maybe later I will find a more objective way to <strong>compare Flash and Unity</strong>. </p>
<p><strong>Flash is much more than 3D</strong> and there are multiple directions it is evolving in. I am not predicting &#8220;the end of Flash&#8221; or anything like that &#8211; it would be ridiculous. Unity3D on the other hand, with all it&#8217;s coolness is still the <strong>new kid on the block</strong>. It might be a huge success but it might as well share <strong>the fate of Wild Tangent and Shockwave</strong> players (I hope not!). </p>
<p>One thing is sure: if you are into 3D, you can&#8217;t miss it! </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=bSTyFuvs5g0:m7uXyXQltJM:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=bSTyFuvs5g0:m7uXyXQltJM:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=bSTyFuvs5g0:m7uXyXQltJM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/bSTyFuvs5g0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/05/27/flash-vs-unity3d/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/05/27/flash-vs-unity3d/</feedburner:origLink></item>
		<item>
		<title>Exploring JigLibFlash – the AS3 3D physics library</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/KxCbrm-x6Pk/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/04/23/jiglibflash-3d-physics/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 08:38:27 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[JigLibFlash]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[physics simulation]]></category>
		<category><![CDATA[pingpong]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=204</guid>
		<description><![CDATA[
JigLibFlash is a new library for 3D physics simulation in Flash. It is ported from a C++ open source engine. It&#8217;s been around for a few months now, and if you haven&#8217;t heard about it, you need to catch up!
I believe physics simulation is the next step in the Flash 3D world, so I got [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/jiglib/pingpong.html" target="_blank"><img src="http://www.everydayflash.com/flash/jiglib/pingpong.jpg" width="520" height="245" border="0" alt=""></a></p>
<p><strong>JigLibFlash</strong> is a new library for 3D physics simulation in Flash. It is ported from a <strong>C++ open source engine</strong>. It&#8217;s been around for a few months now, and if you haven&#8217;t heard about it, you need to catch up!</p>
<p>I believe physics simulation is the <strong>next step</strong> in the Flash 3D world, so I got very excited when Ringo from <a href="http://www.flashbookmarks.com/" target="_blank">FlashBookmarks</a> invited me <strong>join the JigLibFlash team</strong> a couple of months ago. One little problem: I am perfectly lame when it comes to physics&#8230; In this situation, the only logical thing to do was to join the team and learn all the stuff I need to know about it in the meantime. Sounds like a challenge! </p>
<p>Now I slowly fill my knowledge gap. However, I also managed to do some actual work on the library. Together with <a href="http://blog.reyco1.com/" target="_blank">Reyco</a> we remodeled the API. We started by making it more <strong>Flash developer</strong> friendly, less C-style and more AS-style. All the methods start with a lowercase letter now, and instead of having to set the position and rotation using vectors and matrices, the new API offers simple getter/setters for properties like x/y/z and rotationX/Y/Z just like in <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> or in the new Flash Player 10 API. </p>
<p>Last but not least, we also created a plugin system to <strong>easily integrate</strong> <strong>JigLibFlash </strong>with the popular 3D engines like <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> or <a href="http://away3d.com/" target="_blank">Away3D</a>. Now there are <strong>specialized classes</strong> to interact with those two engines and it should be pretty easy to create a plugin for another engine if one needs. If you worked with <a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod</a> you should notice that the concept is similar to the plugin architecture in there. <em>Update: I just saw in the sources that someone already created a plugin for Sandy3D.</em></p>
<p>To learn more about these changes you can refer to the <a href="http://code.google.com/p/jiglibflash/wiki/New_API_Very_Short_Tutorial" target="_blank">tutorial</a> I wrote which is posted on the projects wiki page. Reyco also wrote a <a href="http://blog.reyco1.com/jiglibflash-papervision3d-quick-run-through/" target="_blank">great article</a> about this on his blog.</p>
<p>The <a href="/flash/jiglib/pingpong.html" target="_blank">demo above</a> is my <strong>first little experiment</strong> with JigLibFlash and <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a>. My idea was to integrate a <strong>Collada object with the physics system</strong> and to add some interactivity to it. I extended the <a href="http://code.google.com/p/jiglibflash/source/browse/trunk/fp9/src/jiglib/plugin/papervision3d/constraint/MouseConstraint.as" target="_blank">Mouse constraint class</a> created by Reyco to control the racket. I encountered some problems with stabilizing it in the long run. After having bounced the ball a few times the racket starts to rotate as if the constraints were broken&#8230; well, I still need to do some research on that. </p>
<p><strong>Source code</strong>. You can browse the sources for the demo <a href="http://code.google.com/p/barteksplayground/source/browse/#svn/trunk/fp10/src/com/everydayflash/jiglib/pong" target="_blank">here</a>.</p>
<p><strong>Links</strong>. Some links to get you started with JigLibFlash:</p>
<ul>
<li><a href="http://www.jiglibflash.com/blog/" target="_blank">Official blog</a>, <a href="http://code.google.com/p/jiglibflash/" target="_blank">Google code</a></li>
<li><a href="http://code.google.com/p/jiglibflash/wiki/New_API_Very_Short_Tutorial" target="_blank">Wiki tutorial on new API</a> and <a href="http://blog.reyco1.com/jiglibflash-papervision3d-quick-run-through/" target="_blank">Reyco&#8217;s article</a></li>
<li><a href="http://blog.zupko.info/?p=273" target="_blank">Really cool demo by Andy Zupko</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=KxCbrm-x6Pk:ezfyl1R5y58:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=KxCbrm-x6Pk:ezfyl1R5y58:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=KxCbrm-x6Pk:ezfyl1R5y58:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/KxCbrm-x6Pk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/04/23/jiglibflash-3d-physics/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/04/23/jiglibflash-3d-physics/</feedburner:origLink></item>
		<item>
		<title>PDFBook3D, a 3D flipbook engine</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/MPNRiKOw4iY/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/04/03/pdfbook3d-3d-flipbook-engine/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 11:16:37 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[News & Events]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[flipbook]]></category>
		<category><![CDATA[flippage]]></category>
		<category><![CDATA[pdfbook]]></category>
		<category><![CDATA[powerflasher]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=118</guid>
		<description><![CDATA[
PDFBook3D is a Flash application that allows to transform a PDF document into a 3D model, that later can be viewed pretty much like a real book. The product was just released by Powerflasher, and I was involved in creating the front-end 3d Flash part of it. 
This application belongs to the family of flipbook [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.powerflasher.de/pdfbook3d/" target="_blank"><img src="/flash/pdfbook/pdfbook3d.jpg" width="520" height="190" border="0" alt="PDFBook3d"></a></p>
<p><strong><a href="http://www.powerflasher.de/pdfbook3d/" target="_blank">PDFBook3D</a></strong> is a Flash application that allows to transform a <strong>PDF document into a 3D model</strong>, that later can be viewed pretty much like a real book. The product was just released by <a href="http://solutions.powerflasher.com/en/products/pdfbook-3d/information/" target="_blank">Powerflasher</a>, and I was involved in creating the front-end 3d Flash part of it. </p>
<p>This application belongs to the family of flipbook engines. I am sure you have seen the classic 2D version of a flipbook at least once. It is widely popular around the web! <strong>PDFBook3D</strong> replaces this classic piece with a more accurate and realistic 3D version of the effect created with <strong>AS3Dmod bend modifier</strong>. The bend modifier allows to create paper simulation in Flash, which is something I already posted about <a href="http://www.everydayflash.com/blog/index.php/2008/11/03/paper-simulation-as3dmod/">back in November</a>.</p>
<p>The application has a rich set of configurable properties, including dimensions of the book (for non typical page sizes) and a number of quality settings to get a decent framerate on slower machines as well. The Powerflasher team created an admin interface to generate 3d books on the fly. You can see it in action <a href="http://pdfbook-3d-demo.powerflasher.com/" target="_blank">here</a>. The product functionality also includes links editor and video embedding. If you are interested in more information please refer to the <a href="http://solutions.powerflasher.com/en/products/pdfbook-3d/information/" target="_blank">Powerflasher Solutions</a> site. </p>
<p>PDFBook3D is also my first commercial project made using <strong><a href="http://www.away3d.com" target="_blank">Away3D</a></strong>. There are a few features in Away3D that made me choose it, but mostly it was the curiosity to try <em>"the other"</em> engine. I must admit Away3D turned out to be pretty cool! </p>
<p>It is most famous for its advanced features like <a href="http://www.closier.nl/blog/?p=82" target="_blank">normal maps</a>, <a href="http://www.closier.nl/blog/?p=73" target="_blank">path extrudes</a> and <a href="http://www.infiniteturtles.co.uk/blog/away3d-multimario" target="_blank">bones animation</a>. However, this project does not rely on those advanced functionalities. Most of what I used in here is pretty basic, but still I was able to find some cool stuff. </p>
<p>One very useful feature is being able to assign <strong>back material</strong> to planes. It might not seem like a huge thing, but since it is used to create the flipping page, it helped me a lot. Actually any <strong>mesh in Away3D can have a back material</strong> assigned to its faces using the <code>back</code> property of the class:</p>
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-2">
<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;">myMesh.<span style="color: #006600;">material</span> = <span style="color: #000000; font-weight: bold;">new</span> WireframeMaterial<span style="color: #66cc66;">&#40;</span>0xff0000<span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// classic front-side material</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">myMesh.<span style="color: #006600;">back</span> = <span style="color: #000000; font-weight: bold;">new</span> WireframeMaterial<span style="color: #66cc66;">&#40;</span>0x00ff00<span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// back material </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Notice, that it is not the same thing as having a <strong>double sided material</strong> - that is, the same material used for both sides of a face. In this case - one material is used for one side, and a completely different one for the other. This is why it was perfect for creating a page of a book.</p>
<p>Another cool feature of Away3D is <strong>triangle caching</strong> - it is a built in functionality, that doesn't require any extra coding and it can give a significant <a href="http://www.infiniteturtles.co.uk/blog/awa3d-220-sierpinski-turtles" target="_blank">performance boost</a>. Thanks to triangle caching, whenever the page flip animation is on, the rest of the book that does not move at this moment is not re-rendered at each frame. A similar optimization can be achieved in Papervision3D using render layers, but it's not as easy to use. </p>
<p>Last but not least, I'd like to thank <a href="http://blog.closier.nl/" target="_blank">Fabrice Closier</a> from the Away3D team for support and feedback during the project! </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=MPNRiKOw4iY:C_lLubDtgiA:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=MPNRiKOw4iY:C_lLubDtgiA:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=MPNRiKOw4iY:C_lLubDtgiA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/MPNRiKOw4iY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/04/03/pdfbook3d-3d-flipbook-engine/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/04/03/pdfbook3d-3d-flipbook-engine/</feedburner:origLink></item>
		<item>
		<title>Mustang goes into augmented reality</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/306UxkZFWNM/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/03/26/mustang-augmented-reality/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 18:45:01 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[FLARToolkit]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[mustang]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=66</guid>
		<description><![CDATA[
Augmented Reality (AR) generated so much buzz in the community in the last few weeks that I had to give it a try!
I suppose most of you know what AR is, however just in case you don't, here's some basic facts from an Actionscript developer perspective: augmented reality uses pattern recognition to render 3D graphics [...]]]></description>
			<content:encoded><![CDATA[<p><object width="520" height="388"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3864433&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3864433&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="520" height="388"></embed></object></p>
<p><strong>Augmented Reality (AR)</strong> generated so much buzz in the community in the last few weeks that I had to give it a try!</p>
<p>I suppose most of you know what AR is, however just in case you don't, here's some basic facts from an Actionscript developer perspective: augmented reality uses <strong>pattern recognition</strong> to render <strong>3D graphics on top of a video display</strong>. A pattern, also called marker, is a rectangular shape that you need to print and position in front of your camera. The stream from the camera is analyzed and the marker is used to determine the <strong>coordinate system of the world</strong> captured by the camera. This coordinate system is passed to a 3D engine which <strong>renders objects on top of the video image</strong>. Pretty simple, huh?</p>
<p>As far as Flash is concerned, the API for augmented reality is called <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en" target="_blank"><strong>FLARToolkit</strong></a>, which is an AS3 <strong>port of library written in Java and C</strong> done by <a href="http://saqoosha.net/" target="_blank">Saqoosha</a>. If you want to know more about this project, here's a great <a href="http://www.mikkoh.com/blog/?p=182" target="_blank">intro to the subject</a> written by Mikko Haapoja.</p>
<p>In most of the cool AR projects I have seen so far <a href="http://ge.ecomagination.com/smartgrid/#/augmented_reality" target="_blank">[1]</a> <a href="http://www.boffswana.com/news/?p=392" target="_blank">[2]</a> the <strong>user is supposed to hold the marker and move it around</strong> in front of the camera and the 3d object follows the marker. I had a slightly different idea: why not just <strong>leave the marker and the camera in one place</strong> and use your keyboard to move around the 3d objects? </p>
<p>Some time ago I posted a <a href="http://www.everydayflash.com/blog/index.php/2009/02/13/car-simulation-with-maya-papervision3d/" target="_blank">demo featuring a Mustang</a> that you could drive around a desert scenery. I thought it would be cool if I could now drive it around my bedroom floor. I was very surprised how easy it was to integrate my model with <strong>FLARToolkit and Papervision3D</strong>. All I had to do was to scale and rotate the model a bit and that's it! </p>
<p>The <a href="http://vimeo.com/3864433" target="_blank">above video</a> shows a recording of the experiment. If you have a webcam you can try it yourself. To do this, follow this instructions:</p>
<ol>
<li><a href="http://www.everydayflash.com/flash/flar/marker.pdf" target="_blank">Print the marker</a> (You can alternatively display it on your iPhone)</li>
<li>Click on <a href="http://www.everydayflash.com/flash/flar/" target="_blank">this link</a>, and choose "Allow" from the security dialog</li>
<li>Point your webcam so that the marker is fully visible</li>
<li>When the car is loaded (~250kb) it will appear on top of it</li>
<li>Use cursor keys to drive the car and CTRL key to apply hand brake</li>
<li>Have fun!</li>
</ol>
<p>If you want to dig further <a href="http://code.google.com/p/barteksplayground/source/browse/#svn/trunk/fp10/src/com/everydayflash/flar/mustang" target="_blank"><strong>here's the source code</strong></a>. The whole magic is in the <code>FlarMustang.as</code> class. The rest of the classes are an adaptation from the FLARToolkit basic example and some classes I used for the <a href="http://www.everydayflash.com/blog/index.php/2009/02/13/car-simulation-with-maya-papervision3d/">Mustang demo</a>. </p>
<p><strong>Unrelated note</strong>. In case you are reading this post in your RSS reader, you might not have noticed that <a href="http://www.everydayflash.com/blog/">I redesigned the blog</a>. It's good to change from time to time! Among other stuff, there's a new list of previous 3D experiments and new links in the blogroll, so take a look.  </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=306UxkZFWNM:9-a0vcrDqpI:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=306UxkZFWNM:9-a0vcrDqpI:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=306UxkZFWNM:9-a0vcrDqpI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/306UxkZFWNM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/03/26/mustang-augmented-reality/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/03/26/mustang-augmented-reality/</feedburner:origLink></item>
		<item>
		<title>3D experiments with Flash Player 10 and AS3Dmod</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/IJS2ZsCULFQ/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/03/16/3d-experiments-with-flash-player-10-and-as3dmod/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 10:50:32 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[flash player 10]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[fp10]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=54</guid>
		<description><![CDATA[
Demos: [ 1 ] [ 2 ] [ 3 ] [ 4 ]&#160;&#160;&#160;&#160;&#160;&#160;Flash Player 10 required (obviously)
Flash Player 10 has been around for a few months now. As most of you know, it brings some native 3D support. It's not as robust as Papervision3D or Away3D, and in fact was not designed to compete with [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/flash/as3dmod/fp10/as3dmod-fp10.gif" width="520" height="280" border="0" alt="Flash Player 10 3D experiments"></p>
<p><strong>Demos: <a href="http://www.everydayflash.com/flash/as3dmod/fp10/points3d.html" target="_blank">[ 1 ]</a> <a href="http://www.everydayflash.com/flash/as3dmod/fp10/walk.html" target="_blank">[ 2 ]</a> <a href="http://www.everydayflash.com/flash/as3dmod/fp10/tunnel.html" target="_blank">[ 3 ]</a> <a href="http://www.everydayflash.com/flash/as3dmod/fp10/twistedRibbon.html" target="_blank">[ 4 ]</a></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>Flash Player 10 required (obviously)</em></p>
<p><strong>Flash Player 10</strong> has been around for a few months now. As most of you know, it brings some <strong>native 3D support</strong>. It's not as robust as <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> or <a href="http://www.away3d.com/" target="_blank">Away3D</a>, and in fact was not designed to compete with those engines. Rather than that, it contains classes that perform 3D calculations and allows basic 3D manipulation of display objects.</p>
<p>The last months I focused on catching up with <strong>3D math</strong>. I ordered a book called <a href="http://www.amazon.co.uk/Primer-Graphics-Development-Wordware-Library/dp/1556229119/" target="_blank">"3D Math Primer"</a>, which explains in detail all the vector and matrix operations involved in 3D graphics. Even though the examples are in C++ I recommend this book to anyone doing 3D in Flash. The authors made a great effort to explain the subject with clarity. It worked pretty well for me and I understand the math behind 3D much better now. </p>
<p>Both <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> and <a href="http://www.away3d.com/" target="_blank">Away3D</a> were created so that <strong>we don't have to deal directly with 3D calculations</strong>. If you are working on a project that involves non-trivial 3D and has a deadline, it's better to choose one of those engines instead of "pure Flash Player 10". </p>
<p>However, if you just want to do some <strong>casual experiments</strong> and learn something on the way, <strong>FP10 is great</strong>. It offers a small number of tools, focused around <strong>Vector3D and a Matrix3D</strong> classes. These classes offer low level functionality, so to use them one needs to understand what's going on under the hood. This is a great way to learn! </p>
<p>Then I had this idea to port <strong>AS3Dmod to Flash Player 10</strong> and try to run the modifiers on objects created using FP10 3D classes. It turns out it was not so difficult. Instead of rendering textured 3D objects I just render a <strong>single pixel for each vertex</strong>. Thanks to this I get a relatively good performance even with as much as <strong>8000 vertices</strong>. I found that a modifier applied to such a large amount of vertices, gives interesting visual effects. I even wrote a very simple <strong>Wavefront OBJ importer</strong>, and I could import the 3d pants model from one of my <a href="http://www.everydayflash.com/blog/index.php/2009/02/09/making-things-walk-in-flash-3d/" target="_blank">previous posts</a> to <a href="http://www.everydayflash.com/flash/as3dmod/fp10/walk.html" target="_blank">render them in Flash Player 10</a>. </p>
<p>All my previous demos with AS3Dmod involved pretty <strong>small amount of vertices</strong> - most often no more than 500-600. At this level the performance of the modifiers was not a problem. But with 8000 vertices the modifiers start to have an big impact on the frame rate. A Perlin modifier alone takes <strong>4-5 FPS</strong>, which is quite a lot and it got me worried. I believe code optimizations are in order. An interesting solution could be to implement the <strong>modifiers as a Pixel Bender kernels</strong>. Anyway, I need to do some more research...</p>
<p>In the AS3Dmod SVN you'll find the <a href="http://code.google.com/p/as3dmod/source/browse/#svn/branches/fp10" target="_blank">FP10</a> branch. The main difference between this version and the trunk is that it uses FP10 built-in <strong>Vector3D</strong> and <strong>Matrix3D</strong> classes as well as <strong>Vectors instead of Arrays</strong>. The sources for all experiments mentioned above, including a simple AS3Dmod plugin for FP10, are <a href="http://code.google.com/p/barteksplayground/source/browse/#svn/trunk/fp10/src/com/everydayflash/cart" target="_blank">available here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=IJS2ZsCULFQ:1iVWSrdBhlE:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?i=IJS2ZsCULFQ:1iVWSrdBhlE:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/EverydayFlash?a=IJS2ZsCULFQ:1iVWSrdBhlE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/EverydayFlash?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/IJS2ZsCULFQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/03/16/3d-experiments-with-flash-player-10-and-as3dmod/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/03/16/3d-experiments-with-flash-player-10-and-as3dmod/</feedburner:origLink></item>
		<item>
		<title>Car simulation with Maya &amp; Papervision3d</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/meAi7YkrZQY/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/02/13/car-simulation-with-maya-papervision3d/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 10:17:09 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[car]]></category>
		<category><![CDATA[car game]]></category>
		<category><![CDATA[car physics]]></category>
		<category><![CDATA[car simulation]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[mustang]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[racing]]></category>
		<category><![CDATA[racing game]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=51</guid>
		<description><![CDATA[
Take a test drive with a powerful Mustang GT in a desert scenery! This demo features a car model imported from Maya into Papervision3D. It uses some home-made physics to simulate the car movement and a couple of new AS3Dmod features to manage the model (more below). 
I created this demo together with Krister Karlsson. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/flash/mustang/" target="_blank"><img src="/flash/mustang/mustang.jpg" width="520" height="200" border="0" alt="Mustang GT | Maya, Papervision3D"></a></p>
<p>Take a test drive with a powerful <strong>Mustang GT</strong> in a desert scenery! This demo features a car model imported from Maya into Papervision3D. It uses some home-made physics to simulate the car movement and a couple of new AS3Dmod features to manage the model (more below). </p>
<p>I created this demo together with <strong>Krister Karlsson</strong>. Krister is a 3d artist working with Maya and founder of <a href="http://www.modesty.se" target="_blank">Modesty</a> - a Stockholm based creative agency. The (super)low poly Mustang used here is based on a concept model made by Krister that was <strong>later used to create an actual car!</strong> You can read more about <a href="http://modesty.se/clients/eleanor/" target="_blank">this project here</a>.</p>
<p>Working with this demo has been an occasion for me to explore all the spectrum of Flash 3D related development, like importing and managing a <strong>complex model</strong>, adding interaction and scripting <strong>car physics</strong>. All this with a reasonable performance in mind, of course. </p>
<p>There is quite a lot of source code involved in this demo. I won't be publishing it all as parts of it are rather messy. Instead I'll focus on some <strong>particular problems</strong> I've encountered and solutions to them.</p>
<p><strong>Pivots.</strong> I can't tell if this is a problem of the <a href="http://sourceforge.net/projects/colladamaya/" target="_blank">Maya Collada Exporter</a> or if we have been doing something wrong, but the fact remains that <strong>moving the pivot point of an object in Maya is not reflected in Papervision3D</strong>. Instead, all pivot points default to the center of the whole object when the DAE file is imported.</p>
<p>To fix it, I had the idea to move the pivot point in Actionscript. Unfortunately, there isn't an easy way to do that in Papervision3D. This problem is <a href="http://www.nabble.com/changing-rotation-pivot-td14613233.html#a14613233" target="_blank">generally solved</a> by putting the DisplayObject3D inside another and move it in relation to its parent. But when all the objects are part of a structured DAE it becomes quite painful and requires additional steps. So instead, I wrote a modifier that takes care of that. It's called <a href="http://code.google.com/p/as3dmod/source/browse/trunk/src/com/as3dmod/modifiers/Pivot.as" target="_blank"><strong>Pivot</strong></a>, and this is the way it works:</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-7">
<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: #000000; font-weight: bold;">var</span> do3d:Cube = <span style="color: #000000; font-weight: bold;">new</span> Cube<span style="color: #66cc66;">&#40;</span>materials, <span style="color: #cc66cc;color:#800000;">200</span>, <span style="color: #cc66cc;color:#800000;">200</span>, <span style="color: #cc66cc;color:#800000;">200</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> stack:ModifierStack = <span style="color: #000000; font-weight: bold;">new</span> ModifierStack<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LibraryPv3d<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, do3d<span style="color: #66cc66;">&#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;"><span style="color: #000000; font-weight: bold;">var</span> pivot:Pivot = <span style="color: #000000; font-weight: bold;">new</span> Pivot<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;color:#800000;">200</span>,-<span style="color: #cc66cc;color:#800000;">200</span>,-<span style="color: #cc66cc;color:#800000;">200</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stack.<span style="color: #006600;">addModifier</span><span style="color: #66cc66;">&#40;</span>pivot<span style="color: #66cc66;">&#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;">stack.<span style="color: #006600;">collapse</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This piece of code will move the pivot point <strong>-200 units on all 3 axes</strong>. In case of this cube it will end up in the lower left corner. It does it without creating any additional display objects, but rather by offsetting all the objects vertices.</p>
<p>Please note that I collapse the stack after applying the pivot. Otherwise the pivot would be moved at every call to <code>stack.apply()</code>, which is not what we are looking here for.</p>
<p>The problem with the Mustang model was that all 4 wheels were rotating around the center of the car rather then around individual centers of each object. I needed to move the pivot point to the center of each wheel. I thought that moving the pivot to the geometrical center of the object is a typical thing to do, so I create a shortcut method for it:</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('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;">pivot.<span style="color: #006600;">setMeshCenter</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Calling this function automatically sets the pivot point in the geometrical <strong>center of the mesh</strong>. At this point I thought I was done with the wheels, but there was one more problem...</p>
<p><strong>Roll &#038; steer</strong>. I think anyone who ever created an interactive 3d car model must have faced this one. <strong>A wheel rolls around the Z axis and the steering goes along it's Y axis</strong>. So, the first think that came to my mind when I started to code it was:</p>
<div class="igBar"><span id="lactionscript-9"><a href="#" onclick="javascript:showPlainTxt('actionscript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-9">
<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;">wheel.<span style="color: #006600;">rotationZ</span> += <span style="color: #cc66cc;color:#800000;">10</span>; <span style="color: #808080; font-style: italic;">// roll 10 degrees</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wheel.<span style="color: #006600;">rotationY</span> = <span style="color: #cc66cc;color:#800000;">30</span>; <span style="color: #808080; font-style: italic;">// turn 30 degrees </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>While this code seems perfectly logical, when put in action <strong>things go wrong</strong> and the wheel starts to act like if the car had undergone a severe crash.</p>
<p>The reason for this is that once the wheel rotates along the Y axis (turns), the Z axis is no longer the right axis for roll. The correct axis would be the Z axis rotated 30 degrees on the XZ plane. </p>
<p>Again, a solution would be to enclose the wheel into a parent DisplayObject3D and then use the parent to steer and the child to roll. However, since I had already an elegant solution for the pivot I didn't want to <strong>clutter my model</strong> with an additional set of elements for this one either. </p>
<p>There comes the <strong><a href="http://code.google.com/p/as3dmod/source/browse/trunk/src/com/as3dmod/modifiers/Wheel.as" target="_blank">Wheel modifier</a></strong>. Apply it to an object - typically of a cylindrical shape - and use its <code>speed</code> and <code>turn</code> properties to manipulate the wheel. </p>
<div class="igBar"><span id="lactionscript-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-10">
<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: #000000; font-weight: bold;">var</span> do3d:DisplayObject3D = dae.<span style="color: #006600;">getChildByName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"wheel"</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> stack:ModifierStack = <span style="color: #000000; font-weight: bold;">new</span> ModifierStack<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LibraryPv3d<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, do3d<span style="color: #66cc66;">&#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;"><span style="color: #000000; font-weight: bold;">var</span> wheel:Wheel = <span style="color: #000000; font-weight: bold;">new</span> Wheel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stack.<span style="color: #006600;">addModifier</span><span style="color: #66cc66;">&#40;</span>wheel<span style="color: #66cc66;">&#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;">...</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;">// Please mind that it expects values in radians</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;">wheel.<span style="color: #006600;">turn</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span> / <span style="color: #cc66cc;color:#800000;">6</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wheel.<span style="color: #006600;">speed</span> = <span style="color: #cc66cc;color:#800000;">5</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;">stack.<span style="color: #0066CC;">apply</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Internally the modifier applies some math to <strong>rotate the roll axis according the the current turn value</strong> so that everything looks fine and you don't need to worry about it ;) Read the <a href="http://www.everydayflash.com/flash/as3dmod/doc/com/as3dmod/modifiers/Wheel.html" target="_blank">documentation of this class</a> for more information.</p>
<p>All this new features are available in the <strong>latest SVN revision of AS3Dmod</strong>. So, go ahead and <a href="http://code.google.com/p/as3dmod/source/checkout" target="_blank">grab it </a> later. But first, <a href="/flash/mustang/" target="_blank">enjoy your ride</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=OlNWPtdZ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=OlNWPtdZ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=H9C37vbs"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/meAi7YkrZQY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/02/13/car-simulation-with-maya-papervision3d/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/02/13/car-simulation-with-maya-papervision3d/</feedburner:origLink></item>
		<item>
		<title>Making things walk in Flash 3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/FwHmOSPKfBI/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/02/09/making-things-walk-in-flash-3d/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 09:06:22 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[2D Animation]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[character animation]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[walk cycle]]></category>
		<category><![CDATA[walking]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=52</guid>
		<description><![CDATA[
An Actionscript-based 3D bone system is something I wanted to do for a long time, but I couldn't figure out how to approach this problem for several months. A few days ago, I finally made a breakthrough. Here's a first demo I quickly put together: a 3D walk cycle.
So far the only way to have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/walk/" target="_blank"><img src="http://www.everydayflash.com/flash/walk/walk-cycle-3d.png" border="0" alt="Walk cycle in Papervision3D" width="520" height="220" /></a></p>
<p>An <strong>Actionscript-based 3D bone system</strong> is something I wanted to do for a long time, but I couldn't figure out how to approach this problem for several months. A few days ago, I finally made a breakthrough. Here's a first demo I quickly put together: <a href="http://www.everydayflash.com/flash/walk/" target="_blank">a 3D walk cycle</a>.</p>
<p>So far the only way to have a <strong>walking character in Flash 3D</strong> was to create an animation sequence in a 3D editor and export it as an <strong>animated DAE</strong> and/or use <a href="http://cast3d.org/" target="_blank">Cast3D</a>. For sure, this method allows to achieve <a href="http://www.bajibot.com/xmas2008/" target="_blank">awesome results</a>, but it is <strong>not nearly as flexible</strong> as being able to control the animation <strong>directly from Actionscript</strong>.</p>
<p>So, how does the above demo work? First of all I created a model of <strong>pants in Blender</strong>. This is the 4th model I ever did with Blender so it not perfect, but is good enough for the job. The important part is that both legs and the waist form a <strong>single mesh</strong>.</p>
<p>After I imported the model into <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> I applied several <strong>Break modifiers</strong> to the model. The <a href="http://code.google.com/p/as3dmod/source/browse/trunk/src/com/as3dmod/modifiers/Break.as" target="_blank"><strong>Break modifier</strong></a> is a new class I wrote for <a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod</a> and is of key importance for this demo. In brief, it allows to apply rotation only to a group of vertices while leaving the rest untouched. The resulting deformation makes the mesh look like it was broken, hence the name.</p>
<p>I created a <a href="http://code.google.com/p/as3dmod/wiki/AS3Dmod_Tutorial" target="_blank">modifier stack</a> and added <strong>4 Break modifiers</strong> to the pants. One for each tight, and one for each knee. The angle for each of them can be modified separately, which allows dynamic animation. </p>
<p>You probably wonder how I did <strong>indicate which vertices belong to which part of the mesh</strong> (waist, thigh, calf) and how I even know where those parts start or end on the code level. That is crucial in creating an armature and it is also the tricky part. Most of the 3D IDEs, like 3Dsmax or Blender have some kind of visual interface that allows the user to <strong>select vertices and attach them to a bone</strong>. In AS everything is code, so this is a challenge. I must confess that for this demo I hardcoded some values and did some assumptions to make it work, but I think there is a way to make this task <strong>relatively easy</strong> or at least possible to apprehend.</p>
<p>In the long run, it would be cool if bones could be <strong>exported from 3D IDEs</strong> and <strong>exposed as objects</strong> in Actionscript. As far as I know, there isn't anything like this available for the moment. <a href="http://www.away3d.com" target="_blank">Away3D</a> supports <a href="http://www.infiniteturtles.co.uk/blog/away3d-multimario" target="_blank">collada bone animation</a> but, despite its promising name, it serves a different purpose (correct me if I am wrong.)</p>
<p>Let's go back to the demo. Once I had the Break modifiers in place and applied to the correct areas of the mesh, the rest was rather easy. To create a proper <strong>walk cycle</strong>, I just took <a href="http://www.bit-101.com/blog/" target="_blank">Keith Peters'</a> book <a href="http://www.friendsofed.com/book.html?isbn=1590597915" target="_blank"><strong>"Making Things Move"</strong></a>, Chapter 13 on <strong>Forward Kinematics</strong>, and I adapted the code from the examples.</p>
<p>In case you don't know that book, I would strongly recommend getting it. It contains all the essential stuff you need to know, if you want to call yourself a serious AS3 developer. I never leave home without it! There is also a <a href="http://www.friendsofed.com/book.html?isbn=9781430216087" target="_blank">sequel</a>, with stuff for Flash Player 10.</p>
<p>This walk cycle is only a <strong>first step</strong> to create a bone system in AS, but I wanted to share it with you without spending another few months making it fully featured. <strong>Break modifier</strong> is available in the latest <a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod</a> SVN repository. I should warn you however that this is a <strong>very early version</strong>, not really usable for the moment. </p>
<p>Of course, updates are coming so <strong>stay tuned!</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=XgEKm1Fk"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=XgEKm1Fk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=ureNpcsZ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/FwHmOSPKfBI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/02/09/making-things-walk-in-flash-3d/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/02/09/making-things-walk-in-flash-3d/</feedburner:origLink></item>
		<item>
		<title>The AS3Dmod tutorial</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/jNc8-XU3saQ/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2009/01/06/the-as3dmod-tutorial/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 19:23:16 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[Actionscript APIs]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=49</guid>
		<description><![CDATA[
I did some research in the blogs and on Twitter, and often when someone mentioned AS3Dmod, the recurring theme was the lack of documentation. Yeah... but creating proper documentation is such a difficult task! 
First of all, it's hard to find enough free time. Then, even if you find some, most of us, including me, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/as3dmod/wiki/AS3Dmod_Tutorial" target="_blank"><img src="/flash/as3dmod/as3dmod-tutorial.gif" width="520" height="200" border="0" alt="The AS3Dmod tutorial"></a></p>
<p>I did some research <strong>in the blogs and on Twitter</strong>, and often when someone mentioned AS3Dmod, the recurring theme was the <strong>lack of documentation</strong>. Yeah... but creating proper documentation is such a difficult task! </p>
<p>First of all, it's hard to find enough free time. Then, even if you find some, most of us, including me, will always find it more fun <strong>to write code instead</strong>. Eventually, I profited of the calmer period in the last 3 weeks and made some progress with that. The result is <a href="http://code.google.com/p/as3dmod/wiki/AS3Dmod_Tutorial" target="_blank"><strong>the AS3Dmod tutorial</strong></a>.</p>
<p>In the tutorial you will find answers to the following topics:</p>
<ul>
<li>how to integrate AS3Dmod with the Flash 3d engines</li>
<li>how the modifier stack works</li>
<li>how to create and apply modifiers</li>
<li>how to animate the modifier properties</li>
<li>how to use the <code>collapse</code> feature</li>
</ul>
<p>Beside the tutorial there are <a href="http://www.everydayflash.com/flash/as3dmod/doc/" target="_blank"><strong>API Docs</strong></a> available for some time now. </p>
<p>Another thing are simple <strong>interactive demos for each modifier</strong>. So far I created it for one: <strong>Skew</strong>. You <a href="http://www.everydayflash.com/flash/as3dmod/demo/skew.html" target="_blank">can view it here</a>. The demo allows to see all the properties and features of the modifier in action, instead of explaining it in writing. If this concept gets some positive feedback, I'll try to do more of those.</p>
<p>Hope you will find all this useful, and remember that feedback is very welcome (and much needed). And of course <strong>Happy New Year everyone!</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=FazLwZAX"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=FazLwZAX" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=o6XqLyLi"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/jNc8-XU3saQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2009/01/06/the-as3dmod-tutorial/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2009/01/06/the-as3dmod-tutorial/</feedburner:origLink></item>
		<item>
		<title>EA Skateit Nintendo DS demo with Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/q-eapKR103I/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/12/16/paperskate3d-ea-skateit/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 22:32:34 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[EA]]></category>
		<category><![CDATA[Electronic Arts]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[gesture recognition]]></category>
		<category><![CDATA[Nintendo ds]]></category>
		<category><![CDATA[paperking3d]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[skate]]></category>
		<category><![CDATA[skateboard]]></category>
		<category><![CDATA[skateboarding game]]></category>
		<category><![CDATA[skateit]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=48</guid>
		<description><![CDATA[
Those of you who follow my blog, may remember the Paperskate3D demo I published back in the summer. Back then I said that I'll post the rest of the story someday. So here it is. 
It was originally created for the Paperking3D contest organized by the Pv3D team. There were many awesome project sent it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.skateit.ea.com/" target="_blank"><img src="/blog-assets/skateit.jpg" width="520" height="200" border="0" alt="Nintendo DS Skate Demo"></a></p>
<p>Those of you who follow my blog, may remember the <a href="http://www.paperskate3d.com" target="_blank">Paperskate3D demo</a> I published back in the summer. Back then I said that I'll post the <strong>rest of the story</strong> someday. So here it is. </p>
<p>It was <strong>originally created</strong> for the <a href="http://blog.papervision3d.org/2008/07/02/paperking3d-the-papervision3d-contest/" target="_blank"><strong>Paperking3D contest</strong></a> organized by the Pv3D team. There were many awesome project sent it for this contest, including <a href="http://code.google.com/p/vectorvision/" target="_blank">Vectorvision</a> - the cool 3d vector library. The skate demo didn't make it to the top 3 but it received a <strong>honorable mention</strong>, which made me very happy.</p>
<p>But the best came a bit later, when I was contacted by <a href="http://www.revolutivedesign.com/" target="_blank">Revolutive Design</a> from Vancouver. Based on the original application, together we created a demo for <a href="http://www.skateit.ea.com/" target="_blank"><strong>Skateit</strong>,</a> a new <strong>skating game from Electronic Arts targeted for Nintendo DS</strong>. </p>
<p>To <strong>biggest improvement</strong> over the original version is the new way the skateboard is controlled by the user. While before it was based on keyboard, in the EA demo it is modeled on the "Flickit" system which allows to <strong>control the skateboard with the stylus</strong> on the DS. To simulate this in Flash, I used mouse <strong>gesture recognition</strong> based on the <a href="http://www.bytearray.org/?p=91" target="_blank">excellent class</a> provided by Didier Brun. This class was originally intended to identify written characters, but I was able to adapt it to my needs pretty easily. In the demo, it is used to recognize gestures for 20 different tricks. </p>
<p>To access the demo go to the <a href="http://www.skateit.ea.com/" target="_blank">EA website</a> and click the large button in the middle right of the screen. Have fun! </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=z0bmcY7h"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=z0bmcY7h" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=lPLTlJrd"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/q-eapKR103I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/12/16/paperskate3d-ea-skateit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/12/16/paperskate3d-ea-skateit/</feedburner:origLink></item>
		<item>
		<title>Wind simulation with modifiers and WOW Engine</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/DfMf3oXWlVM/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/12/08/wind-simulation-wow-engine-as3dmod/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 08:30:22 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash physics]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[physics simulation]]></category>
		<category><![CDATA[wind simulation]]></category>
		<category><![CDATA[wow]]></category>
		<category><![CDATA[wow-engine]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=47</guid>
		<description><![CDATA[
WOW-Engine is an Actionscript API to simulate physics in a 3d environment. The code is based on a popular 2d physics library - APE. It offers some very interesting possibilities in 3D animation, and everyone doing 3D in Flash should have it in their toolbox.
WOW engine simulates a physics world model composed of entities called [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/pv3d/windsock/" target="_blank"><img src="http://www.everydayflash.com/flash/pv3d/windsock/windsock.jpg" border="0" alt="" width="520" height="202" /></a></p>
<p><strong><a href="http://seraf.mediabox.fr/wow-engine/as3-3d-physics-engine-wow-engine/" target="_blank">WOW-Engine</a></strong> is an Actionscript <strong>API to simulate physics in a 3d environment</strong>. The code is based on a popular 2d physics library - <a href="http://www.cove.org/ape/" target="_blank"><strong>APE</strong></a>. It offers some very interesting possibilities in 3D animation, and everyone doing 3D in Flash should have it in their toolbox.</p>
<p>WOW engine <strong>simulates a physics world model</strong> composed of entities called particles. <strong>Particles</strong> can be connected using <strong>constraints</strong> and exposed to different <strong>forces</strong> that make them move around. Some more information as well as a few tutorials can be found on the <a href="http://seraf.mediabox.fr/wow-engine/as3-3d-physics-engine-wow-engine/" target="_blank">projects home page</a>.</p>
<p>The basic technique of using WOW and 3D in Flash is to <strong>map those particles to objects on the 3D scene</strong>, and before each render read synchronize their x, y and z coordinates. But there are other ways too... On the WOW page, <a href="http://seraf.mediabox.fr/wow-engine/wow-engine-technical-advanced-demo-cloth-demo-01/" target="_blank">here</a> and <a href="http://seraf.mediabox.fr/wow-engine/wow-engine-technical-advanced-demo-cloth-demo-03/" target="_blank">here</a> you can find some examples of particles mapped not to whole objects but rather to <strong>individual vertices</strong>. </p>
<p><strong>Animation based on vertices</strong> has been my main preoccupation for some time now, so I got immediately interested. Unfortunately those WOW examples come <strong>without source code</strong>, so I had to figure that out on my own. The <a href="http://www.everydayflash.com/flash/pv3d/windsock/" target="_blank">above demo</a> comes as a result. </p>
<p>Some quick details: the windsock was modeled in <a href="http://www.blender.org" target="_blank">Blender</a> and the textures were baked using the technique I mentioned in my <a href="http://www.everydayflash.com/blog/index.php/2008/11/20/texture-baking-is-your-friend/" target="_blank">previous post</a>. On the flash side <a href="http://blog.papervision3d.org" target="_blank">Papervision3D</a> engine is used and a couple of <a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod</a> modifiers - <strong>Taper and Perlin</strong>.</p>
<p>This is my <strong>first experiment</strong> with <strong><a href="http://seraf.mediabox.fr/wow-engine/as3-3d-physics-engine-wow-engine/" target="_blank">WOW physics engine</a></strong>, but after getting a basic understanding of how it works, I am convinced there is a big potential in <strong>combining AS3Dmod and WOW</strong>, so more stuff will be coming hopefully!</p>
<p>As usual here's the <strong><a href="http://www.everydayflash.com/flash/pv3d/windsock/windsock.zip">source code</a></strong>. Please mind that this code is a result of a late night coding session ;)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=tydvM85M"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=tydvM85M" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=EUtsPNmL"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/DfMf3oXWlVM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/12/08/wind-simulation-wow-engine-as3dmod/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/12/08/wind-simulation-wow-engine-as3dmod/</feedburner:origLink></item>
		<item>
		<title>Texture baking is your friend</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/xkN2V8mTOVo/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/11/20/texture-baking-is-your-friend/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 23:57:59 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[alternativa3d]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[ecodazoo]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[roxik]]></category>
		<category><![CDATA[texture baking]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=45</guid>
		<description><![CDATA[
Texture baking has been known to the Flash 3d community since a long time, but a quick look into Google shows us that it is not a very popular topic. I think it definitely should get more attention. In Flash performance is always an issue, and high quality is always expected by our clients. Texture [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/chair/" target="_blank"><img src="http://www.everydayflash.com/flash/chair/awaychair.jpg" border="0" alt="" width="520" height="202" /></a></p>
<p><strong>Texture baking</strong> has been known to the Flash 3d community since a long time, but a quick look into Google shows us that it is not a very popular topic. I think it definitely should get more attention. <strong>In Flash performance is always an issue, and high quality is always expected</strong> by our clients. Texture baking helps to achieve this goal. </p>
<p>In short, it consists of getting all the lightning effects of a material and "burning" them directly on the material itself. After such operation, the lights cannot change anymore, but the material gets a nice effect of depth and it doesn't require any more computations at runtime.</p>
<p>Most of the available 3D software offers a texture baking function. <a href="http://www.everydayflash.com/flash/chair/" target="_blank">For the demo above</a>, I did choose <strong><a href="http://www.blender.org/" target="_blank">Blender</a></strong> because it's free (it also has a very weird user interface, but I digress). On the Flash side, it runs on <strong><a href="http://www.away3d.com" target="_blank">Away3d</a></strong>.</p>
<p>To create a model with baked textures in Flash I followed this steps:</p>
<ol>
<li><strong>Create the 3d model</strong> of the chair in Blender</li>
<li><strong>Project all the faces</strong> of the model on to an bitmap (in Blender its called UV Unwrapping)</li>
<li><strong>Paint the texture</strong> in Photoshop</li>
<li>Import the texture to Blender and <strong>apply it to back the model</strong></li>
<li><strong>Add lights and bake the texture</strong> on to another bitmap</li>
<li><strong>Export the geometry</strong> with the UV information included (<a href="http://en.wikipedia.org/wiki/COLLADA" target="_blank">Collada</a> or <a href="http://en.wikipedia.org/wiki/Obj" target="_blank">Wavefront</a>)</li>
<li><strong>Export the baked texture</strong> as a jpg</li>
<li>Import both into Flash and use your favorite 3d engine to render</li>
</ol>
<p>Each of the steps above could require a separate tutorial, so instead I published some <strong>files created in the process</strong> to give you a better idea. You can <a href="http://www.everydayflash.com/flash/chair/baked-textures.zip">get them here</a>. <em>Please note, that this is only a reference material - it is not supposed to be built or compiled or anything.</em></p>
<p>Additionally, for those of you who use Blender a nice tutorial on both <strong>UV Texture Mapping and Texture Baking</strong> is <a href="http://www.scifi-meshes.com/forums/dojo/1755-blender-faint-hearted-08-uv-texture-mapping-texture-baking.html" target="_blank">available here</a>.</p>
<p>In the current state of Flash 3D and its overall performance, texture baking is a <strong>highly useful technique</strong> that allows to achieve very good results. If you do not believe me, take look at some of the most awesome Flash 3d pieces that came out in the last few months: </p>
<ul>
<li><strong><a href="http://blog.alternativaplatform.com/ru/files/2008/04/bunker.swf" target="_blank">Bunker demo</a></strong> by Alternativa3d team (<a href="http://alternativaplatform.com/en/download/src/bunker_src_en.zip" target="_blank">sources available here</a>) </li>
<li><strong><a href="http://ecodazoo.com/" target="_blank">EcoDaZoo</a></strong> by <a href="http://www.roxik.com/" target="_blank">Roxik</a></li>
</ul>
<p>I am sure you've seen them before anyway. They both combine great visual effects with a very high performance. And guess what... in both of them, you'll find <strong>baked textures all over the place!</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=ruMSMi8x"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=ruMSMi8x" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=XLcw26YS"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/xkN2V8mTOVo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/11/20/texture-baking-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/11/20/texture-baking-is-your-friend/</feedburner:origLink></item>
		<item>
		<title>Paper simulation in with AS3Dmod and Away3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/8Hflu3JuiSU/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/11/03/paper-simulation-as3dmod/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 09:28:09 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[bend modifier]]></category>
		<category><![CDATA[declaration of independence]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[tweener]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=44</guid>
		<description><![CDATA[
Since I released the bend modifier a lot of people have been asking how to bend an object not only along one of its axes, but along any angle. That was clearly a feature missing, but I also didn't have a clue ho to do that. Now, a after a good few days of struggle, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/paper/" target="_blank"><img src="http://www.everydayflash.com/flash/paper/awaypaper.jpg" border="0" alt="" width="520" height="202" /></a></p>
<p>Since I released the bend modifier a lot of people have been asking how to bend an object not only along one of its axes, but <strong>along any angle</strong>. That was clearly a feature missing, but I also didn't have a clue ho to do that. Now, a after a good few days of struggle, and with a little help from my friends - <a href="http://www.everydayflash.com/flash/paper/" target="_blank">here it is</a>. </p>
<p>The Bend class now takes 3 arguments in the constructor, the third being the angle at which the bend is executed. Please mind, that this argument expects an <strong>angle in radians</strong>. In the code it looks like this:</p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<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: #000000; font-weight: bold;">var</span> mesh:Mesh = <span style="color: #66cc66;">&#91;</span>a mesh<span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> stack:ModifierStack = </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: #000000; font-weight: bold;">new</span> ModifierStack<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LibraryAway3d<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, mesh<span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> bend:Bend = <span style="color: #000000; font-weight: bold;">new</span> Bend<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">1</span>, .<span style="color: #cc66cc;color:#800000;">5</span>, <span style="color: #cc66cc;color:#800000;">1</span>.<span style="color: #cc66cc;color:#800000;">2</span><span style="color: #66cc66;">&#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;">stack.<span style="color: #006600;">addModifier</span><span style="color: #66cc66;">&#40;</span>bend<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stack.<span style="color: #0066CC;">apply</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Of course, there is also a getter/setter for the <code>angle</code>, which allows to change the value dynamically, and to use libraries such as Tweener to animate it. </p>
<p>The Bend modifier is now part of the <strong><a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod library</a></strong>. Since AS3Dmod is cross-engine, the above demo was done <strong>with Away3D</strong>, but of course, <strong>the same functionality can be used with other engines</strong>, including Papervision3D. </p>
<p>For those of you who remember the <a href="http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/" target="_blank">initial bending demo</a>, I used a 100$ bill as a graphic element then. I thought it would fun to be consistent and to stay in the American theme. Therefore, <a href="http://www.everydayflash.com/flash/paper/" target="_blank">this time</a> you can play with the <a href="http://en.wikipedia.org/wiki/United_States_Declaration_of_Independence" target="_blank">Declaration of Independence</a>. Fans of <a href="http://www.imdb.com/title/tt0368891/" target="_blank">"National Treasure"</a> should be delighted.</p>
<p>As usual the sources are available and you can <a href="http://www.everydayflash.com/flash/paper/awaypaper.zip" target="_blank">get them here</a>. I hope you like the demo and that you will find the code useful. To compile it you need the latest versions of <a href="http://code.google.com/p/as3dmod/" target="_blank">AS3Dmod</a>, <a href="http://away3d.com/" target="_blank">Away3D</a> and <a href="http://code.google.com/p/tweener/"target="_blank">Tweener</a> libraries.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=OHlzp8K7"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=OHlzp8K7" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=NFny74wl"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/8Hflu3JuiSU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/11/03/paper-simulation-as3dmod/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/11/03/paper-simulation-as3dmod/</feedburner:origLink></item>
		<item>
		<title>Update: what’s up with AS3Dmod?</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/4hxclHrdt0E/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/09/26/update-as3dmod-1/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 08:15:43 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[alternativa3d]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[modifiers]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[sandy3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=43</guid>
		<description><![CDATA[A few weeks passed since I wrote about the AS3Dmod library and released an initial version of the code. Some new stuff has happened since, so here's an update.
First of all AS3Dmod has a new team member - Makc. Makc has been involved in several AS open-source projects, most notably Sandy3D. You can read more [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks passed since I wrote about the <a href="http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/">AS3Dmod library</a> and released an initial version of the code. Some new stuff has happened since, so here's an update.</p>
<p>First of all AS3Dmod has a <strong>new team member - Makc</strong>. Makc has been involved in several AS open-source projects, most notably Sandy3D. You can read more about Makc, <a href="http://makc.coverthesky.com/FlashFX/" target="_blank">here</a>, where you will also find some cool Flash experiments.</p>
<p>The code has also evolved, and was moved to a <strong>modest 0.2 version</strong>. The most important changes are some fixes in the imports that prevented the compilation of the project so far.</p>
<p>The 0.2 version has 5 new modifiers: <strong>Bloat, Twist, Taper, Skew and a UserDefined</strong> modifier that allows to create custom vertex manipulation and easily integrate it into the stack. </p>
<p>Other then that, there is now an <strong>ANT script</strong> that allows to compile the demos for all 4 engines, and also to generate <strong>API Docs</strong>. Of course the documentation is ever evolving, but the latest version is always available <a href="http://www.everydayflash.com/flash/as3dmod/doc/">here</a>. Please note, that <strong>API docs are synchronized with the contents of the SVN repository</strong>. The zipped sources available on the project home page are there for reference, but they quickly become outdated.</p>
<p>Last but not least, there already are a few demos that use AS3Dmod. I allowed myself to gather a short list of what I found out there:</p>
<ul>
<li><a href="http://www.dehash.com/?p=203" target="_blank">Interactive demo</a> by Dehash. I think the first AS3Dmod ever made ;)</li>
<li><a href="http://www.tres-graficos.jp/away3d/elephant102_a3d/" target="_blank">Elephant demo</a> by Tres Graficos</li>
<li><a href="http://blog.r3c7.net/?p=224" target="_blank">Away3D + AS3Dmod</a> by note.x</li>
<li><a href="http://www.lamberta.org/blog/better-bend-than-break/" target="_blank">VectorVision + AS3Dmod</a> by Billy Lamberta</li>
<li><a href="http://clockmaker.jp/blog/2008/09/as3dmod/" target="_blank">Bending example with Pv3d</a> by ClockMaker</li>
</ul>
<p><strong>Thanks to everyone!</strong> We will try to put in more and more features, document the code and also create a tutorial, so stay tuned.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=lyEVPaFb"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=lyEVPaFb" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=KiC3mcqj"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/4hxclHrdt0E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/09/26/update-as3dmod-1/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/09/26/update-as3dmod-1/</feedburner:origLink></item>
		<item>
		<title>Actionscript3 development with FDT</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/pyORCmHC5dk/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/09/19/actionscript3-fdt/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 14:56:06 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[powerflasher]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=42</guid>
		<description><![CDATA[
So far I've been using Flash Develop for all my AS3 projects. But recently, as I stared to do some more serious development, I thought it's time to look for a more powerful tool. Thanks to Marcel from Slot3 and the guys from Powerflasher, since a couple of weeks I am equipped with a new, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fdt.powerflasher.com/" target="_blank"><img src="http://www.everydayflash.com/blog-assets/fdt.jpg" border="0" alt="" width="520" height="131" /></a></p>
<p>So far I've been using <strong>Flash Develop</strong> for all my AS3 projects. But recently, as I stared to do some more serious development, I thought it's time to look for a more powerful tool. Thanks to <a href="http://www.slot3.com/" target="_blank">Marcel from Slot3</a> and the guys from <a href="http://solutions.powerflasher.com/" target="_blank">Powerflasher</a>, since a couple of weeks I am equipped with a new, shiny FDT3 Enterprise license.</p>
<p>I assume that most of the readers of this blog know what FDT is. However, recently I have been asking quite a lot of developers about it, and to my surprise, only some have heard of it, very few are actually using it. So I thought, I'd post some info <strong>for those of you who are not familiar with FDT yet</strong>.</p>
<p><strong>FDT is an Eclipse based AS2/AS3 editor.</strong> It has a rich set of features that helps writing and editing code, and a build tool to compile Flex/Flash projects. It is equipped with numerous cool features, such as <strong>code completion, refactoring functions, syntax checker</strong> and more. To give you just a glimpse of how FDT can help you in everyday Flash/Flex development, I'll focus on two of my favorite ones.</p>
<p><strong>Templates.</strong> In short templates are shortcuts to generate a chunk of code - everything starting with a method call, ending with a class stub. Example: typing lots of log messages can be tedious. In FDT you just create a template, and every time you type in a shortcut (ex. <code>log</code>) it will automatically generate call to your log class (whatever you might use) that can look like this: </p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<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: #0066CC;">Log</span>.<span style="color: #006600;">info</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"ClassName.methodName: "</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Of course <code>ObjectName</code> will automatically be set to whatever class you are in, and so will <code>methodName</code>. FDT has a built in template editor, so you can create any template you want. Believe me, once you get used to this, it will speed up your coding a lot.</p>
<p><strong>ANT integration.</strong> <a href="http://ant.apache.org/" target="_blank">ANT</a> is a Java based universal build tool. If you wonder what a build tool is, imagine you have a project that is composed of 30 SWF files. I am sure you can feel the pain that is publishing them all each time you change something. With ANT this kind of task is fully automated and makes managing multiple-file projects really seamless. </p>
<p>But ANT is not just about compiling. It has a large number of plug-ins for almost anything. You can create a build file that will compile all the SWFs in you project, open an <strong>FTP connection</strong>, transfer all the project <strong>files to a <a href="http://www.webhostingsearch.com/dedicated-server.php" target="_blank">web server</a></strong> and <strong>send an email</strong> with a link to your client for review. Nice, huh? It won't prepare your morning coffee though. </p>
<p>And there is more of course. I suggest you download the <a href="http://solutions.powerflasher.com/products/fdt-3-actionscript-editor/how-to-install-fdt/" target="_blank">trial version</a> and check for yourself. </p>
<p>Unlike Flash Develop, FDT is not free. The license can constitute quite an important expense in fact. However, if you consider making some advanced AS3 development it is definitely worth trying out.  </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=ilzqMzoc"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=ilzqMzoc" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=i6upDhS2"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/pyORCmHC5dk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/09/19/actionscript3-fdt/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/09/19/actionscript3-fdt/</feedburner:origLink></item>
		<item>
		<title>AS3Dmod, a modifier library for all Flash 3d engines</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/g-TYMaAt3oc/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 08:11:59 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[actionsript]]></category>
		<category><![CDATA[alternativa3d]]></category>
		<category><![CDATA[as3dmod]]></category>
		<category><![CDATA[away3d]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[modifier]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[sandy3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=41</guid>
		<description><![CDATA[
Meet AS3Dmod, a cross-engine 3d modifier library for Flash. Sounds cool? Yeah, I am sure it does! Just in case, however, let's see what it does step by step.
A. Cross-engine. 3D in Flash is around here for some time now, and it resulted in quite a few engines available. Each engine has some cool features [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/as3dmod/" target="_blank"><img src="http://www.everydayflash.com/flash/as3dmod/as3dmod-teaser.png" border="0" alt="" width="520" height="200" /></a></p>
<p><strong>Meet AS3Dmod</strong>, a cross-engine 3d modifier library for Flash. Sounds cool? Yeah, I am sure it does! Just in case, however, let's see what it does step by step.</p>
<p><strong>A. Cross-engine</strong>. 3D in Flash is around here for some time now, and it resulted in quite a few engines available. Each engine has some cool features of its own, and sometimes having to choose between them can result in a headache. While AS3Dmod won't solve this situation, it is an attempt to create some functionality that will be available across different engines.</p>
<p><strong>B. Modifier library</strong>. The readers of this blog probably remember the Bend modifier I wrote for PV3D. Well, it is one of many possible modifiers. Classic 3d packages come equipped with at least a dozen of them, which include: taper, twist, noise, skew, etc. Modifiers are basically functions that can be applied to a 3d object to transform it in a certain way. They can be used separately, but when combined they become a very powerful tool. In this, they are much like filters in Photoshop. </p>
<p><strong>C. Flash</strong>. Instead of explaining how modifiers work in Flash, here's a short list of some of the possible uses: <strong>a sheet of paper, a ribbon, a waving flag, water, cloth, a tree or other plant, a butterfly, a birds wing...</strong> They could also be helpful in animating a human face, and in many other situations where animations exported from 3d editors might fall short. </p>
<p><strong>Does it sound cooler now?</strong> It sounded to me when I had the idea a few days ago. As you can imagine I was not able to develop anything close to a full featured library in this short time. Nevertheless, I publish what I was able to come up so far, so that you can all see where I am heading. For the moment, here's what's in there:</p>
<p>- a framework for creating static and <strong>animated modifier stacks</strong><br />
- 3 basic modifiers: <strong>Noise</strong>, <strong>Bend</strong> and <strong>Perlin</strong><br />
- plug-ins for the most popular engines: <strong><a href="http://blog.papervision3d.org/" target="_blank">Papervision3d</a>, <a href="http://www.away3d.com/" target="_blank">Away3d</a>, <a href="http://www.flashsandy.org/" target="_blank">Sandy3d</a> and <a href="http://alternativaplatform.com/en/alternativa3d/" target="_blank">Alternativa3d</a></strong><br />
- a simple demo for each engine<br />
- <del datetime="2008-09-02T19:17:27+00:00">basic documentation</del> not yet :)</p>
<p><strong>Source files</strong>. <a href="http://code.google.com/p/as3dmod/" target="_blank">The project</a> is at Google Code. You can do a checkout from SVN or download a ZIP. </p>
<p><strong>Demo</strong>. In the repository you can find <a href="http://code.google.com/p/as3dmod/source/browse/trunk#trunk/bin" target="_blank">4 demo SWFs</a>, one for each engine. It features a basic stack of 4 modifiers - Noise, Perlin and Bend x2. You can also compile the project yourself. Just follow the instructions I added <a href="http://code.google.com/p/as3dmod/source/browse/trunk/demo/DemoBase.as" target="_blank">in the document class code</a>. </p>
<p><em><strong>Notes.</strong><br />
1. There is no plug-in for FIVe3D - that is because this engine works in a quite different way and doesn't use vertices which are fundamental to modifiers.<br />
2. The Alternativa3d version works in a bit weird way. I think, it is because there's something I don't understand about this engine, but I will be figuring this out.</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=XAlbQvaD"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=XAlbQvaD" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=WbNZ0CVM"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/g-TYMaAt3oc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/</feedburner:origLink></item>
		<item>
		<title>Using the bend modifier with Collada objects</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/LCrqtonu2Sk/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/08/26/using-the-bend-modifier-with-collada-objects/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 22:11:52 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[bend modifier]]></category>
		<category><![CDATA[collada]]></category>
		<category><![CDATA[dae]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[shading]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=39</guid>
		<description><![CDATA[
Papervision3D comes with a set of primitive 3d shapes - such as a plane, a cube and a sphere. It is possible to do quite a lot with those, but the real power lies in importing objects from 3d editors like Maya, 3dsmax or, in that case - Blender. In Papervision3D, the format of choice [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/pv3d/ladydae/" target="_blank"><img src="http://www.everydayflash.com/flash/pv3d/ladydae/ladydae.jpg" border="0" alt="" width="520" height="205" /></a></p>
<p>Papervision3D comes with a set of primitive 3d shapes - such as a plane, a cube and a sphere. It is possible to do quite a lot with those, but <strong>the real power lies in importing objects from 3d editors</strong> like <a href="http://usa.autodesk.com/adsk/servlet/index?id=7635018&#038;siteID=123112" target="_blank">Maya</a>, <a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&#038;id=5659302" target="_blank">3dsmax</a> or, in that case - <a href="http://www.blender.org" target="_blank">Blender</a>. In Papervision3D, the format of choice for importing meshes from 3d editors is <a href="http://www.collada.org/mediawiki/index.php/COLLADA" target="_blank">Collada</a>.</p>
<p>Some time ago I actually did export a Collada file from Blender and import it into Papervision3D. You can see the result in one of <a href="http://www.everydayflash.com/blog/index.php/2008/03/01/from-blender-to-papervision3d/" target="_blank">my early posts</a>. Back then, it was like riding a bike, downhill, in a forest, blindfolded - you don't register much, and at the end you are just happy that you made it. This time I wanted to actually understand what is going on.</p>
<p>For my first experiment I decided to <strong>export only the geometry</strong> and not the texture. I wanted to see my <a href="http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/" target="_blank">bend modifier</a> applied to such an object. The task turned out to be not difficult at all. The only thing I needed to understand was the way Collada files are represented in Papervision3D. </p>
<p><strong>A Collada is basically an XML file</strong> (with a *.dae extension), so it is perfectly human readable. It contains a part that describes its contents. In my file it can be found somewhere towards the end, and it starts like this: </p>
<div class="igBar"><span id="lxml-18"><a href="#" onclick="javascript:showPlainTxt('xml-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-18">
<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;library_visual_scenes<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;visual_scene</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"Scene"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"Scene"</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;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;node</span> <span style="color: #000066;">layer</span>=<span style="color: #ff0000;">"L2"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"LadyDae"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"LadyDae"</span><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;">[...] </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The first interesting point is that <strong>a <strong>Collada file represents a scene</strong>, not a single 3d object</strong>. In my case the scene has only one object, but it is still a scene. That is why Papervision3D will first create a DisplayObject3D that represents this scene, and only then it will add a child that represents the 3d object itself. So in the code, once the Collada is loaded, I can access the object "LadyDae" like that:</p>
<div class="igBar"><span id="lactionscript-19"><a href="#" onclick="javascript:showPlainTxt('actionscript-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-19">
<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: #000000; font-weight: bold;">var</span> mesh:DisplayObject3D = dae.<span style="color: #006600;">getChildByName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"COLLADA_Scene"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getChildByName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"LadyDae"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Note that the scene is named <strong>"COLLADA_Scene"</strong> not "Scene" as you could expect from the XML. It's because this name is hard coded and it will always be the same, no matter what the name is in your file. Also note that the attribute you need to refer too is the 'name' attribute, not 'id'. </p>
<p>Now, that <strong>the 'mesh' variable contains a reference to the object holding the geometry</strong> applying the Bend modifier is pretty simple:</p>
<div class="igBar"><span id="lactionscript-20"><a href="#" onclick="javascript:showPlainTxt('actionscript-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-20">
<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: #000000; font-weight: bold;">var</span> b:Bend = <span style="color: #000000; font-weight: bold;">new</span> Bend<span style="color: #66cc66;">&#40;</span>mesh<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">b.<span style="color: #006600;">quickBend</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">1</span>, .<span style="color: #cc66cc;color:#800000;">5</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>So, I'd love to tell you stories on how, after a many sleepless nights, I finally made a breakthrough and now the Bend modifier works with Collada... <strong>but the fact is it always did</strong>. The thing I failed to grasp so far was the structure of the Collada object itself.</p>
<p>This unexpected success left me some time and energy to play a bit with another topic from my must-explore-soon list - <strong>ShadedMaterials</strong>. I did not do much. Basically I just followed some of Ralph Hauwerts <a href="http://www.unitzeroone.com/blog/2007/04/03/papervision3d-demos-cellshading-toonrendering-and-more/"> old demos</a>, but it resulted in some effects that are <a href="http://www.everydayflash.com/flash/pv3d/ladydae/" target="_blank">nice to look at</a>.</p>
<p><strong>Credits.</strong> The model of the girl is a very simplified version of the original made by <a href="http://www.unbruco.it/offcircle/index_en.html" target="_blank">Tiziana</a>. The background tile comes, as usual, from <a href="http://www.squidfingers.com/" target="_blank">SquidFingers</a>.</p>
<p><strong>Source.</strong> The source code is available <a href="http://barteksplayground.googlecode.com/files/ladydae.zip">here</a>. In the example, I load a ZIP containing the Collada file. A class called KMZ is able to load and unpack it correctly, and it saves a lot of bandwidth. I got this tip on the <a href="http://www.nabble.com/Loading-ZIPed-DAE-files-to19103548.html" target="_blank">Pv3d forum</a> (thanks!)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=Kxs9U0ko"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=Kxs9U0ko" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=3KqPzb2c"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/LCrqtonu2Sk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/08/26/using-the-bend-modifier-with-collada-objects/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/08/26/using-the-bend-modifier-with-collada-objects/</feedburner:origLink></item>
		<item>
		<title>Skateboard simulator in Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/HxBSWVPWyPs/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/08/18/skateboard-simulator-papervision3d/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 07:47:37 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[paperking3d]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[skate]]></category>
		<category><![CDATA[skateboard]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=38</guid>
		<description><![CDATA[
A long, long time ago I used to skate. It was a time when Tony Hawk was still in his teens, boneless was the coolest trick and Future Primitive was the latest skateboarding movie, available exclusively on a VHS tape (remember those?).
I was never very successful at skateboarding. However, I always admired the smooth moves [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.paperskate3d.com/" target="_blank"><img src="http://www.everydayflash.com/flash/pv3d/assets/paperskate.jpg" border="0" alt="" width="520" height="200" /></a></p>
<p><strong>A long, long time ago I used to skate.</strong> It was a time when <a href="http://www.tonyhawk.com/" target="_blank">Tony Hawk</a> was still in his teens, <a href="http://www.youtube.com/watch?v=m48g6guLlOA" target="_blank">boneless</a> was the coolest trick and <a href="http://www.youtube.com/watch?v=uTsd_bkGdtI" target="_blank">Future Primitive</a> was the latest skateboarding movie, available exclusively on a VHS tape (remember those?).</p>
<p>I was never very successful at skateboarding. However, I always admired the smooth moves of the deck under the feet of guys more talented then myself. So, many years later I thought it would be nice to pay tribute to this sport, and <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> seemed like the perfect tool. The execution however appeared a task much more difficult than I imagined. Fortunately, I had some free time in July and August so I sat to my desk and started coding. Today you can see the results.</p>
<p><strong>Source</strong>. As usual, I post all the source files - you can <a href="http://www.paperskate3d.com/sources.html" target="_blank">get them here</a> (this time under <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank">CC license</a>, not MIT). I also plan to write some technical details on how the application works soon. For the moment, I will just mention that it is built with <a href="http://blog.papervision3d.org/" target="_blank">Papervision3D</a> and the animations are done with <a href="http://code.google.com/p/tweener/" target="_blank">Tweener</a>. </p>
<p><strong>Now, no more talk.</strong> Just <a href="http://www.paperskate3d.com/" target="_blank">click here</a> and bust some perfect ollies, dudes! And to be sure not to miss the rest of the story, subscribe to this blog's <a href="http://feeds.feedburner.com/EverydayFlash" target="_blank">RSS</a> or just bookmark this page.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=nig8m8oI"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=nig8m8oI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=O06TUKNM"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/HxBSWVPWyPs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/08/18/skateboard-simulator-papervision3d/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/08/18/skateboard-simulator-papervision3d/</feedburner:origLink></item>
		<item>
		<title>Tutorial: 3D photo album, FIVe3D and TweenLite</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/5KJK4VfinXo/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/07/10/tutorial-five3d-tweenlite/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 08:33:05 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[FIVe3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[photo]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=36</guid>
		<description><![CDATA[
Recently I wrote a tutorial for The Tech Labs, and it has been published yesterday. It is a tutorial which shows how to build a simple 3d photo album using the FIVe3D and TweenLite libraries. You can read it here. I hope you'll will find it useful!
The Tech Labs is a website recently started by [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thetechlabs.com/3d/building-a-3d-album-with-five3d-and-tweenlite/" target="_blank"><img src="/flash/five3d/tutorial/fived3album.jpg" width="520" height="200" border="0"></a></p>
<p>Recently I wrote a tutorial for <a href="http://www.thetechlabs.com/" target="_blank"><strong>The Tech Labs</strong></a>, and it has been published yesterday. It is a tutorial which shows how to build <strong>a simple 3d photo album</strong> using the <a href="http://five3d.mathieu-badimon.com/" target="_blank">FIVe3D</a> and <a href="http://blog.greensock.com/tweenliteas2/" target="_blank">TweenLite</a> libraries. You can read it <a href="http://www.thetechlabs.com/3d/building-a-3d-album-with-five3d-and-tweenlite/" target="_blank">here</a>. I hope you'll will find it useful!</p>
<p><a href="http://www.thetechlabs.com/" target="_blank"><strong>The Tech Labs</strong></a> is a website recently started by <strong>Carlos Pinho</strong>. It <em>"is intended to be a tool to contribute for the research, information and knowledge for the IT professionals as also for the non-techies."</em> Be sure to check it out. There's already a few good tutorials in there and new stuff is coming every week.</p>
<p>Carlos also runs the <a href="http://flashenabledblog.com/" target="_blank"><strong>Flash Enabled blog</strong></a>, which features cool stuff from all over the web. You will find there plenty of links to resources ranging <strong>from Photoshop tips, to Actionscript and Flash/Flex tutorials</strong>. It is a great source of information, so be sure to visit!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=Iqbo08Do"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=Iqbo08Do" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=snh8eQU0"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/5KJK4VfinXo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/07/10/tutorial-five3d-tweenlite/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/07/10/tutorial-five3d-tweenlite/</feedburner:origLink></item>
		<item>
		<title>Pixel precision in Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/M19FFZbAMgQ/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/07/07/pixel-precision-in-papervision3d/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 10:18:24 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[pixel perfect]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=35</guid>
		<description><![CDATA[
I used to work for a company that made of the concept of pixel perfection one of the pillars of their success. Today most of the top clients and agencies demand high quality, and pixel perfection became one of the important components of a great website. Obviously, it concerns 3D as well.
To achieve it, sooner [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/pv3d/precision/" target="_blank"><img src="http://www.everydayflash.com/flash/pv3d/precision/precision-demo.jpg" border="0" alt="" width="520" height="205" /></a></p>
<p>I used to work for <a href="http://www.f-i.com/" target="_blank">a company</a> that made of the concept of <strong>pixel perfection</strong> one of the pillars of their success. Today most of the top clients and agencies demand high quality, and pixel perfection became one of the important components of a great website. Obviously, it concerns 3D as well.</p>
<p>To achieve it, sooner or later in your 3D adventures you will come across one of these problems:<br />
1. <strong>A material should be rendered as in 1:1 scale of the original texture</strong><br />
2. <strong>A precise, pixel level match between 2d and 3d content is necessary</strong></p>
<p>In order to check how to solve these problems, I created <a href="http://www.everydayflash.com/flash/pv3d/precision/" target="_blank">a very simple demo</a>. First, I had to make sure my textures are not scaled. I started to browse the <a href="http://www.nabble.com/Papervision3D-f22855.html" target="_blank">Papervision3D forum</a> and it wasn't long before I found the magic formula:</p>
<div class="igBar"><span id="lactionscript-24"><a href="#" onclick="javascript:showPlainTxt('actionscript-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-24">
<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;">3dobj.<span style="color: #006600;">z</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> - <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span> * <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Many thanks to <a href="http://www.nabble.com/How-to-get-a-Plane-in-Scen3D-view-at-scale-1%3A1-on-ViewPort-td17741402.html" target="_blank">unnormaJH and kjangsa3</a> for this tip. I would add that it works just as it is <strong>only with planes</strong>. In my example I worked with a cube, and a cubes Z position is defined by the point in the center of it - which means that the face facing the camera will be closer half the cubes width, so remember that this needs to be adjusted.</p>
<p><strong>UPDATE.</strong> With the new Camera classes (GW rev. 639 an higher) the formula changes a bit. The "-1" in "zoom-1" is no longer needed. So it looks like this:</p>
<div class="igBar"><span id="lactionscript-25"><a href="#" onclick="javascript:showPlainTxt('actionscript-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-25">
<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;">3dobj.<span style="color: #006600;">z</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> * <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The second problem - a <strong>pixel perfect match between 2D and 3D</strong> - is mainly about being able to figure out the screen X and Y coordinates of the 3D object. They can be obtained that way:</p>
<div class="igBar"><span id="lactionscript-26"><a href="#" onclick="javascript:showPlainTxt('actionscript-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-26">
<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;">screenPosX = 3dobj.<span style="color: #006600;">screen</span>.<span style="color: #006600;">x</span> + viewport.<span style="color: #006600;">viewportWidth</span> / <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">screenPosY = 3dobj.<span style="color: #006600;">screen</span>.<span style="color: #006600;">y</span> + viewport.<span style="color: #006600;">viewportHeight</span> / <span style="color: #cc66cc;color:#800000;">2</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That, I found in an <a href="http://archive.pv3d.org/?p=51" target="_blank">article on PV3D.org</a> which shows how to do this. There is also an example of how to get the X and Y coordinates of a single vertex.</p>
<p>In the demo above, knowing the screen coordinates of the cube, I use the <strong>BitmapData.draw method</strong> to take a snapshot of the 2D background at this position for use as the texture. If you scale the browser window you can see how the texture on the cube is being updated to exactly match the background tile.</p>
<p>In the real world, what you'll need much more often is to do the opposite, that is <strong>drawing 2d content exactly on top of a 3d object</strong>. An example would be replacing a texture with a Sprite containing some interactive elements. By knowing the screen coordinates of your 3d object, and by making sure it is scaled 1:1 it is a quite easy task to make that look seamless &amp; perfect!</p>
<p><strong>Source code</strong> - <a href="http://barteksplayground.googlecode.com/files/PrecisionPapervision3d.zip">get it here</a>.</p>
<p><strong>Credits</strong> The tile graphics come from <a href="http://www.squidfingers.com/" target="_blank">Squidfingers</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=fNIgmoKq"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=fNIgmoKq" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=4JMLGGn8"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/M19FFZbAMgQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/07/07/pixel-precision-in-papervision3d/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/07/07/pixel-precision-in-papervision3d/</feedburner:origLink></item>
		<item>
		<title>Flash on free software: FlashDevelop and Flex SDK</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/WfsYmIDkKPo/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/07/01/flash-on-free-software-flashdevelop-flex-sdk/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 16:41:45 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=34</guid>
		<description><![CDATA[I have been recently asked a couple of times about the source code that I publish and how to compile it. I decided to write a short note on that.
For my experiments, I use a combination of FlashDevelop and the free Flex SDK from Adobe Open Source. It is much better suited to work with [...]]]></description>
			<content:encoded><![CDATA[<p>I have been recently asked a couple of times about the <strong>source code</strong> that I publish and <strong>how to compile it</strong>. I decided to write a short note on that.</p>
<p>For my experiments, I use a combination of <a href="http://www.flashdevelop.org/" target="_blank">FlashDevelop</a> and the free <a href="http://www.adobe.com/products/flex/flexdownloads/#sdk" target="_blank">Flex SDK</a> from Adobe Open Source. It is much better suited to work with AS3 then Flash IDE, and what's most cool - it is 100% free!</p>
<p>To start developing <strong>Flash on free software</strong>, you simply need to download and install <a href="http://www.flashdevelop.org/" target="_blank">FlashDevelop</a> and the <a href="http://www.adobe.com/products/flex/flexdownloads/#sdk" target="_blank">Flex SDK</a>. Installing the SDK means merely downloading a ZIP and copying its contents into a folder on your disk. Please also note that FlashDevelop is currently available for PC only.</p>
<p>Once you have both, open FlashDevelop, go to the 'Tools > Program Settings' menu, choose the 'AS3Context' group and look for the 'Flex SDK Location' property. Set it to the folder where you just copied/installed the SDK. Now create a new project with the 'Actionscript 3 Default Project' template and you are ready to go. Really, it is so simple!</p>
<p>For a more in depth coverage of the topic you can refer to <a href="http://www.flashdevelop.org/community/viewtopic.php?t=1932" target="_blank">this thread</a> on the <strong>FlashDevelop forum</strong>. Also, John Lindquist from <a href="http://pv3d.org" target="_blank">PV3D.org</a> posted a <a href="http://archive.pv3d.org/?p=28" target="_blank">very good tutorial</a> on <strong>FlashDevelop and Papervision3D</strong>, so be sure to read that too.</p>
<p>Since in FlashDevelop <strong>you do not have a FLA file</strong> to work with, there is no library either. That means that external assets are not imported, and they must be embedded in a different way. For that, the <strong>Flex style [Embed] tag</strong> is used.</p>
<p>I prepared a <a href="http://barteksplayground.googlecode.com/files/embedding-assets.zip">little test project in FlashDevelop</a> that illustrates how to <strong>embed different types of objects</strong> (images, sounds, movieclips and fonts) with this technique. Download it, take a look at the source code and I am sure you will grasp the concept in no time. If you installed FlashDevelop with the Flex SDK properly, you should be able to compile this project and see the results. For a more in depth information about embedding assets in Flex refer to the <a href="http://www.adobe.com/devnet/flex/quickstart/embedding_assets/">official documentation</a>.</p>
<p>Overall, for <strong>3D in Flash</strong> this setup is much better then the traditional Flash IDE. It is more flexible, you do not need to keep an empty FLA file used only to compile SWFs, and since there is no timeline and no frames, you can only write code in classes - and this enforces better OOP practices!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=khX5MmV9"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=khX5MmV9" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=yWzpxLTa"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/WfsYmIDkKPo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/07/01/flash-on-free-software-flashdevelop-flex-sdk/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/07/01/flash-on-free-software-flashdevelop-flex-sdk/</feedburner:origLink></item>
		<item>
		<title>Microphone controlled animation in Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/EoS_HV7QzBE/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/06/24/microphone-animation-papervision3d/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 20:12:36 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[2D Animation]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=32</guid>
		<description><![CDATA[
This time I have something less mind-twisting then the bend modifier and all that math. The idea was to create an animation of leaves flying around, propelled by wind controlled with the microphone. This little experiment was also a good occasion to work with some new Papervision3D features.
Effects. The Papervision3D team decided to merge the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/pv3d/leaves/" target="_blank"><img src="/flash/pv3d/leaves/leaves-demo.jpg" width="520" height="205" border="0" alt=""></a></p>
<p>This time I have something less mind-twisting then the bend modifier and all that math. The idea was to create an animation of leaves flying around, propelled by wind controlled with the microphone. This little experiment was also a good occasion to work with some new <a href="http://blog.papervision3d.org" target="_blank">Papervision3D</a> features.</p>
<p><strong>Effects</strong>. The Papervision3D team decided to merge the Effects branch with Great White earlier this month. All the detailed information about that can be found on by Andy Zupko's <a href="http://blog.zupko.info/?p=129" target="_blank">blog</a>. There is a lot of cool stuff, so be sure to check it out. One of those is a new property of the DisplayObject3D called 'useOwnContainer'. When set to true, all the classic bitmap effects can be applied directly to a mesh. In this case I used the BlurFilter, and the ColorMatrixFilter for the depth-of-field effect. The inspiration came from the really cool <a href="http://mrdoob.com/blog/?postid=418" target="_blank">depth-of-field experiments</a> by <a href="http://mrdoob.com/blog/" target="_blank">Mr.doob</a>.</p>
<p><strong>SimpleLevelOfDetail</strong>. With this one, the idea is that the further an object is from the camera, the less faces it has. That way we can get an important performance gain without sacrificing the quality too much. I tried to implement it, but I ran into some trouble. Later, after a brief discussion on the PV3D forum, Andy Zupko <a href="http://blog.zupko.info/?p=137" target="_blank">added the 'SimpleLevelOfDetail' class</a> that implements this concept. I used it here. Thanks a lot, Andy!</p>
<p><strong>Bend modifier</strong>. Finally, I use the <a href="http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/" target="_blank">Bend class</a> to give the leaves a slightly more natural look.</p>
<p><strong>Now, the fun part</strong>. The leaves react to the activity level of the microphone, so if you take yours and start to blow into it, they will <a href="http://www.everydayflash.com/flash/pv3d/leaves/" target="_blank">take off and fly around</a>. Be careful, if you blow too hard you will get a head rush! :)</p>
<p><em>If you do not have a microphone use your mouse wheel to create wind. Keep in mind however that it isn't as much fun as with a mic. Also, on Windows, the microphone volume settings are really tricky and well hidden in multiple places, so if something is not working - double check those in the first place.</em></p>
<p>Last but not least, here's the <strong><a href="/flash/pv3d/leaves/leaves-demo-2.zip">source code</a></strong> (updated Dec 17th 2008 to work with latest PV3D trunk).</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=WHFiIcUs"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=WHFiIcUs" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=ogwB9fVQ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/EoS_HV7QzBE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/06/24/microphone-animation-papervision3d/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/06/24/microphone-animation-papervision3d/</feedburner:origLink></item>
		<item>
		<title>Bend modifier – part II</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/giK_o5VZ5S8/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 18:35:39 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bend modifier]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=31</guid>
		<description><![CDATA[
UPDATE Sept 9th, 2008. The Bend modifier is now part of AS3Dmod library. Use that one instead of the class linked below.
First of all, thanks for the great feedback I got after the first post on bending. I really appreciate it. 
This time, I post an updated version of the Bend class for Papervision3D that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/pv3d/bend/all/" target="_blank" title="Click for demo" ><img src="http://www.everydayflash.com/flash/pv3d/bend/all/bend-em-all.gif" border="0"/></a></p>
<p><strong>UPDATE Sept 9th, 2008. The Bend modifier is now part of <a href="http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/">AS3Dmod library</a>. Use that one instead of the class linked below.</strong></p>
<p>First of all, thanks for the great feedback I got after <a href="http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/">the first post</a> on bending. I really appreciate it. </p>
<p>This time, I post an updated version of the Bend class for <a href="http://blog.papervision3d.org" target="_blank">Papervision3D</a> that works with every simple DisplayObject3D - that is, a DisplayObject3D that does not contain any child objects. Click <a href="http://www.everydayflash.com/flash/pv3d/bend/all/" target="_blank" title="Bend for any DisplayObject3D" >here for a demo</a>. The algorithm has been refined and the class public methods have been changed. Here's an updated use-case:</p>
<div class="igBar"><span id="lactionscript-29"><a href="#" onclick="javascript:showPlainTxt('actionscript-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-29">
<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;">do3d = <span style="color: #000000; font-weight: bold;">new</span> SomeDisplayObject3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #006600;">bend</span> = <span style="color: #000000; font-weight: bold;">new</span> Bend<span style="color: #66cc66;">&#40;</span>do3d <span style="color: #66cc66;">&#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;">scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>do3d <span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">bend.<span style="color: #006600;">bend</span><span style="color: #66cc66;">&#40;</span>Bend.<span style="color: #006600;">X</span>, Bend.<span style="color: #006600;">Z</span>, <span style="color: #cc66cc;color:#800000;">2</span>, <span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">4</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The bend() method accepts four arguments, out of which the two first are new: </p>
<ul>
<li><strong>The axis of the bend</strong></li>
<li><strong>The direction of the bend</strong> </li>
</ul>
<p>Now: I tried to write the theory behind those axes. I really did! But then this post was becoming boring and highly incomprehensible, so I gave up.</p>
<p>The best thing to do is to experiment with those setting. Each argument can take one of the three values: <strong>Bend.X</strong>, <strong>Bend.Y</strong> and <strong>Bend.Z</strong>. Different primitives will need different settings for the bending to look correct, but on the other hand, playing with them can lead to quite fascinating and weird-looking shapes, so be sure to try different combinations.</p>
<p>If you do not have time to experiment however, I created a special method, that <strong>magically bends the object the right way</strong>:</p>
<div class="igBar"><span id="lactionscript-30"><a href="#" onclick="javascript:showPlainTxt('actionscript-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-30">
<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;">bend.<span style="color: #006600;">quickBend</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">2</span>, <span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">4</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The two other arguments are 'force' and 'offset'. Both are described in detail in the <a href="http://code.google.com/p/barteksplayground/source/browse/trunk/src/com/everydayflash/pv3d/modifiers/Bend.as" target="_blank">source code</a>. Additionally, I also published the <a href="http://www.everydayflash.com/flash/pv3d/bend/all/bend-demo.zip">source of the demo here</a>. Have fun!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=UuaAVzTv"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=UuaAVzTv" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=SHtatCR9"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/giK_o5VZ5S8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/</feedburner:origLink></item>
		<item>
		<title>Bend modifier for Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/rNsxbzhCd5s/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 07:51:43 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=30</guid>
		<description><![CDATA[
UPDATE Sept 9th, 2008. The Bend modifier is now part of AS3Dmod library. Use that one instead of the class linked below.
Bending objects is one of the classic features of any 3D package. I thought it would be nice to be able to bend stuff in Papervision3D too.
First, I had to spend a couple of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/flash/pv3d/bend/" target="_blank" title="Click to view the demo"><img src="/flash/pv3d/bend/bend-plane-papervision3d.jpg" width="520" height="221" border="0"></a></p>
<p><strong>UPDATE Sept 9th, 2008. The Bend modifier is now part of <a href="http://www.everydayflash.com/blog/index.php/2008/09/03/as3dmod/">AS3Dmod library</a>. Use that one instead of the class linked below.</strong></p>
<p><strong>Bending objects</strong> is one of the classic features of any 3D package. I thought it would be nice to be able to bend stuff in <a href="http://blog.papervision3d.org" target="_blank">Papervision3D</a> too.</p>
<p>First, I had to spend a couple of days trying to understand the concept of bending. It is fairly obvious when you see it, but when it comes to express bending with mathematical formulas, it is not. Plus, I am not very strong in math, and that doesn't help :)</p>
<p>Eventually I grasped the concept: <strong>bending means distributing all the vertices of an object around a point in space</strong>. The closer the point is from the object, the stronger the bend. I will prepare a separate post explaining this theory soon. For now, just play with <a href="/flash/pv3d/bend/" target="_blank">the demo</a>.</p>
<p>Currently the Bend class only accepts Planes, but I am working on a version that will be able to bend anything else. <strong>The source</strong> for the <a href="http://code.google.com/p/barteksplayground/source/browse/trunk/src/com/everydayflash/pv3d/modifiers/Bend.as" target="_blank">Bend class is here</a>. It is a very basic version and the algorithm is not yet optimized, but it should give everyone who's interested a fairly good idea on how it is done. You can also grab the class and use it with your planes created in Papervision3D. Here's a basic use case:</p>
<div class="igBar"><span id="lactionscript-32"><a href="#" onclick="javascript:showPlainTxt('actionscript-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-32">
<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;">plane = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>someMaterial,&nbsp; <span style="color: #cc66cc;color:#800000;">200</span>, <span style="color: #cc66cc;color:#800000;">200</span>, <span style="color: #cc66cc;color:#800000;">20</span>, <span style="color: #cc66cc;color:#800000;">20</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">bend = <span style="color: #000000; font-weight: bold;">new</span> Bend<span style="color: #66cc66;">&#40;</span>plane<span style="color: #66cc66;">&#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;">scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>plane<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">bend.<span style="color: #006600;">bend</span><span style="color: #66cc66;">&#40;</span>Bend.<span style="color: #006600;">X</span>, Bend.<span style="color: #006600;">Z</span>, <span style="color: #cc66cc;color:#800000;">1</span>, <span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">5</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Check the source file for detailed info about the arguments.</p>
<p><strong>UPDATE June 16th 2008</strong>. Check the next post for a <a href="http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/">newer version of Bend class</a> (demo included).</p>
<p>In general this kind of transformations are called <strong>modifiers</strong> and can be organized in stacks. This means that one modifier can be applied to an object, and then another one can be applied to the result of this transformation. For an interesting list of possible modifiers <a href="http://www.mobilefish.com/tutorials/3dsmax/3dsmax_quickguide_modifiers.html" target="_blank">check here</a> (examples are from <a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&#038;id=5659302" target="_blank">3dsMAX</a>). </p>
<p><strong>Modifiers stack</strong> is a powerful tool in <a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&#038;id=5659302" target="_blank">3dsMAX</a>, it would definitely be good to have something like this in Papervision3D, don't you think?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=1AE9Zzif"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=1AE9Zzif" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=jltEhAbZ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/rNsxbzhCd5s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/</feedburner:origLink></item>
		<item>
		<title>A banner built using FIVe3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/w11AIkAq8QM/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/06/04/banner-using-five3d/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 08:09:40 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[FIVe3D]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=28</guid>
		<description><![CDATA[
Ever since Mathieu Badimon released FIVe3d AS3, I was thinking that it would be great to build a 3D animated banner using this library.
The main challenge with banners is obviously the file size. I had to customize FIVe3d a little bit for this one. By organizing some imports and removing some parts of code I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.everydayflash.com/flash/futbolowo/" target="_blank"><img class="alignnone" src="http://www.everydayflash.com/flash/futbolowo/pict.png" alt="Click here to see the banner" width="520" height="260" border="0"/></a></p>
<p><strong>Ever since Mathieu Badimon released <a href="http://five3d.mathieu-badimon.com/" target="_blank"><strong>FIVe3d</strong></a> AS3, I was thinking that it would be great to build a <a href="http://www.everydayflash.com/flash/futbolowo/" target="_blank">3D animated banner</a> using this library.</strong></p>
<p>The main challenge with banners is obviously the file size. I had to customize <strong>FIVe3d</strong> a little bit for this one. By organizing some imports and removing some parts of code I did not use I gained a couple of kilobytes. For the animation I used <a href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLite</a>, which is a much lighter alternative to Tweener. My final result is around <strong>40KB</strong>. My original plan was something closer to 30KB... but ok!</p>
<p>Except for the final 2D animation of the logo, everything is 100% script. All the 3D objects are drawn in code using the FIVe3d drawing functions (which are based on the standard Drawing API). The result is around a 1000 lines of code, plus the code of the libraries - pretty much for a banner, huh?</p>
<p>At Multimania in Belgium, I've seen <a href="http://www.webkitchen.be/" target="_blank">Serge Jespers</a> from Adobe presenting a sneak peak of<br />
<strong>Flash CS4 IDE</strong>. It seems that it will be possible to prepare this kind of animations directly on the timeline... and probably in a matter of a couple of hours! So this kind of experiments will become obsolete. Nevertheless, this is still a distant future and now FIVe3D rocks!</p>
<p><strong>Source.</strong> For anyone who wants to see how it's done here are <a href="http://www.everydayflash.com/flash/futbolowo/futbulowo-source.zip">the sources</a>. The code is not super clean, but I hope it is readable. As <a href="http://www.everydayflash.com/blog/index.php/about/" target="_blank">always</a> I release it under MIT license.</p>
<p>As a final note, a few words about the site this banner was made for. <a href="http://www.futbolowo.pl" target="_blank">Futbolowo.pl</a> is a community site run by a friend of mine (it is all in Polish only). It allows local football clubs to run their websites based on a specialized content management engine.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=lG3H2zCQ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=lG3H2zCQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=0re7TAmH"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/w11AIkAq8QM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/06/04/banner-using-five3d/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/06/04/banner-using-five3d/</feedburner:origLink></item>
		<item>
		<title>Rotating a Sprite around any point</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/Snfi2Ci7L7o/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/05/28/rotating-a-sprite-around-any-point/#comments</comments>
		<pubDate>Wed, 28 May 2008 20:47:30 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[2D Animation]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=27</guid>
		<description><![CDATA[
Click once to activate, then click anywhere to move the registration point. Use SPACE to change the object or any other key to change the direction of the rotation.
This time I want to share a simple solution to a relatively simple, but annoying problem.
The problem: the Sprite.rotation property rotates the object always around the registration [...]]]></description>
			<content:encoded><![CDATA[<p><iframe marginwidth="0" marginheight="0" src="http://www.everydayflash.com/flash/rotator" frameborder="0" width="520" height="200"></iframe></p>
<p><span style="font-size:10px;line-height:12px">Click once to activate, then click anywhere to move the registration point. Use SPACE to change the object or any other key to change the direction of the rotation.</span></p>
<p>This time I want to share a simple solution to a relatively simple, but annoying problem.</p>
<p><u><em>The problem:</em></u> the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#rotation" target="_blank">Sprite.rotation</a> property rotates the object always around the <strong>registration point</strong> of the Sprite. If you need to rotate it around some other point, it's not automatic. </p>
<p>One way to achieve this is to move the content inside the Sprite in order to change its position in relation to the registration point. It works, but it's not elegant and not very handy if the Sprite has many children - you would need to move all of them.</p>
<p>Another way is to wrap your Sprite into another Sprite and rotate the parent. This solution is a bit better, but still has lots of shortcomings. And what about if you need to change the registration point of the object during rotation?</p>
<p><u><em>Solution:</em></u> the <strong>Rotator</strong> class can be used as a replacement for the default <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html#rotation" target="_blank">Sprite.rotation</a> property. This class uses a combination of trigonometric functions to rotate an object around a point along with the rotation property itself to create a correct circular movement. It allows you to have a proper rotation no matter if the point is placed inside the rotated object or outside of it. And, what's most fun, you can change the registration point at any moment. Play with the demo above to see it in action.</p>
<p><strong>Source.</strong> Check out the <a href="http://code.google.com/p/barteksplayground/source/browse/trunk/src/com/everydayflash/util/Rotator.as" target="_blank">source of the class here</a>, or just grab a ZIP with the <a href="http://www.everydayflash.com/flash/rotator/Rotator.zip">complete demo here</a>. </p>
<p><strong>Example.</strong> It can be used either directly, in an 'ENTER_FRAME' animation, or in combination with <a href="http://code.google.com/p/tweener/" target="_blank">Tweener</a> or other similar libraries. It works not only with a Sprite, but also with any class that extends the DisplayObject. </p>
<p>Use it like this:</p>
<p>
<div class="igBar"><span id="lactionscript-35"><a href="#" onclick="javascript:showPlainTxt('actionscript-35'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-35">
<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: #000000; font-weight: bold;">var</span> s:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> r:Rotator = <span style="color: #000000; font-weight: bold;">new</span> Rotator<span style="color: #66cc66;">&#40;</span>s, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">10</span>,<span style="color: #cc66cc;color:#800000;">10</span><span style="color: #66cc66;">&#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;">r.<span style="color: #006600;">rotation</span> = <span style="color: #cc66cc;color:#800000;">45</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>or like this:</p>
<p>
<div class="igBar"><span id="lactionscript-36"><a href="#" onclick="javascript:showPlainTxt('actionscript-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-36">
<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: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</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: #000000; font-weight: bold;">var</span> s:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #000000; font-weight: bold;">var</span> r:Rotator = <span style="color: #000000; font-weight: bold;">new</span> Rotator<span style="color: #66cc66;">&#40;</span>s, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">10</span>,<span style="color: #cc66cc;color:#800000;">10</span><span style="color: #66cc66;">&#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;">Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>r, <span style="color: #66cc66;">&#123;</span> rotation:<span style="color: #cc66cc;color:#800000;">45</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;color:#800000;">1</span>, transition:<span style="color: #ff0000;">"linear"</span><span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=1p8hIoZE"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=1p8hIoZE" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=Ner8bEWQ"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/Snfi2Ci7L7o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/05/28/rotating-a-sprite-around-any-point/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/05/28/rotating-a-sprite-around-any-point/</feedburner:origLink></item>
		<item>
		<title>Road trip animation in Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/nbtyhu0Fn3A/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/05/16/road-trip-papervision3d/#comments</comments>
		<pubDate>Thu, 15 May 2008 22:09:39 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[game programming]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=25</guid>
		<description><![CDATA[
I have been thinking about doing something like this for some time now, but I had no idea where to start. However, recently, after I experimented with animating vertices in Papervision3D, things started to look brighter, so a couple of days ago I sat down and started coding...
Basic concept here is that there is one [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.everydayflash.com/flash/pv3d/losthighway/' target='_blank'><img src='http://www.everydayflash.com/flash/pv3d/losthighway/lostHighway.jpg' width='521' height='200' alt='Click to see the demo' class='alignnone' border="0" /></a></p>
<p>I have been thinking about doing something like this for some time now, but I had no idea where to start. However, recently, after I experimented with <a href="index.php/2008/05/05/vertex-animation-papervision3d/">animating vertices</a> in <a href="http://blog.papervision3d.org" target="_blank">Papervision3D</a>, things started to look brighter, so a couple of days ago I sat down and started coding...</p>
<p>Basic concept here is that there is one Plane and two BitmapData objects - a texture and a terrain. The Plane never moves, but instead the texture and the terrain are scrolled on it.</p>
<p><strong>The texture</strong> is assigned as material to the plane. At each frame the texture BitmapData is scrolled by an offset and the material is updated.</p>
<p><strong>The terrain</strong> is a grey scale bitmap. It is scrolled in the same way as the texture. Each pixel of the terrain is mapped to a single vertex of the plane - the lighter the pixel color is, the higher the z position of the vertex will be. It is done the the same way as in my <a href="index.php/2008/05/05/vertex-animation-papervision3d/">previous example</a>. Only this time it is not a generated noise, but rather a map drawn manually, so that is works good with the texture.</p>
<p><strong>Hills and turns</strong>. Additionally, each vertex on the plane has its x and z positions rearranged continuously using <code>Math.sin()</code> and <code>Math.cos()</code> functions with different phases - that creates the illusion of uphills, downhills and turns...</p>
<p><strong>Lighting</strong>. Finally there is one more bitmap - a light map, that is blended with the texture using MULTIPLY mode to create the effect of light and darkness.</p>
<p><img src='http://www.everydayflash.com/flash/pv3d/losthighway/textures.gif' width='521' height='140' class='alignnone' /></p>
<p><strong>Source</strong>. I think it is a pretty nice effect and a good starting point for maybe a car racing game or something. Check the demo, try it in full screen by pressing SPACE and <a href="http://code.google.com/p/barteksplayground/source/browse/trunk/src/com/everydayflash/pv3d/losth/Roadtrip.as" target="_blank">grab the source</a> to see it in detail (also available in a <a href="http://barteksplayground.googlecode.com/files/RoadtripPapervision3D.zip">zip bundle</a> containing all the graphical assets I used).</p>
<p><strong>Credits</strong>. In this demo I used textures from <a href="http://www.openfootage.net/" target="_blank">OpenFootage.net</a>. They have some great stuff in there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=rFjI778P"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=rFjI778P" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=OcXR45BH"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/nbtyhu0Fn3A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/05/16/road-trip-papervision3d/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/05/16/road-trip-papervision3d/</feedburner:origLink></item>
		<item>
		<title>Flash Player 10 Beta available</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/UhnE4hhU9P0/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/05/15/flash-player-10-beta/#comments</comments>
		<pubDate>Thu, 15 May 2008 08:05:05 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[News & Events]]></category>
		<category><![CDATA[astro]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash player 10]]></category>
		<category><![CDATA[pixel bender]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=26</guid>
		<description><![CDATA[
It is official - Flash Player 10 (Astro) is there, and you can download and install it from Adobe Labs. At a first glance, the most exciting things in the new player are (from my point of view):
3D support. Of course! Adobe says "Complex effects are simple with APIs that extend what you already know" [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank"><img src="/blog-assets/flash10.jpg" width="521" height="100" alt="Flash Player 10 @ Adobe Labs" border="0"></a></p>
<p>It is official - <a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank"><strong>Flash Player 10 (Astro)</strong></a> is there, and you can download and install it from <a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank">Adobe Labs</a>. At a first glance, the most exciting things in the new player are (from my point of view):</p>
<p><strong>3D support</strong>. Of course! Adobe says "<em>Complex effects are simple with APIs that extend what you already know</em>" so I guess a Sprite3D is on its way.</p>
<p><strong>Custom filters</strong> support with <a href="http://www.adobe.com/go/pixelbender_toolkit" target="_blank">Pixel Bender</a> (formerly known as Hydra). I played with it a little bit a few weeks ago, but now we will be able to actually see it in action in the player. Sweet.</p>
<p>Performance improvement with <strong>hardware acceleration</strong>.</p>
<p>So be sure to install it, and check out the demos. The source code for the examples is provided too!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=W9q3WQft"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=W9q3WQft" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=924YMHMp"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/UhnE4hhU9P0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/05/15/flash-player-10-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/05/15/flash-player-10-beta/</feedburner:origLink></item>
		<item>
		<title>Upcoming events: 2M08 and WebFlashFestival</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/0zcxsfxSxKs/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/05/10/multimania08-webflashfestival/#comments</comments>
		<pubDate>Sat, 10 May 2008 07:13:48 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[News & Events]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[belgium]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[france]]></category>
		<category><![CDATA[kortrijk]]></category>
		<category><![CDATA[paris]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=24</guid>
		<description><![CDATA[
One weekend, two events, and they are due in two weeks. Pretty cool, isn't it?
On Friday May 23rd I will be at Multimania08 in Kortrijk, Belgium and on Saturday 24th and Sunday 25th I will be in Paris attending the Web Flash Festival 2008. Both of this events are dedicated to Flash and technologies that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://www.everydayflash.com/blog-assets/may08conf.jpg" alt="Click to see the demo" width="521" height="123" /></p>
<p>One weekend, two events, and they are due in two weeks. Pretty cool, isn't it?</p>
<p>On Friday May 23rd I will be at <a href="http://www.multi-mania.be/2008/" target="_blank">Multimania08</a> in Kortrijk, Belgium and on Saturday 24th and Sunday 25th I will be in Paris attending the <a href="http://www.flashfestival.net/2008/" target="_blank">Web Flash Festival 2008</a>. Both of this events are dedicated to Flash and technologies that revolve around it, and both seem really exciting. There will be lots of interesting conferences including <a href="http://www.unitzeroone.com/blog/" target="_blank">Ralph Hauwert</a>, <a href="http://blog.andre-michelle.com/" target="_blank">André Michelle</a> and <a href="http://www.quasimondo.com/" target="_blank">Quasimodo</a>, presentation from agencies such as <a href="http://www.group94.com/" target="_blank">Group94</a> and <a href="http://www.diplomatic-cover.com/" target="_blank">Diplomatic Cover</a> and much more.</p>
<p>I am looking forward in particular to learn new stuff about 3D in Flash and have some interesting discussions on this topic, so if you are attending one of those events and if you are interested in that too, drop me an email at bartek [AT] everydayflash [DOT] com or just post a comment below.</p>
<p>See you in Belgium and France soon!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=2uwp255i"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=2uwp255i" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=HF6BH9Fw"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/0zcxsfxSxKs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/05/10/multimania08-webflashfestival/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/05/10/multimania08-webflashfestival/</feedburner:origLink></item>
		<item>
		<title>Animating vertices in Papervision3D</title>
		<link>http://feedproxy.google.com/~r/EverydayFlash/~3/TbQqcPrajRc/</link>
		<comments>http://www.everydayflash.com/blog/index.php/2008/05/05/vertex-animation-papervision3d/#comments</comments>
		<pubDate>Mon, 05 May 2008 19:14:00 +0000</pubDate>
		<dc:creator>bartek drozdz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[3d animation]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[papervision3d]]></category>

		<guid isPermaLink="false">http://www.everydayflash.com/blog/?p=23</guid>
		<description><![CDATA[
Rotating cubes, planes and spheres in 3D is fun. However this time, I thought that I'd try something less basic when it comes to 3D animation. So here's the idea: the Papervision3D universe is composed of triangles. Each object is a structure formed of one or more of them. The points where the triangles meet [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.everydayflash.com/flash/pv3d/vertices/' target='_blank'><img src='http://www.everydayflash.com/flash/pv3d/vertices/pv3d-vertices.jpg' width='521' height='187' alt='Click to see the demo' class='alignnone' border="0"/></a></p>
<p>Rotating cubes, planes and spheres in 3D is fun. However this time, I thought that I'd try something less basic when it comes to 3D animation. So here's the idea: the <a href="http://www.papervision3d.org" target="_blank">Papervision3D</a> universe is composed of triangles. Each object is a structure formed of one or more of them. The points where the triangles meet are called vertices (plural for vertex). A vertex, represented by the class Vertex3D, is basically a point in the 3D space with a 'x', 'y' and 'z' coordinates. The interesting part is that each of those vertices can be manipulated separately.</p>
<p>Click on the image above to <a href='http://www.everydayflash.com/flash/pv3d/vertices/' target='_blank'>view a demo</a>. Once I grasped the basic idea that vertices can be manipulated, such effect was pretty simple to acheive. First I create a plane, I add a bitmap texture, and then I access the vertices of the plane one by one and manipulate their 'z' property.</p>
<p>For the animation I create a small bitmapData object and apply the perlinNoise on it at each frame with different settings to create this illusion of wavy movement. Then I translate the color value of each pixel to the 'z' property of each vertex in the 3D plane. Later I multiply this value by stage.mouseX, so the effect will vary in intensity depending on the mouse position... And voilà! I have a waving flag, a small piece of a stormy sea, a rodeo-style magic carpet or whatever.</p>
<p>Move your mouse cursor around from the right to the left side of the screen. Click anywhere to switch between a bitmap texture and a wireframe texture. In the wireframe mode the movement of the vertices is much easier to spot and understand.</p>
<p>BTW. I created a project on Google Code because I needed an SVN account for personal use, but I discovered that the code browser is also pretty cool for sharing stuff and it even formats AS3 in a nice way! So, if you are interested in the source for this example, <a href="http://code.google.com/p/barteksplayground/source/browse/trunk/src/com/everydayflash/pv3d/PerlinCarpet.as" target="_blank">it is here</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/EverydayFlash?a=bidQGrsO"><img src="http://feeds.feedburner.com/~f/EverydayFlash?i=bidQGrsO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/EverydayFlash?a=HGGxXQkB"><img src="http://feeds.feedburner.com/~f/EverydayFlash?d=50" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/EverydayFlash/~4/TbQqcPrajRc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.everydayflash.com/blog/index.php/2008/05/05/vertex-animation-papervision3d/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://www.everydayflash.com/blog/index.php/2008/05/05/vertex-animation-papervision3d/</feedburner:origLink></item>
	</channel>
</rss>
