1
$\begingroup$

I have a somewhat simply material made of a "noise texture" and a "color ramp" going from green to blue, making a random plane with grass and water.

No I wanted to see if I could maybe plant grass in geometry nodes. I know how to do this, but how do I get it to only plant it on the green from the material? If I make a "noise texture" and "color ramp" in geometry nodes, set them to the same numbers as in the material, and to put it to "selection" on a "mesh to points" it seems that this noise is not the same as in the material.

So I somehow need to get the green arial from the material into geometry nodes as a selection/vertex group or something.

Any ideas on this problem?

$\endgroup$

1 Answer 1

2
$\begingroup$

First of all it depends if you use the same vectors for the Noise Texture in the shader and the one in Geometry Nodes. I assume you might have just done the following: added a Noise Texture in the Shader Editor and plugged it in a Color Ramp for the blue and green areas. Then added a Noise Texture in Geometry Nodes with the same values, probably used a Color Ramp to split it in black and white with same/similar values as the blue/green ramp. I used it for distributing points and end up with something like this (I've instanced small icospheres on the points):

wrong texture coordinates

This definitely doesn't look like the points were only distributed on the green areas. If your setup is similar to mine, the first reason for the discrepancy is, the Noise Texture in the shader without anything plugged into Vector uses Generated coordinates by default - in GeoNodes the texture uses Object coordinates. So the first thing to do is, add a Texture Coordinate node in the shader and plug the Object output into the Vector input of the texture:

low resolution geometry

Still not looking correct? Then you maybe have a similar plane like I have in my example - the default plane which is one face with four vertices, one on each corner. The problem is, the textures in GeoNodes have to be attached to some geometry. It is a bit like Vertex Paint, the geometry cannot hold color or other values where there is no vertex (i.e. they get interpolated inbetween). So to get a better distribution, you have to subdivide the mesh:

improved subdivided geometry

Now you start to see that the points are more or less distributed in the green areas. But the high resolution of the plane is of course decreasing the performance. To make sure nothing is distributed in the blue areas you should probably shrink those (in my example white) parts in Geometry Nodes to have some border around the water.

$\endgroup$
1
  • 1
    $\begingroup$ Hi Gordon... You got it all right :) Thank you so much.. It works perfectly :) Really appreciate your help $\endgroup$ Feb 13 at 21:35

You must log in to answer this question.

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