Can I use a texture instead of vertex group for point density?

Is there some way to specify a (UV mapped) texture input for the density attribute in the point distribution in geometry nodes - rather than using vertex groups?

I want to distribute points on a surface (trees on ground) but my surface only has ten vertices so vertex painting is not working well.
By increasing the vertices to about 3000 I get a resolution enough for vertex painting, but now I have a horribly complicated mesh that I can no longer work with if I want to retain the low poly look.

You can use the attribute sample texture node and sample the texture you created on the textures panel
, then use a point scale node that scales the instances wrt your image texture information.
For example like this

This is the result before applying the texture sample

Thank you very much! This takes me a big step closer to solving this.
Is there also some way to have the texture control the density of objects rather than their scale, like when using vertex painting? I tried switching things around based on your setup, but for some reason it seems like the ‘density’ is ignored in the distribution.

‘Sample Texture’ was of course also a 2.93 feature while I was still sitting on 2.92. Fixed that now.

I’m looking for something similar. But the documentation of the Attribute Sample Texture node contains this note:

UV maps can only be accessed after a Point Distribute node currently. This is a limitation that will be resolved.

i need something similar in blender 3.1.
Trying to use a texture here in Geo Nodes to define where these points show.
BLENDER MASK GEO NODES

oh, and heres my nodes… NOT solved … :frowning:

and heres the texture!

and thanks, if anyone could help! :slight_smile:

You can do it like this

Plane/mesh has to be subdivided for it to work
You can use UVMap like in this setup or use Position as texture vector but it has to be adjusted

1 Like

Hi @higgsas thanks a lot for helping.

It was this uvmap i was missing!
No sudbdiv needed. Its needed when its weight painting. In this case, i’m using this texture.
Worked in the same mesh i had before. Thanks for helping!

here is the plane mesh:
mesh

Nodes:

thanks again!