11

So, I have set up like this (3.1):

enter image description here

I generate some color (random is just for example) and send it to output to use it in the material. But the only way to make this work is to use realize instances node. So I want to know if where is a way to do the same thing without realizing instances (maybe some hacks), because it may be too costly for performance and memory.

You know the bunch of ways to do the same in particles (from instancer setting) and in the object (Object info ⇾ color), but seems to be they are not working...

Crantisz
  • 35,244
  • 2
  • 37
  • 89
  • 2
    I had this exact question like 4 days ago and actually thought "Crantisz is gonna show up and explain how easy this is and I'm gonna feel like a fool".

    I can tell you the render speed is the same, I didn't check memory usage though

    – TheJeran Feb 14 '22 at 15:14
  • 1
    @TheJeran Well, I've checked. It's around 16 times faster to rebuild without realizing instances with simple cubes and spheres – Crantisz Feb 14 '22 at 15:19
  • oofta hadn't considered that. Hopefully, there's an answer. But if you don't know it, I'm thinking it doesn't exist yet. Which is weird cause all those instances have the correct value assigned to them. Dunno why it can't carry over into the shader editor. – TheJeran Feb 14 '22 at 15:27

1 Answers1

10

This is now possible in 3.4 https://developer.blender.org/rB2f7234d3e1b

Store the attribute on instance

enter image description here

And then access it in shader menu using Instancer as the source.

enter image description here

TheJeran
  • 2,601
  • 1
  • 8
  • 24