Raymond
Demo: Green Dragon

Articles with the tag: Vertex Indexing

Texturing: fixed the texture seams

After generating my own vertex indices and vertex weight indices, vertices can now have multiple UV attributes and so the seams are eliminated.

But morphing no longer works...

OK, by recording the indexing order of the base mesh and forcing the morph target meshes to load their vertices with that order, the distortion is largely gone - save for a few odd polys. I don't know what is going on here. Perhaps the Three.js Model format 3 exporter doesn't save the vertices in the same order for different shapes.

Idea: the face index loading order might have changed, but not the vertices. It would be worth recording the positions selected for the base mesh and applying them to the vertex list in the morph target meshes.

Face index selection (ResourceManager.cpp):

glm::vec3 tempVertex;
glm::vec3 tempNormal;
glm::vec2 tempUV;

pos = faces[i+j] * coordsPerVertex;

tempVertex.x = vertexCoords ...

Read More »


Page 1 / 1