UV Distortion Identification and Selection


#1

Hello CG (Talk lol) Society

It’s been some time…

So here is a question about the wonderful UV Distortion Shader used to show UV distortion of your UV Shells in the Texture Editor and Viewport.

Below is an example mesh of a retopo’d brick pile photogrammetry scan. As you can see it’s UV’d in one nice large piece and relaxed to avoid a bunch of nasty shells and wasted UV space.

Now I would go through a separate the distorted areas and remap them. The selection process will be lengthy and it’s not just this pile of bricks I need to do. I have other similar objects that will require the same process.

So my question is:

Is there a way to determine the UV’s/Verts/Polys that are over a certain distortion level and make a selection from such information?

Thanks in advance!

aKEWt :slight_smile:


#2

i would think you would need to compare the area of a triangle in UV space against the area of the triangle in 3d space. If the ratio is less than the ideal ratio, add it your selection.

You would also need some method for determining which triangle has the ideal amount of uv space to set the comparison.


#3

Yeah that sounds reasonable. I was also wondering if there is a way of extracting the data used in shading the UV Distortion Shader. It must have some kind of function?


#4

I don’t know how to query the distortion from the “Display UV distortion”, but you can calculate it yourself. Given a surface triangle t and its UV coordinates, calculate its Jacobian of the mapping, J. Then, you can measure the isometric distortion as the distance of J from SO(2), or the quasiconformal distortion as the ratio between the singular values of J.

I can help you with the formulas if that’s what you are looking for. As an exercise, I’d suggest that you write a shader that display these distortions over the mesh.