I made a building using geometry nodes
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?
I made a building using geometry nodes
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?
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:
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.
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:
Or you can merge in Geometry Nodes, we do that switching the field depending on if the geometry is from the grid:
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:
The only thing you would need is use the UVMap attribute in the instances material: