Render realistic images from 3D models in IRONCAD (Part 1 of 2)

Render realistic images from 3D models in IRONCAD (Part 1 of 2)
Emil Rindell

Emil Rindell

Jonas Bryntesson

Jonas Bryntesson

Henrik Andersson

Henrik Andersson

2022-07-20

5 min read
Emil Rindell

Emil Rindell

Jonas Bryntesson

Jonas Bryntesson

Henrik Andersson

Henrik Andersson

2022-07-20

5 min read

The term "Rendering" in the 3D world is, in short, a process of creating a realistic image from a 3D model. There is also something called real-time rendering, which is rendering in real time, i.e. shadows and reflections appear while you are modelling. A simple overview of the process is that a 3D model is created in a 3D modelling software and then materials and colours are applied. Light sources are added and cameras are set up. The principle can actually be compared to a professional photograph of a product in a photo studio.

In the past, it has been quite complicated to get to grips with this world, but progress has been made and the programmes have become more user-friendly and easier to understand, but still sophisticated enough for those who really want to delve into the depths. There is both separate software for rendering but also implemented in both CAD and surface modelling software. In this post we will focus on the implemented rendering process in IRONCAD and in part 2 the separate software KeyShot which is becoming increasingly popular with our users. Load up the coffee maker because here we go!

Rendering in IRONCAD

IRONCAD has an advanced built-in rendering engine based on code from the YafaRay rendering engine that follows general standards for image rendering. The image being rendered is placed in a separate CPU thread and in its own window. This means you can continue working in the 3D scene while the image is rendered in the background. The rendering engine has a variety of settings and options that can be a little difficult to understand if you lack basic information on how to render an image. But hopefully you will have a broader understanding after this post. A tip is to print out the glossary at the end of the post which can be useful to fall back on to keep up with the text.

Global Illumination (GI)

When rendering images, it is important to know that the two biggest factors affecting the final result of the image are light and material, with light playing the biggest role here. Light affects the colours, shading, reflections and refractions of each object in the scene. Global Illumination abbreviated GI is a concept in rendering values that means you don't really need to work with separate light sources (although it is needed in some cases). GI allows you to get a smooth and fine lighting throughout the scene. The principle is really quite simple where GI is a basic natural light in the scene. Imagine an object on a table and without any lights directly aimed at it, you can see the object thanks to the natural light and this is exactly what GI stands for.

IC GI

GI light is like a large sphere that emits light from all directions and edges towards the centre of the sphere. As a user, setting up the natural light is quite easy in IRONCAD but GI light can also be, with certain settings, computationally demanding which means that the rendering will take longer to produce.

HDR- Background

The rendering tools can be found under the tab Visualization and under Render-group. You can also access the settings via Property Browser:

Image rendering IRONCAD
Here you can find the settings for image rendering in IRONCAD.

First of all, we recommend that you set a white background. This will make it easier to get a good result that does not affect the GI light (the colour of the background becomes the colour of our GI light). Right click in the scene background followed by Background and Color. Then set the Top and Bottom Color to white followed by Ok.

Background settings

To create a more lifelike light, you can use a HDR (3D Environment in IRONCAD). An HDR(also called HDRI) image is usually a real photograph taken with a special technique but can also be an image composed of colours (usually black and white or grey) with white dots, rectangles and circles. The image itself acts as a GI light source, where the content of the image is reproduced in a natural way on your subject.

Then select the 3D Environment option followed by Open and select for example Kitchen followed by Ok. This is a basic set of HDR images that comes with the IRONCAD installation, located on this path C:\ProgramFiles\IronCAD\"version"\Images\EnvironmentImages\StudioEnvironments. There are lots of sites where you can both download free images and buy them. Here you can find more HDR images.

Here we have rendered an image of the model with an HDR image in the background.

IC HDR

If we now compare the images, we see no direct difference in the images other than that the background has changed. As mentioned, an HDR image can be used as a quick and easy way to change the feel of the image. But the images still look quite dull and boring. That's because we haven't added any material properties to our parts. By influencing the material properties of the image, we can see the effect of the HDR image more clearly and the images become more alive. But even the image that was completely white in the background becomes completely different. White backgrounds can therefore be very useful when you want a simple and stylish visualisation of a product.

HDR and White

But can I get a white background but keep the reflections in the material? Of course! Then we use something called an Alpha Mask (uncovering the image). By using an alpha mask, the background is "cut" away and with the help of an image editing program (Photoshop etc), we can put in whatever image or colour we want instead. Not all file formats support Alpha Mask (*.jpg etc), so we have to choose *.png as the file format to use the feature. More on this later in the post.

Perspectives and other light sources

It is very important before we start rendering that the 3D scene has "Perspective" enabled (F9) in the scene, if we don't have it the rendering will take much longer to complete. The rendering engine calculates virtual photons (light particles) bouncing on the surface of the model and the camera's perspective is critical as the rendering will complete more accurately and faster.

Perspective IC

To make good use of the GI lighting, we recommend that you also switch off all other light sources to start with. It is better to start with a global light and then work your way forward with additional light sources. The preset light sources in the scene will cast harsh shadows and other unexpected effects. Below we have an image with GI and extra light sources, here we see for example that the light coming from the front is too bright. As mentioned start by turning off all other light sources at first and then experiment with extra light.

Lightsource

Mark the candles under Lights in the story tree. Then right-click on them and choose to uncheck Light On.

Lights IRONCAD

If you want to experiment with additional light sources, you can find them under the Visualization tab followed by Insert Light.

Light sources in IRONCAD

Material

Now that you've had a little briefing on lighting, let's go through some of the current material to find more realism and depth in the image. By far the fastest way to apply materials is to drag and drop them from a catalog. IRONCAD contains a lot of catalogs with materials but most of them are not opened by default. Go to Open>Scene, then hold down CTRL and left-click on these four catalogs: AdvMaterial, AdvWood, Materials, Metal and Specular BRDF.

Open catalogue IRONCAD

If you can't find the catalogues, you can download them here: Material. Here you can see the contents of these catalogues:

Catalogs rendering ironcad

Smart Paint - Color

When a material is applied to a part or assembly, you will find the settings under Smart Paint Settings. Some of the settings are also visible under Property Browser for the selected part.

Smart Paint IRONCAD

Under Color properties, you control the colors of the part, also accessible under Property Browser of a selected part or surface (highlighted in green). It is possible to choose any color you want more than the default colors shown in the palette. Then click on More Colors. Then by clicking on Define custom colors you can also choose to enter your own RGB color.

RGB IRONCAD

Instead of using a color, it is possible to project an image as a texture on a part or surface. Here you can either drag in a default image from a catalog or choose to project your own image by clicking on Browse.

Under Image projection you control how the texture will be applied (also called "mapped") to the object or surface, which differs depending on the appearance of the surface (spherical, cylindrical or flat). Natural The projection is the most common for medium sized surfaces/parts. Under each image projection there are settings (Settings) where you can both scale and rotate the image. Many times you need to go in and change here to get your texture just the way you want it.

Texture mapping in ironcad

Tiled image also called Seamless is a term in the rendering world that means having an image without a seam. These types of images can be useful when you want to map a surface that should have no image joints, such as a lawn or a brick wall. The images are applied in the same way as above, the only difference is how the image is constructed. The image below is a good example of an image that is seamless.

Seamless texture ironcad
Seamless texure in IRONCAD

This image is mapped just like the one above but is not constructed as a seamless image. Here you can clearly see a seam in the image. So to create more realistic and consistent images, aim for seamless textures where needed.

Non seamless texture ironcad


As with HDR images, there is a plethora of websites offering both buy one get one free images. A good site with free images can be found at here and if you are looking for seamless images like the example above, search for Seamless or Tiled textures for example Google.

Shader

Instead of using textures, you can use a Shader. You can roughly explain it as a dynamic pattern. Based on parameters, you create different shapes or effects, for example you can use a shader to get the effect of a surface painted in a metallic colour or build up your own veins in wood. This is something that requires a bit of experimentation but is relatively easy to get to grips with if you wanted to. The effect of a Shader is shown when the rendering is complete. Instead of building a completely new Shader from scratch, it is much easier to edit an existing one and modify the parameters until you have achieved the desired result.

Here we have used a Multi-Layer Metallic Shader without affecting the default values:

Multi-Layer Metallic Shader IRONCAD

To use a Shader you go into Smart Paint on the surface or part then tick the Use Shader then click on the down arrow to select one Shader to start from. In this case we have chosen a Multi-Layer Metallic. Then press the three dots to open up the settings for the specific Shaders. Here it is then up to you as a user to modify your parameters until you achieve the desired result. The parameters differ depending on Shader. A tip is to read at Description what each value does.

Shader settings ironcad

If you've experimented too much and want to reset your settings, it's easy to just drag and drop the original material onto the surface or the part from the catalog with the shader and it will restore what you've done.

Smart Paint - Finish

Under Finish settings we find the effect of the light on the surface or the part. When we have no direct light or light sources other than GI, we cannot see any change in the way the light appears on the surface. In this example we have therefore chosen to render the image with direct light only instead of GI. By looking at the sphere on the right, you can see how the light will spread over the surface depending on the parameters you change.

Finish Smart Paint IRONCAD

Under Predefined Finishes we will find predefined values with different scattering of the light. Below we have rendered an image with direct light and used three different of the predefined light settings. Again, as before, it is up to you as the user to modify the settings to suit your material or use some of the pre-set materials from the Catalog Explorer.

Predefined Finishes

Under Finish we also have something called BRDF(Bidirectional Reflectance Distribution Function) this functionality will not be covered in this post. Briefly explained, it can further increase the realism of your rendering. Here you can watch a video explaining this in more detail:

Smart Paint - Transparency

When rendering something transparent, you should look at Transparency tab under Smart Paint. Here we have preset parameters and also a simple slider, the more to the right the more transparency. Index of refraction (The index of refraction stands for the refraction of light rays as they pass between different materials. Here it can be useful to find out the correct refractive index for your material to get the most realistic rendering possible.

There are some refraction tables to be found on the web, here we have listed five materials with different refractive indices:

Vacuum: 1

Acrylic glass: 1.409-1.492 (at 20°C)

Window glass: 1.52 (at 20°C)

Silicone: 3.42-3.48 (at 20°C)

Diamond: 2.417 (at 20°C)

Source: https://www.physlink.com/reference/indicesofrefraction.cfm

Another important thing to do when rendering transparent parts is that you enable Render both sides of surface. Do this by going into the Part Properties on the party followed by the rendering tab and checking the Render both sides of surface.

Render both sides of surface ironcad

Another setting that may be useful to know is Ray Depth which can be accessed via Render Options>Image.

Ray Depth

Ray Depth(ray depth) tells the user how many objects a ray can meet before it is considered "fully calculated". Hits can be propagated from reflections or refractions. This type of constraint must exist to prevent an infinite loop like two parallel mirrors facing each other(mirror 1 looking into mirror 2 looking back at mirror 1, etc.).

However, if the beam depth is too low, it will "terminate" too early, resulting in a background on the glass where a different geometry was expected. The default value in IRONCAD is 4, which is sufficient in simpler scenes but if there are multiple layers of transparency this value must be manually increased.

For example - if we look at an object through a window with a single pane that is rendered as 2-sided, then a value of 3 in Ray Depth is appropriate. The beam enters the glass through the exit window and hits the object, allowing us to see the object. If you are looking through a double-glazed window, a value of 5 is needed. If you are looking through a bundle of two double-glazed windows, a value of 9 is needed, and so on.

Ray Depth=2

ray depth 2

Ray Depth=4

ray depth 4

Ray Depth=4

Ray Depth 4

Ray Depth=6

ray depth 6

Smart Paint - Bumps

Bumps (also called "bump mapping") is a special technique for simulating irregularities in the surface of a part. You actually put images in different layers on a surface where the underlying image creates an irregularity on the surface above. By default, bump folders in IRONCAD are ignored when rendering, so if you want to use them, we must first make a setting under GI to make them visible. Click on the arrow under Render Now and you will see Render Options
where you then choose to go to the tab Global Illumination and uncheck Ignore Bump Normals followed by Ok.

Below we see a yellow rendered sphere that does not contain a bump folder:

No bump

Under Smart Paint in IRONCAD we find Bumps. You can use any image as a bumpmap but a good guideline is to have a black and white image to get a lot of contrast in our bumps. Click on Make bumps from image and select the image you want to use as a bump folder. Here we also see Image projection where we control how the bump map is projected onto the surface. In this case we choose Spherical because we have a sphere as a part. Under Bump height you control how strong the roughness should be. Here you can choose a positive or negative value where the former simulates elevations in the material.

Bumps IRONCAD

When you then press Ok , you will not see any change in the material, but we need to do a rendering to see the result. Press CTRL+R (shortcut to start a render) or select Render Now under Visualization to start rendering.

Render now IRONCAD

Here we can now clearly see how our Bumpmap has affected the surface:

Bumpmapp

Smart Paint - Reflection

Under the Reflection tab we find settings to make a material reflect surrounding objects, environment and light. Basically all materials are reflective to some degree, the lack of reflections in a material is related to microscopic imperfections in the material. By pulling the slider Reflection intensity to the right we increase the reflections in the material, how much the material will be reflected we can see on the sphere to the right.

reflection in ironcad

Experimenting with reflection values is very rewarding as you quickly gain realism in the image. The important thing is to try to find out how much the real material is actually reflected in reality. Below we see three simple spheres where we have only set Reflection intensity to 0, 50 and 100%. By having the default choice Reflect Environment enabled, we get reflections from the HDR image in the background and around lying objects(which we don't have in this particular scene).

Reflection intensity ironcad

In some cases you want to reflect some other image in the material than the background, then you can choose the option Reflect image which means that you can choose any image to be reflected in that particular part.

Reflect Image

Below we see an example where object A has Reflect Environment option and object B has Reflect Image. Note how you still reflect surrounding objects in the scene with Reflect Image, but only the environment in the reflection has changed without changing the background of the scene.

Refect image ironcad

If you want to create more blur, you can use Reflection Blur in combination with Reflection Intensity to create more matte reflections. Use the preview on the right to see how the reflections are affected in the material.

Reflection blur ironcad

Below is an example of how we have combined these two functions.

Reflection blur differences ironcad

Under Reflection we also have something called the Fresnel Amount. this functionality we will not address in this post. Here you can watch a video explaining this in more detail instead:

Smart Paint - Decal

Decal i Smart Paint is used to apply a decal/logo to a surface. Mapping decals is essentially the same methodology as mapping textures but with an option to build up layers in the image, in short it works like putting a sticker on a surface. Ideally, you should have a *.png image with an Alpha Mask, a bare bones image. The principle is simple, select an image by pressing Browse Files, followed by how the image should be projected onto the surface. In this case we have a flat surface and will use Natural.

Smart Paint Decal

This is what it looked like when we had just added a sticker without doing anything underneath Settings:

Decal folder

This isn't really how we wanted the image, but we wanted to bring this up because this is something you often see when you start mapping decals. The image can be misoriented and overlaid all over the surface. If we now go into Settings instead and change the values, we will get a different result.

decal settings

Here you can see the default settings and what we changed:

Decal settings ironcad

The result is now like a sticker on the surface:

decal render

In the above image we have used an image that has *.jpg as file format, the *.jpg format as mentioned does not support Alpha Mask therefore we get a background on our decal, in this case white. If we want the decal to be uncovered / cut out we have to use an image in *.png format which in turn contains an Alpha Mask.

When we apply an image with an Alpha Mask, we also have to modify the Transparency the settings under Decal. Here we chose Type: see-through and What is transparent: black pixels.

transparent decal ironcad

This is what it would look like if we used our image that was exposed:

Alpha Mask Rendering IRONCAD

Experiment with the settings and you'll quickly understand how to make it work for your image. Again, use the sphere on the right for a preview of how it will look with your settings. Now that we've added this image as a decal, we can map any background or color behind the decal. This is then mapped via the tab Color i Smart Paint. The background of the decal will appear after the rendering is complete.

Map decal background

Smart Paint - Emission

Issue i Smart Paint is a method for creating materials that glow and emit a light. Change the stack Emission to make the material glow with the desired intensity and change Samples for how many times this should be calculated by the computer, the higher Samples the more accurate the calculation of the light emitted. We recommend using both these settings sparingly as it very quickly affects rendering time.

In the example below we see how the material starts to glow the higher Issue value it gets.

Issue

But one thing that's worth noting is that we don't actually get hardly any light scattering more than a sense that the material is glowing, especially if you look at the surrounding geometry. It's actually just like Issue works. If we want a real light source, we have to put one there ourselves. In the case below, we added one Point Light which you can find under Insert Light i Visualization tab.

Point Light

We then placed the light source using TriBall in the centre of our sphere which is in the middle. Then right-click on the light source below in the Lights in the story tree and select Light Properties followed by Light and Intensity where you change the brightness of the light. There are a variety of other light settings. We recommend that you go in and try it out for yourself to see what it will look like when you modify certain settings.

Light Properties IRONCAD

By combining Issue with a Point Light we can get a much more realistic glow that actually emits light in our model:

Emission and Point Light IRONCAD

Here you can download the scene above and see how we did it in more detail(created in v2022 PU1SP1):

Emission-PointLight.ics

Advanced Rendering Options

Under Render Options you will find all settings for the rendering engine where you control how the image is built up and how the light is controlled. In case you are using the classic interface(Toolbar UI), make sure you can see Render the tools. The yellow sphere on the right is Render Now which will start your rendering. The white button on the left is Render Options.

Render Options

Render Options is also hidden under Render Now button in the Ribbon Bar border.

Render Options IRONCAD

Image

The first tab under Render Options controls the size of the image and Fill Pattern, which means how the image should be calculated in its render window and the size of the blocks, the pattern of the image on the right:

Advanced Rendering Properties

Ray Depth value has been covered earlier in the post so we refer to that part of the post.

To save your image with an uncovered background (Alpha Mask), keeping in mind that you should not have any other object, floor etc. obscuring the background, start by right-clicking on your rendering when it is finished and select Save As.

Save As rendering

Then select *.PNG as the file format, followed by Options, then tick Alpha Mask and then press Ok and Save.

Rendering Alpha Mask

Super Sampling

Super-Sampling which is a form of Antialiasing and can be described as a methodology for removing aliasing, which are jagged and "pixelated" edges from the rendered image.

Super Sampling IRONCAD

We will not address this in this post but refer to this film instead:

Global Illumination

At the beginning of this post, we covered a bit about what GI is and how to use it. The settings for Global Illumination in IRONCAD can be found here:

Global Illumination IRONCAD

The area around GI is vast and wide and almost requires its own separate guide for deeper explanation. The concept is not unique to IRONCAD like much else covered in this guide. But a general rock concept in rendering and animation. This video will give you a broad understanding if you really want to delve into the world of rendering and GI:

Training material

If you want more basic knowledge about how rendering works in IRONCAD, we recommend that you look through our basic course material and then use this guide as a complement and deeper explanation.

Here you can find our free training material on rendering in IRONCAD:

Image rendering in IRONCAD

What is KeyShot?

KeyShot is an add-on to IRONCAD that is capable of creating incredible renderings and animations quickly and easily. The link to IRONCAD allows the model to be transferred to KeyShot at the touch of a button, where the user can add material effects, textures, background themes and lighting effects. The image is rendered in real time, so you can quickly see the effect of the changes you have just made. Creating photo-realistic product images and animations has never been easier. We offer KeyShot Add on to both IRONCAD and INOVATE. Here you can read a guide to rendering images in KeyShot.

>