Detecting UV overlaps
4131 4 1- ZoltanE
- Member
- 17 posts
- Joined: July 2013
- Offline
- Andr
- Member
- 900 posts
- Joined: Feb. 2016
- Offline
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.
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.
- ZoltanE
- Member
- 17 posts
- Joined: July 2013
- Offline
- bolegna
- Member
- 2 posts
- Joined: Aug. 2018
- Offline
- ZoltanE
- Member
- 17 posts
- Joined: July 2013
- Offline
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!
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