How to easily create a CG image like a toy photo "Ubuntu / Linux" ・ Photo realistic rendering with LeoCAD & Blender

hulk02.png 写真かCG?

Introduction

Hello media of streampack team. https://cloudpack.jp/service/option/streampack.html

Copyrights Sintel © copyright Blender Foundation | www.sintel.org

Big Buck Bunny © copyright 2008, Blender Foundation | www.bigbuckbunny.org

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

Purpose

Learn simple examples of LeoCAD and Blender. All those softwares are compatible with Linux, Windows & MacOS. As I didn't find a lot of documentation for Linux I decided to focus this tutorial on Linux. All of these software are compatible with Linux, Windows and Mac OS. I couldn't find any Linux installation documentation, so I decided to focus this tutorial on Linux.

Tools / Tools

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. LeoCAD is a free and open source CAD software. You can easily create a scene with block parts using drag and drop. LeoCAD supports the ldraw file format (https://en.wikipedia.org/wiki/LDraw). Screenshot at 2020-03-05 14-28-26.png

Blender Blender is a free & open sources 3D modeler & renderer. Movies like Sintel or Big Buck Bunny have been entirely made with Blender. Blender is a free open source 3D modeler and renderer. Movies such as Sintel and Big Buck Bunny are all made in Blender. Screenshot at 2020-03-05 14-36-31.png

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

Versions ・ Versions

In this tutorial I am using the following versions : This tutorial uses 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 ・ 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. By default, LeoCAD provides a limited number of block parts. The next step is to install more parts.

More block Parts! More block parts!

The following command will install more blocks for LeoCAD. The following command installs more LeoCAD blocks.

sudo apt-get install ldraw-parts

Checking the ldraw-parts install path : ** ldraw-parts ** Check installation 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

If you install this package with ** apt-get **, the default block part 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. Since the paths are different, we need to create a symbolic link.

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. LeoCAD is very easy to use and intuitive. You can easily drag and drop parts to create a scene. Saved scenes use the **. Ldr ** format.

Blender In this tutorial I am using Blender v2.82. I'm using a static build of Blender "v2.82". Download it from here Download here

Blender plugin Download it from here. Download from here.

Step 1 ・ STEP 1

Please choose Please choose: Edit > Preferences

Step 2 ・ STEP 2

Click Add-ons, then Install Click ** Add-ons **, then ** Install ** addon_s.png

Step 3 ・ STEP 3

Please select & install the plugin as shown in the screen capture. Select and install the plugin as shown in the screen capture. Screenshot at 2020-03-05 15-12-00.png

Step 4 ・ STEP 4

Please activate the plugin & save the settings. Please enable the plugin and save your settings. save.png

Step 5 ・ STEP 5

You should now be able to import LeoCAD files. You should now be able to import the LeoCAD file. import.png

Step 6 ・ 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. Check the imported scene. You can use the mouse wheel to zoom in and out on the scene. You can move around the scene by holding down the middle mouse button.

Step 7 ・ 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. Move the camera and change the viewpoint. To move the camera, you need to click the camera to select it, press the ** G ** key and move it with the mouse. camera_tuto.png

Some Blender keyborad shortcuts ・ Blender keyboard shortcuts

From the Blender documentation

From Blender doc

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”.

Roll Press ** R ** to enter the object's rotation mode. By default, it rotates on the camera's local ** Z ** axis (the axis orthogonal to the Camera View). This movement is called the "Roll" of the camera.

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

** Horizontal Pan or Yaw ** This corresponds to rotation around the camera's local Y axis. Press ** R ** followed by ** Y ** twice.

Step 8 ・ STEP 8

Settings the image size. Please select an image size. render.png

Step 9 ・ STEP 9

CPU Rendering / CPU Rendering render2.png

Render faster with a GPU ・ Render faster with GPU

If you have a supported GPU you can render pictures faster. If you have a Supported GPU (), you can render the image faster.

Go to : Please click: Edit > Preferences > System system.png Once you selected your GPU, you need to enable it for rendering. Once you've selected your GPU, you need to enable rendering. gpu_1.png

You can now start GPU rendering. Now you can start GPU rendering. render2.png

Rendered pics examples-Rendering examples

Holiday house model can be found here. Click here for the Holiday House model [https://www.eurobricks.com/forum/index.php?/forums/topic/48285-key-topic-official-lego-sets-made-in-ldraw/&page= It is located at 31 & tab = comments # comment-1529726). This picture has been rendered in 02 min 40 sec with a nvidia GPU. It took 2 minutes and 40 seconds to render this image on the nvidia GPU. house_2min_40.png

Train model can be found here. The train model is [here](https://www.eurobricks.com/forum/index.php?/forums/topic/48285-key-topic-official-lego-sets-made-in-ldraw/&do=findComment&comment = 1009702). This picture has been rendered in 02 min 11 sec with a nvidia GPU. It took 2 minutes and 11 seconds to render this image on the nvidia gpu. train_2min_11.png

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

Recommended Posts

How to easily create a CG image like a toy photo "Ubuntu / Linux" ・ Photo realistic rendering with LeoCAD & Blender
How to create a submenu with the [Blender] plugin
I tried to easily create a high-precision 3D image with one photo [0]. (Confirmed how to capture the space, put a net)
I tried to easily create a high-precision 3D image with one photo [2]. (Try processing depth with numpy)
I tried to easily create a high-precision 3D image with one photo [-1]. (Is the hidden area really visible?)
How to create a shortcut command for LINUX
How to create a multi-platform app with kivy
I tried to easily create a high-precision 3D image with one photo [1]. (Depth can now be edited in PNG.)
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
How to create a local repository for Linux OS
[Python] How to create a 2D histogram with Matplotlib
I tried to easily create a high-precision 3D image with one photo [3]. MiDaS of feat. Intel-isl only depth without permission.
A memo on how to easily prepare a Linux exercise environment
How to create a flow mesh around a cylinder with snappyHexMesh
How to create an ISO file (CD image) on Linux
How to create a heatmap with an arbitrary domain in Python
How to create a label (mask) for segmentation with labelme (semantic segmentation mask)
Create a Docker container image with JRE8 / JDK8 on Amazon Linux
How to write a docstring to create a named tuple document with sphinx
How to create a serverless machine learning API with AWS Lambda
How to create a Conda package
How to create a virtual bridge
How to install MBDyn (Linux Ubuntu)
How to create a Dockerfile (basic)
[Blender] How to make a Blender plugin
How to create a config file
3. Natural language processing with Python 1-2. How to create a corpus: Aozora Bunko
I came up with a way to create a 3D model from a photo Part 02 Image loading and vertex drawing