Transform a globe into a plane? 

Software: Away3D 4.x

damon, Newbie
Posted: 08 August 2013 09:44 AM   Total Posts: 3

So i need to transform a globe into a plane best by animating it. Is there an easy functionality implemented in away3d or does anyone know the basic approach how to achieve that ?

   

Avatar
Fabrice Closier, Administrator
Posted: 08 August 2013 03:42 PM   Total Posts: 1265   [ # 1 ]

the easyest way:—> load a plane or make one into Prefab, go to VertexAnimation generator, from the frame row, load an external file holding the sphere. It must have EXACTLY the same amount of vertices.
close, if you select your mesh in scene the player, will animate. set the speed as you want. Go to to export: as md2, and load this like in the examples using md2’s. or the easyest way: export as as3 (with export animators on). In away the class is simply, import MyClass, addChild(new MyClass).

There are more ways to achieve this, but would require more or less complex coding. This is the most easy and you should be done in matter of minutes.

   

damon, Newbie
Posted: 08 August 2013 03:54 PM   Total Posts: 3   [ # 2 ]

thx for the idea, however i meant if i have already built a sphere in away3d how could i transform it

   

Avatar
Fabrice Closier, Administrator
Posted: 08 August 2013 07:45 PM   Total Posts: 1265   [ # 3 ]

That’s also easy but requires coding: In pseudo
- extract the vertices of the Sphere and a Plane.
- Ensure both the meshes have same amount of vertices (or catch the diffs). - Make a new Mesh, the animated one, and define the geometry with one of the two buffers.
-Using a factor 0-1 to interpolate. Do animated mesh vert dest = vertice A * factor + vertice B * 1-factor;
This factor can be tweened if you need some nice motion.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X