0
$\begingroup$

Could someone please explain how Blender handles textures when creating objects in Geometry Nodes?

For example, consider this sphere I created in Geometry Nodes. One of the nodes is plugged into the Position socket, and the other is plugged into the UV Map socket.

Plugged into the Position : This one has its own set of numbers within three columns:

enter image description here

Plugged into the UV Map : Again This one has its own set of numbers within two columns (third column is just zero) :

enter image description here

My question is, how does Blender know how to interact with these numbers? I mean, they are completely different sets of numbers.

How do “Texture Space” and “Texture Map” relate to each other in Blender when using GN? why "position" node looks more symmetrical than "UV map" node?

$\endgroup$
3
  • 1
    $\begingroup$ probably because 3D position is using real 3D space (X, Y, Z) and UV map is using 2D space (X, Y) $\endgroup$
    – Emir
    Jan 26 at 17:01
  • $\begingroup$ Thanks @Emir 👍 then why mostly everyone recommends using uv map? $\endgroup$ Jan 26 at 17:05
  • 1
    $\begingroup$ For Geometry Nodes, i don't know. In general for 3D modeling, because is easier to create and manipulate a 3D object unwrapped in 2D space to add textures $\endgroup$
    – Emir
    Jan 26 at 17:26

1 Answer 1

1
$\begingroup$

You don't show your material, so we have incomplete information...

My question is, how does Blender know how to interact with these numbers?

It is described by node trees. Node trees are evaluated by Blender code using particular rules, in case of Geometry Nodes it can be simplified to:

  • Evaluate the geometry connected to the "Geometry" input of the "Group Output" node.
  • Iterate over all elements of this evaluated geometry.
  • For each element of this geometry, iterate over each input socket of "Group Output" node.
  • For each socket, check if it's set to the domain of the currently evaluated element. For example if the element you're currently processing is an edge, and the socket you're currently processing is set to edge domain, then evaluate the stuff (other nodes) linked to this socket.
  • Once evaluated, read in the modifier what name is assigned to this output attribute, and save the evaluated data under the index of currently evaluated element in this attribute.
  • Proceed to evaluate the next socket, once you run out of sockets, proceed to evaluate the next element.

If you know programming, think of each node as a function, and of links as parameters/arguments of the functions.

So in your case the "Group Output" has only one socket "geometry" so it just evaluates the geometry by asking "Set Material" for the geometry. This node in your case just adds a material to the list of materials of the mesh, and sets the material index of all faces to this material. However, before it does so, it too has to obtain Geometry, and it asks for it the "Store Named Attribute" node. The SNA node asks for geometry from the "UV Sphere" which generates the geometry based on given inputs and returns it. The SNA then does what Group Output could also do, it saves the evaluated link connected to Value socket in an attribute, evaluating the linked function for each element (here Point = vertex) of the Geometry. If you connect "UV Map" you will get slightly malformed data, because it's supposed to be read in "Face Corner" not "Point" domain.

More reading:

$\endgroup$
2
  • $\begingroup$ Thanks ❤️❤️❤️ as always helpful. Could you kindly ❤️elaborate on your answer in relation to "Texture Space" vs "Texture Map"? I’m new to the 3D modeling world and would like to know what the SDATA attribute describes. Is it a ‘texture map’ or ‘texture space’? I am that rookie.😊I’ve learned many keywords this week, but I’m having trouble putting them together in a way that makes sense to me🤷‍♂️ $\endgroup$ Jan 26 at 18:40
  • 1
    $\begingroup$ SDATA represents what you saved there. If you connect "Position" it becomes an alias of the vertex/edge/face position. Saving position is often used to store original position, then temporarily move for some reason, and then move back to the stored position. If you connect "UV Map", then SDATA becomes the UV map, which tells you what 2D coordinate on a texture (UV simply means XY, but other letters are used to not confuse 3D space, and texture 2D space) a given point is assigned to. Research "UV unwrapping" to understand this. $\endgroup$ Jan 26 at 18:54

You must log in to answer this question.

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