In this lesson, we are going to create a soccer ball using the for-each loop in Houdini. We begin by creating a platonic solid and then adding a subdivide node on it. Then we use a Ray SOP to ensure a round shape, and put on a PolyExtrude which will push out the patches on the soccer ball. In order to not do an overall surface extrude, we use an Attribute Create node to assign numbers to the patches, which we can then extrude in a For Each loop. 



For over thirty five years, SideFX has been providing artists with procedural 3D animation and visual effects tools designed to create the highest-quality cinematic results. We are passionate about what our customers do because our roots are in production, both as artists and as pioneering technical innovators.

More from SideFX


  • jonathd 1 year, 7 months ago  | 

    Would be great to update this tutorial with the latest six Foreach Loops options present in 18.5 so we know which one to pick. So far I couldn’t replicate the primitive patching described in the video and would love to understand why. Many thanks.

  • thomas.vantroyen 1 year, 6 months ago  | 

    For all people having a hard time doing this in 18.5 like me:

    Nodes with differences from the video:
    1) create an Attribute Create with Name = "primnum", Class = Primitive and Value = $PR.
    2) for the loop, create a For-Each Primitive, and, like in the vid, in the foreach_end node, set Piece Attribute to "primnum". The logic here is that foreach primitive loops over all primitives (=faces), but you can partition (group) them into "Pieces" using an attribute (primnum).

Please log in to leave a comment.