Glitched texture with geometry nodes

So I put a texture on my terrain, but for some reason when I use geometry nodes and try to put instances on my object, the texture becomes completely green.
Before:


After:

Hi, could be you need a set material node on your landscape mesh.

Hope that helps

I already tried it and it unfortunately didn’t work, it gave me the same result

It looks like you are loosing your uv cords (this usually effects the instances), it is difficult to say why without seeing the nodes (both GN and Material)
But in general with GN in the shader editor do not enter the UV cords with a texture coordinate node.

Use an atribute node or a UV Map node, for some reason geometry nodes do not like the texture coordinate node

3 Likes

I have tried how you suggested, but it still doesn’t work. Here are the nodes. I tried using another instance and the result was still the same.
Shader nodes:


Geometry nodes:

Interesting info… :star_struck: … never heard of this… saved into my notes… (even if they are ver very chaotic) …

You have your GN node on your landscape object. You do not need the grass material on that object.

The grass material should be on the grass objects that you are instancing. delete it from the landscape object’s material slots. I have a feeling that is your problem.

Your “landscape” material should just work on your landscape object, you are not changing its geometry in your GN setup, I would also delete the set material node, you should not need it in this case.

Also I would not recommend realizing the instances if it is not necessary, this will slow down your whole file. Why do you want to realize them? It will turn every blade of grass and tree into real geometry that has to be calculated all the time.

1 Like

the grass is a hair particle, however the trees are indeed realized for the simple reason that there would be too many objects in the scene. Objects slow down my pc more than polygons. Does that mean that I should make the grass inside the GN?

No you do not need to do it in GN.
In this case you do need the grass material in the material slot, but only the grass should use that material (in the particle render settings)

Realizing the instances turns them into real geometry (realize them) and will slow down your pc anyway.
You do not need to realize them. If you do not realize them they are instances and take up a lot less memory.

How big is your file? If you can share it I will take a look to see what is going on. You can compress Blender files in the save dialogue, hit N to see the N panel and check “compress”

It’s 11 Mb.

However, one tree is 2000 objects and if you multiply it by 100 it gets to 200 000 objects. My pc doesn’t appreciate and makes moving in the viewport impossible, it and prefers more polygons.

Your procedural tree on its own (only one tree) goes from to 9,582 to 110 verts if you do not realize the instances and it looks exactly the same!

Even after getting rid of the realize instances in you procedural tree, plugging into you landscape GN set up (join geometry) crashes my system!

So next I got rid of the realize instances in your Sakura tree went from 325,506 verts to 741.

Then set the procedural tree’s “object info” node to “instance” and changed the density of the points.

Finally the file stopped crashing.

So to optimize your scene get rid of all the realize instance nodes you do not need to realize them it only makes things worse. Also careful with the density of your trees.

Here is what I got in the end, note that the landscape texture (I did not have your image) is OK.

Also note the statistics 89,629 objects but only 5,209 verts. That is because the objects ARE INSTANCES not realized.

The scene is manageable.

I noticed that the trees in my version lost some leaves and look shaggy.

I have not found out why but it lead me to take another look at your original file.
I plugged the trees in and yes your landscape did loose its UV’s.

The fix was to do as I said in my first post. Use an atribute node or a UVMap node for the texture coordinates of your LANDSCAPE texture (I think if you treid it you were trying the grass texture.)

This is your original file using a UVMap node for the landscape texture:

I still think you should try not to realize the instances look at your vert count. (6,000,000 for 5 objects)

Thank you very much. It’s working now. It seems that instead of doing as you said in your first post to the landscape texture, I put it on the grass which was very stupid. I also understand your concern about the verts and fully understand that it can cause problems. However my pc, for some reason, hates object counts. I think you probably have seen that my sakura tree was over 15k objects. My pc can’t handle it and I can’t move in the viewport at all. If maybe you have a fix to it, I will gladly try it out. But for the time being my pc can handle verts just fine instead of objects.

I think it is not your pc it is blender. There are other threads that talk about blender having problems with large object counts. I just reopened one of the files that was crashing (not the last version I did) and saw this message in terminal:

I think you are reaching the limits of what blender can handle, it looks like a question of “choose your poison” either too many verts or too many objects.

As you probably want to put more things in your scene I think you will have to work out a way to economize somehow reducing strain on blender.

I have not done large scenes myself but you can find other threads here that talk about scene optimization for large landscapes.

I will edit out some of the things I said in my second to last post as you were loosing your UV’s and I do not want to confuse other readers.

The general thing to remember is that GN nodes like textures to use an attribute node or a UV map node for mapping textures. They do not like the “texture coordinates node” nor in the case of images textures, no mapping node (which reverts to texture coordinates by default)

Good luck and happy Blending :slightly_smiling_face:

1 Like