1
$\begingroup$

I have made a displace and decimate modifier pipeline to generate a globe with height map displacement. However the UVs after this process become messy. Even recalculating UVs by geometry nodes still have glitches around the edge because UV at the seam are merged and wrapped around as a result of decimate modifier.

The simplest solution should be just running UV > Sphere Projection but that is not an option on the modifier or geometry nodes

I am using blender 2.93. Are there any ways to make this possible by any means? Could I write script to run command after modifier? Or are there any ways to split the edge of decimated mesh and recalculate UV properly? Or any node in geometry node that I could use to completely imitate Sphere Projection algorithm? Or did this feature have been added in blender of later version?

$\endgroup$
2
  • 2
    $\begingroup$ Might be helpful: blender.stackexchange.com/a/280086/71578 Sharing your current file on blend-exchange.com might be helpful for those who want to take a look at your problem as well. $\endgroup$
    – Kuboå
    Dec 28, 2022 at 16:48
  • 2
    $\begingroup$ Note that you can do everything in that link in shader nodes as well (which is going to have more cross-version compatibility, be per-sample rather than per-vertex, and, possibly, have better performance.) $\endgroup$
    – Nathan
    Dec 28, 2022 at 16:56

1 Answer 1

1
$\begingroup$

Sorry for not provide enough info. I can calculate UV of the sphere myself. But there was the well known problem to calculate spherical mapping that the UV will be mod into the range 0-1 instead of staying with nearby triangle

like this

enter image description here

In the end I could not found a way to do it in blender 2.9. But I found a solution in blender 3.4. In this version there is a geometry node Offset Corner in Face that let me get the value of other UV to compare with current UV

enter image description here

Which let me compare that, if the U value of neighbor UV of the same triangle face are distance apart than some epsilon (0.75 in this case) its mean the sphere projection was wrapped around from the calculation of atan2 and so that point need to be offsetted

The full node it this (the Node Group is the image above that utilized the node Offset Corner in Face)

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .