Detecting UV overlaps

   5438   4   1
User Avatar
Member
18 posts
Joined: 7月 2013
オフライン
Is there a way to find primitives or vertices which overlap in the UV? Automatic UVing methods tend to leave behind overlaps which break texture baking. If I could find the prims involved then I could lay them out separately.
User Avatar
Member
899 posts
Joined: 2月 2016
オフライン
hello, maybe there's some utility in the gameDev toolset, but I'm not really sure about it.

Anyway, one way you could do it yourself is to assign uv values to the point position, then use a boolean in detect mode to find the self-intersections (AxA polygons).

Not ideal for high-res model, as boolean operations are quite slow.
Probably there better ways to do that.
User Avatar
Member
18 posts
Joined: 7月 2013
オフライン
Great idea thanks! Polydoctor also works but I haven't measured if it's faster.
User Avatar
Member
2 posts
Joined: 8月 2018
オフライン
ZoltanE
Great idea thanks! Polydoctor also works but I haven't measured if it's faster.

Hi there - just trying to do this very thing. Would you show how you used polydoctor to detect overlapping uv's?
User Avatar
Member
18 posts
Joined: 7月 2013
オフライン
First I use VertexSplit to duplicate vertices which have discontinuous UVs.
Next a simple VEXpression in a wrangler sets positions (P attribute) from UVs, essentially flattening the mesh onto the XY plane.
I feed that mesh into a Polydoctor which has its Pair Overlaps flag enabled. That way the PolyDoctor creates a “valid_poly” attribute and places a 0 on ones which overlap.
In another wrangler, taking both original and flattened geo streams as inputs, I mark the invalid polygons on the original mesh. (The poly order remained the same so the wrangler can just run over primitives.)
I let an Unwrap node do its magic on prims which are marked as invalid then as the final step an UVLayout tidies up.

I hope it makes sense. Good luck!
  • Quick Links