Making Photo-Realistic Lego Bricks in Blenderbrixaranimation.com/Bricks Tutorial.pdf · To start,...

3
This tutorial demonstrates how to achieve a near-photo-re- alistic render of basic Lego bricks using Blender 2.48a. We’ll only cover the very basics of Lego rendering, without getting into complicated processes like modelling custom Lego bricks. For this tutorial, I’m assuming that you know the basics of the Blender software. * * * To start, you need to get some 3D Lego bricks into Blender. To generate the bricks and build models, I use a free program called LeoCAD (www.leocad.org), which allows users to export their models to a .3ds format. After exporting to .3ds, I import the .3ds into Blender using the default settings. Find some Lego-building software that works for you, put together a simple scene, and import it into Blender. Next, we’ll adjust some of the basic material settings for the Lego bricks. Here are the settings I used: Diffuse Shader: Oren-Nayar, with Reflection at .4 and Rough at .5 Specular Shader: Blinn, with Specularity at .8, Hard at 80, and Refraction at 4 Ray Mirror: On, with RayMir at .1 and Gloss at .9 You can also work with the colors of the bricks if you wish. I changed the color of the black brick to Making Photo-Realistic Lego Bricks in Blender

Transcript of Making Photo-Realistic Lego Bricks in Blenderbrixaranimation.com/Bricks Tutorial.pdf · To start,...

This tutorial demonstrates how to achieve a near-photo-re-alistic render of basic Lego bricks using Blender 2.48a. We’ll only cover the very basics of Lego rendering, without getting into complicated processes like modelling custom Lego bricks. For this tutorial, I’m assuming that you know the basics of the Blender software.

* * *

To start, you need to get some 3D Lego bricks into Blender. To generate the bricks and build models, I use a free program called LeoCAD (www.leocad.org), which allows users to export their models to a .3ds format. After exporting to .3ds, I import the .3ds into Blender using the default settings. Find some Lego-building software that works for you, put together a simple scene, and import it into Blender.

Next, we’ll adjust some of the basic material settings for the Lego bricks. Here are the settings I used:

Diffuse Shader: Oren-Nayar, with Reflection at .4 and Rough at .5Specular Shader: Blinn, with Specularity at .8, Hard at 80, and Refraction at 4Ray Mirror: On, with RayMir at .1 and Gloss at .9

You can also work with the colors of the bricks if you wish. I changed the color of the black brick to

Making Photo-Realistic Lego Bricks in Blender

R: .05G: .05B: .05

Let’s work on the meshes of the bricks. Select one brick, then select the rest of them using [b] key (or hit [space] and choose Select>>Select All by Type>>Mesh), and hit the “Set Smooth” button under the Editing panel. You may also want to re-define the centers of each brick, for animation pur-poses. With all the bricks selected, hit [space], and choose Transform>>Center New.

Now it’s time to bevel the bricks. This will give them soft edges, and makes a big difference when it comes to realism. Select a brick, and add a Bevel Modifier, with a width of .01 or so. If you’re ready for some “tedious” work, limit the bevel using bevel weights (circled in red at right). If you do this, Blender will bevel only the edges you select. To select the edges for beveling, enter Edit Mode. Use Face Select Mode instead of Vertex Select Mode, and make sure that all the faces in the brick mesh are selected. Now, using the [b] key with the [alt] key held, deselect the vertical faces of the studs of the brick (see the screenshot at right). Hit [control + shift + e], and type in the value of 1. Now the bevel modifier bevels all of the brick mesh, except for the vertical sides of the studs.

The extra step of leaving the vertical stud sides out of the bevelling is not absolutely necessary, but it will help keep them looking smooth.

Next we’ll apply the bevel modifier to the rest of our bricks. Enter Object Mode again, and select the rest of the bricks using the [b] key or Select All by Type feature. Hit [control + c], and choose Modifiers>>Bevel. Now that the bevel modifier is applied to all the bricks, you can set the bevel weights for the remainder of them, one by one.

We’re getting close to render time, but there are a few steps left. Add in a lamp (and a floor plane, if you want). I used a sun lamp, with Ray Shadows enabled. Set the Soft Size to 20 and the Samples to 10. I used an Energy of 2 and a Distance of 5000. Go to the World settings and turn on Ambient Occlusion. Set the energy to 1 with the number of samples at 10. I actually used the “Constant Jittered” option for ambient occlusion, which saved on render time.

In the Scene panel, enable radiosity rendering (circled at right). Under the Radio Render tab (in the Shading panel), set Max Iterations to 1 and Gamma to 10. This will allow our brick meshes to render smoothly.

As the last step, go to the Node editor, and add in a Gamma node and a Hue/Saturation/Value node between the input and the output. Change the Gamma value to .60, and set the Saturation value to 1.2. Of course, turn on the “Do Composite” button in the Scene panel. Now, hit the F12 key (which on your keyboard is probably worn out by now) to render!

* * *

You can find a .blend file and full-size example render at the following page of my website:

http://www.chamberlinproductions.org/photorealbricks.html

Some final notes: if you render a close-up of your Legos in high resolution, you’ll see that there are a few flaws; but without more advanced Blender techniques, these flaws can’t be helped.

First, at (very) close range you will notice the polygonal look of the studs. This can only be satisfactorily fixed with some good mesh work. Also, if you render the underside of a brick, you will see at close range that the tube-like structures on the in-side of the brick will not quite look smooth either. Part of the reason is that they have been bevelled, and we didn’t take the time to leave them out of the bevelling like we left the studs out.

Second, there are no tiny “Lego” signatures on the studs of each brick, as there are in real life. That would take a little more mesh work!

If you are a hardware-challenged individual (like me), and your computer can’t handle rendering larger models with a lot of realism, there are several things you can do. For starters, you can lower the number of samples on the lamp and ambient occlusion. You can also skip the entire bevelling process. The results won’t look as realistic, but you can still get decent renders, especially from a distance:

Anyhow, I hope this tutorial has helped someone progress as a brickfilmer!

William Chamberlin