The "reorder vertices" and "copy vertex groups" scripts for Blender 2.49b use a preprocessing step wherein we construct a map of targetVerts <-> sourceVerts, based on the vertices' UV coordinates. Map format is: map[round(uv.x)][round(uv.y)] = array of struct { sourceVert, uv, targetVert }. When face UVs are in use, a vertex can have multiple UVs, in which case we index it by all of them. Benefit of this approach is that the meshes don't need the same vertex order or even the same number of vertices: if vertex A in the source mesh has a counterpart B in the target mesh, and A and B have identical or near-identical UVs, then we can get A from B or B from A. Only catch is that building the map is very slow; generally we loop over every vertex in every face (roughly <len(source.verts) * 3 + len(target.verts) * 3> iterations if both meshes are triangulated).
You or the mod creator probably won't read this, but unfortunately I'm facing a problem
Everything works, I also have the correct blender version and the pallette folder with the correct .blend files.
But the problem is that the meshes are not displayed exactly like in CK or ingame
It's about the total conversion enderal. There are cells where, for example, over 500 rock meshes are used in a formation. To reduce the draw calls I would like to combine them and this blender addon would be the only way to do that
Awesome to see all of your work here dude! I've been pushing for people over at the niftools team to keep working on their porting plugin, but apparently development has ground to a halt since mid-last year.
3 comments
The "reorder vertices" and "copy vertex groups" scripts for Blender 2.49b use a preprocessing step wherein we construct a map of targetVerts <-> sourceVerts, based on the vertices' UV coordinates. Map format is: map[round(uv.x)][round(uv.y)] = array of struct { sourceVert, uv, targetVert }. When face UVs are in use, a vertex can have multiple UVs, in which case we index it by all of them. Benefit of this approach is that the meshes don't need the same vertex order or even the same number of vertices: if vertex A in the source mesh has a counterpart B in the target mesh, and A and B have identical or near-identical UVs, then we can get A from B or B from A. Only catch is that building the map is very slow; generally we loop over every vertex in every face (roughly <len(source.verts) * 3 + len(target.verts) * 3> iterations if both meshes are triangulated).
https://gitlab.com/ReltivlyObjectv/import-ck-prefab-for-blender
Everything works, I also have the correct blender version and the pallette folder with the correct .blend files.
But the problem is that the meshes are not displayed exactly like in CK or ingame
It's about the total conversion enderal. There are cells where, for example, over 500 rock meshes are used in a formation. To reduce the draw calls I would like to combine them and this blender addon would be the only way to do that