<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Li : Dev &#187; 3D</title>
	<atom:link href="http://www.lidev.com.ar/?feed=rss2&#038;cat=3" rel="self" type="application/rss+xml" />
	<link>http://www.lidev.com.ar</link>
	<description>Actionscript Development Blog</description>
	<lastBuildDate>Fri, 14 May 2010 03:39:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My Dream Device</title>
		<link>http://www.lidev.com.ar/?p=331</link>
		<comments>http://www.lidev.com.ar/?p=331#comments</comments>
		<pubDate>Fri, 14 May 2010 03:34:09 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=331</guid>
		<description><![CDATA[
A few days ago, our latest Away Media work  was made public. This time it's www.mydreamdevice.com, a website where you can arrange existing 3D models into all kinds of creations. The site is a simple but fun way to promote Qualcomm's Smartbook computer: you can create your dream device with components that all exist miniaturized [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lidev.com.ar/blog/wp-content/uploads/2010/05/dream.jpg"><img class="alignnone size-full wp-image-332" title="dream" src="http://www.lidev.com.ar/blog/wp-content/uploads/2010/05/dream.jpg" alt="" width="540" height="195" /></a></p>
<p>A few days ago, our latest Away Media work  was made public. This time it's <a href="http://www.mydreamdevice.com" target="_blank">www.mydreamdevice.com</a>, a website where you can arrange existing 3D models into all kinds of creations. The site is a simple but fun way to promote Qualcomm's Smartbook computer: you can create your dream device with components that all exist miniaturized in the Smartbook. Right after the site became live, people started to effectively use the tools we provided, but not precisely in the way we had in mind. But hey, I have to admit that I couldn't stop laughing after seeing some of the obscenities that were created! Too bad there has to be a moderator :-/</p>
<p>Our main focus was to make the manipulation of 3D elements as simple as possible and as least "techy" as possible. It's pretty amazing how hard this is to do once you get involved with the task: you need to manipulate things in 3D with a 2D interface BUT you can't introduce abstract concepts, a complex interface, just 3 or 4 buttons! It was quite a challenge, but I think we did a reasonable job. While doing this I studied a lot of 3D interfaces in different softwares. They vary a lot and are usually very effective but they all require you to "learn" how to use the rather complex controls. None seem to have what we tried to accomplish here: A set of controls that you don't need time to adapt to, just a few clicks and tests and you're ready to go after a few seconds. In real life, you don't need to know about X, Y, Z in order to manipulate objects, so why would you need to be familiar with 3D tools in order to effectively drag things around in virtual 3D. I must admit though that the only way I see to do this perfectly is to actually have a 3D interface, but I guess that won't happen for a while. Anyway, there is a lot behind the apparent simplicity of the results and the topic of natural, simple interfaces for 3D editing is very interesting.</p>
<p>Another nice thing that we dealt with in the project is OBB collisions and collision response. I wrote about how to detect OBB collisions before, but not about how to resolve them. The challenge here was to make the colliding objects respond physically, without having the user loose control of what's in his grasp, which is the typical response a real physics engine would cause. In the end, the physics are so simple that its nice not to have to use a full 3D physics engine.</p>
<p>It has been very nice to work with such level of designers from Cocomino (<a href="http://www.cocomino.com" target="_blank">www.cocomino.com</a>). I really hope we create more cool stuff with them!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=331</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OBB Collision Detection</title>
		<link>http://www.lidev.com.ar/?p=295</link>
		<comments>http://www.lidev.com.ar/?p=295#comments</comments>
		<pubDate>Mon, 19 Oct 2009 23:34:06 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=295</guid>
		<description><![CDATA[
Click on image to view the demo (view source enabled).
Its just a basic implementation of the method of separating axes for 3D OBB's (oriented bounding boxes). It detects collisions between cubes in a way that is slightly more advanced than spherical collisions, which are merely based on distances and radii. Collisions are not resolved in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lidev.com.ar/demos/away3d/obbs1/" target="_blank"><img class="alignnone size-full wp-image-296" title="obbs" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/10/obbs.jpg" alt="" width="500" height="180" /></a></p>
<p>Click on image to view the demo (view source enabled).</p>
<p>Its just a basic implementation of the method of separating axes for 3D OBB's (oriented bounding boxes). It detects collisions between cubes in a way that is slightly more advanced than spherical collisions, which are merely based on distances and radii. Collisions are not resolved in the demo though, only detected.</p>
<p>The point of the experiment is to show that it isn't hard at all to detect collisions between 3D objects if considering only their bounding boxes for their 'physical volume' is enough; if we just need to detect if objects are colliding or not, we don't actually need to bring in a heavy, cpu thirsty, 3D physics engine.</p>
<p>The code is not optimized (in fact quite the contrary so that its easy to read), but it runs quite smoothly with 15 cubes, where each cube is checked with all others for collision. If, for example, a character needed to be checked for collisions against static objects in a 3D scene, we would just need to compare his bounding box with the scene's static bounding boxes, so a large number of physically active objects could be used to describe a pretty complex scene. Furthermore, if any of these boxes were axis aligned, they are no longer OBB's, but rather AABB's (axis aligned bounding boxes) and collision checks could be made much faster. Something like this I imagine:</p>
<p>return (obj1MinX &lt; obj2MaxX) &amp;&amp; (obj1MaxX &gt; obj2MinX) &amp;&amp;<br />
(obj1MinY &lt; obj2MaxY) &amp;&amp; (obj1MaxY &gt; obj2MinY) &amp;&amp;<br />
(obj1MinZ &lt; obj2MaxZ) &amp;&amp; (obj1MaxZ &gt; obj2MinZ);</p>
<p>The experiment is clarifying in understanding how the method of separating axis works, and I guess it gave me a quick glimpse at how a advanced physics engines like <a href="http://www.jiglibflash.com/blog/" target="_blank">JigLibFlash</a> might work. The code is heavily commented, so have a look if you're interested in understanding OBB collisions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=295</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Basic Fractal Tree</title>
		<link>http://www.lidev.com.ar/?p=279</link>
		<comments>http://www.lidev.com.ar/?p=279#comments</comments>
		<pubDate>Sun, 04 Oct 2009 04:50:22 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=279</guid>
		<description><![CDATA[
Another obsolete experiment! Click on the image to view it (view source enabled).
The concept is simple: alternate squares and triangles to produce a fractal tree-like structure. On each step, either triangles or squares are drawn in the edges of the last set of drawn elements. If the last set was triangles, squares are drawn and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lidev.com.ar/demos/fractals/basictree/" target="_blank"><img class="alignnone size-full wp-image-280" title="tree" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/10/tree.jpg" alt="" width="500" height="180" /></a></p>
<p>Another obsolete experiment! Click on the image to view it (view source enabled).</p>
<p>The concept is simple: alternate squares and triangles to produce a fractal tree-like structure. On each step, either triangles or squares are drawn in the edges of the last set of drawn elements. If the last set was triangles, squares are drawn and vice versa. Two squares can sprout from a triangle and a single triangle can sprout from a square, hence, triangles are the cause for bifurcations. That's it! Pretty simple, yet beautiful; the simple rules produce some very complex variations. I hope it is inspiring to produce more complex fractal beings.</p>
<p>Play around with the parameters:</p>
<p>[<strong>growthRate</strong>: Time in ms between the creation of each step] [<strong>maxSteps</strong>: The number of recursive iterations. Be careful not to go above 25! It could crash your browser] [<strong>Triangle base factor</strong>: From 0 to 1, controls the inclination of the triangles. 0.5 makes the tip of the triangle be above the mid point of the base] [<strong>Triangle height factor</strong>: Relationship of the height of tris to their base] [<strong>Square height factor</strong>: Relationship of the height of squares to their base].</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=279</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Warping text in Away3D [UPDATED]</title>
		<link>http://www.lidev.com.ar/?p=258</link>
		<comments>http://www.lidev.com.ar/?p=258#comments</comments>
		<pubDate>Wed, 02 Sep 2009 16:18:19 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=258</guid>
		<description><![CDATA[
[UPDATE] You can find a couple of demos for this in THIS post in the Away3D site.
One of the things I've been wanting for Away3D for a while is the ability to warp a textfield onto a bezier path and animate the text along the path. The proper way of doing this is not just [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lidev.com.ar/demos/textwarp/v3/" target="_blank"><img class="alignnone size-full wp-image-259" title="warp" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/09/warp.jpg" alt="" width="500" height="180" /></a></p>
<p>[UPDATE] You can find a couple of demos for this in <a href="http://away3d.com/warping-3d-text" target="_blank">THIS</a> post in the Away3D site.</p>
<p>One of the things I've been wanting for Away3D for a while is the ability to warp a textfield onto a bezier path and animate the text along the path. The proper way of doing this is not just to position and rotate the characters to fit the path, but to actually deform them to adapt to the path. To do this, the x dimension of the text is transformed into an arc-length parameterized value along the path's length and the other 2 dimensions are then recalculated in this new space.</p>
<p>When it comes to a feature like this its usually much harder for me to develop, but this time I must admit it was pretty simple thanks to <a href="http://www.planetclegg.com/projects/WarpingTextToSplines.html" target="_blank">THIS</a> amazing almost cheat-like resource from Jay Clegg.</p>
<p>Click on the image to see the demo (use the keyboard and mouse to move around). I plan to refine this and upload a full demo/example soon. For now, If you wish to play with it, take a look at the new "AlignToPath.as" class in the geom package of Away3D for fp10.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=258</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extruding TextField3D</title>
		<link>http://www.lidev.com.ar/?p=213</link>
		<comments>http://www.lidev.com.ar/?p=213#comments</comments>
		<pubDate>Mon, 13 Jul 2009 16:16:30 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=213</guid>
		<description><![CDATA[
We've added a simple class that provides extrusions for TextField3D objects. Right click on the demo to see the source and learn how to use the feature.
UPDATE: Properties "textColor" and "textAlpha" have been replaced by "material". Since TextField3D supports various material types now, these two properties are not applicable any more.
Away3D currently supports all the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Demo with source" href="http://www.lidev.com.ar/demos/textfield3d/extrusions/" target="_blank"><img class="alignnone size-full wp-image-214" title="extrusion" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/07/extrusion.jpg" alt="" width="500" height="180" /></a></p>
<p>We've added a simple class that provides extrusions for TextField3D objects. Right click on the demo to see the source and learn how to use the feature.</p>
<p>UPDATE: Properties "textColor" and "textAlpha" have been replaced by "material". Since TextField3D supports various material types now, these two properties are not applicable any more.</p>
<p>Away3D currently supports all the basic color materials on irregular shapes like these. You can use WireColorMaterial, ColorMaterial, WireframeMaterial and ShadingColorMaterial on vector text and vector graphics coming from Flash.</p>
<p>There is still a lot of work to do, but we're getting there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=213</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Importing graphics from Flash to Away3D</title>
		<link>http://www.lidev.com.ar/?p=210</link>
		<comments>http://www.lidev.com.ar/?p=210#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:52:51 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=210</guid>
		<description><![CDATA[
In a very similar way we used the wumedia package to extract fonts from Flash, we can use it to extract vector graphics in general from Flash. This was possible before in Away3D using VectorSwf.as, as shown on a previous post, but the work flow that I will present now is so much simpler, that [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Swf" href="http://www.lidev.com.ar/demos/swf/" target="_blank"><img class="alignnone size-full wp-image-211" title="snowman" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/07/snowman.jpg" alt="" width="500" height="180" /></a></p>
<p>In a very similar way we used the wumedia package to extract fonts from Flash, we can use it to extract vector graphics in general from Flash. This was possible before in Away3D using VectorSwf.as, as shown on a previous post, but the work flow that I will present now is so much simpler, that we've decided to deprecate VectorSwf.as and replace it with the much more powerful and easier to use Swf.as</p>
<p>Click on the image to see what I'm talking about (right-click view source enabled). The snowman was designed in Flash, and a swf was exported containing this graphic and other vector assets that may want to be used in 3D. After that, the assets swf is loaded using the following code, which is the same way many other external assets are loaded with Away3D, such as Collada, 3ds, Obj, etc:</p>
<p>_loader = Swf.load("assets/vectorassets.swf", {libraryClips:["Snowman"],  scaling:2});</p>
<p>"libraryClips" is an array containing all the linkage names of the clips that want to be extracted. It is important to set these linkages in Flash in order to be able to identify the clips from the main app. The parameter is optional however, if not supplied, Swf.as will attempt to extract the graphics from the stage. For this to be possible however, the instances on the stage must be set as graphics types.</p>
<p>Another thing to take into consideration is the flattening of the clips. As one of our current goals is to be able to extrude these clips, Away3D treats flattened graphics differently from graphics that are grouped, or on layers, and non flattened graphics might produce sorting problems at this stage. In order to correctly flatten a vector graphic in Flash (as for instance a drawing imported from Illustrator), the way I recommend it is:</p>
<p>- Alternate "break apart" with "distribute to layers" until no grouped elements are left.</p>
<p>- Select all the resulting shapes and go to Modify -&gt; Shape -&gt; Convert Lines to Fills.</p>
<p>- Copy the content of all the produced layers and paste it into a new clip.</p>
<p>This simple process has ensured me so far to be able to migrate any graphic from Flash to 3D properly. Even pretty complex ones copy-pasted from Illustrator.</p>
<p>Sometimes its good to keep layers however. Imagine a window component that you wish to take to 3D. The window could have a title, a title bar, a frame and a background. And now imagine that you want this window to remain in layers as opposed to being flat (eg, the title bar above the background, title above the title bar). What you do is skip the flattening and use:</p>
<p>{libraryClips:["Snowman"], scaling:2, perspectiveOffset:-100, perspectiveFocus:2000}</p>
<p>in the init object passed to the constructor. This example would separate the layers by 100 pixels backwards, and if viewed exactly 2000 pixels from the front of the container in which the graphics were imported to by Swf.as, you will see exactly what you saw in 2D! With perspective correction of course. As each element is drawn back, it is scaled up so that the overall image doesn't loose proportion in each of its elements. If you move from this focus point however, you should become aware of the layering and the offsets between the graphics.</p>
<p>I hope someone finds usefulness in all this. And please, do provide feedback if you've got any ideas or requests!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=210</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TextField3D Tutorial</title>
		<link>http://www.lidev.com.ar/?p=203</link>
		<comments>http://www.lidev.com.ar/?p=203#comments</comments>
		<pubDate>Sat, 04 Jul 2009 19:41:21 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=203</guid>
		<description><![CDATA[
So, what's new with dynamic 3D text in Away3D now? Not much from the end-user point of view, but the internals have changed dramatically from previous implementations. What's most important is that TextField3D is now a permanent class in the engine. We no longer have to use the textfields branch in order to use vector [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Demo with source" href="http://www.lidev.com.ar/demos/textfield3d/tutorial_july_2009/" target="_blank"><img class="alignnone size-full wp-image-204" title="text" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/07/text.jpg" alt="" width="500" height="180" /></a></p>
<p>So, what's new with dynamic 3D text in Away3D now? Not much from the end-user point of view, but the internals have changed dramatically from previous implementations. What's most important is that TextField3D is now a permanent class in the engine. We no longer have to use the textfields branch in order to use vector features. The branch was experimental, is now deprecated, and all the investigated features are now being assimilated in the main trunk.</p>
<p>Dynamic textfields are now using Guojian Wu's powerful swf parser. You can see this magnificent tool and more of his work at <a title="Wu!" href="http://wu-media.com" target="_blank">wu-media.com</a>. The parser allows us to use any font installed in the system, and provides many text wrapping features such as leading, kerning, alignment, etc.</p>
<p>There are many ways to use it. The basic principle is that Wu's parser identifyes a font's byte data in an swf and extracts its vector information. Font byte data can be in the same swf as the main application, or in a different asset swf. The way I recommend to use it is as follows:</p>
<p>1) Create a new FLA file with Flash, create a dynamic textfield for each font on stage, and on each use the properties panel to embed the characters you will want to be using. Export the swf as, for example, fonts.swf.</p>
<p>2) In another actionscript project, use an URLLoader to load the fonts.swf as binary data.</p>
<p>3) Once the data is loaded, use "VectorText.extractFont(_loader.data)" so that the parser can process the fonts. NOTE: In flex, you can also embed the fonts.swf file, and pass the bytes to extractFont() as "new FontBytes()".</p>
<p>4) You can now create TextField3D instances as:<br />
var textfield:TextField3D = new TextField3D("Arial", {textAlpha:1, textColor:0x000000, text:"TextField3D", size:200, leading:0, kerning:0, textWidth:2000, align:"TL"});<br />
_scene.addChild(textfield);</p>
<p>UPDATE: Properties "textColor" and "textAlpha" have been replaced by "material". Since TextField3D supports various material types now, these two properties are not applicable any more.</p>
<p>Click on the image above to see a demo, and then right-click on the demo to view the source.</p>
<p>What's next? In the next few days we will continue to assimilate features from the textfields branch into Away3D's main trunk. Amongst these coming features are vector text extrusion, support for advanced shading materials on vector primitives like text, importing of sprites from Flash with wu's parser in a very similar way as using text in this tutorial, tessellation tools for vector primitives, extrusion of sprites imported from Flash, etc.</p>
<p>I'll make sure to post any updates on this progress. On the mean time, I hope you enjoy these basic text features, and don't hesitate to post any suggestions here, or in the Away3D user group!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>3D LensFlare</title>
		<link>http://www.lidev.com.ar/?p=200</link>
		<comments>http://www.lidev.com.ar/?p=200#comments</comments>
		<pubDate>Wed, 03 Jun 2009 12:15:33 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=200</guid>
		<description><![CDATA[
A simple lens flare effect has been added to Away3D's main trunk. Click on the image above to see the demo (view source enabled).
Please feedback any ideas, adjustments, etc that would make it more realistic!
]]></description>
			<content:encoded><![CDATA[<p><a title="flares demo" href="http://www.lidev.com.ar/demos/flares/v1/" target="_blank"><img class="alignnone size-full wp-image-201" title="flare" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/06/flare.jpg" alt="" width="500" height="180" /></a></p>
<p>A simple lens flare effect has been added to Away3D's main trunk. Click on the image above to see the demo (view source enabled).</p>
<p>Please feedback any ideas, adjustments, etc that would make it more realistic!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=200</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Morgan Stanley Matrix</title>
		<link>http://www.lidev.com.ar/?p=196</link>
		<comments>http://www.lidev.com.ar/?p=196#comments</comments>
		<pubDate>Tue, 02 Jun 2009 10:21:51 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=196</guid>
		<description><![CDATA[
Working with Morgan Stanley and a small team of superb designers from Adobe Profesional Services on this microsite was one of the best work experiences I've had. Have a look: www.morganstanley.com/matrixinfo
The site was built using Away3D + Awaybuilder, and it uses simple yet slick camera motion tweens to fly around a space crammed with vector [...]]]></description>
			<content:encoded><![CDATA[<p><a title="microsite" href="http://www.morganstanley.com/matrixinfo" target="_blank"><img class="alignnone size-full wp-image-197" title="ms" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/06/ms.jpg" alt="" width="500" height="180" /></a></p>
<p>Working with Morgan Stanley and a small team of superb designers from Adobe Profesional Services on this microsite was one of the best work experiences I've had. Have a look: <a title="microsite" href="http://www.morganstanley.com/matrixinfo" target="_blank">www.morganstanley.com/matrixinfo</a></p>
<p>The site was built using Away3D + Awaybuilder, and it uses simple yet slick camera motion tweens to fly around a space crammed with vector content. Such content was provided with a friendly workflow using the JSFL tools from my previous posts. Additionally, a pretty interesting class was used to "perspectivate" the vector glyfs so that most of the text is only visible correctly from a given position in 3D space. The site is a pretty good example of the crisp look of vectors in 3D, and makes me think of all the possibilities we have with this sort of tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=196</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VectorSwf tutorial</title>
		<link>http://www.lidev.com.ar/?p=192</link>
		<comments>http://www.lidev.com.ar/?p=192#comments</comments>
		<pubDate>Tue, 19 May 2009 13:41:59 +0000</pubDate>
		<dc:creator>Li</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.lidev.com.ar/?p=192</guid>
		<description><![CDATA[
[UPDATE] VectorSwf.as is now deprecated. The replacement is Swf.as, which provides a much simpler workflow. See upcoming post!
This tutorial attempts to explain the features described in the previous post, so you can use them, and hopefully apply them for something more useful than this demo!
Setting up the project.
--------------------------------------------------------------------------------
1 - Create a new Actionscript project in [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Demo" href="http://www.lidev.com.ar/demos/textfieldsmerge/vectorswf/v5/" target="_blank"><img class="alignnone size-full wp-image-193" title="tut" src="http://www.lidev.com.ar/blog/wp-content/uploads/2009/05/tut.jpg" alt="" width="500" height="180" /></a></p>
<p>[UPDATE] VectorSwf.as is now deprecated. The replacement is Swf.as, which provides a much simpler workflow. See upcoming post!</p>
<p>This tutorial attempts to explain the features described in the previous post, so you can use them, and hopefully apply them for something more useful than this demo!</p>
<p>Setting up the project.<br />
--------------------------------------------------------------------------------<br />
1 - Create a new Actionscript project in Flex. Delete the default class created by Flex and paste <a title="Source classes" href="http://www.lidev.com.ar/demos/textfieldsmerge/vectorswf/v5/classes.zip" target="_self">these 2 classes</a> into the project src folder. Set Main.as as the Default Application.<br />
2 - Link your project to the latest Away3D trunk. You can either do this by setting up a separate library project and linking the AS project via properties/ActionScript Build Path/Library path or simply pasting a copy of the away3d lib in the src folder of your AS project.<br />
3 - In the project properties/ActionsScript Compiler, add "-use-network=false" in the Additional Compiler arguments field to avoid security sandbox problems.<br />
4 - In the src folder of your project create a new flash file named Assets.fla and allow it to publish at the same level Assets.swf.</p>
<p>Prepare your assets in Flash:<br />
--------------------------------------------------------------------------------<br />
5 - Create a new clip and, in it, draw some vector graphics. Make sure not to use strokes because they are not supported yet. Sorry! In my case I downloaded an .eps from www.freevectors.net and copy pasted the content into the clip.<br />
6 - We now need to run a JSFL command from Flash in order to inject its vector data into a variable in the clip's timeline. For this download <a title="jsfl scripts" href="http://www.lidev.com.ar/demos/textfieldsmerge/vectorswf/v5/jsflaway.zip" target="_self">the jsflaway lib</a> and place it in your flash commands folder. In my case it is "Users/yourUserName/Library/ApplicationSupport/Adobe/FlashCS3/en/Configuration/Commands/"... then while in the clip's edit mode (in its stage) in Flash, go to Commands, run Command and go to the jsflaway lib you just copied to your HD and select VectorDataInjector.jsfl in the components package of the lib. You will see that this should create a new layer in your clip called "vectorData".<br />
7 - Drag an instance of your clip to the main stage of your Assets.fla and publish it.<br />
8 - Repeat steps 5 to 7 to add more elements. As long as an element is on the stage, and the clip contains the vectorData layer, Away3D should be able to port it to 3D.</p>
<p>Away3D code.<br />
--------------------------------------------------------------------------------<br />
9 - You can tweak some settings in the src:<br />
var vectors:ObjectContainer3D = VectorSwf.load("Assets.swf", {scaling:1, zOffset:100});<br />
_scene.addChild(vectors);<br />
Scaling speaks for itself, and zOffset is the z spacing applied between each clip in the main stage of the Assets fla.</p>
<p>SOURCE: http://www.lidev.com.ar/demos/textfieldsmerge/vectorswf/v5/tutorial_vectorSwf.zip</p>
<p>I hope you can find useful applications for this feature. You can use it to show vector interfaces in 3D, text, and practically anything made out of vectors. Steps 5 to 8 should be greatly simplifyed soon thanks to feedback I already recieved from you guys. I'll let you know when I have some updates. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lidev.com.ar/?feed=rss2&amp;p=192</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
