26
$\begingroup$

I'm excitedly playing with the new Geometry Nodes system, but I've run into a limitation. I would like to control the color of object instances created with the Point Instance node, but I can't seem to find a way to do this. Is it at all possible?

I've created the image below using a workaround of deciding the color in the shader graph depending on the object position, but this is very hard to make position-independent and does not give me the same control I would have in the Geometry Nodes graph. A bowl full of differently colored balls arranged in a spiral pattern The Geometry Nodes setup of the scene The shader node setup of the scene

$\endgroup$
6
  • 1
    $\begingroup$ It's a good question. I've tried setting an attribute with AttributeFill - and using an Attribute input node in the shader - but it doesn't work. The docs for the AttributeColorramp geometry node says " The resulting colors are stored on the geometry in a color attribute." - but it's doesn't work as either Attribute or as the color output of the "Object Info" node in the shader ... $\endgroup$
    – gromgull
    Mar 3, 2021 at 16:16
  • $\begingroup$ Use vertex colors. See youtube video for guidance and sample. Min. requirement: blender 2.93 beta $\endgroup$
    – eWilli
    May 3, 2021 at 11:55
  • $\begingroup$ Awesome colour scheme! $\endgroup$ Jun 14, 2021 at 21:44
  • $\begingroup$ Hi, were you able to solve your question? i am very interested to find a straight forward answer :) $\endgroup$
    – Ziggy
    Sep 2, 2021 at 12:43
  • $\begingroup$ it works with 3.0 and cycles as Lumpiluk writes $\endgroup$
    – gromgull
    Sep 3, 2021 at 13:03

2 Answers 2

15
$\begingroup$

The solution has been added to Blender 3.0.0 Alpha recently and is called the Attribute Transfer node. There's a good YouTube tutorial by Entagma on it.

  1. Set the render engine to Cycles.

  2. Add an Attribute Transfer node before your Geometry Nodes Group Output. Route the output of a node from before your Point Instance or similar node to the Source Geometry socket. Select the source attribute to transfer to the resulting mesh and give it a target name. Depending on the data type of your attribute, you may have to play around with the 2 dropdown menus as well.

    Screenshot of the described Geometry nodes setup

  3. In the shader of the source object you used for instancing, use an Attribute node with Type "Geometry" and the name of your transferred attribute.

    Screenshot of the described shader

$\endgroup$
1
  • $\begingroup$ How would one do that on blender 4.0.1 ? $\endgroup$ Feb 15 at 16:58
11
$\begingroup$

I'm not sure to answer your question but I was struggling with setting colors to object instances and I finally managed to apply a texture input by simply using Object>location as Vector input for texture.

I would like to find how to use "emitter" color for instances color input... enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ this looks like the answer op was looking for $\endgroup$
    – Lowlande52
    Oct 26, 2021 at 4:37
  • $\begingroup$ If you want to assign a random colour to each instance, you can use a colour ramp with the "Random" output of the "Object Info" node there. $\endgroup$ Dec 30, 2021 at 0:16
  • $\begingroup$ This is exactly what I'm trying to do, but it's not working, so I'm guessing something is wrong with my geometry node setup. Any idea how to get this working in 3.3? $\endgroup$ Sep 30, 2022 at 2:12
  • $\begingroup$ Jk. Figured it out. My object wasn't at world origin. $\endgroup$ Sep 30, 2022 at 2:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .