[DirectX, SlimDX] Mesh Materials ...
Hi,
I'm trying to remove double vertices from a mesh which has multiple materials and subsets. The remove doubles algorithm works well, but the material data gets lost and all subsets share the first material.
Here is what I do ...
I load the mesh, extract the vertex and index buffers, modify them and write them to a new mesh. I copy the materials and effects over to the new mesh. Then I create a new attribute table which seems to contain the right data and finally I let the mesh generate the adjacency.
I don't know if you want to see the code :). It's over here: D3D9MeshTools.cs ( look for "public static Mesh Optimize(Mesh mesh)" ).
... but maybe you can help me just by seeing the steps I'm doing. Am I missing something?
Best Regards.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement