Conservation of vertices order

Software: Away3D 4.x

Thomas Weiss, Jr. Member
Posted: 31 July 2013 08:47 AM   Total Posts: 35

Hi there,

I am importing an OBJ in AwayBuilder and load the resulting AWD in Away3D 4.1.4. When accessing the mesh vertex buffer (the first sub-geometry being a CompactSubGeometry), I noticed that the vertices order from the OBJ is not preserved, which is an issue for me because I need to ‘manually’ animate the mesh vertices.
Is it something that I am missing?



80prozent, Sr. Member
Posted: 02 August 2013 03:30 PM   Total Posts: 430   [ # 1 ]


Sorry, but at this point, the vertice-order from imported files like obj, is not preserved.
On import, the mesh might needs to be split into different subgeometries, so the order is changed (if its not allready changed earlier)...
i think it would be possible, to keep track of the changed vertices-order, by creating a dictionary when parsing, that will translate the old-vert-index to new-vert-index + subGeo-index…but since this is only needed on special cases, it would need to be optional….I think this feature will be added at some point, but i cannot tell you when…
for a workarround, you could write yourself a little function, that loops over the verts, and gives back all verts at a specific position.
this way, you could read the position of a vert in your modeling-application, and check the index for the vert in away3d using its position…
this only makes sense when you do not have to animate lots of points….



sorry…i hope my actionscript is better than my english…

‹‹ ATF in AWD


Away3D Forum

Member Login