0
$\begingroup$

I'm trying to use geometry nodes to make an ID map I can bake. I'll be baking in external software so ideally this would be vertex colour that can be exported in an FBX file. Applying colour based on UVs would be fine too, but I think vertex colour would be more straightforward.

How can I apply a different random value to the vertices of each loose part within an object? I cannot seem to find any Geometry node that allows me to affect loose parts of an object individually. I have also been unable to export vertex colours generated using geometry nodes.

$\endgroup$

1 Answer 1

4
$\begingroup$

there is a node for this called the mesh island node.

it tells you how many island there are and thier index, so if you want you could export a 0 to 1 range (if you need that is something situations) by dividing the index by the count, and storing as a float (or color if that is preferable).

If you want a random color then you could use the White Noise Texture node and the index as the vector (if you want to be a stickler for precision 😁 you should set the White Noise Texture to 1D and the island index as the W), you could store this as a vertex color [color attribute].

$\endgroup$
4
  • 1
    $\begingroup$ But how are those colors stored as vertex colors to be exported? $\endgroup$ Sep 19, 2023 at 8:00
  • 1
    $\begingroup$ @GordonBrinkmann with a store named attribute node or the group output. $\endgroup$
    – shmuel
    Sep 19, 2023 at 11:09
  • 1
    $\begingroup$ Is the Named Atrribute exported to FBX? $\endgroup$ Sep 19, 2023 at 11:31
  • 1
    $\begingroup$ @GordonBrinkmann they should be. you could check the geometry data to see if it's there after applying the modifier. $\endgroup$
    – shmuel
    Sep 19, 2023 at 15:33

You must log in to answer this question.

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