Quote:

Have you tried to copy/paste my code in lite-c? I don't know what the problem could be as I've not used lite-c extensively yet. My code doesn't use any C++ specific constructs, so you should be able to use it in lite-c aswell (maybe remove the type conversion macros).


yes, i tried your version. my version and your version seem to give me the same wrong results in lite-c.

how does your VERTEX struct look like?

Quote:

Do you need this for your newton plugin, or for this plugin?


it's needed for both. printing out the mesh will be helpful for debugging and almost the same code will be usable for feeding the geometry to newton for collision detection.

(and i have another idea where this would come in handy. for machinima projects i always wanted to create a plugin which allows you to record gameplay and then render a high quality version from it using a renderer like yafray or gelato. )

Quote:

Are you planning on doing this plugin, once you get the hang of d3d? I've given the algorithm some thought and I must admit it hurts my brain.


i would do it if i got this d3d stuff working but i am not sure when and if this will happen. maybe i should better try to use a c++ compiler but i can't download the huge directx sdk with my crappy internet connection.

the algorithm isn't tricky. basically you just have to iterate through all triangles and put each vertex (with its position, normal, uv1, uv2 data) of a triangle into a python dictionary (called hash table or map in other languages i think?). to build the index list you can lookup the vertices in the dictionary then.

...

i think simply loading the second uv-set from an exported med txt file won't work since with that format you won't know which uvs and which vertices belong together for light maps.

so like i already said i would do a complete mesh loader which replaces the mesh of an entity. another problem came to my mind now though. such a mesh loader would also have to care about loading textures which makes it more complicated. or the entity which gets the mesh replaced would already need to have the correct textures applied but this would be a kind of ugly solution since there always would be the need for two versions of the model (mdl7 + custom format) then.