How can one find the textures coordinates of the vertex? What’s the chunk and how is it composed?

Thank…

How can one find the textures coordinates of the vertex? What’s the chunk and how is it composed?

Thank…

Look for Lib3ds by J.E. Hoffman at SourceForge. It covers many aspects of 3ds reading, including texture coordinates-

What about normals? Are there any? I couldn’t find them, so I did this: For each triangle, with the 3 points of the triangle, calculated the normal vector, normalized it and used it with thoose 3 vertex of the triangle (the same normal for the 3). Is this correct? The results where good… But is there any room to improvement? Like some sort of smooth normals…

Thanks

Well to have smooth normals i would do what you did first then :

for (each vertex) {

get all related faces normals

sum these normals

normalize the sum

}

[This message has been edited by holocaust (edited 03-10-2001).]

Actually, if you’re loading any large 3ds models, you’ll be better off finding the vertex normals by

(a) init all vert normals to 0

(b) for each mesh-face, add face normal to each vert’s normal (creating a big sum)-

© normalize all vert normals

If you iterate all faces for each vertex, on large models (15k+ triangles), you’ll be waiting forever~ (numVert * numFace ) = O(n^2)

The per-face way is (numVert + numFace + numVert) = O(3n)