Texture Coordinate Extrapolation

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Foaly
Posts: 142
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Texture Coordinate Extrapolation

Post by Foaly »

Hello!
I've got a difficult problem, which I tried to solve for a while now.
I simpliy want to extrapolate uv coordinates.
For example I have a mesh which has a part which is textured and a connected part, which is not. The untextured part has no uv coordinates. Now I want to extrapolate the uv coordinates to that part, so I can texture it too.

The following images show what I mean:
Picture A is the starting mesh. The right part is the textured, the left the "untextured".
Picture B shows the mesh which the new texture. The texture coordinates have not been adjusted jet.
Picture C shows the final mesh, which I want to have (it's one face loop more, than pic A).
Image

I just used a mesh made from quads, so it is easier to see what I mean, but it should also work with a non symmetrical meshes and different face counts on both sides (so I cannot easily mirror, I could do that myself).
I know that this is possible, because Blender can do that. (That's how I created these images)

I already tried a lot and came up with two algorithms (each ~600 lines) which do work with some meshes, but if the mesh is curved or more complicated, they both produce a lot of distortion:
Image

Please help me!
Post Reply