here's
.ASE file in .txt format and the output of my
texture_vertex_array ( so you can compare texture coordinates ) they are the same ( i think i did it right ).
i don't remembere where, i've read about that the coordinate Y is inversed.
i wrote new method, where i rewrite all texture and vertex coordinate, here it is:
- Code: Select all
private void fix_arrays ()
{
float[] new_vert = new float [ face_num * 3 * 3 ] ;
float[] new_tvert = new float [ face_num * 3 * 2 ] ;
byte [] new_index = new byte [ face_num * 3 ] ;
for ( int i = 0 ; i < face_num * 3 ; i ++ )
{
new_vert [ i * 3 ] = vertex_coords [ index_array [ i ] * 3 ] ;
new_tvert [ i * 2 ] = texture_data [ texture_index [ i ] * 2 ] ;
new_vert [ i * 3 + 1 ] = vertex_coords [ index_array [ i ] * 3 + 1 ] ;
new_tvert [ i * 2 + 1 ] = 1.0f - texture_data [ texture_index [ i ] * 2 + 1 ] ;
new_vert [ i * 3 + 2 ] = vertex_coords [ index_array [ i ] * 3 + 2 ] ;
new_index[ i ] = ( byte ) i ;
}
vertex_num = vertex_coords.length ;
texture_vertex_num = vertex_coords.length ;
vertex_coords = new_vert ;
index_array = new_index ;
texture_data = new_tvert ;
}
i've set my simple box.
and look what i get:
( everything is fine )

________________________________________________________________________
so with simple model everything is ok, but when i've set my robot model, i've got this:

i've got only the part of my model =(