Monday, October 24, 2022

2D to 3D, using just Blender

One of the useful tricks for board game pieces is figuring out how to create a 3D object from a 2D image. I did an earlier version of this, using a different process. If you have the SVG file of the object, you can skip to Step 4.

 

Step 1 - Get a straight-on shot of the piece you will be making

The best objects are photographed from directly in front of the object, in good light, with enough resolution to trace the object well.

Step 2 - Importing the file

First, hit 7 on your keypad to orient the view to looking "from above". Next, shift-a will add an (i)mage, and use reference or background - choose your image.

It's useful to have the image in the center, and then to angle it so that it appears straight on. Use (g)rab and (r)otate to move the photo around.


Step 3 - Create the outline

Make sure to be in object mode - if you're in edit mode, it adds new meshes to the existing object selected. shift-a to add a plane, then (s)cale it down so that it fits to the object you are tracing. (Tab) will drop you in and out of edit mode. At this point, choose "select mode vertex" so anything you click on with your mouse will only pick up a corner. (d)elete 3 verticees, and then select the last vertex.   


Now, just (e)xtrude from the selected point around the entire object. If something doesn't quite match, you can use (g)rab to move the vertex around. To connect the final vertex to your original, just select both (shift and click to select more than one) and (f)ace to create a line.

For finer detail, add more vertices to the area. If not enough vertices were added in the first pass, select two adjacent vertices, control-e (or choose the edge menu), and subdivide it. More subdivisions, more vertices.

For less detail, choose one or more vertices, (x), then dissolve vertices.

This meeple needs a flat & even surface for its feet. Select the meeple's base vertices.


On the menu bar, there is a Transform Pivot Point, choose "Active Element". (s)cale (y) (0) will scale all 4 points on the y-axis to the "y" position for the last vertex selected.


Step 4 - Make a face and extrude to make an object

Still in edit mode, (a) will select all vertices. (f) will create a face connecting all of the selected vertices. Next, (e)xtrude (1) to extrude the face along the z-axis. (If it doesn't lock to the z-axis as a blue line, then (z) will lock/unlock it.)

Holding the center mouse button, then moving the mouse will change the view (the keypad 7 had locked to the view from above).

Step 5 - Adjust the total size of the object

(Tab) to go back to Object Mode. Click on "Item" from the side tabs.


Adjust the x-axis or y-axis to a known measurement. In this case, the y-axis measurement for the meeple's height is 16mm - adding that to the Dimension Y box skews your meeple along the y-axis. Copy the "scale" for y to the scale for x, to keep your x&y scale the same. Measuring the thickness of the meeple, adjust the Dimension Z box to 10mm.

To clean things up at the end of the process, select Object>Apply>Rotation & Scale to set the "scale" for x/y/z to 1. Sometimes slicer software expects this, and it is a good habit to get into regardless.

Step 6 - Export the object

File>Export>Stl will export the selected object as an .stl file, useful for 3D printing.

Conclusion: 2D is now 3D!

It's straightforward, it's brute-force, but it is also done.

Extra Credit: Using the Mirror Modifier

There are more tricks than what was shown here. The meeple is technically the same on its left and right sides, even though the outline isn't the same. Instead of drawing out the complete outline in Step 3, you can get by with only doing one half, then mirroring it.

 


Disclaimers: Have the "edge" to be mirrored directly on the x- or y-axis. Scale must be "1" and rotation 0 degrees following the process at the end of Step 5. The object's origin should be at 0/0 for the best results.

(Tab) to Object Mode and select the object. Click on the wrench for Modifier properties, and scroll down to Mirror under Generate. The default mirror is the x-axis, which gives the proper mirror for this meeple's other half. Check the "Clipping" box, so that the two halves merge at the mirroring line. Resume the design process back at Step 4.