← all tags

#Maker Stuff

General "marker" vibes - 3d pritning, hacking something together, physical projects, etc.

2 entries

Designing 3D Models in Photoshop

Since having a 3D printer, a common item I want to design and print are custom plaques, tags, and signs. Using traditional 3D modeling software works for this, but it’s tedious to create really good looking designs. It’s especially hard to iterate/tweak a “graphic” design in CAD software.

So I developed a workflow that’s worked really well for me where I instead design a greyscale 2D image with image editing software, and use OpenSCAD to convert it into a 3D model for me to print. I’ve not seen this specific method documented very well online, so I thought I’d put together a little blog post detailing how it works.

This method is inspired by those sites that make a lithoplane STL out of an image you upload. I originally tried using these sites but ran into so many issues getting exactly what I wanted.

The Strategy

The goal is to create a thin print with images/text/logos “cut” out of the piece. We do this by creating a greyscale 2D image of the design, then using this image as a height-map to generate a 3d model (via the surface function). This can work for both fully cut-through designs, or two-tone designs by swapping out the filament half way through the print.

Design

You can use any software you want to design the 2D image. I like Photopea, which is a free Photoshop alternative. A fully cut through design is easy, make any fully black-and-white photo you want. But with this style, you need to follow stencil logic such that the black portion of your image is a single continuous body (resulting in a single object being printed).

Cut-through example

But if you’d like a more complex shape, and avoid those stencil lines (and get a sturdier piece), you can design a two-tone image, like so. The grey can be printed with one color filament, the black another.

2 tone example

Depending on the depth of your piece, you can also bevel the edges to make the piece more readable from more angles - do this using Precise glows (not Softer).

2tone bevel

Once we extrude a 3d model, this will make more sense.

Modeling

Once we have our image saved, we can head over to OpenSCAD to create the model. We’ll use the surface function in OpenSCAD to treat the image like a height map:

  • White pixels #ffffff will be considered a height of 0
  • Black pixels #000000 will be considered a height of 1
  • Greys will be somewhere in between, #808080 is 0.5

PS: I like invert=true because the black portion being what I print is more intuitive to me.

The one caveat here is that 0 height portions of the image will still be drawn in the preview - but once brought into a slicer the 0 height will be ignored. Here’s an example OpenSCAD script:

src="/some-dir/src-2tone-grad.png";
surface(file = src, center = true, convexity = 5, invert=true);

This will result in a model that is 800mm x 500mm with a height of 100mm (the black pixel height). I normally scale this in my slicer, as scaling it in OpenSCAD takes FOREVER.

preview 2 tone gradient

You can do this in the UI, but the preview window with the surface function can get really laggy. So I often use the CLI. To create a preview image:

/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD -o preview.png model.scad

Then to render an STL:

/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD -o render.stl model.scad

Slicing

I have a Prusa Mini, so I’m only familiar with the Prusa Slicer. Once the model is imported, I can adjust the dimensions to what I want, in this case, I’m slicing 80mmx50mm with a height of 5mm.

Slicer resize

Then we slice! Here’s the cut-through example:

sliced cut-through top

Looks great! But from the side (or back) it’s difficult to read. Also, that O looks fragile.

sliced cut-through side

Using the straight-up 2-tone helps though, plus makes it so you can’t even see the design from the back, and we don’t need to worry about the flow!

sliced 2 tone bw

But my favorite option is using the outer glow in the source image to make a bevel. It is the most readable from all angles, and looks great.

sliced 2 tone gradient

There you go!

Rechargeable Glow-Disc Box

A portable, rechargeable UV-charging box for glow discs - with built-in red night-vision lights and a shoulder strap. Originally posted to /r/discgolf.

The box in all its glory!

The box in all its glory! The UV lights are normally off when the lid is open (to stop you from blinding yourself). The switch is taped down for this photo.

UV LED strips between each disc

There are UV LED strips between each disc. I spray painted the inside silver to help reflect the UV light on all sides of the disc.

Rechargeable battery + charge-level mirror

It’s powered by a removable, 12v, 3000mAh, rechargeable battery. I added a 45-degree mirror so you can easily see the current charge level.

Dimmable red LEDs on both sides

The red LEDs are dimmable and are on both sides. No more pulling out my phone flashlight to make sure I don’t trip, and I get to keep those night eyes :)

Controls panel

The left slider controls the UV brightness (if you’re trying to conserve battery). The middle dial controls the red LEDs. The lid-switch is on the left, held down by a paintbrush.

Shoulder strap from an old camera bag

I salvaged a shoulder strap from an old camera bag - it sits right on my hip, which is perfect. I was really happy with how comfortable it is to carry. (I’m 6’5” for reference.)

Strap doesn't block the lid

I made sure that the straps wouldn’t stop you from opening the box while wearing it.

The original prototype

This was the original prototype I made months ago. The final product was only slightly larger.

Prototype shoulder strap

Shoulder strap included! :D

Prototype vs final, side by side

Here are both compared to each other.

Prototype vs final, both open

And both open.

Plexiglass sheets with UV LED strips

Between each disc are two plexiglass sheets with UV LED strips stuck to them.

Lights staggered so they don't block each other

The lights were placed so that they charged the disc on the opposite side, and the strips didn’t block each other.

Wire cutting and soldering

Making these took the longest time, especially the wire-cutting and soldering…

First test charge

This was my first test-charge.

Yup. That worked.

Yup. That worked.

Glow not perfectly even but super bright

It’s not a perfectly even charge - but they’re super bright. I hope that they get jostled while being carried, resulting in an even charge.

First big 3D-printing project

I bought a 3D printer recently, and this was its first big project. Almost all the internals are 3D printed (plexiglass guides, disc holders, dimmer switch mounts, battery cage, etc.).

Demo

Rechargeable Glow-Disc Box