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

<channel>
	<title>David &#187; News</title>
	<atom:link href="http://www.david5.com/category/news/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.david5.com</link>
	<description>El blog personal de David Pérez</description>
	<pubDate>Mon, 01 Mar 2010 04:04:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rigid Spheres with JigliFlash and Papervision3D</title>
		<link>http://www.david5.com/rigid-spheres-with-jigliflash-and-papervision3d/</link>
		<comments>http://www.david5.com/rigid-spheres-with-jigliflash-and-papervision3d/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 01:16:50 +0000</pubDate>
		<dc:creator>David Perez</dc:creator>
		
		<category><![CDATA[Labs]]></category>

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

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

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

		<guid isPermaLink="false">http://www.david5.com/?p=164</guid>
		<description><![CDATA[
Demo Sources
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.david5.com/labs/pv3d/investigacion3/Main.html" target="_blank"><img class="aligncenter size-medium wp-image-165" title="pv3d-physicsspheres" src="http://www.david5.com/wp-content/uploads/2009/10/pv3d-physicsspheres-300x135.png" alt="pv3d-physicsspheres" width="300" height="135" /></a></p>
<p><a title="Spheres - Rigid Body Class - Papervision3D - JiglibFlash" href="http://www.david5.com/labs/pv3d/investigacion3/Main.html" target="_blank">Demo</a> <a href="http://www.david5.com/labs/pv3d/investigacion3/Main.mxml" target="_blank">Sources</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.david5.com/rigid-spheres-with-jigliflash-and-papervision3d/feed/intl/en/</wfw:commentRss>
		</item>
		<item>
		<title>Understanding how a TriangleMesh3D works</title>
		<link>http://www.david5.com/understanding-how-a-trianglemesh3d-works/</link>
		<comments>http://www.david5.com/understanding-how-a-trianglemesh3d-works/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 14:39:32 +0000</pubDate>
		<dc:creator>David Perez</dc:creator>
		
		<category><![CDATA[Papervision3D]]></category>

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

		<guid isPermaLink="false">http://www.david5.com/?p=146</guid>
		<description><![CDATA[In Papervision3D, the TriangleMesh3D class is a geometry class used to build renderable objects. There are several types of geometry objects, such as: Particles, Lines3D, Pixels, and meshes conformed by triangles,  called triangleMesh3D objects (See the org.papervision3d.core.geom path). In this post I&#8217;ll focus the analysis for understanding how to build a personalized TriangleMesh3D object.
We remember [...]]]></description>
			<content:encoded><![CDATA[<p>In Papervision3D, the TriangleMesh3D class is a geometry class used to build renderable objects. There are several types of geometry objects, such as: Particles, Lines3D, Pixels, and meshes conformed by triangles,  called triangleMesh3D objects (See the org.papervision3d.core.geom path). In this post I&#8217;ll focus the analysis for understanding how to build a personalized TriangleMesh3D object.</p>
<p>We remember that the more easy way to create custom triangle3DMeshes is using <a href="http://ascollada.org/">ASCollada </a>(exporting your 3D model from Maya, 3DsMax, etc, to Pv3d). This post is focused on creating a triangleMesh3D at runtime.</p>
<p>The primitive objects (Plane, Cylinder, Sphere)  are  extensions of TriangleMesh3D. The construction of another type of TriangleMesh3D object have similar procedures to primitive objects creation.</p>
<p>The <strong>basic sintaxis to create a TriangleMesh3D</strong> instance is:<br />
var triangleMesh3D = new TriangleMesh3D(material, vertices, faces)<br />
Where the parameters represent:</p>
<p>-material:MaterialObject3D, the material to be mapped into triangles3D.</p>
<p>-vertices:Array, an array of Vertex3D instances that conform the mesh vertices.</p>
<p>-faces:Array, an array of Triangle3D instances that represent the triangles to be rendered.</p>
<p>The vertices array and the faces array represent the TriangleMesh3D geometry.</p>
<p>triangleMesh3D.vertices<br />
triangleMesh3D.faces</p>
<p><strong>The orthogonal space.</strong><br />
Papervision3D use a right-handed triad. That means that the positive axis can be represented by the right-hand rule. This is a graphic which the directions of the positive axis can be appreciated.</p>
<p><a href="http://www.david5.com/wp-content/uploads/2009/06/xyz_map.jpg"><img class="aligncenter size-full wp-image-147" title="xyz_orthogonal_system_pv3d" src="http://www.david5.com/wp-content/uploads/2009/06/xyz_map.jpg" alt="xyz_orthogonal_system_pv3d" width="400" height="400" /></a></p>
<p><strong>Creating the vertices array</strong></p>
<p>Each position of the vertices array store a instance of Vertex3D. A vertex3D object lets you create the 3D vertices. A vertice is composed of x, y and z values that represent the position in the orthogonal space.</p>
<p>The sintax to creat a Vertex3D objects is:<br />
var x:Number = 10;<br />
var y:Number = 20;<br />
var z:Number = -15;<br />
var vertex3D = new Vertex3D(x,y,z)</p>
<p>Where the x,y and z variables represent the position in the 3D space.</p>
<p>The set of vertex3D is stored in the vertices array.</p>
<p>A Vertex3D object allow to store others properties (vertex3D.extra).</p>
<p>When a vertex3D object is asigned to another variable, it adquires the same characteristics than the process of array element´s asignation. Then, if you want to create a copy of a vertex3D, you need to create a new instance of this vertex3D.</p>
<p>For example:</p>
<p>var vertexA:Vertex3D = new Vertex3D(1,2,3);<br />
trace(vertexA) //x:1, y:2, z:3;<br />
var vertexB:Vertex3D = vertexA;<br />
vertexB.x = -5;<br />
trace(vertexB) //x:-5, y:2, z:3;</p>
<p>trace(vertexA) //x:-5, y:2, z:3;</p>
<p>See also:</p>
<p>var vertexA:Vertex3D = new Vertex3D(1,2,3);<br />
trace(vertexA) //x:1, y:2, z:3;<br />
var vertexB:Vertex3D = vertexA.vertex3DInstance;<br />
vertexB.x = -5;<br />
trace(vertexB) //x:-5, y:2, z:3;<br />
trace(vertexA) //x:1, y:2, z:3;</p>
<p><strong>Creating the faces array</strong></p>
<p>The faces array have the Triangle3D objects stored, that represent the triangles which conform<br />
the mesh. The sintax to create a Triangle3D is:<br />
var triangle3D:Triangle3D = new Triangle3D(do3d, vertices, material, uv)<br />
Where<br />
do3d:DisplayObject3D, this is the instance that contain the TriangleMesh3D<br />
vertices: An array of length 3. Each position of the array stores a vertice (vertex3D) of the vertices array. Theses vertices represent the absolute position of the triangle3D vertices (v0,v1,v2).<br />
material: The Material3D object to be used in the triangle3D (BitmapMaterial, ColorMaterial, PhongMaterial, etc) is referenced here.</p>
<p>uv: An array of length 3. This array store NumberUV objects that represent the UV mapping of the triangle3D.</p>
<p>The connected faces represent the set of triangle3Ds that are connected to the vertex3D object. Each vertex3D object that belongs to the mesh have at least one triangle3D connected.</p>
<p>After initializing a triangleMesh3D (with the triangleMesh3D.geometry.ready = true property) each vertex3D in the mesh store a Number3D object in the triangleMesh3D.normal property. The normal Number3D represents the normal vector to the surface in the vertice. It is calculated in relation to the triangle3D normals that are stored in the connected faces. The normal have modulo 1.</p>
<p><strong>UV Mapping</strong></p>
<p>Mathematically, a NumberUV represents the projection in the xy plane (by default) of the versor (vector with modulo=1) of the triangle3D vertices. If you move the triangleMesh3D.vertices[k] x, y or z positions, you&#8217;ll see a distortion in the texture, this is because you need to update the UV mapping of the triangle3D. You can use the triangleMesh3D.projectTexture() method. This method isn´t fast if it is used in a loop because it creates a lot of new variables and uses dictionary, you can create your own UV mapping update method, for example:</p>
<p>uvAx = Math.abs( (a.x - menU) / (mayU - menU + 0.000001) );<br />
uvAy = Math.abs( (a.y - menV) / (mayV - menV + 0.000001) );<br />
uvBx = Math.abs( (b.x - menU) / (mayU - menU + 0.000001) );<br />
uvBy = Math.abs( (b.y - menV) / (mayV - menV + 0.000001) );<br />
uvCx = Math.abs( (c.x - menU) / (mayU - menU + 0.000001) );<br />
uvCy = Math.abs( (c.y - menV) / (mayV - menV + 0.000001) );<br />
uvDx = Math.abs( (d.x - menU) / (mayU - menU + 0.000001) );</p>
<p>uvDy = Math.abs( (d.y - menV) / (mayV - menV + 0.000001) );</p>
<p>uvA = new NumberUV(uvAx, uvAy);<br />
uvB = new NumberUV(uvBx, uvBy);<br />
uvC = new NumberUV(uvCx, uvCy);<br />
uvD = new NumberUV(uvDx, uvDy);<br />
faces.push( new Triangle3D(this, [a,c,b], null, [uvA,uvC,uvB]) );<br />
faces.push( new Triangle3D(this, [d,b,c], null, [uvD,uvB,uvC]) );</p>
<p>in were a, b, c and d are the vertices of two connected triangles, mayU is the greater X value, mayV is the greater X value, menU is the smallest X value, menV is the smallest Y value, and 0.000001 is used to solve the indetermination of division by zero. This is a code fragment of a <a href="http://david5.com/labs/pv3d/firststeps/materialstest/MainSuperficieMontanosa.html">dinamic triangleMesh3D</a>.</p>
<p>The secuence of the uv array parameters that are stored in a Triangle3D must be governed by the right hand rule (I&#8217;m not sure why pv3d uses the two types of triad rules, it could be better to use only the left hand rule). These graphic can help you  understand the secuence of the uv0, uv1, and uv2 NumberUVs that correspond to v0, v1 and v2 vertex3D&#8217;s of a triangle3D.</p>
<p><a href="http://www.david5.com/wp-content/uploads/2009/03/mapeado2.jpg"><img class="aligncenter size-medium wp-image-85" title="mapeado2" src="http://www.david5.com/wp-content/uploads/2009/03/mapeado2-300x247.jpg" alt="mapeado2" width="300" height="247" /></a><a href="http://www.david5.com/wp-content/uploads/2009/03/triangulo.png"><img class="aligncenter size-medium wp-image-59" title="UVmapping" src="http://www.david5.com/wp-content/uploads/2009/03/triangulo-300x169.png" alt="UVmapping" width="300" height="169" /></a></p>
<p>Some experiments of vertices manipulation are done only with wireframe materials or with color material. A way to do vertices manipulations without a distortion in the texture of the 3D objects in meshes that have bitmapMaterials or shade materials is to update the uv mapping of the faces.</p>
<p>PD: This post needs a good revision of the english. My native language is spanish. I created the english version of this blog to exercise my english writting. <img src='http://www.david5.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>rzbknd75ht</p>
]]></content:encoded>
			<wfw:commentRss>http://www.david5.com/understanding-how-a-trianglemesh3d-works/feed/intl/en/</wfw:commentRss>
		</item>
		<item>
		<title>3D user interfaces in internet browsers - Papervision3D</title>
		<link>http://www.david5.com/interfaces-tridimensionales-en-los-navegadores-de-internet-papervision3d/</link>
		<comments>http://www.david5.com/interfaces-tridimensionales-en-los-navegadores-de-internet-papervision3d/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 21:02:38 +0000</pubDate>
		<dc:creator>David Perez</dc:creator>
		
		<category><![CDATA[Papervision3D]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://www.david5.com/?p=43</guid>
		<description><![CDATA[Full version in spanish (PDF) here.
Abstract
Nowadays we have the opportunity of developing three-dimensional graphical user interfaces for Internet browsers, these interfaces are capable of reaching 99% of the Internet users without the need of installing  any additional software. This is achieved by using the virtual machine Adobe Flash Player, which has a multimedia native format.
Papervision3D [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://david5.com/labs/pv3d/investigacion/interfaces3d.pdf">Full version in spanish (PDF) here</a>.</p>
<h2>Abstract</h2>
<p>Nowadays we have the opportunity of developing three-dimensional graphical user interfaces for Internet browsers, these interfaces are capable of reaching 99% of the Internet users without the need of installing  any additional software. This is achieved by using the virtual machine <a href="http://en.wikipedia.org/wiki/Adobe_Flash_Player">Adobe Flash Player</a>, which has a multimedia native format.<br />
Papervision3D is a real time 3D engine for ActionScript 3. It&#8217;s an open source library which has the basic features of the three-dimensional computer graphics, which creates a 3D illusion using the 2D rendering engine that has the Flash Player.</p>
<p>You can make a 3D site based totally on open source tools, using Linux as a platform for Flex SDK, which compiles the ActionScript code, based on the <a href="http://blog.papervision3d.org/">Papervision3D</a> library.</p>
<h2>Introduction</h2>
<p>The user experience is a factor that has recently gained great importance in the network. There are a strong tendency of migration from desktop applications to the browser: word processors, spreadsheets, photo-processing software, email clients, and a great number of applications that have been built to run in web browsers. The question is why haven&#8217;t there appeared three-dimensional interfaces for certain applications or complex web pages with a minimum  of load time? The answer is simple: The lack of a suitable software platform with ubiquity for developing three-dimensional applications online. This issue will be analyzed in depth in this article.</p>
<p>Papervision3D opens a world for demonstrations and simple interfaces neglected for a long time in the network. Now there is a reasonable potential for creating stunning and interactive three-dimensional interfaces, with a minimum download time. This is something that web developers have wanted for a long time. A<a href="http://blog.papervision3d.org/2009/03/16/papervisionx-what-it-is-and-what-it-isnt/"> new version of Papervision3D is beeing developed</a>, <a href="http://www.unitzeroone.com/blog/2009/03/18/flash-10-massive-amounts-of-3d-particles-with-alchemy-source-included/">based on the new Flash Player 10 API, which includes the posibility of including C++ and Pixel Bender to compile codes to Flash Player</a>. With all of these improvements on the recent technology it&#8217;s expected to increase dramatically the quality of the 3D websites. Following this path we can open a lot of possibilities to develop innovative user interfaces. For this reason Papervision3D becomes very important in Web development.</p>
<p>The objetive of this post is to show the basics elements that you needed to know for developing 3D applications using Papervision3D.</p>
<h2>Analysis of existing technologies for developing 3D interfaces in browsers</h2>
<p>When all technologies and resources for the developing three-dimensional interfaces with easy access for users (Software Development Kit, 3D rendering engine in real time via the Internet, using the GPU for rendering engine, high penetration technology Internet browsers and bandwidth of high-speed) have matured, it will be an impending shift in internet browsing.</p>
<p>Software engineers from numerous companies and communities of open source development are working today to make rendering of real-time 3D in web browsers possible. It is possible to demonstrate that the development environment based on the Adobe Flash Player virtual machine is currently the leading infrastructure for implementation of 3D interfaces in web browsers.</p>
<p><strong>The advantages of Flash over other alternatives:</strong></p>
<p>In this analysis I merely consider the basics technical aspects and ubiquity for choosing the best enviroment for developing 3D aplications for browsers. (<a href="http://www.kaourantin.net/2008/09/on-performance.html">Part of this analisys is based in Tinic&#8217;s post</a>)</p>
<p><strong>HTML vs. Flash for 3D</strong></p>
<p>HTML is a static document format, Flash has in its core a multimedia format. So, unlike HTML, which has exactly 1 frame, Flash content can have an infinite number of frames over time. HTML is static, Flash is dynamic. HTML doesn&#8217;t support Drag and Drop, Flash does.</p>
<p><strong>AJAX vs. Flash for 3D</strong></p>
<p>In most cases, AJAX is encouraged for the development of RIA, the examples include: Gmail, Google Maps, among others. But there are a proofs that AJAX is reaching its limits. The fact that Google Earth could not be taken to the browser with AJAX demonstrates that 3D software development goes beyond what AJAX can offer.</p>
<p><strong>SVG/Canvas vs. Flash for 3D</strong></p>
<p>Flash and SVG were designed initially for two-dimensional graphics, but the Core Team of Papervision3D has challenged the performance of Flash Player and turned it into a 3D rendering engine. This could also be possible with SVG or Canvas, but the amount of tags used to develop a multi-frame real content (not a demo site) are too many compared to a code written in Flash. This causes decrease of productivity because of the extra lines of code. Another thing to take in consideration is that in Internet Explorer you must install a plug-in for viewing SVG content (most of the current PCs that have installed Internet Explorer don&#8217;t have installed this plugin).</p>
<p><strong>Java Virtual Machine vs Flash for 3D </strong></p>
<p>Java Virtual Machine has some incompatibilities between versions. Flash has no incompatibility between the releases.</p>
<p><strong>Silverlight vs Flash for 3D</strong></p>
<p>In tecnical aspects, Silverlight is better than Flash for the development of three-dimensional environments, because it has access to DirectX, but it doesn&#8217;t have ubiquity (you need to download a plugin to use it), while <a href="http://www.adobe.com/products/player_census/flashplayer/version_penetration.html">Flash Player is present in 98% of the browsers</a>.</p>
<p><strong>Shockwave vs Flash for 3D</strong></p>
<p>Shockwave is a plugin for browsers that specializes in creating 3D content in real time. Technically it a good choice for 3D development, but has a low penetration rate (50%).</p>
<p><strong>Unity3D vs Flash for 3D</strong></p>
<p>Unity3D is also a plugin for browsers specialized in 3D content rendering in real time. Technically it is the best choice for 3D development, but also has a very low penetration rate (1%).</p>
<p>Therefore, Adobe Flash Player could actually be the best option for creating three-dimensional interfaces in web browsers.<br />
The most important reason for choosing Flash Player in this analysis was because of its ubiquity, this is really important. The clearest example is Second Life, a virtual world that has not been as successful as expected, and much of this failure is due to the need of downloading a 21.2MB software to access this virtual world. Downloading a plugin to display a website is usually big limitation for its popularity. Internet users generally do not want to install new plugins, while <a href="http://www.adobe.com/products/player_census/flashplayer/">Flash Player is already installed in most of the PCs worldwide</a>.</p>
<p><strong>The Flash player is designed and optimized for 2D rendering. Not for 3D rendering.</strong></p>
<p>This is a critical reason why Flash is not technically the best option. In real cases, the number of frames per second of 3D content rendered  is often lower than most 3D desktop games. The developer community of Flash Player is developing several private and open source projects to render 3D in Flash Player, including:</p>
<p><a href="http://alternativaplatform.com/en/alternativa3d/">Alternativa3D</a></p>
<p><a href="http://www.away3d.com/">Away 3D</a></p>
<p><a href="http://code.google.com/p/five3d/downloads/list">Five3D</a></p>
<p><a href="http://www.nulldesign.de/nd3d-as3-3d-engine/">ND3D</a></p>
<p><a href="http://blog.papervision3d.org/">Papervision3D</a></p>
<p><a href="http://www.flashsandy.org/">Sandy3D</a></p>
<p><a href="http://www.3key.at/we3d/forum/">Wire Engine 3D</a></p>
<p>For this article, I decided to talk about Papervision3D, which is the most popular engine for 3D rendering for flash.</p>
<h2>Basic concepts on 3D design with Papervision3D</h2>
<p>In terms of computer graphics, more especifically in 3D spaces, <a href="http://en.wikipedia.org/wiki/Rendering_(computer_graphics)">rendering</a> is a complex process calculated by a computer to generate a 2D image from a 3D scene.<br />
The technique most used today for the production of 3D graphics in real time is the rasterization. The rasterization is basically a process for transforming  converted vector data (data) into a set of pixels (images). Papervision3D uses this technique due to the fact that it is the fastest.<br />
In short words, the the Papervision3D render engine uses a robust logic to produce a 3D illusion on 2D. This logic is basically the following:</p>
<p><strong>Projection</strong> (<a href="http://www.google.com/codesearch/p?hl=es#Lqh0XMELiZA/trunk/branches/cs4/src/org/papervision3d/core/geom/TriangleMesh3D.as&amp;q=TriangleMesh3D%20package:http://papervision3d\.googlecode\.com&amp;l=87">project</a>)</p>
<p>The orthogonal projection is done through mathematical transformations. This technique is not entirely satisfactory, so in fact it is used in perspective projection. Papervision3D in a 4&#215;4 matrix (<a href="http://www.google.com/codesearch/p?hl=es#Lqh0XMELiZA/trunk/as3/trunk/src/org/papervision3d/core/math/Matrix3D.as&amp;q=Matrix3D%20lang:actionscript&amp;l=9">Matrix3D</a>) represents the translation, rotation and scale for all axes. There are also three other matrices to represent 3D scenes: The global array, the array of cameras, and the transformation matrix objects.<br />
More explicitly, each Vertex3D from each 3D object has to be transformed by these matrices to finish as a 2D Flash Player.</p>
<p><strong>Geometry</strong></p>
<p>Basically, every point in space is located in the form of stored data points (<a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/geom/renderables/Vertex3D.as">Vertex3D</a>). The set of three vertices can form a face (<a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/geom/renderables/Triangle3D.as">Triangle3D</a>). Parent vertices and faces are stored in instances of <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/proto/GeometryObject3D.as">GeometryObject3D</a>. Each <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/proto/GeometryObject3D.as">DisplayObject3D </a>class contains information objects (location, processing, orientation, axes, etc.) and a reference to the instance of GeometryObject3D. The DisplayObject3D data and the materials of each object are used by the <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/render/BasicRenderEngine.as">BasicRenderEngine</a> engine to draw the object into an object <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/view/Viewport3D.as">Viewport3D</a>.</p>
<p><strong>Texture mapping</strong></p>
<p>Is the most used, and it consumes much of CPU cycles. <a href="http://en.wikipedia.org/wiki/UV_mapping">UV mapping</a> is used in this process.</p>
<p>The mapping of a triangle, the most basic example, is as follows:</p>
<p>It creates an array of vertices.  In each array position we store an instance of Vertex3D to be the x, y and z coordinates that turns to be vertices of the triangle. In this example each of these vertices are called v0, v1 and v2.</p>
<p>A face is composed of three vertices (v0, v1, v2). It creates an instance of <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/geom/renderables/Triangle3D.as">Triangle3D</a>, where they are introduced as parameters to the material to be mapped, vertices and UV coordinates for each vertex. The array of 3 vertices introduced in the instance of Triangle3D must have the same location as the sequence of the 3 array UV coordinates. The UV coordinates of each point corresponds to the coordinate of <a href="http://en.wikipedia.org/wiki/Unit_vector">versor</a> bi-dimensional projection of the point on the Viewport3D object. The sequence can be chosen arbitrarily, but it must be remembered that the orientation of the face is submited to the <a href="http://en.wikipedia.org/wiki/Right-hand_rule">right hand rule</a>.</p>
<h2><a href="http://www.david5.com/wp-content/uploads/2009/03/triangulo.png"><img class="alignnone size-full wp-image-59" title="UVmapping" src="http://www.david5.com/wp-content/uploads/2009/03/triangulo.png" alt="UVmapping" width="500" height="283" /></a></h2>
<p>v0 = new Vertex3D (x0, y0, z0); vertices.push (v0);</p>
<p>v1 = new Vertex3D (x0, y0, z0); vertices.push (v1);</p>
<p>v2 = new Vertex3D (x0, y0, z0); vertices.push (v2);</p>
<p>faces.push (new Triangle3D (triangleMesh, [v0, v1, v2], material [UV0, UV1, UV2)].</p>
<p>This produces the same results by following sequences: [v0, v1, v2], or [v1, v2, v0] or [v2, v0, v1]</p>
<p>The other side of the triangle is mapped under the sequence counter: [v0, v2, v1], or [v1, v0, v2] or [v2, v1, v0]</p>
<p>The array &#8220;vertices&#8221; and the array &#8220;faces&#8221; are stored in an instance of GeometryObject3D.</p>
<p>Complex geometric objects are created by the combination of triangles, which are the basic geometric entity in the process of rendering. <a href="http://www.david5.com/mis-primeros-experimentos-en-papervision3d/intl/en/">I Posted here some examples of construction of a triangle</a>, and instances of more complex TriangleMesh3D.</p>
<p><strong>Materials</strong></p>
<p>The materials are a collection of properties that determine how it will be rendered a superificie 3D. The different types of materials inherited the <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/core/proto/MaterialObject3D.as">MaterialObject3D</a> class, this implies that they find the following properties for each material:</p>
<p>name (string): name of material</p>
<p>interactive (Boolean): allows allocation of listeners, eg click events.</p>
<p>oneSide or doubleSided (Boolean): Maps the material in one or both sides, repectivamente.</p>
<p>Smooth (Boolean): Applies a smoothing algorithm to the material.</p>
<p>The basic types of materials are:</p>
<p><em>WireframeMaterial</em></p>
<p>As mentioned above, a 3D object is composed of several triangles.</p>
<p>The sides of each triangle, around the object, are displayed with WireframeMaterial.</p>
<p><em>ColorMaterial </em></p>
<p>The materials of a solid color color projected on 3D objects.</p>
<p>BitmapMaterial and BitmapFileMaterial</p>
<p>It is possible to use an image jpg, gif or png, or any object on bitmapData</p>
<p><em>BitmapColorMaterial</em></p>
<p>ColorMaterial is like the difference is that you can access the pixels of the material.</p>
<p><em>VideoStreamMaterial</em></p>
<p>You can do streaming video materials such as 3D objects.</p>
<p><strong>Lighting and shading</strong></p>
<p>The simulation of light is one of the most complicated in the 3D rasterization process because of the high amount of CPU cycles is required. Therefore, the lighting effects are very basic Papervision3D. You can use a class called<a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/lights/PointLight3D.as"> PointLight3D</a> for lighting effects. Lights affect the following materials: <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/CellMaterial.as">CellMaterial</a>, <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/EnvMapMaterial.as">EnvMapMaterial</a>, <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/FlatShadeMaterial.as">FlatShadeMaterial</a>, <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/GouraudMaterial.as">GouraundMaterial</a> and <a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/PhongMaterial.as">PhongMaterial</a>.</p>
<p>The syntax used is:</p>
<p><em>PointLight3D</em></p>
<p>light = new PointLight3D (true);</p>
<p>light.x = 50;</p>
<p>light.y = 50;</p>
<p>light.z = -600;</p>
<p>scene.addChild (light)</p>
<p><a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/CellMaterial.as"><em>CellMaterial</em></a></p>
<p>var cellMaterial: CellMaterial = new CellMaterial (light, 0&#215;111111, 0xFFFFFF, 5);</p>
<p>var plane: Plane = new Plane (cellMaterial, 400400,10,10)</p>
<p>scene.addChild (do3d)</p>
<p><a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/EnvMapMaterial.as"><em>EnvMapMaterial</em></a></p>
<p>var material: EnvMapMaterial = new EnvMapMaterial (light, bitmapData, bitmapData, 0&#215;555555);</p>
<p>var plane: Plane = new Plane (material, 500.500);</p>
<p>scene.addChild (plane);</p>
<p><a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/FlatShadeMaterial.as"><em>FlatShadeMaterial</em></a></p>
<p>var flatShadedMaterial: FlatShadeMaterial = new FlatShadeMaterial (light, 0&#215;0000FF, 0&#215;00ff00);</p>
<p>var plane: Plane = new Plane (flatShadedMaterial, 400400, 10.10);</p>
<p>scene.addChild (plane);</p>
<p><a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/GouraudMaterial.as"><em>GouraundMaterial</em></a></p>
<p>var gouraundMaterial: GouraudMaterial = new GouraudMaterial (light, 0&#215;0000FF, 0&#215;00ff00);</p>
<p>var plane: Plane = new Plane (gouraundMaterial, 400400,10,10);</p>
<p>scene.addChild (plane);</p>
<p><a href="http://code.google.com/p/papervision3d/source/browse/trunk/as3/trunk/src/org/papervision3d/materials/shadematerials/PhongMaterial.as"><em>PhongMaterial</em></a></p>
<p>var phongMaterial: MaterialObject3D = new PhongMaterial (light, 0&#215;0000FF, 0&#215;00ff00, 1);</p>
<p>plane: Plane = new Plane (phongMaterial, 400400,10,10);</p>
<p>scene.addChild (plane)</p>
<p>A <a href="http://www.madvertices.com/2008/10/papervision-3d-materials-overview.html">summary of materials</a> can be found on the blog Mad Vertices.</p>
<p><strong>Collada</strong></p>
<p>You can import 3D objects from any 3D modeling software that supports exporting to COLLADA. <a href="http://en.wikipedia.org/wiki/COLLADA">COLLADA</a> is an XML format that is used to establish a file-sharing for interactive 3D applications.</p>
<p><strong>Cameras</strong></p>
<p>Papervision3D have 4 types of cameras: free, target, spring and debug.</p>
<p>The camera has three especific properties that can be manipulated: zoom, focus and FOV</p>
<p><strong>Papervision3D Tween + Flex SDK + + Linux: An Open Source solution</strong></p>
<p><a href="http://www.carlosulloa.com/">Carlos Ulloa</a> released to open source the first version of Papervision3D in 2006 and it has been improved greatly since then. For transition of numerical value properties yo can use a library called <a href="http://code.google.com/p/tweener/">Tweener,</a> developed by <a href="http://zehfernando.com/">Zeh Fernando</a>.</p>
<p>It is important to note that Adobe Flash Player is still the owner, but the tools mentioned adove are avaliable for free.</p>
<p><strong>Conclusion </strong></p>
<p>Using all the new features of Flash Player 10 APIs, you get more capacity for real time 3D rendering. This will significantly optimizes the performance of Papervision3D, in fact, others 3D rendering engines are already partially implemented the new API will dramatically improve the experience of Internet users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.david5.com/interfaces-tridimensionales-en-los-navegadores-de-internet-papervision3d/feed/intl/en/</wfw:commentRss>
		</item>
		<item>
		<title>My firsts experiments with Papervision3D</title>
		<link>http://www.david5.com/mis-primeros-experimentos-en-papervision3d/</link>
		<comments>http://www.david5.com/mis-primeros-experimentos-en-papervision3d/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 15:07:51 +0000</pubDate>
		<dc:creator>David Perez</dc:creator>
		
		<category><![CDATA[Papervision3D]]></category>

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

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

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

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

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

		<guid isPermaLink="false">http://www.david5.com/?p=18</guid>
		<description><![CDATA[Some months ago I started using Papervision3D. I like Papervision3D, it&#8217;s a innovative open source project, and the Core Team of PV3D are challenging the performance of the Flash Player. Who know correctly this 3D rendering engine, you can make a lot of innovatives  dynamics back-ends 3D, it can be a way for a [...]]]></description>
			<content:encoded><![CDATA[<p>Some months ago I started using <a href="http://blog.papervision3d.org/">Papervision3D</a>. I like Papervision3D, it&#8217;s a innovative open source project, and the Core Team of PV3D are challenging the performance of the Flash Player. Who know correctly this 3D rendering engine, you can make a lot of innovatives  dynamics back-ends 3D, it can be a way for a very interesting innovation. I&#8217;m already begun exploring Papervision3D.</p>
<p>I decided to share my firsts experiments:</p>
<ul>
<li><a href="http://www.david5.com/labs/pv3d/firststeps/trianguloequilatero/MainTrianguloEquilatero.html">Construction of a3D  triangle</a>.<br />
<a href="http://www.david5.com/labs/pv3d/firststeps/trianguloequilatero/MainTrianguloEquilatero.html"><img class="size-full wp-image-112 aligncenter" title="trianglepapervision3d" src="http://www.david5.com/wp-content/uploads/2009/03/trianglepapervision3d.jpg" alt="trianglepapervision3d" width="486" height="176" /></a><br />
In this experiment I learned how to create a TriangleMesh3D, the process is simple, every point in space is an instance of the class Vertex3D, and the faces are based on these points. The way of mapping faces I&#8217;ll post later.<br />
<a href="http://www.david5.com/labs/pv3d/firststeps/trianguloequilatero/MainTrianguloEquilatero.html">View</a>.  <a href="http://david5.com/labs/pv3d/firststeps/trianguloequilatero/trianguloEquilatero.zip">Source Code.<br />
</a></li>
</ul>
<ul>
<li> My next step was to <a href="http://david5.com/labs/pv3d/firststeps/planocontriangulos/MainPlano.html">create a plane joining two triangles</a>.<br />
<a href="http://david5.com/labs/pv3d/firststeps/planocontriangulos/MainPlano.html"><img class="size-full wp-image-114 aligncenter" title="triangle2papervision3d" src="http://www.david5.com/wp-content/uploads/2009/03/triangle2papervision3d.jpg" alt="triangle2papervision3d" width="486" height="176" /></a><br />
Papervision3D already exists in the Plane class, but I decided to do it manually, with the goal of learning how to build instances TriangleMesh3D.<br />
<a href="http://david5.com/labs/pv3d/firststeps/planocontriangulos/MainPlano.html">View</a>.  <a href="http://david5.com/labs/pv3d/firststeps/planocontriangulos/planocontriangulos.zip">Source Code</a>.</li>
</ul>
<ul>
<li> Then I started to <a href="http://www.david5.com/labs/pv3d/firststeps/planeparticle/MainPlaneParticle.html">experiment to create 3D games</a>,<br />
<a href="http://www.david5.com/labs/pv3d/firststeps/planeparticle/MainPlaneParticle.html"><img class="size-full wp-image-115 aligncenter" title="papervision3dgame" src="http://www.david5.com/wp-content/uploads/2009/03/papervision3dgame.jpg" alt="papervision3dgame" width="486" height="176" /></a><br />
I used the Particles class to create particles at each vertex of the plane and it&#8217;s rotate around the y axis. The limitation is the very low framerate, it is necessary to optimize the code, but for a first experience was very nice. I was happy :D. To rotate and move the camera position, you can use your mouse and arrow keys<br />
<a href="http://www.david5.com/labs/pv3d/firststeps/planeparticle/MainPlaneParticle.html">View</a>. <a href="http://www.david5.com/labs/pv3d/firststeps/planeparticle/planeparticle.zip">Source Code</a>.</li>
</ul>
<ul>
<li> My next experiment consisted in the <a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces1/MainAlgebraicSurface1.html">construction of algebraic surfaces</a> instanciating TriangleMesh3D class, and made my first integration with Tween Papervision3D in this experiment.<br />
<a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces1/MainAlgebraicSurface1.html"><img class="aligncenter size-full wp-image-116" title="algebrapv3d" src="http://www.david5.com/wp-content/uploads/2009/03/algebrapv3d.jpg" alt="algebrapv3d" width="486" height="176" /></a>To rotate and move the camera, you can use your mouse and arrow keys. And press the space key to change the subject.<br />
<a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces1/MainAlgebraicSurface1.html">View</a>.<a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces1/algebraicsurface1.zip"> Source Code</a>.</li>
</ul>
<ul>
<li> The experiment quoted above simply play with the depth of Vertex3D points, I make a small modification so that the x and y components follow a sine curve, and the z component of the transition point.<br />
<a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces2/MainAlgebraicSurface2.html"><img class="aligncenter size-full wp-image-118" title="algebra2pv3d" src="http://www.david5.com/wp-content/uploads/2009/03/algebra2pv3d.jpg" alt="algebra2pv3d" width="486" height="176" /></a>Some objects are ugly, some rare, but gives an idea of what can be done with careful mathematical study of surfaces to create.<br />
<a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces2/MainAlgebraicSurface2.html">View</a>. <a href="http://david5.com/labs/pv3d/firststeps/algebraicsurfaces2/algebraicsurface2.zip">Source Code</a>.</li>
</ul>
<ul>
<li> There are many classes to create materials in Papervision3D, <a href="http://david5.com/labs/pv3d/firststeps/materialstest/MainSuperficieMontanosa.html">the basic tests that I made with Papervision3D materials</a> used for the following types of materials:<br />
flatShadedMaterial<br />
gouraundMaterial<br />
phongMaterial<br />
cellMaterial<br />
envMapMaterial<br />
<a href="http://david5.com/labs/pv3d/firststeps/materialstest/MainSuperficieMontanosa.html"><img class="aligncenter size-full wp-image-121" title="materialpapervision3d" src="http://www.david5.com/wp-content/uploads/2009/03/materialpapervision3d.jpg" alt="materialpapervision3d" width="486" height="176" /></a><br />
To view the types of materials listed above, you must re-compile the source code you must uncoment addChild methods.<br />
<a href="http://david5.com/labs/pv3d/firststeps/materialstest/MainSuperficieMontanosa.html">View</a>. <a href="http://david5.com/labs/pv3d/firststeps/materialstest/materialstest.zip">Source Code</a>.</li>
</ul>
<ul>
<li> I was interested to make a small integration of sound materials.<br />
<a href="http://david5.com/labs/pv3d/firststeps/dinamicmaterials/dinamicmaterials.zip">Source Code</a>.</li>
</ul>
<ul>
<li> This example of cubes and spheres in Papervision3D was very easy to make, simply because using primitive objects.<br />
<a href="http://david5.com/labs/pv3d/firststeps/materialCubeAndSphere/TestMaterialCube2.html"><img class="aligncenter size-full wp-image-122" title="cubeandspherepv3d" src="http://www.david5.com/wp-content/uploads/2009/03/cubeandspherepv3d.jpg" alt="cubeandspherepv3d" width="486" height="176" /></a>You can use de arrows keys to see the 3D objects.<br />
<a href="http://david5.com/labs/pv3d/firststeps/materialCubeAndSphere/TestMaterialCube2.html">View</a>. <a href="http://david5.com/labs/pv3d/firststeps/materialCubeAndSphere/TestMaterialCube2.as">Source Code</a>.</li>
</ul>
<p>This is my first post about Papervision3D, I&#8217;ll post frequently about this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.david5.com/mis-primeros-experimentos-en-papervision3d/feed/intl/en/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to my personal blog!</title>
		<link>http://www.david5.com/welcome-to-my-personal-blog/</link>
		<comments>http://www.david5.com/welcome-to-my-personal-blog/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 00:28:50 +0000</pubDate>
		<dc:creator>David Perez</dc:creator>
		
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.david5.com/?p=1</guid>
		<description><![CDATA[Welcome to my blog! After several years of blog reading, I decided to give a new step and begin to write about issues that interests me.  I’ll write about my country, my university issues, my travels and events, the web and engineering technologies and the thoughts that I want to share; we’ll discuss about [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to my blog! After several years of blog reading, I decided to give a new step and begin to write about issues that interests me.  I’ll write about my country, my university issues, my travels and events, the web and engineering technologies and the thoughts that I want to share; we’ll discuss about all this issues, and I’ll learn with you.</p>
<p>My name is David Pérez, I live in <a href="http://en.wikipedia.org/wiki/Ciudad_del_Este">Ciudad del Este</a>, <a href="http://en.wikipedia.org/wiki/Paraguay">Paraguay</a>, my interests are based in electricity, web technologies and their intersections. I’m studding Electrical Engineering, , and parallel, I’m studding a BA in Systems Analysis, both at <a href="http://www.fpune.edu.py/">Polytechnic Faculty</a> of the <a href="http://une.edu.py/">East National University</a>, I love music! I play classical guitar  and some violin, I invite you to see <a href="http://www.flickr.com/photos/35114868@N03/">my photos on Flickr</a>!</p>
<p>I’ll much like very much that you involved in my blog leave comments, this is very important for me.  You can too <a href="mailto:contact@david5.com">contact me by mail</a> as well.</p>
<p>Welcome, I hope to share an interesting experience with you and have a good time <img src='http://www.david5.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.david5.com/welcome-to-my-personal-blog/feed/intl/en/</wfw:commentRss>
		</item>
	</channel>
</rss>
