Lego® photo realistic rendering with LeoCAD & Blender [Ubuntu / Linux]

Step by step guide to learn to render Lego photorealistic images with Blender !

Lego® photo realistic rendering with  LeoCAD & Blender [Ubuntu / Linux]

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse the following softwares.

Tools

  • LeoCAD
  • ldraw-parts
  • Blender & ImportLDraw plugin

LeoCAD

LeoCAD is a free & open sources CAD software , you will be able to create scene easily with block parts using drag&drop. LeoCAD supports the ldraw file format.
01


Blender

Blender is a free & open sources 3D modeler & renderer.
Movies like Sintel or Big Buck Bunny have been entirely made with Blender.
blender_04

Blender plugin

Blender will use this plugin to import .ldr files and to setup the rendering options.

Versions

In this tutorial I am using the following versions :

Software Version
Ubuntu 18.04 LTS
LeoCAD 18.01
Blender 2.82
ImportLDraw plugin 1.1.11 for blender 2.81

Installation and common use cases

LeoCAD

sudo apt-get install leocad

By default, LeoCAD is provided with a limited number of block parts. We will install more parts in the next step.

More blockd more fun !

The following command will install more blocks for LeoCAD.

sudo apt-get install ldraw-parts

Checking the ldraw-parts install path :

dpkg -L ldraw-parts

When you install this package with apt-get, the default block parts location will be /usr/share/ldraw
The ImportLDraw plugin is looking for parts in ~/mldraw

As the paths are different we need to create a symlink.

ln -s /usr/share/ldraw ~/ldraw

LeoCAD is very easy to use and intuitive. You can easily drag & drop parts to create your scene.
Your saved scene will use the .ldr format.


Blender

In this tutorial I am using Blender v2.82.
Download it from here

Blender plugin

Download it from here.

STEP 1

Please choose
Edit > Preferences

STEP 2

Click Add-ons, then Install
addon

STEP 3

Please select & install the plugin as shown in the screen capture.
02

STEP 4

Please activate the plugin & save the settings.
save

STEP 5

You should now be able to import LeoCAD files.
import

STEP 6

Checking the imported scene.
You can use the mouse wheel to zoom in and out on your scene.
You can hold the middle button of your mouse to move around your scene.

STEP 7

Moving the camera & changing the perspective.
In order to move the camera you need to select it by clicking it, then press the G key and move it with your mouse.
camera_tuto

Some Blender keyborad shortcuts

From the Blender documentation

Roll
Press R to enter object rotation mode. The default will be to rotate the camera in its local Z axis (the axis orthogonal to the camera view), which is the definition of a camera “roll”.

Horizontal Pan or Yaw
This corresponds to a rotation around the camera’s local Y axis. Press R, and then Y twice.

STEP 8

Settings the image size.
03

STEP 9

CPU Rendering
render2


Render faster with a GPU

If you have a supported GPU you can render pictures faster.

Go to :
Edit > Preferences > System
system
Once you selected your GPU, you need to enable it for rendering.
gpu_1
You can now start GPU rendering.
render2


Rendered pics examples

Holiday house model can be found here.
This picture has been rendered in 02 min 40 sec with a nvidia GPU.
house_2min_40

Train model can be found here.
This picture has been rendered in 02 min 11 sec with a nvidia GPU.
train_2min_11


Information sources

https://www.leocad.org/
https://www.blender.org/
https://github.com/TobyLobster/ImportLDraw
https://en.wikipedia.org/wiki/LDraw
https://www.eurobricks.com
https://docs.blender.org/manual/ja/latest/editors/3dview/navigate/camera_view.html


Share Tweet Send
0 Comments
Loading...