Skip to main content
Detail added.
Source Link
Mentalist
  • 19.4k
  • 9
  • 97
  • 172

I tried to assign different random colors to instances based on this answer, but for some reason each triangle of my instancer mesh produces different color for the instances.

Instance Attribute colors vary depending on the face triangle the instances spawn from

It seems like eachEach face triangle of the mesh is producing different results. If using a ColorRamp it's easy to see that the position on the ramp gradient varies greatly from one tri to another. Ideally, the ColorRamp gradient position should fall randomly for each instance, with an equal likelihood of landing anywhere between values 0.0 and 1.0.

Here's another example, with different mesh geometry, different Density Max value, and a standard grayscale ColorRamp (Emission Shader is used in this example, these are not shadows):

Why is this happening, and how can I get the distribution of my random colors to be uniform? Thanks.

I tried to assign different random colors to instances based on this answer, but for some reason each triangle of my instancer mesh produces different color for the instances.

Instance Attribute colors vary depending on the face triangle the instances spawn from

It seems like each face triangle of the mesh is producing different results. If using a ColorRamp it's easy to see that the position on the ramp gradient varies greatly from one tri to another. Ideally, the ColorRamp gradient position should fall randomly for each instance, with an equal likelihood of landing anywhere between values 0.0 and 1.0.

Why is this happening, and how can I get the distribution of my random colors to be uniform? Thanks.

I tried to assign different random colors to instances based on this answer, but for some reason each triangle of my instancer mesh produces different color for the instances.

Instance Attribute colors vary depending on the face triangle the instances spawn from

Each face triangle of the mesh is producing different results. If using a ColorRamp it's easy to see that the position on the ramp gradient varies greatly from one tri to another. Ideally, the ColorRamp gradient position should fall randomly for each instance, with an equal likelihood of landing anywhere between values 0.0 and 1.0.

Here's another example, with different mesh geometry, different Density Max value, and a standard grayscale ColorRamp (Emission Shader is used in this example, these are not shadows):

Why is this happening, and how can I get the distribution of my random colors to be uniform? Thanks.

Source Link
Mentalist
  • 19.4k
  • 9
  • 97
  • 172

GN: Each tri of instancer mesh is randomizing instance colors differently. How to make distribution uniform?

I tried to assign different random colors to instances based on this answer, but for some reason each triangle of my instancer mesh produces different color for the instances.

Instance Attribute colors vary depending on the face triangle the instances spawn from

It seems like each face triangle of the mesh is producing different results. If using a ColorRamp it's easy to see that the position on the ramp gradient varies greatly from one tri to another. Ideally, the ColorRamp gradient position should fall randomly for each instance, with an equal likelihood of landing anywhere between values 0.0 and 1.0.

Why is this happening, and how can I get the distribution of my random colors to be uniform? Thanks.