Demo: Green Dragon

Articles with the tag: Texturing

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 »

Texturing: OpenGL Vertex attributes limitation

It's a start, but why are the seams visible? Those seams are where the UV sections seperate, but they render fine in Blender.

I think the problem is that the UV map island edge vertices are actually the same vertices, so they are traversing the no-man's-land between islands and creating the warped texturing at the seams. It shouldn't be doing that, but it's doing some weird interpolation between the islands.

UV texture islands

Possible solutions:

Try: shrinking mesh islands - no Try: finding that weird border delta glsl thing

last ditch: colour the area between islands GREEN so the seams don't look as bad...

...which won't work, because it's going over the other islands.

[16/06/14 11:22]

Possible solution: Multitexturing. Each island can be given its own texture of the same size but with an alpha channel, so no cross-blending can take ...

Read More »

Texturing with DDS

On texturing: is there any reason the ResMan can't store the DDS data? The Material objects can be charged with storing the texture, so the texture is never stored more than once in device memory.

Scene init example:

ResMan->LoadMaterial("material1", ResMan->GetTexture("texture1");

Read More »

Page 1 / 1