2
$\begingroup$

I'm new to blender. I'm wondering using the attached node layout, where I use multiple 'set materials' how I would be able to control the probability of one of these materials appearing. Specifically the material 'sticker.oo1'.

Geometry Nodes

Output

$\endgroup$
0

2 Answers 2

2
$\begingroup$

You can use this node setup...

enter image description here

to get this:

enter image description here

Note1: i changed your sticker color of 001 to pink so that i could see something - in your blend file it was just black

Note2: important that this works: you have to make sure, that your material 001 goes first into the instance node like this:

enter image description here

The node setup is pretty basic: a probabilty will be defined by boolean random value. This controls a switch whether it uses instance 0 (integer node 0) or a random value from 1 to 7 (which are the other instances)

$\endgroup$
1
  • 1
    $\begingroup$ Perfect. Thanks very much for your help I'll remember this! $\endgroup$ Commented Jul 13, 2023 at 9:58
3
$\begingroup$

I figured, it might be convenient to have an interface like so:

Here 🟦 Blue material has the same chance to appear as ⬛ Black. 🟩 Green has twice the base chance, meaning it statistically appears as often as Black and Blue combined. 🟥 Red will fill just a quarter of the area Green fills, and ⬜ White is very rare, 5 times rarer than Red. The probability could be presented as a chart:

🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟥🟥🟥🟥⬜

Of course if those cumulative weights are confusing, feel free to just set the values to percentages, in this case it would be: 🟦$22\%$⬛$22\%$🟩$44\%$🟥$10\%$⬜$2\%$ (some arbitrary rounding was done)

The real result of the above:

Obviously other than provided Seed, it would be nice to allow for some grouping, where you would plug in a Mesh Island: Island Index for example. I'll leave it for anyone interested to edit in, as basically you would just plug it into the ID of the Random node (select the node and press ✲ CtrlH to reveal hidden sockets).

Add Material group:

Randomize Materials group:

$\endgroup$
2
  • 1
    $\begingroup$ Reading the question again, I might have misunderstood the question (or I did understand it but the title is bad), might need to find a better place for this answer :P $\endgroup$ Commented Jul 13, 2023 at 10:22
  • $\begingroup$ Thanks for your input. Looks interesting I'll play around with your settings when I get home. $\endgroup$ Commented Jul 19, 2023 at 14:15

You must log in to answer this question.

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