Boxshot Materials

Boxshot supports complex materials with reflection, refraction, transparency, bump and more. Creating materials from scratch may be quite sophisticated, so we’d recommend using the built–in materials from the assets library as the starting point. It is much easier to pick a well–matching material from the library and then adjust it a bit, rather than build a new one from scratch.

Physics behind the scene

When light comes onto a surface, it is either reflected, transmitted or both. The sum of energies after the hit should be the same as before, so you have to decide how much light to pass through the surface and how much to reflect and how.

Boxshot first checks the reflection level, so if you set reflection to 100%, transmission will not happen at all. All the light that is not reflected will be either transmitted (for transparent surfaces) or reflected diffusely (for opaque surfaces). So at the next step Boxshot checks the opacity level and if the material opaque — Boxshot does the diffuse reflection, otherwise it transmits the light under the surface. If the material has refraction enabled, Boxshot also changes the light direction.

It is very helpful to understand the text above if you want to make your own materials. Once again: reflection, then transmission, then diffuse. Try to play with the built–in materials and see what happens.

What you see is not what you get

Please note that hardware–accelerated OpenGL preview may differ from what you get at rendering time, as it is almost impossible to simulate the process in real time on hardware. Preview rendering is just a reference, so consider using raytracing preview to check the real appearance of the scene and materials.

Reflection

Boxshot supports a lots of reflection features by the small number of parameters, so it is relatively easy to get used to them and get good results really fast.

There are several controls in the Reflection section of the Materials panel:

There are some other reflection-related options at the Surface section of the panel:

Fresnel and metallic reflections

Fresnel reflection simulates plastic surfaces, which reflect better at glancing angles. See the image below to compare Fresnel and metallic reflections:

Simple and fresnel reflections in Boxshot

The left sphere has 30% reflection level, the right sphere reflects according to the Fresnel’s formula. The reflection level is defined by the angle and by the index of refraction, which is defined in the Surface section below. There is a lot of information about Fresnel reflection in the Internet, there are tables of refraction indices for various materials and other useful things that may help to achieve better results.

Saturated reflections

Reflections are not saturated in Boxshot by default. This means if ray hits a reflective material, it simply reflects. The only thing that affects reflection is reflection tint, so you can color up the reflection. This is perfect for metallic foil effect, or plain metals.

For saturated reflections, ray first passes the diffuse layer and reflects then. This means reflection will be colored by the diffuse texture and look like a reflective metallic paint. This is good for complex labels, especially if reflection masks are used.

Diffuse, specular and saturated reflections in Boxshot

The image above has three balls. The one at the left has simple diffuse texture. The middle one has non-saturated 100% reflection on top of that texture and the right one has the same reflection, but with the saturation option enabled. You see that reflection picks up the color of diffuse texture.

You can read more about this in the saturated reflection tutorial.

Rough reflection

Rough (blurred) reflection may be really useful for rendering brushed metal and similar materials. See the image below:

Specular and rough reflections in Boxshot

The left sphere has sharp specular reflection, while the right one has rough reflection. Use the Roughness parameter to control the effect.

Roughness mask helps making UV–spot effect — simply load a grayscale mask having black pixels for glossy areas and white pixels for the rough ones, so you can get something like this:

UV Spot effect made with roughness mask in Boxshot

Ball at the right has rough reflection and a pattern mask, while the ball at the left has just the rough reflection. You can read more about this in the uv–spot effect tutorial.

Transmission

There are two types of transmission in Boxshot: simple — when light doesn’t change its direction (for instance a hole in the paper), and refraction — when light does change the direction (a glass ball is a good example).

Simple transmission

That’s really easy. Create an image with transparency, assign it to the shape and you’ll get what you need:

Image transparency used as the opacity mask in Boxshot

Boxshot automatically detects that the image has an alpha–channel (transparency mask) and uses it. Please note that not all the shapes are designed to work with transparent sides, so they may not have inner geometry and may appear just transparent there.

Refraction

Refraction is about glass, plastic and other semi–transparent materials that are used for CD boxes, wine bottles and so on. Boxshot supports that and provides enough parameters to fine tune the output. The most important parameters are located in Surface and Transparency sections of the Materials panel.

Here is the water ball with the fresnel reflection enabled:

Refracting glass ball rendered in Boxshot

Note that the background looks distorted inside the ball — that’s refraction, as the light rays change their direction when they pass through the ball. This doesn’t happen for simple transmission when you cut a hole in the paper.

Medium color

Sometimes you need to render a thick not–so–transparent glass. That’s where you may use the medium color parameters. There is a special section in the materials panel for that with just two options there: attenuation and transmittance. Here’s how it works:

Transmittance defines the color that the medium has if it is attenuation centimeters thick.

Pretty simple, but needs some practice to get used to. Here are six glass cylinders with the same transmittance color and different attenuation values.

Translucent green glass cylinders rendered in Boxshot

The cylinders themselves are 4cm in diameter. Attenuations are: 1cm, 2cm, 5cm, 10cm, 50cm and 500cm. As you may see, the larger the attenuation is, the more transparent the cylinders are. That’s because attenuation is a thickness that a medium needs to have to make the transmittance color.

You can read more about this in the glass materials tutorial.

Rough surfaces

Exactly as with reflections, the roughness level of material affects the transmission (when refraction is enabled). The ball below has olive medium color and surface roughness enabled:

Rough refracting green glass ball rendered in Boxshot

This is useful for “old glass” or “frozen window” effects.

Bump

Bump effect lets you easily simulate surface relief: embossing, leather, stone and so on. You load a height–map and Boxshot simulates the surface according to the loaded image brightness. See the parameters in the Bump section of the Materials panel:

Normal bump

Normal bump just changes the normals direction, mostly affecting reflection and refraction. Good for leather, glass, wood effects. Here are three spheres with 25%, 50% and 100% stone bump effect:

Three spheres with normal bump effect

Offset bump

This one works best for flat surfaces and takes care about lighting and shadows, so it is great for embossing effects:

Relief bump effect on a plane with direct sunlight

While looking great, the effect doesn’t really change the shape itself which stays flat. The effect therefore is better viewed from the top.

More Tutorials

Rendering

Materials

Features

Shapes