# Can‘t use Weight Painting to control the density

I want to put some sesame on bun,some places have much sesame, some places have few, so I goes to weight paint and want to use weight to control the density factor in GN.
But no matter what weight it is ,it shows the same density, and when I want to delete some sesame,it still stay there. So what can I do?

• Does this answer your question? Geometry Nodes: How to iterate a Vertex Color gradient across geometries? Commented Mar 5, 2022 at 14:39
• not the same question, but same answer Commented Mar 5, 2022 at 14:39
• It's not the same problem.There must be a place that store the weight paint number which is 0~1,that's works to the factor, but in my way, it don't work.Maybe I don't get the number, I don't know how. Commented Mar 5, 2022 at 15:00
• Yes, you can fix your problem by using a float input instead of boolean (pink) input Commented Mar 5, 2022 at 15:53
• Thanks,I got it! Commented Mar 5, 2022 at 16:05

you can use this node setup:

The problem is your density. Weight paint is just between 0 and 1 and that's why you don't see your difference. So you have to multiply that value.

• I use poisson Disk and what I link is the density factor not density, so it should be 0~1, but I finally found out why.Because at a very first try, I link the input to selection, although I change it immediately and never use the link again, the input style keeps the same: "selection", that means no matter what weight is , the input is a boolean. Thanks for your case, it gives me a comparison to help me find out the mistake. Commented Mar 5, 2022 at 16:04
• Indeed, in the group input node the type must be changed from boolean to color - this was the solution for me as well. Perhaps it would be helpful for others to mention this in the answer? Commented Jan 31, 2023 at 5:45

So you want the sesame to be spread on top of the bun randomly. And then add in your weight paint?

I did it the following way: Group input here I have one more going to a Math Multiply node going into Density Max of the Distribute Points on Faces node. I also have a Rotate Euler in it for the rotation. Best way to do it the way you want is to watch Blender Guru Donut 3.0 part 9 he explains it well

• I want to use something to control the density wherever I want. Commented Mar 5, 2022 at 14:57
• Ahh thats why it looked so weird to answer thanks Commented Mar 5, 2022 at 15:14
• I have watch his video，but I think he has the same problem and just neglect that.He just paint where the sugar is, but can't control the density by weight paint number, I mean different place has different density. Commented Mar 5, 2022 at 15:14