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.
Blender
Blender is a free & open sources 3D modeler & renderer.
Movies like Sintel or Big Buck Bunny have been entirely made with Blender.
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
STEP 1
Please choose
Edit > Preferences
STEP 2
Click Add-ons, then Install
STEP 3
Please select & install the plugin as shown in the screen capture.
STEP 4
Please activate the plugin & save the settings.
STEP 5
You should now be able to import LeoCAD files.
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.
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.
STEP 9
CPU Rendering
Render faster with a GPU
If you have a supported GPU you can render pictures faster.
Go to :
Edit > Preferences > System
Once you selected your GPU, you need to enable it for rendering.
You can now start GPU rendering.
Rendered pics examples
Holiday house model can be found here.
This picture has been rendered in 02 min 40 sec with a nvidia GPU.
Train model can be found here.
This picture has been rendered in 02 min 11 sec with a nvidia GPU.
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