5
$\begingroup$

I made a building using geometry nodes

Having Textures but cant apply a modifier to save

It has textures and works fine but when I try to apply Geometry Nodes, Realize Instances Node makes building parts loose their UVs.
How is it possible to apply modifier and keep UV at the same time?

textures are gone

$\endgroup$
3
  • $\begingroup$ Hi. How do you apply the texture? Do you have a set material node? and set material index node? Please show the full node tree. $\endgroup$ Commented May 29, 2022 at 12:37
  • $\begingroup$ no, i don't have any texture node $\endgroup$
    – George K.
    Commented May 29, 2022 at 15:09
  • $\begingroup$ imgur.com/a/zWCMOSu these objects already have textures in the old blender 2.9 no needed any texture nodes or realize instance so this is new and don't know $\endgroup$
    – George K.
    Commented May 29, 2022 at 15:12

1 Answer 1

5
$\begingroup$

When realizing instances, their UVs are converted to an attribute with a name equal to the name of the UV Layer that the source object have:

enter image description here

In that image, UVMap is the uvs of geometry from instances, while uv_map is the uvs of the Mesh Grid generated in the Geometry Nodes.

The UVMap can be accessed with the Attribute node in the Material Nodes.

enter image description here

You will need to set the material of the instances to this new material with the Set Material node.

If you will use the same material for the roof, you need to merge the uv of the Mesh Grid with the realized instances uv, you can rename the uvs of the objects being instanced to uv_map:

enter image description here

Or you can merge in Geometry Nodes, we do that switching the field depending on if the geometry is from the grid:

enter image description here

enter image description here

enter image description here

enter image description here

If you will use a different material for the roof, you don't need to merge the UVs, just set the material of the roof in Geometry Nodes before joining the geometry with the instances.

If you dont merge the UVs, and use a different material for the roof, you won't need to manipulate any attribute in Geometry Nodes:

enter image description here

The only thing you would need is use the UVMap attribute in the instances material:

enter image description here

$\endgroup$
9
  • $\begingroup$ I followed everything and nothing happened or maybe I am stupid $\endgroup$
    – George K.
    Commented Jun 1, 2022 at 13:28
  • $\begingroup$ @GeorgeK. can you provide a blend file with the modifications you did using this answer? that way i can search for what went wrong. $\endgroup$
    – Hulifier
    Commented Jun 1, 2022 at 18:15
  • $\begingroup$ we.tl/t-KouJcIVTWv $\endgroup$
    – George K.
    Commented Jun 2, 2022 at 12:14
  • $\begingroup$ @GeorgeK. The reason it didn't work is that you created a new material on the object with Geometry nodes where the uv attribute is used, while in my answer i modified the material of the instances. If you want to use the new material you created, you need to apply it to the instances using a Set Material node. I think that using a separate material on the final object is a better idea compared to what I did, since modifying the material of the objects that will be instanced will make them show textures only with Geometry Nodes. I will edit the answer to use that material. $\endgroup$
    – Hulifier
    Commented Jun 2, 2022 at 17:03
  • $\begingroup$ @GeorgeK. also, if you will use a different material for the roof, there's no need for merging UV's. $\endgroup$
    – Hulifier
    Commented Jun 2, 2022 at 17:29

You must log in to answer this question.

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