How to read color attribute with geometry node?

How you can read the color attributes with the geometry node?

image

I wonder if its possible to do the same as with the geometry nodes as what I have done with the material editor because it would be much more convenient to make a custom modifier out of this.

I would like to to read the color attributes: “Col” and “AO”. Seperate the RGB channels. Recombine as seen below and store them as a new vertex color attribute.

It should be under Geometry > Read > Named Attribute. Just enter the correct name and choose correct attribute type.
Separate/Combine Vector function the same in GN.
Store Named Attribute to write it.

4 Likes

Thanks, Is is possible to preview the new attribute without applying the modifier?

For me the combined version appears in the list only after the modifier has been applied

But yea the thing works like you posted. Just need to apply the modifier to see the new combined attribute.

It won’t appear in the Color Attributes list until applied, but you can still preview and use it.

For quick preview, you can use Viewer Node (Ctrl + Shift + Click on geometry and attribute… not sure if it works by default or with built-in Node Wrangler addon). Note, that for this attributes don’t even need to be stored, any attribute can be seen this way.

image

OR, after storing attribute, you can use it in Input > Attribute Node in shader nodes. Just enter the name of the attribute manually.

1 Like