Creating an LED in Blender

by StumpChunkman in Circuits > Software

6167 Views, 5 Favorites, 0 Comments

Creating an LED in Blender

LED3.png
LED2.png
LED-Front-01.png

I made the components for an LED Throwie in Blender, and figured other people might be curious what my workflow was. So I decided to put this together. Hopefully it helps you out with what you're doing. This is the first 3D Model I've ever made, so I'm pretty excited about it.

The first image, is the original LED I created. This instructable is my remaking it for the purposes of telling you how I did it.

For reference sake, it took me longer to upload all of the images for this instructable, then it did for me to make the LED in Blender.

2D Art

LED-Front-01.png
LED-Side-01.png
Screenshot 2015-10-21 14.01.00.png

Before you start with Blender, you need to make front and side views of your LED that you can trace in
Blender. I created mine in Illustrator, but you can draw with a pencil and scan, use Paint, or take a picture from the front and size on your phone and send them to your computer, it really doesn't matter. Just make sure the two images are the exact same dimensions.

You can freehand if you like, but I wanted to make my representations as accurate as possible. So I looked at Datasheets, and got as close to the dimensions as I possibly could for a 10mm LED.

Blender Basics

Screenshot 2015-10-21 14.05.48.png

Blender uses a lot of shortcuts. When one comes up, I will put the shortcut in a {bracket} so you know that's what I'm talking about. If I tell you to extrude {e} that means you select the part to extrude, hit the e key, and move the mouse to extrude.

There are also a fair amount of menu's. Instead of constantly telling to to "select" x, I'm just going to put the selection in [brackets]. So {shift} {a} [Mesh] [Monkey], it means you push shift and a at the same time (then let go), and click on the Mesh menu, then the Monkey selection. It'll save me a lot of time, thanks.

In Blender, you select with right click, and move around things with middle click. You can {shift} or {ctrl} middle click to get different camera movements.

If you look around, you'll see three diagonal lines in the corners of different boxes on the screen. It might help to think of these all as separate windows. Which ever area you mouse is hovering over, when you type a keyboard shortcut, that's the window it will effect.

Open Blender

Screenshot 2015-10-21 14.05.49.png
Screenshot 2015-10-21 14.09.04.png
Screenshot 2015-10-21 14.09.07.png
Screenshot 2015-10-21 14.09.10.png

Open up Blender and close the opening dialogue screen.

  • You should see a Cube in the center of the screen. The cube should be highlighted (outlined) in orange.
  • That means it's selected (if it's not outlined, right click to select).
  • {del} [Delete] the cube.

Planes

Screenshot 2015-10-21 14.14.41.png
Screenshot 2015-10-21 14.20.00.png
Screenshot 2015-10-21 14.20.05.png

Left click around the screen and you'll see your cursor move around. When you place a new object, it will be placed wherever your cursor is.

  • {shift} {s} [Cursor to Center]. This will place your cursor in the center of the window.
  • {shift} {a}, [Mesh] [Plane]. You should now have a plane sitting in the center of your work area.

Apply Image to Plane

Screenshot 2015-10-21 14.21.27.png
Screenshot 2015-10-21 14.21.15.png
Screenshot 2015-10-21 14.21.23.png
Screenshot 2015-10-21 14.21.40.png

Find one of your images, mine are transparent png's. I opted to go with the front view first.

  • Have Blender (and your plane) visible in the background.
  • Click and drag your image over the plane.

The image should display on your plane.

Rotating

Screenshot 2015-10-21 14.23.35.png
Screenshot 2015-10-21 14.23.44.png
Screenshot 2015-10-21 14.23.45.png
Screenshot 2015-10-21 14.23.46.png
Screenshot 2015-10-21 14.23.56.png

{r} rotate your LED so it's standing upright.

Helpful keyboard shortcuts:

  • {x}, {y} or {z} will lock you into a single plane of rotation. I used x and was able to rotate my LED without any difficulties.
  • Numbers! When rotating, or scaling, if you know the exact number you want to go to, just type it in, you'll see it being input in the bottom lefthand corner of the screen. I used "90" to make sure my image was at a right angle to what it was initially.

A Second Angle

Screenshot 2015-10-21 14.26.17.png
Screenshot 2015-10-21 14.26.20.png
Screenshot 2015-10-21 14.26.28.png
Screenshot 2015-10-21 14.27.03.png
Screenshot 2015-10-21 14.27.07(2).png
Screenshot 2015-10-21 14.27.08.png
Screenshot 2015-10-21 14.27.08(2).png
Screenshot 2015-10-21 14.27.14.png
Screenshot 2015-10-21 14.32.59.png
Screenshot 2015-10-21 14.33.00.png
Screenshot 2015-10-21 14.33.02.png
Screenshot 2015-10-21 14.33.07.png

Now we add the other LED image.

  • Ensure your cursor is centered again.
  • Add another plane.
  • Drag your other image onto it.

In addition to rotating it upright, you also need to rotate this one 90 degrees along the z-axis. One way to do this, without {z}, is {7} on the numpad. {7} gives you an overhead view, and rotating from there will only rotate along the z-axis. You can also use {1} or {3} to look from the x or y axis. So rotate it 90 degrees along the z-axis, and then 90 degrees on the x or y axis so your two images are perpendicular

Moving Things Around

Screenshot 2015-10-21 14.39.37.png
Screenshot 2015-10-21 14.39.38.png
Screenshot 2015-10-21 14.39.39.png
Screenshot 2015-10-21 14.39.40.png
Screenshot 2015-10-21 14.39.41.png
Screenshot 2015-10-21 14.39.47.png
Screenshot 2015-10-21 14.40.21.png
Screenshot 2015-10-21 14.40.26.png
Screenshot 2015-10-21 14.40.27.png
Screenshot 2015-10-21 14.40.28.png
Screenshot 2015-10-21 14.40.33.png
Screenshot 2015-10-21 14.40.44.png
Screenshot 2015-10-21 14.42.24.png

If you ever have trouble with selections and you want to select or unselect everything:

  • Just tape or double tap {a}. Just keep in mind, this also selects the camera and lights in the scene.
  • When everything is unselected, {b}, then left click and drag to select both planes.
  • numpad {1} & {shift} middle mouse button & middle mouse scroll to get to a good location.
  • Left Click and drag on the blue arrow point up. (This is your z-axis movement icon.) (you could also {g}, {z} to grab and restrict movement to the z-axis - same thing, two techniques).

Move your LED so the base in on the ground plane.

Starting the LED

Screenshot 2015-10-21 14.42.30.png
Screenshot 2015-10-21 14.42.32.png
Screenshot 2015-10-21 14.43.38.png
Screenshot 2015-10-21 14.43.41.png
Screenshot 2015-10-21 14.43.41(2).png
Screenshot 2015-10-21 14.43.42.png
Screenshot 2015-10-21 14.43.42(2).png
Screenshot 2015-10-21 14.44.12.png

Ensure your cursor is centered.

  • {shift} {a} [mesh] [circle].
  • {s} drag your mouse to scale the circle until it matches the size of your drawing.

Editing a Dome

Screenshot 2015-10-21 14.45.11.png
Screenshot 2015-10-21 14.56.45.png
Screenshot 2015-10-21 14.56.48.png
Screenshot 2015-10-21 14.56.49.png
Screenshot 2015-10-21 14.56.57.png
Screenshot 2015-10-21 15.12.50.png
Screenshot 2015-10-21 15.13.01.png
Screenshot 2015-10-21 15.13.11.png
Screenshot 2015-10-21 15.17.18.png
Screenshot 2015-10-21 15.17.33.png
Screenshot 2015-10-21 15.17.40.png
Screenshot 2015-10-21 15.17.45.png
Screenshot 2015-10-21 15.17.59.png
Screenshot 2015-10-21 15.18.09.png
Screenshot 2015-10-21 15.18.40.png
Screenshot 2015-10-21 15.18.50.png
Screenshot 2015-10-21 15.20.00.png
Screenshot 2015-10-21 15.20.03.png
Screenshot 2015-10-21 15.24.36.png
Screenshot 2015-10-21 15.24.37.png
Screenshot 2015-10-21 15.24.41.png
Screenshot 2015-10-21 15.25.46.png
Screenshot 2015-10-21 15.25.49.png
Screenshot 2015-10-21 15.25.52.png
Screenshot 2015-10-21 15.25.53.png
Screenshot 2015-10-21 15.26.06.png
Screenshot 2015-10-21 15.26.08.png
Screenshot 2015-10-21 15.27.06.png

Now we make the top of our LED. With the circle selected {tab} into Edit mode. If you keep {tab}ing you'll notice that it switches you back and forth between edit and object. These are the only modes we should have to use.
In the bottom of the editor: Ensure, Proportional editing is disabled. Ensure that you have "Vertex Select" selected.

Options: If you want to have the roundest circle possible there's two ways to go. You can {w} [subdivide], which will give you more points in your circle. And also take a lot more processing power. The other option is to {w} [smooth], which will try to round out your lines, and save you some processing power.

  • {e} to extrude, {z} to lock to the z-axis. Drag the base of your LED up until it aligns with your image. Left click when done, {esc} or Right Click to cancel.
  • {e}, {z}, [.0001], extrudes up a very, very tiny amount.
  • {s} move the sides of your circle into to finish the base of your LED.
  • {e}, {z} mouse up, and {s} to scale in as you reach the top of your LED. If you do it right, you'll make a very tall dome. Use smaller distances on your extrudes to make it more accurate, but also a much larger file.
  • When you get to the top, {f} to fill in the top.

Now you can zoom out a bit, numpad {1} and shift Middle Mouse button to align the bottom circle of Vertexes. Then {z} to look at a wire-frame of your model, {a} to deselect everything, {b}, left click and drag to just select the Vertex's on the bottom of your LED, and {f} again to fill the bottom. (you can {z} again before you {f} to ensure it works).

Layers

Screenshot 2015-10-21 15.27.24.png
Screenshot 2015-10-21 15.28.26.png
Screenshot 2015-10-21 15.28.28.png
Screenshot 2015-10-21 15.28.32.png
  • {tab}
  • {a} to deselect.
  • Right click the LED you just made.
  • {m} left click any layer that isn't the top left. Your LED should disappear.

At the bottom of the screen you can the same 20 boxes that just popped up, and the top left, and whatever one you just clicked should have little circles in them. These are your layers. While we work on the LED legs, we put the LED in a background layer. You can shift click to see multiple layers, or just click to see any layer by itself.

Starting a Leg

Screenshot 2015-10-21 15.31.09.png
Screenshot 2015-10-21 15.31.16.png
Screenshot 2015-10-21 15.31.17.png
Screenshot 2015-10-21 15.31.18.png
Screenshot 2015-10-21 15.31.58.png
Screenshot 2015-10-21 15.33.07.png
Screenshot 2015-10-21 15.33.15.png
Screenshot 2015-10-21 15.33.18.png
Screenshot 2015-10-21 15.33.36.png
Screenshot 2015-10-21 15.33.42.png
  • {shift} {a} [mesh] [cube]
  • {s} scale to match the width of your LED leg.
  • {g} ({x} or {y}) and move your cube to where your leg should be.
  • {shift} {d} (same {x} or {y} from previous), and move the duplicate cube to the other leg's location
  • {tab} back into edit mode

Editing the Legs

Screenshot 2015-10-21 15.34.41.png
Screenshot 2015-10-21 15.35.04.png
Screenshot 2015-10-21 15.36.18.png
Screenshot 2015-10-21 15.36.22.png
Screenshot 2015-10-21 15.36.23.png
Screenshot 2015-10-21 15.36.23(2).png
Screenshot 2015-10-21 15.36.24.png
Screenshot 2015-10-21 15.36.24(2).png
Screenshot 2015-10-21 15.36.33.png
Screenshot 2015-10-21 15.36.34.png
Screenshot 2015-10-21 15.37.53.png
Screenshot 2015-10-21 15.38.21.png
Screenshot 2015-10-21 15.40.22.png
Screenshot 2015-10-21 15.40.34.png
Screenshot 2015-10-21 15.41.55.png
Screenshot 2015-10-21 15.42.04.png
Screenshot 2015-10-21 15.42.11.png
Screenshot 2015-10-21 15.42.11(2).png
Screenshot 2015-10-21 15.42.15.png
Screenshot 2015-10-21 15.42.25.png
Screenshot 2015-10-21 15.42.26.png
Screenshot 2015-10-21 15.42.27.png
Screenshot 2015-10-21 15.42.32.png
Screenshot 2015-10-21 15.42.37.png
Screenshot 2015-10-21 15.43.55.png
Screenshot 2015-10-21 15.43.58.png
Screenshot 2015-10-21 15.43.59.png
Screenshot 2015-10-21 15.44.04.png
Screenshot 2015-10-21 15.44.28.png
Screenshot 2015-10-21 15.44.29.png
Screenshot 2015-10-21 15.44.30.png
Screenshot 2015-10-21 15.44.34.png
Screenshot 2015-10-21 15.45.32.png
Screenshot 2015-10-21 15.46.26.png
Screenshot 2015-10-21 15.46.27.png
Screenshot 2015-10-21 15.46.47.png
Screenshot 2015-10-21 15.47.00.png
Screenshot 2015-10-21 15.47.13.png
Screenshot 2015-10-21 15.48.00.png
Screenshot 2015-10-21 15.48.30.png
Screenshot 2015-10-21 15.48.31.png
Screenshot 2015-10-21 15.48.42.png
Screenshot 2015-10-21 15.49.54.png
Screenshot 2015-10-21 15.50.00(2).png
Screenshot 2015-10-21 15.50.03.png
Screenshot 2015-10-21 15.50.09.png
Screenshot 2015-10-21 15.50.19.png
Screenshot 2015-10-21 15.50.26.png
Screenshot 2015-10-21 15.50.30.png
Screenshot 2015-10-21 15.53.04.png
Screenshot 2015-10-21 15.53.14.png

Ensure "Face Select" is selected

  • {a} to deselect everything
  • Right click to select just the bottom face
  • {e} extrude down to the full length of the leg.

Rotate around and select the top face.

  • {e} extrude up to the base of where the leg takes on a different shape.
  • {e} to each point you'll need to extrude other faces out of (depending on the shape of your anode/cathode toppers, it'll be different)
  • {e} the different faces to fill the area.

Switch to "Edge Select" and select any corners you need to move in. Then {g} grab and move them along whatever {x}, {y}, or {z} axis will make your lines work.

You may need to {z} and {b} to select multiple vertexes at the same time.

  • {tab} into Object mode
  • Right click the cube you haven't edited yet.
  • {tab} back into edit mode.

Perform the same actions on the other leg.

Helpful Hint: If you're having trouble extruding to the perfect locations, you can extrude past, then {ctrl} {r} Left click to select orientation, and the left click again to select exact location, to make slices through solid pieces that you'll be further able to extrude or move around.

Choosing Engines

Screenshot 2015-10-21 15.54.10.png
Screenshot 2015-10-21 15.54.14.png
Screenshot 2015-10-21 15.54.22.png
Screenshot 2015-10-21 15.55.46.png
Screenshot 2015-10-21 15.55.48.png
Screenshot 2015-10-21 15.56.35.png
Screenshot 2015-10-21 15.56.38.png
Screenshot 2015-10-21 15.56.45.png

{tab} back to Object Mode

shift click to see both legs at the same time. You can select the leg not in Layer 1, and {m} it to layer 1.

Now that everything is made, it's time to add Materials and colors. There are different ways to color in blender, we're going to use the Cycles Render. In the top center of your window, there should be a dropdown, ensure it says "Cycles Render"

All of our stuff looks weird now.

Let's select the planes (as we don't need them anymore), and {del} [delete] them.

Adding Materials/Colors

Screenshot 2015-10-21 15.57.29.png
Screenshot 2015-10-21 15.57.38.png
Screenshot 2015-10-21 15.58.08.png
Screenshot 2015-10-21 15.58.56.png
Screenshot 2015-10-21 16.03.54.png
Screenshot 2015-10-21 16.04.23.png
Screenshot 2015-10-21 16.10.36.png
Screenshot 2015-10-21 16.10.38.png
Screenshot 2015-10-21 16.10.44.png
Screenshot 2015-10-21 16.11.47.png
Screenshot 2015-10-21 16.11.56.png
Screenshot 2015-10-21 16.13.12.png

Select one of the Legs
Select the "Material" tab in the right hand window

Click New

Under the Surface Dropdown Select:

  • Surface: Mix Shader
  • Fac: .3
  • Shader1: Diffuse
  • Color: .7, .7, .7, 1.0
  • Roughness: 0
  • Normal: Default
  • Shader2: Glossy GGX
  • Color: 1.0, 1.0, 1.0, 1.0
  • Roughness: .2
  • Normal: Default

Now repeat steps for the other leg.

Now do similar to the Dome. Select the layer with the dome on it, select the Dome.

  • Surface: Mix Shader
  • Fac: .725
  • Shader: Transparent
  • Color: 1.0, 1.0, 1.0, 1.0
  • Shader: Diffuse
  • Color: .8, 0.0, 0.0, 1.0
  • Roughness: 0.0
  • Normal: Default

Lighting

Screenshot 2015-10-21 16.13.21.png
Screenshot 2015-10-21 16.13.25.png
Screenshot 2015-10-21 16.14.16.png
Screenshot 2015-10-21 16.14.47.png
Screenshot 2015-10-21 16.14.55.png
Screenshot 2015-10-21 16.15.04.png
Screenshot 2015-10-21 16.15.09.png
Screenshot 2015-10-21 16.15.25.png
Screenshot 2015-10-21 16.16.16.png
Screenshot 2015-10-21 16.16.40.png
Screenshot 2015-10-21 16.16.49.png
Screenshot 2015-10-21 16.17.15.png

Now Let's shift-select both layers so we can see everything.

Change the Viewport shading to "Rendered" and you can look at what you've made.

One issue you'll immediately notice, is it's very difficult to see. One easy way to fix this is to add a lot of lights.

Viewport back into Object mode, and zoom out until you can see the whole scene, light, camera and all

You can change the Light styles on the left hand side. I made them sun's and {shift} {d} duplicated, {g} moved, and {r} rotated them to all point at my LED.

Camera Work

Screenshot 2015-10-21 16.17.56.png
Screenshot 2015-10-21 16.18.12.png
Screenshot 2015-10-21 16.18.26.png
Screenshot 2015-10-21 16.18.28.png
Screenshot 2015-10-21 16.18.30.png
Screenshot 2015-10-21 16.18.45.png
Screenshot 2015-10-21 16.18.56.png
Screenshot 2015-10-21 16.19.03.png
Screenshot 2015-10-21 16.19.05.png
Screenshot 2015-10-21 16.22.52.png
Screenshot 2015-10-21 16.22.59.png

From there, I moved the camera closer to my LED. For the camera, you can grab the bottom left-hand corner of the window, and drag it in to make a second screen. In the screen, you can {t}, {n} away the sidebar menu's if you have them up. Then you can numpad {0} to see one of the views in camera mode. In the other mode, you can move the camera around and {r} rotate it until your shot looks exactly how you like. {f12} to Redner an Image, and then save it as a PNG.

Render Settings

Screenshot 2015-10-21 16.24.23.png
Screenshot 2015-10-21 16.24.29.png

Under the Render menu in the right hand side menu, and the Sampling dropdown, you can set the samples in your render and preview. Your preview should be less then your render (I would recommend 12 for preview and 24 for render, though your results may vary). The higher the value, the longer it will take to save your image, and the nicer it should look.

There's a ton more you can do...but this was all I did to make an LED. Enjoy.