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.
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:
- Metallic — switches between the Fresnel (plastic) and metallic reflection modes (see below);
- Saturated by artwork — controls if the diffuse texture affects reflection (see below);
- Level — defines the level of reflection (if it is metallic);
- Level mask — a grayscale image that allows you to have different reflection levels in different places of the material;
- Tint — a color to multiply the reflection result.
There are some other reflection-related options at the Surface section of the panel:
- Index of refraction — despite the name, this affects non–metallic reflections (see Fresnel reflection below);
- Roughness — the less the value, the more smooth is the surface. Use 0% for a perfect mirror, 100% for a very rough surface;
- Roughness Mask — same as Level Mask above lets you specify different level of roughness in different places of the material.
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:
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.
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.
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 (blurred) reflection may be really useful for rendering brushed metal and similar materials. See the image below:
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:
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.
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).
That’s really easy. Create an image with transparency, assign it to the shape and you’ll get what you need:
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 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.
- Index of refraction — the parameter defines how strong the surface changes the direction of the refracted ray. There are tables of refraction indices for various materials that you may find in the Internet. For example water has refraction index 1.33, diamond — 2.4;
- Opacity — defines the level of transparency of the surface. The less this level, the more rays go through it.
Here is the water ball with the fresnel reflection enabled:
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.
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.
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.
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:
This is useful for “old glass” or “frozen window” effects.
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:
- Mode — choose between no bump, normal bump and relief bump;
- Texture — lets you load a height–map image of the surface relief;
- Normal Map Level — controls the level of the effect, converting the height–map brightness gradients into the surface relief slopes;
- Relief Height — controls the height of the offset bump relief.
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:
This one adds relief details to the surface and takes care about lighting and shadows, so it is great for embossing effects:
You can read more about bump effect in our bump tutorial.
- Realistic Rendering — improving scenes visual appearance;
- Lighting — control environment and directional lighting;
- Saturated Reflection — make "rich" colorful reflections;
- Floor Reflection — reflecting scene objects in the floor;
- Job Manager — rendering jobs later;
- GPU Rendering — rendering scenes faster on GPU;
- Rendering Time and Quality — getting more control on rendering;
- Simple and Realistic Lighting — speeding up scene rendering.
- Texture Slots — how to use texture slots in Boxshot;
- Glass Materials — how to make semi–transparent objects look attractive;
- UV–Spot — how to make a UV–spot effect easily;
- Foil Effect — how to add foil–finishing to your shapes;
- Bump — adding relief to your materials;
- Copying Materials — how to copy materials to other shapes;
- Boxshot Materials — more details about Boxshot materials.
- Decals — applying decals and configuring them;
- Bump Decals — applying bump where it is needed;
- Depth Of Field — adding more realism to your renderings;
- Tools — read more about Boxshot tools;
- Managing Images — how to manage image files used by Boxshot projects;
- Shapes Instances — creating lightweight copies of other shapes.
- Lathe Objects — making symmetrical objects using revolving curves;
- Loft Objects — making custom objects with 2D cross–sections;
- Semi–Transparent Labels — making semi–transparent and partial labels;
- 3D Text — making 3D text objects in Boxshot;
- Extruded Objects — how to make thick 3D object of your flat 2D curve;
- Conical Labels — making conical labels with distorted artwork;
- Custom Shapes — adding custom shapes to the left panel;
- Third Party Shapes — importing third party shapes to Boxshot.