Point Cache Information - How to use Vertex color (bake) correct?

Hi there,

I’m working currently with VFX Graph to place grass on a mesh, like in the demo that was provided by Unity. Problem now is, that i want to read how Unity saves this bake and what information it contains so i can use it in VFX graph.
I want to place grass only on one of the colors (example Red) so i thought i can bake with the tool the vertex color and use red as a mask, but apparently thats not how you should use this information.

I noticed this with baking “normals” with the tool, i had to make a weird calc so the grass would align correctly with the mesh.

Is there any documentation on how i use all the baked data, because i tried to look and unitys documentation only just says “you can bake this” but not how to use it.

Thank you

Hi!

I’m not sure which part could be missing, maybe you can post a picture of your graph?

Here you can find all the documentation regarding point caches:
https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@17.0/manual/point-cache-in-vfx-graph.html

In my opinion, the documentation part of unity could use some work. Very bare bones not much information or basic explanation, which are mostly self explanatory.

Anyway here i made a simple example, where i spawn spheres on red. No matter what i change in those node settings it gets weird (spawning on all colors) or stays on just red.
I can’t split the attribute color and still use it in the attribute slot, or can I?

Edit: I thought changing channel from X to Y or Z would help since color is RGB/XYZ, but no. (Set Scale)
Y spawns it evreywhere
Z spawns it everywhere
XY/XZ nothing (scale 0 all)
YZ for some reason only in the middle (scale 1)
XYZ is the same as X (vertcolor red scale 1)

1 Like

I found a solution, which probably isn’t the smartest way to do it, but it works.

You set the color of the placed particles with the color map
then set scale of all particles to 0
get the attribute color from set color (scale)
and finally put only the desired color where you want to place stuff (X/Y/Z) into the next set scale
voila

Hope other people find better solutions, but if you don’t hope this helps.

Have fun, bye

Edit: Link to the OG Hero