Curves Random per Island unexpectedly changes with resolution

Hello together!

When working with Curves i’ve noticed a (to me) strange behaviour. I’m using the Random Per Island Node from the Geometry Node in a Cycles Shader in combination with a colorramp to color curves. When i was turning up the resolution of the curve i’ve noticed the value of the random per island output changes too and with that the colors that the curves receive also change. It kind of “limits” the ability to just scale up a rendering and expect the same result as it can modify the overall composition. To me it goes against a core principle of design, as it does not yield an expectable outcome (it does, in some way).

Here are some example images:

I always tought that Random Per Island is some sort of “ID” that is assigned upon creation of the UV-Island/Curve and only changes when merged. So i thought "okay, changing the resolution is an “Edit-Operation”, but when editing a curve, just extruding it the output remains the same, so i’m still left wondering, why it changes when the resolution gets modified, but not when adding to a curve by extruding it.

Could this be changed and why does it behave this way? Or did I miss to check some box?

Unfortunately, this is an expected behavior. The value of each island is a random value that depends on the index of the first vertex in the island. When the island size change—perhaps by increasing its resolution—, the index of the first vertex in subsequent islands change and the island values change.

Ideally, we should change that output to be Island ID, where the first island is assigned the value of 0, the second is assigned the value of 1, and so on. This should fix the issue you mentioned and it will even be more useful. Such change would break backward compatibility, however. So maybe we will implement that in the next major version if we have general consensus.

1 Like

Ah, thank you for clearing that up! Its good to know, so i’ll be keeping that in mind moving forward. If it was a mesh thats finished i’d just create a seperate UV Map and bake the Random Island value as an image, but since these are curves that are subject to change thats not possible.
My workaround for now is to use the “Viewport Color” as a substitute, i just duplicated and seperated my curves, assigned the value as Object Color with the color-picker tool and modified the shader to use the Object Color instead of the Random Island value. That way i don’t need 20 seperate shader. In the future i’ll just work with an already high enough resolution from the beginning. :slight_smile:

Thank you for clearing it up again!