1
$\begingroup$

Thought this would be easy but have been struggling so much with this.

I have created vertex groups (indicated with red color) on a big terrain plane and now I'm trying to distribute objects only inside those areas. I tried adding the vertex group in the Density Attribute but it seems that it's using the weight of the group and it does not have a hard edge so the objects are leaking outside of the area.

Any ideas how to achieve this easily?

enter image description here

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

OK It's the final edit. I promise

This method works in blender 2.93 Alpha(I don't know about version 2.92)

All you have to do is set the density attribute to material_index and voila your work is done, no weight paint required, it assigns density on the basis of material used.

Screenshot: enter image description here

enter image description here

$\endgroup$
9
  • $\begingroup$ It looks like yours has a higher level of subdivision. Vertex weights are interpolated along faces, you can see OP's plane is yellow-green all the way to the edge. $\endgroup$ Mar 29, 2021 at 16:20
  • $\begingroup$ That's why I asked for the blend file $\endgroup$ Mar 29, 2021 at 16:24
  • $\begingroup$ Right now it;s just guess work $\endgroup$ Mar 29, 2021 at 16:24
  • $\begingroup$ Yes I think so too. I would really like to keep the geometry really simple as in the actual project I don't want to add extra geometry just to achieve this :( Here is the blend file pasteall.org/blend/d21aed04db79463d992d9504ba0fd93c $\endgroup$
    – lauriinc
    Mar 29, 2021 at 16:25
  • $\begingroup$ I edited my answer. Read it. Hope it helps $\endgroup$ Mar 29, 2021 at 16:48

You must log in to answer this question.

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