Introduction: Modeling and Rendering a Light Bulb in Blender
The purpose of this tutorial is to develop the skills of beginning Blender users by modeling and rendering a simple light bulb.
- Blender installed on computer
- Keyboard with number pad
- 3 button mouse
- Graphics card with CUDA support
Blender is a powerful suite of tool that allows users a lot of creative freedom in creating 3D art. Modeling, sculpting, rigging, texturing, lighting, and rendering can all be done with this free and open-sourced software. But as Uncle Ben once said, with great freedom, comes great responsibility. To create freely with the mind's eye and bring your ideas to life, you must learn how to use the tools you have. And you must learn them well. The purpose of this tutorial is to get you more familiar with the tools Blender provides to you. While experienced users can probably fly through this tutorial in about half an hour or less, a beginner may take several hours to complete. The time needed to complete this tutorial greatly varies from person to person. If you are struggling, don't get discouraged. Make mistakes. Make lots of them. If you're a budding artist, don't get too obsessive with minor imperfections. Learn, move on, and keep learning. And most importantly, enjoy the process. Good luck!
In this tutorial, due to the complexity of Blender, I will not be able to describe every single shortcut and feature. I will try to explain as much as possible, but if you are starting out, you will undoubtedly get stuck along the way in this tutorial. Don't get discouraged. Blender has many users and is well documented. I will try to provide external links to resources that may provide further help.
One Last Note:
For this tutorial I will be using Blender v2.78a on Windows. If you are using a Mac, the shortcut keys I mention may differ slightly.
Step 1: Setting Up Blender (Optional)
When first getting Blender, there may be some setting that you want to adjust to make the workflow a little easier.
Fixing selection with mouse:
First, go to to File > User Preferences. Under the 'Input' section, on the left hand side, you should see am option titled 'Select With'. By default this option is set to 'Right'. I have this set to 'Left' which lets you select within Blender using the left mouse button like you would naturally select on any other program. Click 'Save User Settings' at the bottom of the window.
If you have CUDA compatible graphics card and you have CUDA installed, you can tell Blender to render with your GPU. To do this, go to File > User Preferences, and under the section 'System', navigate towards the bottom of the window. Under the option 'Compute Device', select the CUDA button and select your graphics card in the pull down menu. This will make rendering your image much faster. If you do not see the CUDA button, then you either do not have a CUDA compatible graphics card or you don't have CUDA installed properly. Don't forget to click 'Save User Settings' at the bottom of the window.
Step 2: Getting Use to Controls: Navigation and Manipulation
If you know how to manipulate object in Blender, you can skip this section.
Upon opening Blender for the first time, you may be overwhelmed by the various options and tools that populates the window. Don't worry. You can immediately start playing around with Blender!
If you still see the Splash screen with the robotic man, anywhere outside of the the Splash screen and it will go away. You will be left with a cube in the center of the grid.
- Rotating - To rotate about the center of the screen, hold down the Middle Mouse Button (MMB) and drag your mouse in any direction.
- Panning - To pan across the screen, hold both Shift and MMB and drag your mouse in the direction you want to pan. To pan strictly horizontal, hold Ctrl and scroll up or down with the MMB. To pan strictly vertical, hold Shift and scroll up or down the MMB.
- Zooming - To zoom in or out, scroll up or down with the MMB. To zoom in or out with more precision, hold Ctrl and hold the MMB, then drag with the mouse up or down.
At first the navigation controls of Blender may seem little strange. Play around with them until you get a natural intuition for moving around the environment.
To read more about navigation, click here.
After learning how to comfortably move around, now we can get to manipulating objects. When starting a new project, there is a cube conveniently placed in the center of the screen. First select the cube by left clicking on it and try performing the following:
- Moving - To move the cube, press g and move your cursor in the desired direction you want to move the cube. To move the cube along a single axis, press either the x, y, or z keys (after having pressed the g key). To move the cube along only two axes, press Shift+[axis to exclude]. So for example, if you want to move the cube on the x-axis and y-axis only, you would hit Shift+z. To apply the changes of the scaling, left click the mouse. If you don't want to apply the changes, then right click.
- Scaling - To scale the cube, press s. You should see a line from the center of the cube to your cursor. Move your cursor towards and away from the center of the cube, and notice how it changes in size. You can also scale along a single axis by pressing x, y, or z, where they represent the x-axis, y-axis, and z-axis, respectively. If you wanted to scale on only two of the axes, press Shift+[axis to exclude]. To apply the changes of the scaling, left click the mouse. If you don't want to apply the changes, then right click.
- Rotating - To rotate the cube, press r. Rotating your cursor around the pivot of the object will rotate the object in that direction. Similarly to scaling, you can rotate about a single axis with the x, y, and z keys. To apply changes left click. To discard changes, right click.
You can also morph the shape of the cube by going into Edit Mode. To do this, select the cube and hit the Tab button. When you were navigating and manipulating the cube, you were in Object Mode. You can toggle between the two mode with the Tab key. Where Object Mode allowed you to manipulate the object as a whole, Edit Mode lets you manipulate the vertices that make up the object. This means you can manipulate the fundamental shape of the object. It may seem confusing at first, so it might be best if you experience the different modes for yourself.
When in Edit Mode, you can select any of the vertices on the cube and move them just as you did when you learned to move the cube in Object Mode. You can select multiple vertices by holding the Shift key and left clicking on any of the vertices. Try moving, scaling, and rotating multiple vertices at the same time. You can distort the cube's shape in some interesting ways.
Step 3: Modeling the Rough Shape of the Light Bulb
After familiarizing yourself with manipulating an object in Blender, you're ready to start modeling the light bulb. Go to File > New or hit Ctrl-N to start a new project. Delete to cube in the center of the grid by selecting it, then hitting the x key.
Getting a Reference Image:
When modeling in Blender, it helps to use a reference image. Search Google Images for an image of a light bulb. It is best to use an image that is simple yet realistic and without any background. Once you found an image, save it to a known location. For this tutorial, I will be modeling an incandescent light bulb.
Next, go to the side menu on the right hand side (if you don't see it, hit the N key until you do). Under Background Images section, click the button Add Image, then hit the Open button. Navigate to where you saved your reference image and open it. Now you may or may not see the image. If you do not see the image, hit the 5 key on the number pad. This switches the viewing mode from Perspective to Orthographic. You can switch back to Perspective mode by hitting the 5 key again. If you still don't see it in Orthographic mode, then hit either of the 1, 3, 7, or 9 keys on the number pad. By default, the background image can only be viewed from front, side, top, and bottom perspectives. You can change the setting for viewing the background image under the Axis option if you want.
Getting the Base Shape:
To add an object to the grid, hit Shift+A to pull up a menu. Now we want start with a shape that most closely resembles the light bulb. You can technically start with any shape, but for simplicity, I would suggest starting with a sphere. So under Mesh, select UV Sphere. This will pull up a sphere in the center of the grid.
Before you do anything to the sphere, you will notice a menu on the bottom right hand corner called Add UV Sphere. There are two options that you want to edit. Segments and Rings. By default, there should be 32 segments and 16 rings. You want to reduce these numbers by half. When you begin modeling, your starting shape should be as low resolution as possible in order to preserve computer memory. You can add a modifier called Subdivision Surface to increase the resolution when needed. This allows for more flexibility.
In order to add this modifier to your sphere, first select your sphere in Object mode. Click the modifiers icon in the rightmost menu in the row of other icons (it should look like a wrench). Click Add Modifier, then select Subdivision Surface. You can increase or decrease the resolution by adjusting the numbers under the options View and Render. You will only see the adjustments made under Render in your final render, so this option is not important right now.
Either adjust the size of the background image or adjust the size of the sphere so the sphere matches the size of the bulb.
Modeling the General Shape:
Now you can begin modeling! First you want to delete the bottom section of the sphere because it does not help representing the shape of the light bulb. To do this, switch over to Edit Mode. Hit the b key. This will allow you to select vertices that fall under a particular area defined by your cursor. Delete the bottom two or three rings of the sphere so you have something that looks like dome.
In addition to the scaling, rotating, and resizing tools, there are two other tools that you can use to manipulate the shape of the mesh: Extrusion (e key) and Loop Subdivide (Ctrl+r). The extrusion tool allows you to extrude faces from the mesh. The loop subdivide tool allows you to make loop edges on a given mesh to either sharpen edges by bringing the loop closer to an edge or using more vertices to manipulate the object more intricately.
Alt+left click the most bottom loop of the mesh to select all vertices of the bottom edge and hit the e key to extrude edges to elongate the shape. Use the reference image as a guide as you shape the mesh to look more and more like a light bulb. The shaping process will include the repetition of extruding face and moving vertices to closely match the reference image. The model doesn't have to be perfect. It only needs to closely match the shape of the reference image.
After you finished modeling the glass container of the bulb, it might help to separate the glass and the base of the bulb into two separate object. To do this, before you start modeling the base, select the edge loop closest to the bottom of the bulb and press Shift+d to duplicate the vertices. Next, hit the p key to pull up a menu called Selection and click on the Selection option. This will take all the currently selected vertices of an object and separate them into an other object. Doing this step now will help when constructing the inside elements of the bulb.
When you finally have the base shape down, you'll notice that your bulb will still have a gaping hole at the bottom. To create a face to close the hole, select all points along the bottom edge loop and hit the f key.
- Remember that this model only needs to look like a bulb and not necessarily the bulb in your reference image. Don't get frustrated if it is not perfect.
- Most common light bulbs have a screw for the base. In this tutorial I modeled it without this screw-like shape to keep the process relatively simple. Feel free to take on the challenge and make your bulb base look like a screw.
- As you're modeling it might help to view the mesh as a wire frame so that you can see the reference image as you are extruding and moving the vertices. To do this, hit the z key.
- When extruding, to keep the extrusion aligned along the z-axis, hit the z key. This will help keep your light bulb symmetric.
- Use the loop subdivide tool to sharpen the edges of your mesh. This will come in handy when modeling the base of the bulb particularly the bottom of the base and the top of the base (where the glass bulb meets the metal base).
Step 4: Modeling the Finer Details
At this point, you should have a mesh that looks like a light bulb where the light bulb is separated into the glass part and the metal base. In this step, you will model the inside elements of the light bulb such as wires and filaments.
To make modeling these elements easier, select the glass bulb part of the light bulb and hit the h key. This will hide any selected objects. To bring them back, hit Alt+h.
Modeling the Glass Base:
Most incandescent light bulbs have a glass base within the bulb. You can model this similar to the way you modeled the basic shape of the bulb. Though none of the preset shapes in Blender has a long slender shape like this base, I started with a cube. Again, you can start out with whatever shape you want, but I would suggest using a cube or a sphere.
In my reference image, there's a hole in the middle of the glass base. Your reference image may or may not have this. Whether you want to make this hole or not is up to you, but I like to add finer details to make the bulb as realistic if possible. To do this, I make some edge loop cuts on the glass base and position them in such a way that they form a square in the center of the mesh. Then I delete this square face on both sides and close any loose vertices using the f key.
Modeling the Wires:
Modeling the wires will take a slightly different approach. Instead of using a mesh, you will want to use a Bezier Curve. Hit Shift+a to pull up the Add menu. Then go to Curves > Bezier. This will put a curve at the position of your 3D cursor. You can manipulate this curve just as you would with a mesh object. In Edit mode, you will see red handle lines that allows you to manipulate the curvature. You can also create more of these red handle by hitting the e key.
The bezier curve may not look anything like a wire yet. It doesn't really have any depth or dimension. You can fix this by clicking on the curves icon in the rightmost menu. Change Shape to 3D, Fill to Full, and increase the Depth and Resolution under the Bevel option.
After you model one of the wires, you can save time by duplicating the wire you made and using it for the rest of the wires. Hit select the wire and hit Ctrl-d to duplicate it.
Modeling the Filament:
There are two ways you can do the filament. One way is to simply use a bezier curve. This will be the easiest way and the one I will be using in the tutorial.
However, if you are so ambitious, you can model the filament so that it looks like a coil. This is a slightly more involved and advanced technique, but you can accomplish this by applying a Screw modifier to a circle. I won't go into detail of how to do this but you can probably figure out how to do it by reading the documentation and playing around with this modifier.
Step 5: Adding Materials to the Light Bulb
You can render your light bulb by hitting Shift+z. As you can see, the image looks very unfinished. Go back to the 3D grid view by hitting Shift+z again.
We need to add materials to the bulb so that the base looks like metal and the glass bulb actually resembles glass.
Making the Glass:
Select the glass bulb. Click on the Materials icon in the rightmost menu. Click the New button and various sub-menus should appear. Under Surface, for the Surface, choose Glass BSDF. This applies a glass material to the bulb. If you render your object, you can now see all the inner elements of the bulb.
However, it still looks weird because Blender is treating the bulb as if it were one huge, solid chunk of glass. A real light bulb is hollow. So we need to give the bulb some thickness by going to the Modifier stack and adding a Solidify modifier. You can adjust the settings to your liking, but the default setting should be good enough.
Also apply a glass material to the glass base inside of the bulb.
Making the Metal:
Now we want to give the base of the bulb a metallic look. First, give the base some thickness by applying a Solidify modifier. Then go the the Materials stack and under Surface, apply a Glossy BSDF material, similarly to how you did for the glass bulb.
Apply this material to your wires as well.
Lighting the Filament:
Select your filament and then apply an Emission material to it.
If you render your light bulb now, you can see that the filament is emitting a light. But we want to create a simple environment so we can the light a little better.
Before you create your environment, you will want to scale down your light bulb to a size that is similar to a real light bulb. To see what size your bulb is, go to the Scenes stack. Under Units and Length, select the metric you are most familiar with. Select your entire bulb. Now if you hit the N key to pull up the side menu, you can see the dimensions in metric you selected under Transform and Dimensions. An average light bulb is about 12 centimeters.
The reason for scaling down the light bulb is so that when rendering your image, the camera gets a good size representation of the object.
Now you can add a plane under the bulb and set the color of the rendered background to black by going to the World stack and visiting the Color option.
Fixing the Lighting:
If you render it, you should see just your filament glowing. However, the light seems rather weak. If you go back to the Surface stack, you can increase the strength of it. But you'll notice that no matter how much you increase the strength, it doesn't actually look like it increase the strength by much in the render. This is because Blender is trying to calculate how the light is affected by the glass bulb, and Blender is actually very poor at doing this. So when we render our bulb, we want to light to emit as if the bulb were not there.
To do this, select the glass bulb. Go to the Object stack, under Cycle Settings, uncheck the box for Shadow. If you render your light bulb. the lighting should look a little better. Also, I set the strength of my light to about 10,000.
To make the light more realistic, we want to change the color of the light. By default, the light is pure white, but in real life, this is not the case. Now you can adjust the color for the emission surface, but it' actually difficult to get the right hue and saturation of a light bulb.
Instead, you can open the Node Editor. If you click on the left bottom-most icon on the bottom menu, it pulls up another menu where you can find Node Editor. In the node editor, you can give your objects even more attributes and properties.
If you hit Ctrl+a in the node editor, you will pull up a menu of various attributes you can add. Go to Converter > Blackbody. The attribute Blackbody, modifies the temperature of the light. Set the value to about 3,000.
At this point, you should have a decent looking light bulb.
Step 6: Rendering the Final Image
Congratulation! Now you can start composing an image for the final render. All that needs to be done is the final render.
There's only so much you can do with the positioning of the bulb. I have mine laying on its side.
Adding a Camera:
For your final render, you will want to add a camera so that you can visualize what your image will look like in the final render. To add a camera, hit Shift+a, the select Camera. Resize and position the camera so it views your light bulb to your liking. You can see how your image looks from the camera's perspective by hitting 0 on the number pad.
To render your image, go to the Render stack in the rightmost menu. There are several options you want to adjust:
- If you have a GPU, your computer will not render the image unless you change the option Device, to GPU Compute.
- Also under Resolution, make sure it is at 100%
- Under Sampling and Samples, change the number of samples for the Render option to about 1,000.
- Under Light Paths, make sure that Reflective and Refractive Caustics are turned off.
Now you can click the Render button and your image will start rendering!
Step 7: Conclusion
Congratulations! You modeled and rendered a light bulb in Blender!
Now this image is far from complete, and there are many things you can do to make this image a lot better. But for such a simple image, I tried not to overwhelm any beginners, as the purpose of this tutorial was to familiar the user with Blender.
First, the shadows are a bit too harsh, making the image a little unrealistic. You can fix this problem in the node editor with various attributes. Also, the base of the bulb is a little too metallic. This can be fixed by merging a Diffuse BSDF with the Glossy BSDF material in the node editor.
This image is also rather boring. To make it more interesting you can model some other objects and add them to your image. Perhaps you can make a lamp for this light bulb.
Post-processing would also enhance the image. Blender allows you to add depth of field to your rendered image and other effects such as various glows.
I encourage you to looking into these activities and continue exploring other powerful tools in Blender!
We have a be nice policy.
Please be positive and constructive.