Here is the Cycles implementation: https://github.com/sobotka/blender/blob ... h.cpp#L662Dade wrote: ↑Tue Mar 17, 2020 10:36 am I can write shape that can assign vertex colors based on this "island" concept. It is something to do as pre-processing because, indeed, I can not establish what is an "island" at run-time (during the rendering).
I could introduce this "island" concept in general: does Blender has this mesh information ? Can it be exported ?
They also compute it as a pre-processing step.
I'm not sure cramming more and more features into vertex colors is a good idea. From a user point of view, it leads to weird situations: "why are my vertex colors no longer working when I use the random per island node somewhere else in my shader setup?"
However I'm aware that on the other hand, adding more attributes to mesh vertices and/or the HitPoint struct has drawbacks as well.