Grasshopper · ShapeMap · Tutorial

Create 3D Textures with ShapeMap

A workflow guide for Rhino 9 (Grasshopper and ShapeMap)

30 minRhino 9 for Windows / MacIntermediate
Create 3D Textures with ShapeMap

This tutorial shows how to create 3D textures quickly in Rhino 9 using the ShapeMap components in Grasshopper. You will flatten an existing 3D model, draw a pattern of curves on the flat shape, map those curves back onto the model, and turn them into 3D texture geometry.

What you'll learn

Before you start

If this is your first time using Grasshopper, set up the interface so it matches this tutorial. In the Grasshopper menu bar, turn on Display > Draw Icons and View > Obscure Components.

The model units are millimeters. All distances in this guide are in millimeters.

Loading and unrolling the geometry

  1. Download and open the model ShapeMap_3DTexture.
  2. Run the Grasshopper command.
  3. Drag the SubD parameter from Params > Geometry onto the canvas. Right-click it, choose Set one SubD, and select the upper SubD object in Rhino.
  4. Drag the ShapeSolver component from the Transform tab onto the canvas. Connect the output of the SubD parameter to the S input of ShapeSolver .
  5. Right-click the L0 input of ShapeSolver , choose Set one Line, and pick two points near the SubD object to define the L0 line.
  6. Right-click the L1 input, choose Set one Line, and pick two points in the Rhino viewport to define the L1 line. This line positions the flattened object.
Loading the SubD object and flattening it with ShapeSolver.

Designing the 2D pattern

  1. Continue with your file or download and open the Grasshopper definition ShapeMap_T-01, with ShapeMap_3DTexture.3dm open in Rhino.
  2. Double-click the canvas, type Boundary in the search box, and place the Boundary Surfaces component.
  3. Connect the B output of ShapeSolver to the E input of Boundary Surfaces to create a flat surface.
  4. Search for point the same way and place a Point parameter. Right-click it, choose Set many Points, and pick two points at the lower-left corner of the flattened object.
  5. Search for polyline and place a PolyLine component. Connect the Point parameter to its V input to create a straight line.
  6. Repeat the previous two steps with a new Point parameter and PolyLine component, this time picking three points at the upper-right corner of the flattened object.
  7. Place a Tween Curve component. Connect the two PolyLine outputs to its A and B inputs.
  8. Place a Range component. Double-click the canvas, type //66 and press to create a Panel containing 66.
  9. Connect the Panel to the N input of Range , and connect the R output of Range to the F input of Tween Curve .
  10. Place a Project Curve component. Connect the T output of Tween Curve to its C input, and the S output of Boundary Surfaces to its B input.
  11. Drag a selection box around the components you no longer need to preview. Press the middle mouse button to open the radial menu and choose Disable Preview.
Drawing the first set of pattern curves on the flattened shape.

Refining the pattern and mapping it to the 3D object

  1. Continue with your file or download and open the Grasshopper definition ShapeMap_T-02, with ShapeMap_3DTexture.3dm open in Rhino.
  2. Place a Move component and connect the C output of Project Curve to its G input.
  3. Place a Unit Z component and connect its V output to the T input of Move .
  4. Double-click the canvas, type //0.5 and press . Connect the new Panel to the F input of Unit Z . This moves the pattern curves 0.5 mm in the Z direction.
  5. Place a Rotate component and a Point parameter. Connect the Point parameter to the P input of Rotate .
  6. Right-click the Point parameter, choose Set one Point, and pick a point roughly at the center of the flattened shape.
  7. Double-click the canvas, type 1.55 and press to create a Number Slider with a value of 1.55. Connect it to the A input of Rotate .
  8. Connect the T output of Tween Curve to the G input of Rotate .
  9. Place a second Project Curve component. Connect the G output of Rotate to its C input, and the S output of Boundary Surfaces to its B input.
  10. Place a second Move component and connect the C output of the new Project Curve to its G input.
  11. Place a Negative component. Connect the V output of Unit Z to its X input, and connect its Y output to the T input of the second Move . This completes the second layer of the pattern.
  12. Place the MapToShape component from the ShapeMap panel. Connect the MD output of ShapeSolver to its MD input.
  13. Connect the G outputs of both Move components to the G input of MapToShape . Hold while you make the second connection.
  14. Right-click the G input of MapToShape and choose Flatten. Both sets of curves are now mapped onto the 3D object.
  15. Select the components you no longer need to preview. Press the middle mouse button to open the radial menu and choose Disable Preview.
Adding a rotated second layer and mapping both layers to the 3D object.
Tip
Drag the Number Slider to change the rotation of the second pattern, and watch the curves on the 3D object update in Rhino. To control the number of curves the same way, replace the Panel connected to Range with a Number Slider .

Creating the 3D texture

  1. Continue with your file or download and open the Grasshopper definition ShapeMap_T-03, with ShapeMap_3DTexture.3dm open in Rhino.
  2. Place a Brep Edges component and connect the SubD parameter to its B input.
  3. Place a Join Curves component and connect the En output of Brep Edges to its C input. Right-click Brep Edges and clear Preview.
  4. Place an Entwine component. Connect the C output of Join Curves to its {0;0} input, and the G output of MapToShape to its {0;1} input.
  5. Create a Panel containing 1.5 and 0.75 on separate lines. Right-click the Panel and turn on Multiline Data.
  6. Create a second Panel containing 0.1.
  7. Place a MultiPipe component. Connect the R output of Entwine to its Curves input, the first Panel to its NodeSize input, and the second Panel to its KinkAngle input.
  8. Right-click the NodeSize input and choose Graft.
  9. The 3D pipes appear in the Rhino viewport and update in real time.
Turning the border and pattern curves into pipes with MultiPipe.

Baking the result to Rhino

  1. Continue with your file or download and open the Grasshopper definition ShapeMap_T, with ShapeMap_3DTexture.3dm open in Rhino.
  2. In Rhino, run the Hide command and select the upper SubD object.
  3. Right-click the P output of MultiPipe , choose Bake, and click OK to bake the pipes into Rhino.
  4. Close the Grasshopper window. The finished 3D pipe texture is now in Rhino.
Baking the pipes to Rhino.

Using ShapeMap directly in Rhino

Rhino 9 has no ShapeMap command yet, but you can run ShapeMap through the GrasshopperPlayer command. The process is close to the one in Grasshopper.

  1. Download the Grasshopper definition GHP_ShapeMap_T.
  2. Run the GrasshopperPlayer command and select GHP_ShapeMap_T.gh.
  3. Follow the prompts to select the 3D object to flatten.
  4. Draw a reference line near the 3D object, then pick two points on the XY construction plane to place the flattened object.
  5. Run the Polyline and Line commands to draw two lines.
  6. Run the TweenCurves command to create the first set of pattern curves.
  7. Run the Move command to move these curves up 0.5 mm, then run the Mirror command to mirror them to the opposite side of the XY construction plane.
  8. Run the Rotate command, select the mirrored curves, and rotate them by about 30°.
  9. Window-select both sets of curves. Both sets are now mapped onto the original 3D object.
  10. Select the texture curves and run the MultiPipe command to create pipes with a radius of 0.75 mm.
  11. Run the DupBorder command to extract the outer edge curves of the upper 3D object, then run the MultiPipe command on them with a radius of 1.5 mm.
  12. Run the Hide command on the upper SubD object and switch to the Rendered display mode .
Running ShapeMap from Rhino with GrasshopperPlayer.

Downloads

Finished!
Congratulations for completing this tutorial! Feel free to continue using these tools to detail your design or create a new one from scratch. If you have any questions ask us on Discourse or drop an e-mail to our support team: support@mcneel.com.