1

When I share data between shader and geometry nodes through attributes (more concretely, I was sharing color of the object), it works perfectly, as seen on picture:

It just works

However, when I don't use the original geometry (eg. use Cube node), it stops working:

enter image description here

Why does it not work and how can I fix it? Thanks!

FireFragment
  • 147
  • 5

1 Answers1

1

Just to be able to mark the question as solved, here is a short answer to this from the comments:

To transfer a color attribute from Geometry Nodes to the Shader, a corresponding attribute must be created.

This can either be passed directly to the Group Output (as seen in your screenshot), or an attribute can be explicitly created with the node Store Named Attribute.

Here you have two options.

Either you create the attribute and read it in the shader with the node Attribute:

enter image description here

Or you create a Color Attribute beforehand, store your color there, and read this attribute with the node Color Attribute:

enter image description here

In addition, a material must be assigned to the created geometry with Set Material!

quellenform
  • 35,177
  • 10
  • 50
  • 133