Skip to content

Cycles Renders

SMG edited this page Oct 8, 2023 · 12 revisions

ldr_tools_blender is designed to take advantage of Blender's Cycles rendering engine to create photorealistic renders. This guide walks through how to set up and render a basic scene as well as useful tweaks for optimizing render quality. The steps in this guide are current as of Blender 3.6. Newer Blender versions will have similar features, but the UI and settings may be different.

Importing the Model

The addon supports models in LDraw formats like .ldr or .mpd. Users of Bricklink Studio will first need to export the model as .ldr under File > Export As > Export as LDraw. See the README for basic importing instructions.

Creating a Backdrop

image

This step is optional but can help renders feel more believable. A curved backdrop model will catch shadows as well as add soft bounced lighting to the model, recreating the effect of a photography studio.

Start by adding a plane to the scene with Shift + A > Mesh > Plane. Select the plane and press tab to enter edit mode. Press 2 on the keyboard to enter edge selection mode or click the edge icon. Select and edge of the plane and extrude it twice using the extrude region tool or using the shortcut E+Z. Press tab to exit edit mode or use the mode drop down.

Add a subdivision surface modifier to the plane in the modifiers tab. This will smooth out the transition between faces similar to an actual backdrop. It's also important to right click the plane and select "Shade Smooth" for best results.

This is also a good time to adjust the plane to fill the render. Scale the plane or adjust its vertices or edges in edit mode until they extend past the edges of the rendered region. It's a good idea to make the backdrop model larger than necessary in case the camera needs to be adjusted later. Depending on the camera angle, it may also be helpful to rotate the backdrop to face the camera.

Click the ground plane and add a new material in the materials tab. The default white color is a good starting choice. While it may be tempting to set the color to pure white (1.0, 1.0, 1.0), this is unrealistically reflective. A brightness value of 70-80% will match the brightness of paper or cloth. If the shadows are too dark, increase the environment lighting brightness in the world tab or increase the exposure under Render > Color Management. The backdrop also doesn't have to be white. Colors like black or red can create an intense image that may work well for certain scenes.

Camera

image

A camera is required for rendering. This is different from the camera used to render the viewport, which can be edited by clicking N and then editing settings in the View panel. Add a camera to the scene with Shift+A > Camera. There are a few different ways to adjust the camera position. With the camera selected, press Ctrl+Alt+Numpad 0 to frame the current view. The camera can also be transformed using the move and rotate tools, keyboard shortcuts, or editing the values directly in the Object Properties panel. Another helpful tip for adjusting the camera is to toggle quad view using View > Area > Toggle Quad View or Ctrl+Alt+Q. To look through a camera, select the camera and use Numpad0 or right click and select Set Active Camera.

When working with models of varying scales, it's important to properly frame the model. This can be achieved by translating the camera to be closer or farther away from the scene or by using the focal length or field of view properties in the Camera panel. While it may be tempting to only adjust the focal length to act as a "zoom" slider, this can have unintended effects on the perspective. Smaller focal lengths will have more perspective distortion like a wide angle lens while longer focal lengths will have less distortion like a telephoto lens. Consider using a large focal length and placing the camera far away for more natural renders of large scenes.

Lighting

image

There are a number of ways to light a model. A simple lighting setup used for the sample renders on this repository is a directional light and ambient light. Create a directional light using Shift+A > Light > Sun. Rotate the light in the object properties, using the rotate tool, or using the R key. The intensity can be adjusted in the light properties panel. The sample renders use an intensity between 2.0 and 4.0, but this can be adjusted depending on the scene. Increasing the sun light's angle in the light properties will make the lighting and shadows softer.

Ambient or environment lighting is set in the world tab or by selecting World in the shader editor. A dark gray RGB color will fill in the shadows and create a more realistic image. Using an HDRI environment map will create more interesting reflections but isn't strictly necessary for simple renders. Many HDRIs can be downloaded for free from online. The sample renders just use the basic RGB color option.

Depth of Field (DOF)

image

Depth of field can add increased realism to a render by simulating the out of focus regions from a camera lens. Select the scene camera and enable Depth of Field in the Camera tab. Render the scene or set the camera as active and switch the viewport to rendered view to see the effect. For most scenes, it may look like nothing has changed. The key value to edit is the F-Stop, which controls how much of the scene is in focus. The default F-Stop value will keep most of the scene in focus. For the current scale used for LDraw models, try values between 0.0 and 1.0. This will create a noticeable blurring effect. Set the focus object to the desired point of focus in the scene by selecting the object from the drop down or using the eye dropper. The focus can also be adjusted manually for more precise control like focusing on a precise corner of a part.

Render Settings

The render tab controls the various settings for Cycles. Make sure to select "GPU Compute" under device if available. This will greatly speed up rendering. For weaker integrated graphics like on laptops, it may work better to leave this set to CPU.

It's also important to enable "Denoise" for the render. This will allow for clean renders with much fewer samples and greatly reduce rendering times. Users with an Nvidia GPU should select "Optix". Other machines should use "OpenImageDenoise" with passes set to "Albedo and Normal" for best results. This can also be enabled for the viewport.

The number of required render samples will depend on the lighting and material complexity of the scene. The sample renders all use between 256 and 512 samples since Optix denoising is very effective. Scenes with lots of complicated light paths like transparent windows or occluded interiors may need more samples. Very simple scenes may work well with even 64-128 samples.

The output tab controls the resolution of the final render. It's important not to set this too high since increasing the resolution has a dramatic impact on render times. For creating high resolution renders, it can be helpful to set the resolution scale to a value like 50% or even 25% when testing. This makes test renders much faster when experimenting with camera or lighting changes. Set the resolution scale back to 100% for the final render.

Rendering

image

Rendering requires a camera to be active. Select the desired camera and press 0 on the numpad to set it as active. This can also be done by right clicking the camera in the scene and selecting "Set Active Camera". When ready to render, hit F12 to render the scene.

Color Management

Color management is critical to map the extremely wide range of color and brightness values rendered by Cycles into colors that a computer monitor can actually display. Color management can be adjusted in the very bottom of the Render tab in the Color Management section. Leaving the view transform at its default value of "AgX" or "Filmic" depending on the Blender version will result in softer and more realistic falloff for highlights. This may result in the image looking "washed out" with very low contrast. The contrast can be adjusted by selecting one of the available looks. The exposure setting can be used to globally adjust the rendered brightness if the entire scene is too bright or too dark.

Transparent Renders

image

By default, Cycles will create opaque renders. For creating renders with a transparent background, check Film > Transparent in the Render tab. When saving the render, use a format that supports transparency like PNG or TIFF. For transparent renders with shadows, enable Visibility > Shadow Catcher in the Object Properties tab for the ground plane or backdrop. This will only work properly if transparency is enabled in the render settings. The render above uses transparency and a shadow catcher.

Clone this wiki locally