UV/Texture Distortion

   3332   4   1
User Avatar
Member
73 posts
Joined:
Offline
Hi all,

Can we get the UV/texture distortion data that is present in Houdini?
I haven't found any way to pull this data out of Houdini and or what logic is used to get to it.

So in the visualize node, I can check texture distortion and some settings and that communicates to the visualizers, but I want to capture that data to an attribute.

Thanks for any help or pointers!
-Johan
Edited by Johan Boekhoven - 2020年11月4日 11:09:53
User Avatar
Member
9 posts
Joined: 4月 2016
Offline
This is something I'm also interested in.

Alternatively, it would be useful to know how the texture distortion is being calculated.

Thanks!
User Avatar
Member
495 posts
Joined: 7月 2005
Offline
Hi,

this is an interesting question. I've looked for some resources but haven't found clear definition. So from my personal view: The distortion should give you a measure, how much the uv differs from a square (locally). One idea can be taking the gradients of the u and v direction (Du, Dv), which should be orthogonal with the same length (in non distorted case). It should be invariant under rotation and probably invariant under uniform scale. Taking the determinant of the matrix (Du, Dv, cross(Du, Dv)) should give you a measure. The length of Du, Dv can be optionally normalized or divided by the maximum length of each. If you divide by the maximum length, the non distorted case equals to determinant=1 and in every other case the determinant is smaller 1 (>0).
This is just an idea and there might be many other approaches out there but here is an example.

Attachments:
uv_distortion.hipnc (179.0 KB)

User Avatar
Member
102 posts
Joined: 5月 2006
Offline
Thanks for looking into Aizatulin. Gave your method a try and unfortunately it doesn't hold up on more complex meshes - just as the other solutions I've tried, none get close to the quality of the built in uv distortion visualizer :/
User Avatar
Member
495 posts
Joined: 7月 2005
Offline
Here is another approach calculating the gradient in UV-space. It seems to give more stable results (but still experimental).

PS: this approach is also flawed since it will only work, if the uv-value are unique ...
Edited by Aizatulin - 2021年1月6日 04:49:14

Attachments:
uv_distortionA.hipnc (359.0 KB)

  • Quick Links