Tutorial 1: Your first scene - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Tutorial 1: Your first scene

Personal tools

From LuxRender Wiki

Jump to: navigation, search
This page relates to Blender 2.4x and LuxBlend 0.7.x

This tutorial covers the basics of using LuxBlend and LuxRender 0.6rc3 in Blender to build a simple scene with a light source and a few simple materials. It is intended for users who are new to LuxRender, but who are somewhat familiar with Blender.

Contents

Introduction

LuxRender is an unbiased renderer that will handle your scene in a physically accurate way. To understand how this differs from most other rendering engines, let's first have a look at some typical properties of a typical render engine.

In many render engines, there is a lot to take into consideration when setting up materials and lighting in a scene. Lights and materials in such a renderer can be quite different from those existing in reality. For example, one could create lights that don't cast shadows. Or materials can be defined to be completely transparent while still casting dark shadows.

These features can be very useful in making a scene look realistic. Imagine a teapot in 3D space put near a red wall. In reality the wall would absorb all colors of white light and reflect only the color red. If the render engine does not support this option, one could manually put a red light between the wall and the teapot. This little cheat may work well in some situations, but when working with more complex scenes it tends to get cumbersome.

LuxRender works radically different and takes all the burden of faking away. Because it closely resembles the real world by the use physical and mathematical formulas, when you use LuxRender, you would just place the light where it is supposed to be and start the rendering. LuxRender will then calculate how much light bounces through the scene, taking interactions between all objects into account.

Bear in mind that this luxury -like many other luxuries- comes with a price. The most noticeable downside of unbiased rendering is long rendering time – so make sure to render at low resolution when doing test renderings. Another thing new users may have to get used to is handing over control to the rendering engine: influencing the shadow colour or changing the falloff properties of lights are no longer possible.

This tutorial should get you started with the program. Once you've completed this tutorial, we suggest to take an old scene, set up basic lighting and materials and see how good LuxRender can make it look.

Scene setup

We will start with a simple scene: first delete the standard cube and light, then create a plane, a camera and place 3 monkeys on it as shown in this screenshot:

Tutorial1 image1.png

Assign some materials with names (we will use monkeyleft, monkeymiddle, monkeyright and plane as material names) to the different objects you have created. These name will be used when assigning materials in LuxBlend later on.

It is not strictly necessary to configure any material colours or other parameters in the blender material editor as all this will be done in the LuxBlend material editor instead. Still, it may turn out to be convenient to change the diffuse colour so that the different materials will show in the 3d view.

Light

Next, we will add a LuxRender area light source. In general, it is best to avoid point lights as all light sources in the real world have a certain size. In this case, we will be using a mesh and assign a light material to it. Create a plane and position it above the monkeys:

Tutorial1 image2.png

In Blender, create a material named 'light' and assign it to the plane.

LuxRender mesh lights emit light only in the direction of the surface normal, so we have to make sure the normal is pointing down in our scene, otherwise no light will fall on our objects. You can do this by either rotating the plane 180 degrees, or by flipping the normals in edit mode.

Now we will define the properties of this material called “light” in LuxBlend. Create a Blender window and open LuxBlend in it (if you don't know how to do this, check the instructions [Installing_LuxRender_and_LuxBlend|here] (Windows and Linux) or [OSX_installation_instructions| here] (OS X)). Go to the material editor tab, and while having your light object selected in the 3D window, you should see LuxBlend recognize the name of your material which is 'light'.

Change the material type to "light" on the purple bar of the material editor:

Tutorial1 image3.png

By default the light will be a white coloured light. We do not need to adjust any intensities as LuxRender's tone mapping system will automatically adjust to any light intensity in your scene.


Materials

Now we will start assigning materials. During this tutorial we will be using a "glossy" material for our floor plane, a "matte" material for our left monkey, "glass" for the middle monkey and "metal" for the right monkey.

Select the floor plane we created and choose the "glossy" material in the LuxBlend material editor.

The glossy material has a diffuse channel, a specular channel and a roughness value. Click on the little coloured box on the diffuse channel and select a light brownish colour:

Tutorial1 image7.png

For the specular colour, choose a grey colour that is of similar brightness as the difuse colour.

LuxRender's roughness values can range from 1.0 (pure lambertian / very rough) to infinity (completely specular). For this scene we will use the default value of 50, which is quite glossy.

Next we will assign a "matte" (diffuse) blue coloured material to our left monkey.

Matte materials are LuxRender's most simple materials; they just have a diffuse colour.

Select the monkey, and assign a "matte" material and give it a blue colour:

Tutorial1 image4.png


Our middle monkey will be made out of metal. Select the monkey, change the material type to “metal” and choose “silver” in the name field.

Tutorial1 image5.png


Next we will use a glass material on the last monkey. To do this, select the middle monkey and after checking that the selected material in LuxBlend has been updated, change the material type to “glass”. The glass material has a number of parameters and some presets are available, but we'll just use the default values which should result in clear glass.

Tutorial1 image6.png


Previewing your render

At this point we will want to have a look at what our render will look like. We will use a fast preview method for a quick look. Although our scene is simple enough to preview it with full unbiased quality, we will use the directlighting preview setting here to demonstrate the process, which will come in handy on more complex scenes later.

From the Render presets drop down menu, choose 'Preview - Directlighting only' and press the “Render” button.

Tutorial1 image8.png

The engine will now render without any indirect light, giving a traditional CG look to your scene, with no glossy reflections (only lights). This way, the rendering will be done very fast.

Note: If your render looks blue, make sure that under the Cam/Env tab the environment is set to “none”.

The engine will now render without any indirect light, giving a traditional CG look to your scene, with no glossy reflections (only lights), but it will do it very fast.

Hit the Render button at the bottom of the exporter and you should have a preview rendering in a couple of seconds:

Tutorial1 image11.jpg

NOTE: it usually takes 12 seconds for the program to update the image during rendering. If you want this to be shorter, you can modify the interval (in seconds) in the 'Output' tab of the exporter. However, updating the image takes some processing power, so setting the interval too short will result in longer render times.

Adding some subdivision

Adding some subdivision will make our monkeys look a lot nicer.

We can do this using a blender 'subsurf' modifier, or we can just export our simple meshes we have now and let LuxRender subdivide them internally in the engine. The latter provides a much faster method to export geometry (especially when there it a lot of it, with large numbers of subdivisions), but will not give any preview in Blender, so in this case we will just add some subsurf modifiers in Blender. After adding the modifiers, make sure all the monkey objects are set to smooth.

Final rendering

We will now render our final image.

Change the render configuration preset to 'Final – MLT/Bidir Path Tracing (interior) (recommended):

Tutorial1 image9.png

This will change the configuration of the engine to use Metropolis Light Transport on top of Path tracing. This will result in a unbiased render result.

Next, go to the 'output' tab in LuxBlend, and make sure the 'PNG Output' button is enabled:

Tutorial1 image10.png

The program will now save a tonemapped .png image file every 120 seconds in the same directory as where your export scene file is located. This directory is defined in LuxBlend's system tab in the 'default out dir' field.

Press the render button again and you will see the image appear after a few seconds. The image will slowly get better in quality; it will become less and less noisy. Once you are satisfied with the result, close LuxRender and copy the saved .png image from the default output directory to a convenient location.

The final result