1
$\begingroup$

I'm distributing trees on a hilly terrain using geometry nodes. I've got two different node setups that each create an attribute to define the density of the Point Distribute node. Each of the two works well, as expected when fed into the density slot. However I just can't combine the two attributes into one and get the expected result. I've tried all nodes that can mix attributes, I've got all kinds of results, even the invert of the one I need, but not the right one.

One attribute defines that trees should not grow where the slope is steeper than a certain value and the other attribute defines that trees should not grow on and arround the road. My thinking is that taking the minimum of the two with a math node should work - but it doesn't.

So my questions: what am I doing wrong here? What's the right way to combine together more than two attributes to achieve a complex definition of density?

Below my node setup trying to combine two attributes: not working My current node setup: no trees at all Below my node setup with only the one attribute: works well Controlling density based on slope steepness works Below my setup with only the other attribute: works well Controling density based on distance from road

$\endgroup$
4
  • $\begingroup$ can you provide blend file so i can help you quicker... ;) $\endgroup$
    – Chris
    Commented Jul 2, 2021 at 13:47
  • $\begingroup$ I've uploaded the .blend file to WeTransfer: we.tl/t-foTgUthr2C $\endgroup$
    – Booth
    Commented Jul 2, 2021 at 14:02
  • $\begingroup$ your minimum solution works, your "join" was just too early and not necessary. $\endgroup$
    – Chris
    Commented Jul 2, 2021 at 14:15
  • $\begingroup$ I saw that the number of faces was doubled in the Spreadsheet with the internal "join geometry" node, so perhaps the attributes got defaulted to zero in the "other" geometry $\endgroup$
    – Emil
    Commented Jul 2, 2021 at 16:47

1 Answer 1

2
$\begingroup$

you can do this with this node setup: (your thoughts were right and this also works with minimum - just your join node was not necessary)

enter image description here

Result:

enter image description here

My Street is a circle, i hope you forgive me this simplification.

To combine both you just had to multiply both results. That's all.

your "repaired node tree":

enter image description here

result with your blend file:

enter image description here

$\endgroup$
2
  • $\begingroup$ Exactly right, just what I was looking for! I just need to learn this isn't material nodes, mixing works differently here ;) I suppose I'll be able to combine more than two attributes using this same method to get more complex density definitions. $\endgroup$
    – Booth
    Commented Jul 2, 2021 at 14:36
  • $\begingroup$ Yes you will!!! $\endgroup$
    – Chris
    Commented Jul 2, 2021 at 14:44

You must log in to answer this question.

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