You are here: Tutorials > Rendering Tutorial

Rendering Tutorial

This is a continuation of the Coffee Mug Beginner Tutorial. The information presented here builds on the lessons learned in that tutorial. In this section you render the mug to produce a final image. If you have skipped the modeling section, you can grab the coffee mug model here. With the mug model open, make sure you're in the Model interface tab and let's get started.

It would be simple enough to just press Render and have an image of the coffee mug at this point, but it wouldn't be that interesting of an image, especially with the default settings. And while rendering a single object has its place, in most cases you render out a scene in Modo, with multiple objects, a background, and some distinct lighting. In this section we'll assign a UV map, adjust the surface of the mug and clone it, using a preset to make a basic scene, and then adjust camera and render item settings to produce pleasing results.

Making a UV Map

First, we apply a UV map for later surfacing. UV maps are a way of assigning how a flat texture gets applied to a 3D surface at render time. To make things a little easier, let's hide the handle first.

1.   Using the lasso selection method covered in the previous tutorial, from a side view, drag out a shape, selecting just the handle.

TIP:  It's not easy to avoid selecting some of the body polygons, so if you just select the main part of the handle, you can also use the grow selection (Shift+Up) to add the adjoining polygons where the handle meets the body.

2.   Once the entire handle is selected, press H to hide the geometry.

Hiding geometry is a great way to concentrate on just a group of polygons in an object layer, and to ensure that geometry remains unmodified, as geometry that is hidden cannot be selected, or edited.

Step 01

In the bottom sub-tab of the toolbox there are some UV tools, not as many as in the UV mapping interface tab, but enough to do what we need to do here.

3.   Select the UV Projection tool toward the top of the toolbox and click in the 3D Viewport to activate the tool.
4.   In the Tool Properties panel, set the Projection Type to Cylinder, making sure the axis is set to Y, so the map wraps around the mug's height. Leave the Settings on Automatic.

This sizes the cylinder volume to match that of the selected (or in this case visible) polygons' outer bounding box volume. (A bounding box is simply a rectangular volume of space the represents an object's total height, width and depth).

5.   The map is made. Press Q to drop the tool accepting the UV map values.

Next, we'll assign an image map that matches the logo on the original reference image.

1.   Press U to unhide the handle, making it visible once again.
2.   Switch to the Layout tab for this next section, or if not using the tabs, press Ctrl+Tab and select the Layout workspace option form the popup menu.

This tab has all the functions needed for laying out a scene for rendering. The Layout section is unique in that it has tools for cloning geometry, which is precisely what we are going to do next.

Before we continue, there is a rather important concept you must understand to use the tools to your best benefit. So far you've used the Polygons and Edges selection modes to modify the geometry. For laying out the scene we'll be working in Items selection mode. In this selection mode you can only modify an item's position, rotation and scale, collectively known as its transform values. The previous modes, Vertices, Edges and Polygons are collectively known as the component editing modes and are strictly for editing the geometry itself. Two distinct operations take place in either the component or Items modes, though their results are identical. Each item layer in the Item List is a container for geometry. While in Items mode, you transform the container, but while in any of the component modes, only the contents of that container can be edited.

The upper right viewport of the Layout interface has its own series of tabs and you can select the Item List tab to get a list of all the available items, or layers and they are sometimes referred to in the current scene. So, now while in Items selection mode, make sure the mug layer is selected in the Item List.

3.   Click on the layer name (likely called 'Mesh', or 'Coffee Mug' if you grabbed the included file), highlighting the layer.

Now any operations applied to the scene only affects that selected layer.

The toolbox on the far left side of the screen has a row of buttons. Hidden underneath some of the buttons are alternate tools. These hidden tools are specified with the small gray arrow in the lower right corner of the button itself.

4.   Click and hold on the Scatter Clone button to open a context menu to display all the alternate options. Choose the Instance Scatter button to enable the tool, then click in the 3D Viewport, to activate interactive mode.

Step 2

You might not see anything in the viewport right away, aside from a tool handle.

5.   Press A while hovering the mouse cursor over the 3D Viewport to view all items in the scene.

Eight coffee mugs appear, scattered all around. In the tools property panel, you can adjust the Count value to any number you like.

6.   Set the Range for the vertical axis Y at 0 m to set all coffee mugs on the ground plane.
7.   To randomly rotate the clones, set the Y Rotate value to 360° and then adjust the Range on the X and Z axes to bring the mugs closer together.

Some mugs may overlap, we fix that in the next step.

If you're not happy with the placement of the clones, you can adjust the Seed value till you receive a result you are happy with.

8.   Once finished, drop the tool by pressing Q.

In addition to the original mug, you now have a number of pink wireframe clones. That pink color denotes that the duplicates are indeed Instances, virtual copies that reference the original Mesh Item. They contain no real geometry, just a reference to their originator, so they keep the scene file light and its size small. Any modifications made to the originator propagate to the clones automatically making it easy to modify them later on.

1.   Unlike other types of duplicated objects, such as Replicator Items, you have individual control over each mug instance, so while still in Items mode, click on any mug to select it, then press W to move (transform) the mug's position.
2.   Click on the green circle handle to constrain the movement parallel to the ground plane, making it easy to modify each item's position.
3.   While the Move tool is active, click over another mug instance to select it and then use the tool handles to move it around. Keep doing so until all of the mugs are positioned so they are no longer intersecting.

TIP:  Tumbling the viewport helps you to get a better view of the scene when making adjustments. Press Shift+A to zoom the currently selected items to fill the entire viewport, making it a little easier to navigate around amongst the multiple items.

Step 3

The Item List has now gotten a little over-filled with layers, so first we need to organize it a little.

1.   Click on the topmost Instance layer, scroll to the bottom and hold Shift, and click on the bottom-most layer, selecting all the layers in between.
2.   Press Ctrl+G to group all the layers together into a Group Locator. Toggling the arrow icon preceding the name hides all the layers in the list making it easier to navigate.

We need just one additional piece of geometry to fill out the scene and for that we use a Preset mesh.

1.   In the Preset Browser across the bottom of the screen, select the Meshes tab and locate the Basic folder, opening it. Inside, you find a few simple objects.
2.   Double click on the one named Ground Plane.

This serves as the ground in our scene. It catches cast shadows, so the rendered mugs do not look like they are floating in space.

3.   Save your scene.

Setting Up the Render

For the rendering portion of this tutorial, switch to the Rendering interface tab. In the upper right viewport, expose the 'Shader Tree' panel, all the surfacing and render settings are set through the items in this list.

First, let's position the camera. That can be done in the main viewport area. There are three 3D Viewports to work with in the Rendering interface: the Render Preview that gives a quick reduced quality sample of the final image, the Camera view that shows exactly how the camera sees the geometry, and the advanced OpenGL Perspective view similar to the one in the Model interface.

By clicking in the upper right corner of the viewport, you can navigate around, using the standard viewport controls.

1.   Use Alt+click and drag to rotate the view and Ctrl+Alt+left-click and drag to zoom in and out. With these actions you actually move the Camera item, there is no need to select the Camera item and then activate a transform tool.

As you change the view, you can see the preview update in real time.

2.   To set a wider angle of view than the default settings provide, hold the Ctrl+Alt keys and drag in the viewport.
3.   Feel free to move any of the mug items once the camera is set using the perspective viewport.
4.   Once the Camera position is set, save your scene.

Step 3

Surfacing the Mugs

Before we start surfacing the mug, we need to adjust the lighting, as it plays such an important role in the rendered scene. We work in a facsimile of the lighting used for the final render when adjusting surfaces. In the Shader Tree, which is the viewport panel labeled Shading found on the lower right of the 3D Viewport. It contains the various items or layers that represent the shading or rendering of our scene. Selecting one of the layers displays its attributes in the Properties panel below the Shader Tree. If it is not visible, select the Properties tab, exposing the viewport. The very top item in the Shader Tree is called the Render item. This item holds the settings related to rendering the scene, such as frame size, antialiasing and other quality related settings and also Global Illumination.

Global Illumination is a technique used in 3D graphics to mimic the effects of real world light bouncing around in a scene, producing extremely realistic results. It is such a common technique to use, it is turned on by default in a new scene.

To toggle this setting, while the Render item is selected in the Shader Tree, under the Properties tab, select the Global Illumination sub-tab.

Check or uncheck the box next to Indirect Illumination.

Step 5

When enabling Global Illumination, Modo lights the scene using the settings of the Environment Item. By default, this comes from a gradient applied to the Environment Material.

If you prefer the look of Image Based Lighting, add an HDRI environment. This can be done easily using the presets Modo provides.

1.   You can open the Preset Browser from any interface layout inside a popup window by pressing F6 on the keyboard. In the Preset Browser on the left side, there is a navigator.
2.   Using the controls (click to twirl open the small arrows) locate the Environments > Outdoor folder.
3.   Double click on the Beverly Hills preset (just like adding the ground mesh earlier) to add the Image to the Environment item.
4.   Press F6 again to close the window.

The lighting dramatically changes for the scene in the Render Preview producing a nice outdoor look to the rendered image.

The lighting in the Beverly Hills image is coming from the right-hand side for our image (-X), so let's rotate the Directional Light to match that. This can be best accomplished in the Perspective view across the bottom.

1.   Hold Ctrl+Alt and drag in the viewport to zoom out and then select the Directional Light item in the viewport by clicking over it when it highlights.
2.   With the item selected, set the Action Center, to Origin.

This allows you to easily rotate the light from the world's center.

3.   Press E to activate the Rotate tool and then grabbing just the Y axis handle (the green circle), rotate the light about 45° to the right.

The next part is surfacing. Earlier in the modeling tutorial, a Material tag was applied to the model, named 'Mug'. This action also created what is called a Material Group. This particular item creates a procedural mask that limits any surfacing contained under that group in the Shader Tree to just surfaces tagged with that name. For more details about this, see the Shader Tree section. Each Material Group mask contains a Material item that controls most of the attributes of any surface, such as color and luminosity. We need to select this item to edit it in the Properties panel. While it's easy to select the proper Material item in the Shader Tree in this case, Modo allows you to quickly see what layers are attributed to any part of the scene, by using a shortcut in the Preview viewport.

1.   Right-click over one of the coffee mugs in the Preview panel to open a context menu with a list of all the layers that apply to the mug.
2.   In the menu, click on the Material item directly under the Mug group, selecting it in the Shader Tree.

Step 6

Looking over the attributes in the Properties viewport, we need to adjust the color, as it is much lighter than the mug in the original image.

1.   Click anywhere on the Diffuse Color swatch to open the Modo Color Picker, and adjust the value to a much darker gray color without going completely black.
2.   The original is also quite matte, so set the Roughness value to 90%.

This softens the overall sheen, looking more like the original matte surface.

3.   To make your surface more realistic, enable the following settings: Conserve Energy, Match Specular and Blurry Reflections. Change the Reflection Rays setting to '128' and change the Specular Amount and Fresnel settings to 10% and 20%, respectively.

You can see now its much closer to the original mug.

NOTE:  These attributes are render intensive, so if your system specifications are modest, keep them at the default disabled state. For more information on them, see Material.

Step 7

Next, we utilize the UV map we made earlier to apply an image to the mug. Grab this image of a Modo logo and save it, so you can apply it to the model.

1.   Using the Add Layer button at the top of the Shader Tree, select the Load Image option from the popup menu.
2.   Navigate to where you saved the image to, and select Open.

The image appears right away on the surface.

If the image does not show up correctly, it is probably not assigned to the UV map properly.

3.   Click on the small + icon on the left of the layer name, to open the Texture Locator.

This controls how the image maps onto the mug surface.

4.   Make sure the Projection Type is set to UV Map, and if there is more than one map listed under the UV Map option, select the alternate map.

The image we just applied is a transparent .png. Because of the layered approach of the Shader Tree, the transparent edges show the regular material color underneath our image instead of making the surface transparent. This makes it easy to add labels, markings and other non-rectangular images to a surface.

Step 8

One problem is that the inside of the mug has a logo as well. Since the mug is one continuous surface, the logo projects all the way into it. The easiest way to remove the unwanted logo is to apply a different surface to the interior of the mug. This is where it turns into a good idea to have cloned using Instances, any changes made to the original now propagate to all the clones.

5.   Press Q to drop any tools and then Esc to drop any selections.
6.   In the Perspective viewport, right-click on any of the pink mugs and from the pop-up context menu that opens, select the Select Source of Instance option and press Shift+A to zoom to that model.
7.   Make sure to switch to Polygons selection mode, since we're now editing the model itself.
8.   Rotate the view to see the inside of the mug and click to select the base of the interior.
9.   Press Shift+Up to grow the selection until it encompasses the entire inside of the mug.
10.   Assign a new material tag, overwriting the previous, by pressing M to open the Assign Material dialog and naming the surface 'Inside Mug'.
11.   Press OK to accept the rest of the default settings.

You can see in the Preview that the insides of all the mugs are now back to the default values, but the logo is gone. The inside material has to match that of the exterior. It is useful to instance the material, so that changes to it also change the instance later on if you need to edit them:

1.   Select the mug exterior Material in the Shader Tree, right-click on it to open the context menu pop-up and select the Create Instance option.

There are now two Material items in the group, one of them has its name italicized.

Click on the italicized one and drag and drop it above the material inside the Inside Mug group.

Click to select the Material that was already in there and press Delete, to remove it from the tree as it is no longer necessary.

Now the insides have no logo, the inside surface matches the exterior and since the interior mask contains an instance, any changes made to the original propagate to the instances, so subsequent edits effectively change both surfaces.

You can see your progress by pressing F9 to render the scene. Feel free to make adjustments to the Shader Tree to get a feel for what does what. Once you have the scene the way you like it, make sure to save it. Here is mine:

Step 9

You can add some more effects to make your scene even more realistic.

NOTE:  Some of these settings may take a long time to render, so if your machine specifications are modest, or you don't like waiting for renders to complete, skip these steps.

The first settings you can adjust are those of the light. The shadow the mugs cast are a little harsh.

1.   To soften the shadows, select the Directional Light item in the Shader Tree.
2.   In the Properties viewport, change the Spread Angle value to 10° and the Samples setting to '128' to make the light look a lot more realistic.

For the Camera, select the Camera item in the Shader Tree so you can edit its attributes. The shallow depth of field look is very popular, so let's enable that feature also.

1.   Go to the Camera Effect sub-tab of the Properties viewport and under Depth of Field, check the Enable checkbox.

You can also select the Autofocus button, this causes Modo to fire a single ray from the center of the camera and set the Focal Distance at the first surface it encounters.

2.   Press F9 to render out the scene.

Coffe Mug Render

This tutorial has given you an overview of working from start to finish in Modo, and the steps that are required to complete a project including setting up the scene, the difference between the component and Items selection modes and how to enable and use Modo's Global Illumination rendering engine. If you'd like to explore further, you can assign some preset surfaces to the Ground Plane, select a material in the Preset Browser and drag-and-drop it somewhere in the 3D Viewport and drop it onto the Ground Plane.

If the image looks too grainy for you, you can increase the Antialiasing level in the Render Item under the Settings sub-tab. For the Soft Reflections and Soft Shadow options of the Material and Light items respectively, increasing the Samples values can also help. Keep in mind that as the number of samples increase, image quality increases, but so does the render time.