0
$\begingroup$

I've made a procedural grid to transfer uv from it to my mesh (my mesh is properly cut for UV projection form grid), so I will get result as Data Transfer modifier - UV Project (face corner - nearest face projection), but all methods (Sample Nearest Surface, Sample Neareast Index, Raycast) distort my UV, despite the fact that UV on procedural Grid is perfect.

(I've made two preview nodes to quickly look at the result)

enter image description here enter image description here enter image description here enter image description here enter image description here

$\endgroup$
2
  • $\begingroup$ Do you need the UVs to come from any specific input mesh or do you just want a repeating UV pattern across the world XY in a grid? Cause you can achieve that through much simpler means than doing a whole data transfer. $\endgroup$
    – Jakemoyo
    Commented Jul 2 at 1:40
  • $\begingroup$ @Jakemoyo, just repeating UV pattern, nothing more. But it doesn't work either $\endgroup$
    – Bicukow
    Commented Jul 2 at 10:28

2 Answers 2

1
$\begingroup$

(Using Blender 3.6.12)

The issue is not about interpolation of UVMap from one mesh to an other, but it is about interpolation inside a face of $U$ and $V$ values between face corners. Consequently, whatever the interpolation process between two meshes, the final rendering is corrupted.

Example of UV interpolation

This minimal demonstration case illustrates the issue.

The blue nodes are building a mesh made of two adjacent quad faces aligned in Y direction. The UVMap for each face covers the tile $(U,V) \in [0:1] \times [0:1]$. This is shown in the Spreadsheet Editor where face corners from 0 to 3 are for the bottom face, and face corners from 4 to 7 are for the top one.
The green nodes are building a mesh made of a single quad face shifted in Y direction by half its height. The UVMap value at its face corners is interpolated from the previous mesh using a Sample Nearest Surface node and it is captured using a Store Named Attribute node set in Face Corner domain. The Spreadsheet Editor shows that the interpolated values are right (for this face, the face corner index ranges from 8 to 11).
NB: The red node is just shifting in X direction the second mesh to remove at display the overlap between both meshes.

The corrupted rendering of the second mesh comes from the $V$ coordinate being equal to 0.5 for all its four face corners. Consequently, as $V$ is linearly interpolated inside a face from its face corners value, $V$ equals 0.5 everywhere and there is no variation in Y direction of the rendered texture. As Y increases, the increase of $V$ from 0.5 to 1.0, the discontinuity at Y=0.5 from 1.0 to 0.0, then the increase from 0.0 to 0.5 are completely lost.

A solution is to offset by 1 the UVMap of a tile when it is duplicated (e.g. by the original Array group node), instead of keeping $U$ and $V$ between 0 and 1. With the Extension property of the Image Texture node set to Repeat in the Shader Editor, these UV values are brought back between 0 and 1 after interpolation inside a face.

UV corrected

$\endgroup$
3
  • $\begingroup$ Thank you for answer! Sadly I need this workflow for using UDIM texture, so Repeat texture is not an option, because I need all islands (tiles) be in 1..0 $\endgroup$
    – Bicukow
    Commented Jul 8 at 17:23
  • $\begingroup$ I think I should rewrite this question.... $\endgroup$
    – Bicukow
    Commented Jul 8 at 17:29
  • $\begingroup$ Instead of rewriting this one, may I suggest to ask a new one focusing on using UDIM texture, that changing completely your problem from my point of view ? I do not know if it is because I am using Blender 3.6, but the image 1024.001 does not look like a UDIM tile in the file I uploaded... $\endgroup$ Commented Jul 8 at 20:38
0
$\begingroup$

You can get basic UV coordinates by just using the XY position of each face corner and then dividing it by the total size of the mesh to normalize it. Then you can multiply/add/divide those coordinates to scale or add an offset to the UVs.

enter image description here

Result on your mesh:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks for the answer, but it actually generating tiling uv coordinate, but i need all islands to be in one udim tile (like uv - reset), thats why i creating a grid with uv to project, so, I guess, when you asking me about what i want -- i gave wrong answer -- i need specific mesh $\endgroup$
    – Bicukow
    Commented Jul 3 at 10:09

You must log in to answer this question.

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