Given a number of dupligroups, is there a way to get a unique random value for each one in a cycles shader?

Using the object info node won't work, as each instance consists of multiple objects. I'd like the value to be the same for all objects in the group (in this example, the pedestals ought to be the same as the corresponding Suzanne).

enter image description here

Here's a demo file:

If possible, I'd like to do this without joining objects or de-instantiating the dupligroups.

  • $\begingroup$ I have run into this issue before, never found a solution. Was wondering again today if a solution exists. Sounds like a good feature request. $\endgroup$ – Duarte Farrajota Ramos Feb 27 '18 at 0:39

Using Particles as host for DupliGroup

Thus we can use cool feature of mesh-emitter called From Dupli. This means duplis will inherit location of corresponding space on UV map.

  • Create emitter mesh and unwrap all faces of emitter as separate islands (avoid overlapping in order to have unique values)
  • Add PS system, so amount of particles is equal to face count (disable emit random, even distribution and set particle/face ratio to 1)
  • Choose Whole group as source for duplicating

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.