Obj file relative to the coordinates of the scene Away3d

Software: Away3D 4.x

Krappt, Newbie
Posted: 02 November 2012 02:56 PM   Total Posts: 27

Hello.

I load the obj file, but Away3d determines the coordinates relative to the mesh coordinates stored in obj file. I need to have absolute coordinates, which will be located relative to my meshes.

Show you how you can use the coordinates for meshes relatively scene Away3d.

   

Avatar
Fabrice Closier, Administrator
Posted: 02 November 2012 03:08 PM   Total Posts: 1265   [ # 1 ]

That’s how obj format works. The transforms are baked into the vertices.
There is no concept of sceneGraph in there.
The only thing that you can do with this format is to extrapolate per mesh the objectspacedata bounds and use for instance its center to define the position. You can use MeshHelper.recenter method for this. Bounds class might also be usefull to you. Scale or rotation factors are lost.
Use another format such as 3ds, awd2 or collada from your editor (where transforms and vertices are stored as defined into your editor) if these are of importance for your project.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X