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.
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)
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