I have made a donut in Blender with icing and spinkles on top. I would like to be able to have some of the color from the sprinkles bleed into the icing. I cannot find anything to help me achieve this. Every search result was how to get rid of color bleeding... the complete opposite of what I want!
-
$\begingroup$ Look into dynamic paint...docs.blender.org/manual/en/dev/physics/dynamic_paint/… $\endgroup$– Jake DubeCommented Apr 25, 2018 at 22:00
-
$\begingroup$ blender.stackexchange.com/questions/66449/… $\endgroup$– icYou520Commented Apr 25, 2018 at 22:00
-
$\begingroup$ Which render engine are you using? Can you post a picture of what you currently have? $\endgroup$– Scott MilnerCommented Apr 25, 2018 at 22:00
-
2$\begingroup$ Im assuming he is using cycles, since thats what the Blender Guru donut tutorial is. $\endgroup$– icYou520Commented Apr 25, 2018 at 22:00
-
$\begingroup$ You could also try texture paint docs.blender.org/manual/en/dev/sculpt_paint/painting/… $\endgroup$– icYou520Commented Apr 25, 2018 at 22:02
1 Answer
Data Transfer a vertex color
A procedural approch would be to use vertex colors. Paint the icing black, duplicate the sprinkles and join them and paint them white. Duplicate the icing and join it with the joined sprinkles. In edit mode of this merged geometry, shrink the icing ⎇ AltS. Then (to the actual icing) add a subdivision modifier, add a Data Transfer modifier and finally another subdivision modifier using cycles experimental adaptive subdivision. Transfer the vertex colors from the icing_sprinkles_helper object to the icing. Use the vertex colors in the material to apply it to the color.
This procedural approach is complex, computing intense (many polygons) and produces mediocre results, so let's go with the destructive easy method.
Bake bleed to a texture
Temporarily change the lighting:
Unwrap the icing and create a new image. Add this image as an image texture node in the icing's material and select it (it should be active). We are going to bake on it.
- Bake the direct diffuse component of the icing.
We will now have an emissive map, this is not accurately bleeding, due to the random rotation of the sprinkles.Duh, whatever.
- Connect this texture to the fac of a color mix node, mixing icing color with sprinkle_bleed color.
You can also bake multicolored sprinkles, just separate the Value (used for the factor) and the Hue and Saturation (used for the color).
Examples are highly exaggerated. Use a more moderate falloff with the RGBCurves node.