🍩

Blender Donut Tutorial: Adding Sprinkles with Geometry Nodes

Jul 23, 2024

Blender Donut Tutorial: Adding Sprinkles with Geometry Nodes

Introduction

  • Geometry Nodes is accessed via the tab on the top of the screen.
  • Adjusts the screen layout; close unnecessary parts like the spreadsheet view.

Creating and Applying Geometry Nodes

  • Select icing and click the 'New' button to add a Geometry Nodes modifier.
  • Geometry Nodes allows for flexible modifications post-object creation.
  • Node-based system similar to material nodes but serves different functions.

How Geometry Nodes Work

  • Geometry nodes process input mesh and output the modified mesh.
  • Example: Using a set position node to demonstrate how geometry nodes can raise parts without directly altering the mesh.
  • Modifications via geometry nodes are highly flexible and can be made to parameters visible in the modifier stack.

Adding Sprinkles

  1. Scattering Points on Icing:

    • Use Shift + A > Point distribute points on faces to scatter points.
    • Initially, the mesh will disappear because only points are being rendered.
    • Use Shift + A > Geometry > Join Geometry to add back the original mesh while keeping the points.
  2. Creating a Sprinkle Object:

    • Add a low poly sphere (Shift + A > Mesh > UV Sphere) to serve as sprinkles.
    • Adjust segments and rings to lower values to maintain performance.
    • Scale the sphere down (0.1 in this case).
  3. Using Points for Sprinkles:

    • Drag the sphere from outliner to Geometry Nodes editor.
    • Use Shift + A > Instances > Instances on points to replace scattered points with the sphere.
    • Adjust density appropriately.
  4. Avoid Overlapping Sprinkles:

    • Change distribution to Poisson Disc in Point distribute node.
    • Adjust distance min to avoid overlap but maintain a natural look.

Weight Painting for Controlled Sprinkle Placement

  • Set up weight painting for the icing object.
  • Paint the desired sprinkle density in the weight paint mode.
  • Name the vertex group created by weight painting (e.g., 'sprinkle_density').
  • Reference this vertex group in the Geometry Nodes as a named attribute to control sprinkle distribution.

Adjusting Sprinkle Positions and Density

  • Utilize control and paint to refine sprinkle placement manually for realistic effects.
  • Pin Geometry Nodes window to maintain visibility.
  • Expose density parameter to the modifier stack for easy editing.

Rescaling the Donut

  • Realistically scale donut size (suggested 1:10 scale for a 12cm donut).
  • Apply scale transformations globally to avoid inconsistencies.

Applying Scale and Adjusting Density Accordingly

  • Correct the overall density and minimum distance for scattered sprinkles post-scaling.
  • Consider adding a math node to help maintain a manageable interface by multiplying values within Geometry Nodes.

Conclusion

  • This tutorial has set up sprinkles with correct scaling and density.
  • Next steps include adding different types of sprinkles and adjusting rotations and colors.

Additional Tips

  • Shift + A for adding nodes and objects.
  • Use Numpad period or tilde key for quick object focusing.
  • Employ weight painting creatively to simulate real-world randomness and imperfections.