6
$\begingroup$

I'm using the RGBA channels of the vertex colors on geometry for various effects but I can't find a way to separate out the alpha channel in geometry nodes. Is there a way to access the Alpha channel of a vertex color attribute in a Geometry node?

I Want to separate out V4

$\endgroup$
2
  • $\begingroup$ Sounds like you will need to use an attribute created in the shading editor to be used by the Geometry Nodes editor. $\endgroup$ Jan 31 at 11:13
  • $\begingroup$ +1 good question $\endgroup$
    – Chris
    Jan 31 at 11:15

1 Answer 1

3
$\begingroup$

Blender 3.3+

Things sometimes change for the better, and now also in this case:

Starting with Blender version 3.3, using the alpha channel is possible via the node Separate Color. This is the successor of the node Separate RGB.

This node now splits all channels, and you can additionally choose the mode of color processing:

enter image description here

...and of course this is also possible in the other direction, because the node Combine RGB has also been replaced by the node Combine Color.

Old Answer (Blender below version 3.3)

Unfortunately, the answer is definitely: No, this is currently not possible.

A look at the source code reveals that, although an RGBA color value could in principle be processed due to the variable type, the alpha value is simply not used:

static void sh_node_seprgb_declare(NodeDeclarationBuilder &b)
{
  b.is_function_node();
  b.add_input<decl::Color>(N_("Image")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
  b.add_output<decl::Float>(N_("R"));
  b.add_output<decl::Float>(N_("G"));
  b.add_output<decl::Float>(N_("B"));
}

Source

In contrast, in another part of the code (compositing), which allows the separation of a color into RGBA, the alpha value is very well processed:

static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b)
{
  b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
  b.add_output<decl::Float>(N_("R"));
  b.add_output<decl::Float>(N_("G"));
  b.add_output<decl::Float>(N_("B"));
  b.add_output<decl::Float>(N_("A"));
}

Source

From this we can conclude:

A modification of the source code seems possible and feasible, but currently this function is not implemented yet.

$\endgroup$

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.