Just wanted to share a few of my frustrations with as3, in particular the apis added to aid 3d development.
My reason for voicing these is really to find out if its me miss understanding things or if other people share my opinions.
My main issue is the restrictions of the drawtriangles/projectVectors/transformVectors methods.
These methods work well and are pretty fast but the parameter format drives me nuts!
everything has to be in vectors of numbers i.e.
var verts:Vector.<Number> = new Vector.<Number>();
verts.push(0, 0, 0, 10, 0, 0, 0, 0, 10);
the vector verts now contains a representation of three 3d vertices (that make up a triangle) in the format the flash wants them in.
is this format easy to manage/maintain…no.
is it easy to debug…no.
is it faster for non-native methods…no.
is it the format flash demands…yes.
is it a pain in the arse…yes.
directly referencing a vertex like this is impossible and accessing it will require a minimum of 6 vector index operations, 3 to get the numbers out and 3 to put them back (slow slow slow).
I find things so inflexible that I run two systems in parallel, just to take advantage of the new methods resulting in wasted time and memory.
You often end up just having to repopulate these lists every frame, which although works its just plain craziness.
I am sure there are good reasons for this but what are they?
Why couldn’t they have given us a few interfaces instead i.e. IVector2D and IVector3D. Would it really be much slower?
Let us manage things our own way, give us freedom to implement things how we like!
Another thing that has been bugging me is drawTriangles, it isn’t currently flexible enough to be fully taken advantage of. Say for example you had a cube, and you decide to use 8 vertices to define it, one for each corner, drawTriangles is great because it lets you define which of the vertices makes up each individual triangle but it wont let you specify individual uv-coordinates per triangle-vertex. booo. Ideally a vertex shouldn’t need to be tied to one uv and one uv only because if that vertex is also part of another face it make have a different uv-coord.
Given that adobe are supposedly working on new 3d shiznit that are gonna blow our minds, I really really hope they consult the community and ask the people who are going to be using it most for input, ideas and suggestions!