1
$\begingroup$

If you make instanced copies of a bunch of objects (alt+D), then it is possible to give them different Object Indices from their originals. This is useful if you are using Object Index as a mix factor in the material of the objects. This is especially useful when working with multiple Scenes. However, Instanced Objects don't copy all changes from their originals. If you make a change to a modifier, or Transform the original object, it does not update the Instances. So as you are working, you are stuck constantly re-creating the instances.

You can get around this problem by instead using a Collection Instance of all the objects you need copied. Then any changes are reflected. But then you can no longer change the Object Index of the copies. You can set an Index on the Collection Instance itself, but this doesn't effect the objects within it.

Is it possible to somehow get at the Objects within a Collection Instance and give them their own Object Index that is different from the original object?

$\endgroup$
6
  • $\begingroup$ Have you looked at this answer. Wouldn't the script at the end do what you want? $\endgroup$ – Leander Jul 27 '19 at 15:13
  • $\begingroup$ @Leander If I'm understanding it correctly, that script is for applying modifiers to instances objects. i don't fully understand it, but it somehow updates them. That does not seem to be related to this issue. $\endgroup$ – Ascalon Jul 29 '19 at 0:39
  • $\begingroup$ I read "If you make a change to a modifier, or Transform the original object, it does not update the Instances." and thought, make the change, use the script and the instances are updated. $\endgroup$ – Leander Jul 29 '19 at 6:55
  • $\begingroup$ Oh, yes, that could let me get around this issue entirely. That is true. I may go that method if its not possible to set different Object Indices. $\endgroup$ – Ascalon Jul 29 '19 at 18:03
  • $\begingroup$ @Leander so it's true that modifiers can't be instanced (rather than copied in their current state) between objects? I can't immediately see why not.. it would be very handy, and consistent with the behavior of, say, materials... $\endgroup$ – Robin Betts Jul 30 '19 at 9:06
1
$\begingroup$

Found a workaround. Instead of Index, I'm using the RGB color value from the Object Properties -> Viewport Display of each Collection Instance to drive mix factors in the material of the objects.

From the Object Info node, instead of Object Index, link Color to a SeparateRGB node, and change the Red of the Viewport Color of the instance, same way as you would use Index. Then connect R to Mix node or any other node. Nice thing is you can control each channel separatley, using the Green and Blue value for different things in the same collection instance.

Maybe not as elegant as it should be, but at least for me in the same use case as yours, it does the job.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for posting, so long after your question went unanswered ! $\endgroup$ – Robin Betts Oct 29 '20 at 6:59

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.