0
$\begingroup$

Hopefully, I can explain this well.

I'm using geometry nodes (not sure that matters) to generate some objects that have two different textures assigned to parts of the geometry. There is a 'main' color texture and a 'detail' color texture.

Both textures are set up the same general way:

cubes with color combinations

Object ID Node--->"random"--->links to ColorRamp set to "Constant" and a set of colors is selected in the ColorRamp node.

The "Main" texture has some colors like blue, green, yellow, red. The "Detail" texture has some colors like white, purple, orange, gray.

The idea is that whenever I create a duplicate of the object, a new random color set gets chosen.

The problem I face is that the colors always "match" a particular set. e.g. when the random color for the "Main" texture is blue, the "detail" texture ALWAYS picks white. When green, it ALWAYS picks purple. And so on.

So it's not truly random, it will not generate for example a red object with a purple detail. Red always gets gray, every time.

It seems as though if it's picking e.g. "Slot 0" for the 'Random' on the main texture it also always chooses 'Slot 0' on the detail texture for the same object.

Is there some way around this so that each color choice is randomized independently of the other, and creates truly random combinations?

$\endgroup$
3
  • $\begingroup$ please provide blend file and/or screenshots of your node setup. This is much easier to understand than 1000 words. $\endgroup$
    – Chris
    Jan 4, 2022 at 22:38
  • $\begingroup$ "The problem I face is that the colors always "match" a particular set. e.g. when the random color for the "Main" texture is blue, the "detail" texture ALWAYS picks white." That's how the random works, it generates one random value per object, if the object is the same then the random value is always the same. See blender.stackexchange.com/questions/145641/… $\endgroup$ Jan 5, 2022 at 21:22
  • $\begingroup$ Be interesting to go back and take another look at this, as I remember RNG changes being mentioned in some talk recently. $\endgroup$ Dec 24, 2022 at 23:02

1 Answer 1

1
$\begingroup$

The Object Info node's Random slot is a fixed random number based on the object's name. This is the reason why you always get the same color combinations. It doesn't matter for how many materials or other nodes you use the value. It's always the same number for the given object.

You need two random numbers for the two random colors.

The White Noise Texture node can create another random number for you. Set it to 1D and feed it with the random number of the Object Info. The result is another random number based on the input W. Same input results in the same pseudo-random output.

The following is the Detail material with the changes. The Main material does not need to be changed. new detail nodes

If you need another random color material then just add a unique number ("material id") to the Object Info->Random value with a Math node and it will get its own random numbers.

$\endgroup$

You must log in to answer this question.

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