Showing posts with label Blender. Show all posts
Showing posts with label Blender. Show all posts

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.

      

Thursday, May 14, 2020

Easter Traditions: the Dinobunny (and Sculpting 101)

My girlfriend likes dinosaurs. We have a wacky, inflatable dinosaur that's about two-and-a-half feet nose-to-tail, that got paper-crafted bunny ears at some point. I'll also state this post will feel very dated, as my sculpting abilities progress.

The Great Dinobunny. Every year, he'd hide plastic eggs around the apartment, containing a variety of objects. Some years it was candy, sometimes little dinosaurs or other toys. This year, I printed some eggs (we moved 4 months ago, not sure where things are), and the avatar of the Great Dinobunny.
Avatar of the Great Dinobunny

The project started with the 13 eggs from this design on Thingiverse.  They're a lovely design, printed well 95% of the time, a little longer/thinner than previous eggs - fine for the purposes.

Next, was the 3D Bunny Puzzle by Sakati, also on Thingiverse. As it's a No Derivatives license, I'm not posting the Dinobunny .stl back out there. The 12-piece puzzle is based on the Stanford Bunny, basically a project in 1994 where they tried to 3D model a bunny as accurately as possible for a computer to display. You can read more about it on Wikipedia in this article. I ended up making the dinobunny 13 pieces — I wanted the ear puzzle-piece to be printed white, with the rest of the dinobunny being green.

I printed the puzzle at 50% size, and it was nice. The tolerances were good; not too big, not too little. But for a dinobunny, I needed to do something more. Imported the puzzle into Blender - all of the pieces were imported into their proper space...no dragging needed!

Version 1: Crossbreed
Fixed up the head and the tail - tail was still rough
I haven't done a lot of sculpting in Blender 2.8. Blender 2.79 and lower, I did sculpt several times, but it was never quite natural for me. Blender 2.8, I used most of the same tools, but it just felt better.

Sculpting Tip #1: Turn on Dynamic Topology, aka Dynotopo

When you're in Sculpt mode, it's in the lower right panel, there's a checkbox labeled "Dyntopo". Click that, and your sculpting will look a lot smoother - at a cost of more polygons being created. Also, I've noticed that Dynotopo becomes unchecked when you leave Sculpting mode, at least in my version of 2.8.
Dynotopology off (turn on!) and Symmetry as Mirror is all unselected
Yeah, when you turn on Dynotopo, this is a junk message. Click "OK" and move on


Sculpting Tip #2: Deselect Mirror under Symmetry

It's in the same panel as Dynotopo - immediately below. It's not so much on/off, as select everything off. In the case of the dinobunny, there wasn't anything to mirror - and leaving Mirror X on (the default) made me question my sanity/sculpting.

Sculpting Tip #3: Be aware of what you're sculpting


I definitely did NOT want to affect the puzzle portion. It meant extra care when I was using sculpting tool near the existing puzzle cut outs and tabs.

The new Dinobunny neck

Stretching the neck out was problematic for me. I basically grabbed a bunch of vertices and dragged them up - but it wasn't on a straight z-axis. The next step was making a cylinder with the height of the new neck, with the diameter of the "post" in the puzzle's neck...this served as a guide on grabbing the vertices to the right place. (I want to say I did smart things, like changing the neck pieces to match the rotation face of the cylinder, so I could just "z-z" and move along the object's own z-axis as opposed to global z-axis. It also works to just join the cylinder and the piece you want to move up/down, and then use "p" in edit mode to separate them again. z-z now works for the piece, using the angle of the cylinder.)

Well, you now have a stretched out neck. It no longer looks natural, just a bunch of flat planes.

Before

After
I spent some late night  hours on this, and no longer entirely sure of the process - it's good to document things as you go, so you can be accurate when describing your descent into madness. Remember: dynotopo ON, symmetry OFF. In sculpting mode, the strength & the size of your brush - they're both impacted by how far in/out you zoom in on the model. A feature, not a bug.

Dynotopo was necessary here — I wanted to get the organic, slightly lumpy roundness bits of the original...and it wouldn't make the new faces I needed if I just tried to dump clay strips down.

I also sculpted with non-active pieces visible, as it gave me feedback on how the rest of the pieces looked with the changes. Sculpt mode doesn't affect those non-active pieces, so it was a safe method.

Brushes used:
  • Used Draw more often than Clay Strips, both as a +/- brush.
  • Smooth for cleaning things up
  • Alternating between Crease and Pinch for better definition of transitions

Making Two Pieces instead of One


As I wanted to make the ear portion white, it meant I had to break apart the back of the head/neck piece. I didn't use any sculpting technique - it was a quick creation of a cylinder and cube merged together, and then using Boolean>Intersect on it to make the bottom part. I briefly scaled it up, to then Boolean>Difference to create the puzzle-fit in the top portion. No sculpting needed!

Remaking the puzzle portion - notice my edges are sharp compared to the original




Wednesday, October 9, 2019

Art Deco Lightswitch Cover and Multi-color Prints

This started off as a project to make a lightswitch cover that was interesting and unique. We've been looking at buying a house, and when I mentioned that maybe doing custom ones would be fun — yes.

For this project, I used Blender 2.8 and older developer version Cura (2.x, but is able to run on an ancient OSX desktop). The file can be found here - https://www.thingiverse.com/thing:3907742

Lightswitch Cover Design & the Foray into Art Deco


It would have been an easier start if I had just remixed someone else's lightswitch cover as a base. In this case, I decided to do everything from scratch. Starting with digital calipers, I decided the plate would be 114 mm tall and 71 mm wide. I measured the slot and the holes, using blocks and cylinders to punch holes in the plate. (The cylinder was wider at the top, to represent the tapered screw that lightswitches use.)

I did some beveling on the top and the underside to get a rounded feel for the cover — one of the useful techniques when using control-B to bevel, or Edge>Bevel Edges is using "M" to change the mode...I clicked M several times to get to "percent", which turned out really well. I've done some basic bevels in the past, but this is the first time I experimented with every combination of options before settling on the one true way.

Added some cylinders on the bottom for more screw support. The bevel on the actual bottom came from inset, followed by moving the portion up past the top's bevels, then applying bevel/percentage to the rectangle that had moved up. Tricky.
Before printing this cover, I downloaded someone else's plate from thingiverse, compared the slots and holes...pretty close. I did end up moving the screw holes .3mm closer to the center, but not bad. Printing it, I realized I had not put enough taper space into the plate for the screws. Ah well.

With the basic object shape out of the way, we get into an introduction of "art deco". As I'm not a designer, I went to Google Images, and searched for "art deco pattern". After browsing a ton of images and styles, I decided on one that was relatively simple. (Showing my beta version to an actual designer type person, he asked if I was a designer, and explained that I got the style right - basically a simple image that repeats...that's what I got out of his comments at least.)

The goal was an image that would merge together with itself. Didn't like my design at first, but it looks good printed. 

I created the basic image, sized it up to 15 mm, then used the array modifier for the relative offset y-axis at "1.25", 20 times. I created a second array modifier, .65 for x-axis, .025 y-axis. This wasn't science, it was trial and error to get a feel for what it would look like.



Next was...ugly. I clearly need to learn better habits on how to merge the art deco design onto an object.  It *eventually* worked. I needed to use a lot of the 3D Print Toolbox plugin to look for non-manifold edges. There were over 300, and I did too much manual fixes and partially manual fixes to get down to 0.

Multi-color Prints & How to Pause in Mid-print


A friend asked me how hard it was to imbed something within a print. Specifically, adding a metal nut into a knob as it prints. Sure, it could be done, but I didn't know how or had a project that needed me to stop in mid-print...until NOW.

The idea was to print the art deco image in a different color - imagine a white plate with a series of black stamps. There's a plugin that comes native to Cura, found under Extensions>Post-Processing>Modify G-Code>Add a script>"Pause at height". From Blender, I recognized I needed about 5mm of white before switching over to black. Loading the cover, clicking on the View, Layers...it looked like I needed to switch over at layer 21, at a .24 mm layer height. The only number I had to change for the input was the Pause Height to 5.04mm (arrived at by multiplying 21 * .24).

[edit: I came back a year later to update some of this.]

If you have a different initial layer height, make sure that is figured as layer 1. (For example, a .3mm layer height, and 20 layers at .24...5.10mm.) You can also resume the print from your Octoprint browser window, if you don't have Cura open.

I'm trying out "Extrude Amount" with a new print - it's supposed to extrude filament after you resume. You'll still need to be quick, to clean off that extruded filament before it starts printing on the model.

[edit end. November 29th, 2020.]

You can add multiple pause at heights, for multiple color changes from highest (top) to lowest (bottom).


And I started the print. At layer 21, the printer paused and sent the printer head to the far right corner, and elevated on the z-axis slightly. The Cura software was still open, and registered as "Paused". I opened up the tensioner on the feeder, slowly pulled the white filament out, slowly pushed the black filament through. Caution! Try hard not to move the printer head - if it loses where it is, it won't be aligned when it starts with the new color. (If you look closely, you can see white at the top of each black circle, where I bumped it slightly when using the feeder gear to push it through. The second time, I just pushed it through manually, no gear.)

Going back to the Cura software, it was still paused. Click the resume button, and it goes back to printing. Sadly, my bed temperature was low for PETG (and the room was drafty), so you can see how the corners were pulling up. That's fine for experiments, but wouldn't be good for the final result.

Action shot, printing the black as layer 21

I also found that the cover no longer printed correctly. The screw holes and switch slot in the cover filled on some of the layers! Sure enough, back in Cura in View Layers, I noticed that it filled up. Spending some time in internet searches, the solution that I found suggested in the "Mesh Fixes" options, to DISABLE "Union Overlapping Volumes". That brought back the holes and slot that should have been there in the first place.

The screw holes are white, the switch was black...clearly neither were holes anymore This version had beveled edges on the outside, which meant they ended lower than 5.04 mm (still the white filament).

Having done that, I went back to printing the white/teal PETG to get this final product. (230 degrees nozzle, 70 degree plate, .24mm layer height, .5mm nozzle.) Polymaker's Polylite PETG, 2.85mm.

Ta-da!


Thursday, September 12, 2019

Remixing a d20 countdown dice holder in Blender - BoltFactory plugin

I figured I would share some of the remix process of my latest project.

The final result - whoops, where is my d12?
You can find the final results here on Thingiverse. The original version was done by the user kittka on Thingiverse, a little larger and using magnets.

My original remix that I didn't share, was scaled down and using different magnets. Sadly, the thin magnets I normally use for my projects did not hold the d20 together, as it jostled around in the gaming bag. Remix #2, I used more powerful magnets in the base where the d20 had more room.

As this wasn't a major remix, I didn't bother posting it. There were still minor issues - knocking the d20 at just the wrong angle, it would spill all of the dice out. I considered replacing one set of magnets with a post and hole, so you'd have to pull it apart vertically...but it was in a design backlog.

Enter the Puppy


My friend hosting D&D has a pup that likes to chew. Alfred climbed into my bag, pulled out my d20, and chewed on the lid...breaking off part of the top. Fortunately, none of the magnets were swallowed, no PETG was eaten, but I now needed a new d20.
Post-Alfred


Enter the BoltFactory plugin


Blender 2.8 has a bunch of plugins, most of which I had played with in the earlier versions. I had not experimented very much making bolts in the past. I did make a screw thread once using arrays, but...it was work. Boltfactory is stock, just needing to be turned on. Edit>Preferences>Add-ons, then type in "bolt".


Once that's turned on, you can shift-A to create a mesh, and select "Bolt" at the bottom, which gives you this handy bolt creation menu.


I used the default bolt generated. To get the corresponding nut, just change the Model: BOLT to Model: NUT.


I scaled them both up at the same ratio, to fit to the die. From there, I made a wide-but-not-tall cube to boolean-intersect a thread section from the bottom of the bolt (slightly bigger than the nut part I was cutting out), and a boolean-intersect from the nut. I printed a prototype, to see if my .24 mm layer height and .5mm nozzle would provide good enough tolerances for the scaled-up threads. Success!
Orange nut, purple bolt, with a longer orange test bolt
Scaling up the nut/bolt gave me a really "chunky" thread. Easy to print, as well as not needing a lot of turning to open. (Turned out to be about 108 degrees of turning.) Enough to have a tight seal, but not enough to make it too much effort.

The Real Work


It gets tedious and ugly after this. I dissolved all of the vertices that held the magnets, and made smooth edges to merge with future bolt/nut sections. There were three design issues to overcome, and in my first time doing this, I didn't come up with a clean system.

  1. The top needs to be flush with the base, plane to plane (bottom of the top, to the top of the base)
  2. The number faces on the top need to match the "spin" of the bolt into the nut
  3. The number faces on the top need to be flush with the number faces on the base
The first one was awkward — the top and base needed to be rotated the exact amount. I probably should have just reimported the original, but I continued my original remix. They needed to be the same z-plane coordinates on each facing plane. I checked the z-coordinates of the vertices, and rotated on x/y axis to balance opposite sides. After that was flat, I merged the bolt and nuts (skipping some finer details here). 

I printed the d20 bottom, as the nut part wasn't going to change. Printed a top, testing the "right amount" of bolt.

The second design issue should have been more manageable in Blender, but I didn't trust virtual tolerances. To match up the faces, I would rotate everything BUT the screw portion. It's easiest if you dissolve the unnecessary edges on the bottom of the top - otherwise the spin might get some of your edges cutting into other edges. Again, printed a couple more to get the alignment of faces correct.

The third design issue, I noticed that the top wasn't completely aligned with the bottom, on the x/y axis. I could run my fingernail up the face from #6 into #5, but it would catch...and there was one millimeter-ish gap on the #2 to #10. A couple of printed tops later, it matched.
Closed



Thursday, July 4, 2019

Using Array modifier for an object around a point in space in Blender

Building an array of an object around a point - it always feel messy and non-intuitive in Blender. The first half-dozen times, I'd have to look things up on the internet to recognize where I went wrong. I did this in Blender 2.78, but it applies the same in 2.8.

The two primary tips


  • Set your object to scale & rotation (Scale should be 1.00 when doing an array)
  • Put the object origin on whatever you're going to rotate around

To demonstrate the process, make any object, grab it so it's not in the center, and scale it some fashion.
For this example, I took a cube, extruded it on the Y-axis, added some loop cuts in edit mode (control-r), scaled those cuts in x- and y-axis — then moved it on the y-axis away from the center.

We'll want to spin this object around the center of the grid on 0, 0, 0 - so shift-s to put cursor to center (if it wasn't already there).  Under Object>Transform>Origin to 3D Cursor (or under Tools>Set Origin, or shift-control-alt C)...set the origin to the cursor.

If we DON'T set the origin to cursor, it'll spin around the center of the object when it was a lonely little cube. The green and red arrows should no longer be set on the object, they should have moved down to the center.

This is the killer - Object>Apply>Rotation & Scale.

With the cursor still in the center, shift-a to add an empty axis.

Now for the fun.
The Modifier (wrench) > Array panel

You'll want to turn off the relative and constant offsets. The Object Offset, you will want to turn on, and mark the Empty axis as your offset. (It'll be a drop down in the list of objects you have in Blender.) Nothing will appear to have happened to your object, as the array objects are stacked in the same space.

The next step is selecting the Empty axis, and then rotate it 45 degrees on the Z-axis. This will fan out your objects, based on the rotation of your empty axis. If you want an even distribution of these objects, you would take 360 degrees, divide by 7, and use that instead of 45. (This is convenient sometimes when building a complex objects.)

The array of 7 pieces, at 45 degrees. Note that the original piece counts towards the "Count" from the array modifier panel.

Troubleshooting

If it didn't look like this, go back and revisit the first two points: apply the rotation & scale to the object, and make sure the origin of your object is set to the same spot as your Empty axis.

Extra Tricks


Let's say you wanted to add a number to each of those tiles in space. You could Add Text (then duplicate it any number of times, but hide the extras) above one of those tiles, convert it to mesh, thicken it, boolean it into the object...and then rotate the Empty axis another 45 degrees, to add each number.

Alternatively, you could "set rotation" on your Empty axis each time, and then type in the 45 degrees again....this could be useful, if your rotation is something more complex, like 31.528 — meaning you wouldn't have to do the extra math each step.

You can also do some funky things, by changing the scale of your Empty axis which will stretch or shrink your array in a given direction.

Tuesday, June 18, 2019

Blendering a remixed Treasure Puzzle Box

A friend wanted a puzzle box that could hold one thousand crisp US dollar bills.

The first step was to figure out how much space would be necessary, which gets messy with imperial measurements. 1000 bills stacked on each other - 4.3"? What is that on a ruler? I added 5%, as a safety. (4.5 inches became 115mm.) 2.61" by 6.14" were converted to mm, then rounded to 70mm by 160 mm. Then I created a "cash-block" in a Blender file, designed as a testing metric. Similar to software engineering, if you come up with your tests beforehand, you can test to the challenge. (Otherwise, it is similar to writing a question to an answer you have written down already.)

The next step was finding an initial puzzle box. I chose this steampunk version from Thingiverse, and imported the stl files into the Blender file. Obviously, it's not big enough internally to hold the money. Using the MeasureIt plugin, I mapped out the existing internal measurements, in order to do casual scaling of the object on the appropriate x/y/z axis (130% x 120% x 244%). It wasn't necessary for the box, but I wanted to keep the same scale for the other parts.

With that said, there are issues. The steampunk gears decorations on the side stretched more on the z-axis, as did the compass rose. No good — so I switched to wireframe mode, the edit...selecting all of the gear & compass vertices on the outside of the box, and deleted them. Then I rebuilt the faces. A simple box. But...no decorations. To deal with that, I imported another copy of the base box stl into the project.

You'll notice a vertical measurement of 134.99mm. I added more overall space for the lock mechanism, as well as a plate for the locks to rest on — don't want to damage the dollar bills when the locks turn.
With the "old" version of box, I went into wireframe (z), and edit mode. Once again, selecting all of the vertices of a single gear. It'll pick up any of the faces as well, which is inconvenient for the spaces between the gear teeth. Oh well. With the vertices selected, "p" lets you separate by selection. Switch to object mode, select your new gear object, go back into edit mode. Using face select, I chose all of the ugly, not-needed faces between the gear teeth, and "x" to delete those faces.

The import process isn't always clean. Most of the time, you can ignore the cleanup. It will sometimes cause issues with edge select, selected an edge while holding down shift-alt (OSX). If you do have awkward faces/edges, you merge vertices to a "corner of a plane" vertex, using alt-m and then merging to the last one selected.

If you look at the two horizontal lines, there should just be one face (or two faces, if you have a diagonal line, like the faces above the selection. It probably wasn't designed this way...just a function of importing an stl file.
Getting back to the gear as a whole, let's assume the edge select with shift-alt selected the back edge of the gear. I (e)xtruded those edges by 2 to thicken it, then use "f" to fill in a face for those edges. As a best practice, try to merge only solid piece to another solid piece. (Either by using control-j to join, or boolean>union — I prefer Boolean>Union.)

As I finished each gear, I dropped them into a new collection just for gears (a feature of Blender 2.8).

The compass rose turned out to be...problematic. I wonder how much of it was from the STL, vs. how I took it apart in Blender.



You can see how the faces behind the star work, instead of the separate faces connecting between the spokes. When I saw all of those weird lines, I knew from experience that those faces would need to be cleaned up.

I deleted all of the bad faces, rebuilt them by hand. For each of the 8 face areas between the compass rose spikes, grabbing the vertices in edit mode with the (c)ircular select tool, then making a (f)ace.

There were also some non-manifold faces/edges on the back of the 4 tips, as well as edges/faces BEYOND the other faces already cleaned up. Those non-manifold pieces were just deleted. (Sample selections as viewed from the back of the compass rose.)

You can see the top tip highlighted - it had multiple edges that needed to be cleaned up as well, where it touched the back ring. I would guess this was a function of the software made the original remix.

After those were done, from the back side, I selected the outside edge and the tip edges, and made that a (f)ace. (Everything was now manifold - no air gaps.) I made the whole thing thicker, and recessed the separate faces between the compass spokes. I was a bit concerned that the detail might get lost, with a larger puzzle box...and it make it easier to Boolean>Union with the box.




I made the compass rose and gears 160% bigger on the x-axis and z-axis to match the box's ends, and 120% thicker on the y-axis to make it similar in look. They were put into their own collection.

The final box — the hinges stick straight out, but the rest of the box is accurate.



Friday, May 10, 2019

Blender Design Iterations

I just put up a sub on Thingiverse, based on board game art from Underwater Cities. There was another sub, part of a bigger "replacement parts", but it was relatively plain.

Final Piece

I went through about 14 different versions - with each one getting closer to the final piece. The first useful piece was adding a camera in the side panel, so I could look at the picture of the sub WITH the model.

Version 7 - Adding Camera View
You can see in the upper right panel, you can see a bunch of pieces in an Outliner panel. In the middle right, you can see a camera shot in a 3D Viewport. (There's a lower right, where a properties panel is.) The jpeg of the box front was added using shift-A>Add Image, and I changed the rotation and scale to match the idealized object.

The iterations were roughly 3 categories of work:

  1. Getting it to look like the sub in the picture (70% of the total work)
  2. Making it printable (25%)
  3. Giving it characteristics of a game piece (5%)

Getting it to look like the sub in the picture

A lot of this process is just taking standard shapes and modifying them. The buoyancy tanks are the same — I took a cylinder, did some loop cuts for the ridges that stick out. I copied a couple of UV spheres, turned them on the sides, aligned them with the ends of the cylinder. Select the vertices of the spheres that weren't visible and delete those vertices. Remove the ends of the cylinder, then boolean>union the spheres to those ends. In Edit>Vertex>Remove Double Vertices, to clean up problems. You can either copy it, or use Modifiers>Mirror>Apply.


Honestly, the shoulders and sacs were the messy parts. Shoulders were a lot of proportional editing from a cylinder. Look under the shoulders, there's a strange "sac". It was a isomorphic sphere, that was stretched on the z-axis, added a wireframe modification, and then I removed some vertices to make planes. This next part falls under making it printable: I tried to make it a pure mesh sphere, but it never quite turned out....so I took the inner areas of the holes and turned them into faces. (And the other internal faces I removed, so it would be a manifold object.)

I probably spend way too much time cleaning that up.

Making it printable

The side headlights broke off occasionally — I tried to make them interesting by mounting them to a sphere, then mounting the sphere to the sub. The angled headlights would break off when pulling supports.

The buoyancy tanks were round on the bottom. I'd get weird layers too often down there, so I used Pivot Point>Active Element...selecting a bunch of vertices on the bottom of the main platform, and the lowest 3-4 pairs of vertices on the buoyancy tanks...then Scale>Z to have them scale to the last selected vertex. (As a reminder, when doing this, it can be helpful to look straight on, use "Z" to go into Wireframe mode.) This flattening took care of the weird layers.

The braces that reached the buoyancy tanks were just bars to start — I made them thicker as they entered the sub's body, but eventually also extruded them down on the z-axis through the tanks...this eliminated the tiny interior supports, as well as giving it a more solid-looking feel (necessary for the next part).

Giving it characteristics of a game piece

It was too tall (z-axis, solved by shrinking the dome and the dome cage on the z-axis, then scaling out on the x- and y-axis.). The shoulders and sacs needed to expand in the x- and y-axis (primarily by using Scale).  Keep in mind, these were all separate pieces...making it easy to scale each piece, but also taking longer because I wasn't doing a single operation.

I put the angled headlights forward more on the model, to give a cleaner look. I did not include the "probes" that were on the right side of the sub's art...they were going to be too thin and easily breakable.

These were all relatively easy fixes. If I was more of a designer, I would probably have stronger (and earlier) design principles to fall back on.

Overall Learning Experience

If you're sweating a piece, maybe you're doing it wrong. I probably worked on the mesh sacs for too long. There were simple brute force methods that would have been fine. The dome brace was done as a separate piece, I should have just made it part of the dome. The buoyancy tanks on the bottom, I wanted perfectly round — for no real necessity. (The tanks had those brackets going all the way around, so that first layer was trying to keep those, but then have the tanks.) I printed multiple versions, trying to make the smallest change for the best result.






Wednesday, April 17, 2019

Using Blender to take a 2D image into a 3D cutout

One of the easiest and most magical things, is the speed at which you can turn an image into a 2D mesh object with depth. Calling it 3D is...tough — it doesn't turn a cutout image into a full-formed velociraptor!


This is a phone stand, remixed from a phone holder on Thingiverse — although I also added an extra piece below the holder, to make it more stable. The cutout of the velociraptor is from an image that looked like this:


Once you have the image (jpeg, png, whatever), take it to a (free) website that converts images to SVG - scalable vector graphics format. There's also techniques where you use Inkscape or Adobe Illustrator, but the free websites are pretty much drag-drop-convert.

In Blender, use File>Import to import the SVG.  It will be a microscopic "curve". I typically scale it in x/y about by *40. Important next step: Object>Apply>Scale. If you skip this, it will do crazy things to your object. Object>Convert to "Mesh from Curve/etc". This will turn the curve into a regular mesh. Next, Add Modifier>Solidify>Thickness = 1, and apply it. This gives the mesh depth, instead of just being a plane. It's solid black, which is hard to see details...under Materials, I used the slider to make it gray.



At this point, your image is now a 2D object with depth. If you weren't doing this project in your main blender file, save it, open your main blender file, and then Append>[filepath/file]>Objects>[objectname]. It should be listed in your Scene now, as a mesh object.

I thickened it to about 5mm, Object>Transform>Snap>Origin to Geometry, and then in Orthographic mode, clicked through keypad 1/3/7, adjusting the orientation and rotation of the cutout piece. (For example, in the phone stand, rotated it 90 degrees while looking from above. From the side of the stand, rotated it 55 degrees to match the plane of the upper part of the stand. Once you have your object aligned, scaled, and rotated...I usually hide it, then select the primary object. Add Modifier>Boolean>Difference, then apply.

You're stamping through the main object - make sure nothing is left hanging. For example, if you look at the capital letter "A", If you stamp an "A" through an object, that triangle in the upper half is going to be hanging in mid-air. (Maybe you have your stamp go halfway through the wall of the primary object.) An example of this is another stand, using a Zelda-based image:


Part of the FDM printing process, behind the Zelda icon...the back wall was not a clean print. Probably because the stamp almost went through the wall. A thicker wall, or a shallower boolean could have eliminated it. Not really a problem, as people aren't going to see that back wall, but an imperfection.





Sunday, March 3, 2019

Blender Gears

I've been using gears for a couple of different projects.

My first foray into gears using Blender, was using the Add Mesh: Extra Objects plug-in. It opens up another "base" object in the Add Mesh > Gears > Gear options. It creates a gear without the faces connecting the inside of the center hole (a non-manifold model). It's easy enough to create these faces - alt-shift each inside ring, the bridge the edge loops (through Control-E for the edge menu, then Bridge Edge Loops, or spacebar-find Bridge Edge Loops).



Breaking it down

  • Teeth is...teeth - the distance from the inside ring to the outside tooth tip is Base+Dedendum+Addendum
  • Radius is the distance from the middle of a tooth, to the opposing side's middle tooth
  • Width is the z-axis height
  • Base is the inside of the ring to the outside of the ring
  • Dedendum - the distance from the "middle" of a tooth, to the outside ring (increasing it, also shrinks the hole in the center)
  • Addendum is the tip of the tooth, distance is figured again from the middle of the tooth to the tip
  • Pressure angle is going to the slant of the tips of each tooth - anywhere from 0 degrees (square), to a maximum of 45 degrees (if your addendum is a larger value than your overall size, you'll need to reduce the pressure angle to avoid bad topology)
  • Skewness is used for helical and herringbone gears - also known as a helix angle
  • Conical angle has one end shrink to a cone - 45 degrees leads to a tip, where 0 is no cone, and 90 is flat (practical uses - 0 to 45)
  • Crown makes a crown by elevating the tips and mid-points of each tooth - a measurement of the z-axis difference between the base of a tooth to the connected top of tooth (not a hypotenuse, which would be longer)

Woodgears

That's just how to lay out the gear, once you get your gear designed! I used this perfectly fine option from a site called Woodgears...he does a lot of great woodworking, and the gear tool is useful.

Otvinta's Instant Gear

My current gear-making assistant is Otvinta's Instant Gear. Their branding is "A collection of tutorials & resources for 3D modeling and 3D printing enthusiasts". The useful part, is how it generates a python script to create the gears.

You can then go into a Text Editor window in Blender (usually on the 3D View, lower left hand corner), click on the "+ New" button, to create a new text data block...paste that code, and the press the "Run Script" button. You have the outside outline of two gears, both preset as meshes (back in the 3D View).


Thursday, November 1, 2018

Figuring out bad meshes in Cura and Blender

One of my recent quick projects was making a simple "D" with a cut for a magnet. I was using magnets from my first project on Thingiverse, so I started by appending the "white" portion of that Blender file.

The benefits of appending, means that I get the Blender object, without having been converted to an STL. This means if I do edge loops, Blender already knows how to play with it...and I can use my current Blender startup file, instead of the dated one I used two years ago.

I switched into edit mode after the append, selected all of the planes of the magnet-holding portion, and hid all of that. I then selected the rest and deleted it. Looking back, I should have just done Control-I, to invert the selection. Oh well...un-hid the ring of planes and made it a cylinder (select an edge with Alt-A, F to create a face, repeat it for the other end of the cylinder. Renamed it Magnet.

Back in Object mode, I added Text, Edit Mode to make it a D. Object mode, Object>Convert to>Mesh from Curve/Text. I went back into Edit mode to scale the interior of the D in, so it would be a thicker letter. Boolean>Solidify>Thicken 1mm...Apply, easy.

It should be a simple matter just to Boolean>Difference the magnet out of the D...and it was. Opened the STL in Cura, and it was ready to print. But there's a red bit. Huh. (I'm posting the fix above it, the broken original beneath.)


It probably would have printed, but it also means something is wrong in the design.

Running Blender 2.78 on OSX, I re-examine the cutout...it's a slightly different shade. It's an easy enough fix, reseting normals in Edit mode. Mesh>Normals>Recalculate Outside. But it doesn't explain why this was a problem!


Remember my first steps? I used the magnet sizing from the STOP sign...and the cylinder part inside-outside normals were flipped. When I made the magnet cutout, by using those cylinder sides, it used those same normals. You can see the Magnet object that is off-color. (When I was doing work, I hid objects and never saw the color difference.)



Be wary of Boolean cuts with bad normals!

[The solution is: fix the normals on the "bad" magnet, so the colors look correct. When you use boolean on the D to remove the magnet shape, it will have the correct normals.]




Thursday, February 8, 2018

3D modeling and printing for Gloomhaven storage

I've been designing upgrade components for Gloomhaven for the past several weeks. So much, that everything for storing Gloomhaven efficiently went into one Thingiverse project download: https://www.thingiverse.com/thing:2774773



I started with the toolbox frame, being a Harbor Freight "20 Bin Portable Parts Storage Case" (any of the mustard-yellow bins came with it). $10 for each one, and two was more than I needed. It's completely possible to have remade the basic box myself, but I cheated. This project by cpodbob was a fine start - I really liked the feet they had made.

Most of my new boxes needed to be a 2x2 - big enough for playing cards. Before I started modifying THAT box, I printed a basic box to get a feel for how thick the walls would turn out, that the feet would fit properly...the boxes that came with the Harbor Freight tray had small pegs for feet.

First box, the walls were a bit thin at 1.5mm. 3 was more solid than I needed, so I evolved down to 2mm. Did you notice the crosses embossed in the bottom of the lid? The trays needed to either fit in them or at least not be interfering with them. 2mm was good.

In Blender, I made a copy of the 2x1 box, multiplied its width by two...but that made those awesome feet stretch out. I went back to the original box, went into wireframe mode (z), used the (b)ox selection tool in edit mode, and grabbed one side to match the copy's new width.

Good Design: I added a hole in the bottom in each of the boxes, to push things through from the back. This means there's no awkward "slamming down a box upside-down to get something out". This will come back even more with the trays later. (A simple Boolean operation, selecting the box and choosing difference with a cylinder.)

Event Card Boxes (City & Road)

Event card decks were my next consideration. It needed three compartments - 30-ish unlocked cards that would be pulled out often, a tray for the cards that had been experienced but not removed from the game, and room for 30-ish locked cards (needing an event to put them into the unlocked deck).



The first attempt had the dividers opening up in different directions. One set of holes on one side of the box, halfway up. Another set of holes at the other side, slightly further up on the box.
Bad Design: the underside divider got caught.
Good Design: there was enough room between them, when they were both pivoting from the same side, that both could open.

Difficult to see, the event box dividers were not flat pieces with pegs slapped on - I wanted the pegs to be pushed in, so when they popped into the holes they would stay. PETG is great as a filament - I made the original "arms" too thick to push easily. Slimming it down to 11mm meant that it was still solid, but just flexible enough for the posts to pop in.

Monster Trays

One of the organization needs of Gloomhaven, is to find the correct monster standees for what is going to fight that scenario. When playing other people's games, a huge plastic baggie was the worst. You didn't know how many to find and you needed to compare and contrast against hundreds of other monster tokens. Except, these are 3x2 boxes, instead of the 2x2 boxes I remixed earlier.


It works out that you need 6 trays for the different monsters. Each of the mini trays for each monster, had a hole in the back - you don't need to dump the whole tray to get just one stack out. You can also fit 6 monster standees per mini tray (sometimes 10 for the smaller monsters)...and the Harbor Freight tray is tall enough for exactly 3 trays.

Bad Design: I should have designed for the Earth Spirit. I had to remake the tray because I thought I could eyeball the dimensions "enough".
Bad Design: I also didn't know how many mini-trays I needed. I got lucky. I should have done my homework, counted it all out, then recounted it.
Good Design: The trays were stackable, so they needed foot cut-outs to sit in. I could have just made them all flat with no feet, but this gives them better stacking. I was happy with adding the cutouts.

Making the mini-trays - it was important for them to line up.  For this, I was in edit mode, and used the knife tool with "c" to make the cuts straight across, and "z" to cut through as if in wireframe.

To cut out the area for the feet, I copied the bottom outside vertexes of the feet, and dragged them to the top, then started merging vertexes (alt-m) first to last. This meant I didn't need to redo all of the planes. It was still tedious, but only 10 minutes of work. Measuring 3 trays from top to bottom, it worked out to tray+feet+tray+tray, as the second and third feet fit into the tray beneath them.

You can also see the Boss Standee tray - there's a mini-tray for the huge Stone Golem standees, and the rest of the "large size" standees fit loose in the un-trayed area.

The red tray holds the monster stat cards & envelopes. Mostly just a big 3x2 tray, but added lips inside the box so the envelopes would sit on those. Again, a hole in the back to push things out. This tray was 2 stacks high, combined with the Boss Standee tray it fit flush to the Harbor Freight Tray.

Dead Card Box

I also made a dead-card box, for the cards removed from game. I considered gluing shut, but haven't done it...yet. For the embossed "broken card" icon for the cover, I took a card-shaped cube, used the knife tool to make cuts in a zig-zag fashion, and then used the "p" selection tool to break it into two parts. This allowed me to rotate only part of the total card-cube, and then I "j"oined them back together, so I could face the two bottom parts of the ripped card back together.

The cover rests on some extruded shelves, instead of the cards so that more cards can be shoved in.

Store Divider

The store is frequently messy. You have the store, future store cards from prosperity, item designs from chests and events, and random item designs. Hopefully they will all end up in the store, but in the beginning, each separate.
I thought about redesigning the box and incorporating the lengthwise stand into the side of the box, but...maybe that would be good for people who sleeve their store cards.

The design challenge was to have the dividers stay upright and solid, but be able to slide to accommodate more/less cards in the various stacks.
I originally made a groove in the stand and the dividers had little tongues to fit inside the groove - too many tolerance problems can come up that way.

Good Design: Don't make more headaches than you need - reduce complexity, especially multiple tolerances.

I removed one side of the groove (on the part closest to the box) and thickened the tongue to take up the same space. I also made the dividers thicker so they would stay vertical more easily.

Overall

  • My Gloomhaven storage method turned out really well. I might tweak some more storage boxes later, as demands come up.
  • I learned the knife tool a lot better. 
  • I addressed card mix-up issues for the store and events. 
  • I probably could have made the box from scratch, instead of a remix. 
    • Is it lazy to use code that's already there and suits your purposes? Existing box gets repurposed, I'll call that a mixed-win.