Reflections and Refractions

 

 

Reflection and Refraction can add context to scene objects that reflect or distort light, giving a better understanding of your product. If your configurator contains materials like water, glass, mirrors, polished metal surfaces or other materials, consider adding reflection or refraction.

 

These features can slow the scene’s performance and may distract your user with unnecessary details. While they are effective, consider if the visual clues they add to the scene are worth the effort.

 

Understanding Reflection and Refraction

Reflection

the surface of one object is so shiny, your customer can see reflections of other meshes beside the object. For example, a wall mirror can reflect the image of a nearby table lamp. Or the chrome of a vehicle can reflect a tree parked next to it.

 

Refraction

the surface of one object is so clear, your customer can see objects behind the object. For example, a glass vase in front of a wall can refract the pattern of the wallpaper behind it. A window can refract the environment behind it.

 

Some materials have both reflection and refraction. For example, the water in a swimming pool not only reflects an image of the sun overhead, but refracts the pattern of tiles coating the bottom of the pool.

 

 

Setting up Reflection or Refraction

First, consider if these techniques would improve your customer’s understanding of your product.

  • Does your product have a noticeably shiny or clear surface as part of its construction?
  • Is that surface large, prominent, or otherwise an important part of the product?
  • Is your 3D scene almost complete? Reflection/refraction work is one of the final improvements you can make to your scene, and should be done only after most of your meshes are complete.

 

Then create a reflective or refractive surface, and paint it with the right material.

  1. Create a new connector in the mesh you want to make reflective.
    The connector will be the target position for all calculations. Usually, you can position this target at the center of the mesh. Aim the connector’s vector to be normal (or perpendicular) to the surface you want to make shiny.
  2. Create or find the material you want to use on this surface.
  3. In the material properties, open the “Physical” expander.
  4. Make a note of any existing roughness setting. This property may be ignored depending on the type of reflection you use, so you might need to find another way to accomplish this effect.
  5. Set the physical properties for easier testing.
    • If your material is reflective, set the metallic to 1.0, for 100% reflectivity.
    • If your material is refractive, set the metallic to 0.5 for half reflectivity.
    • Both reflective and refractive? Set metallic to 0.3, and roughness to 0.2.
  6. In the material properties, open the “Reflection & Subsurface” expander.
  7. Check the box next to reflection, refraction, or both. Best practice suggests building and testing one or the other of these two boxes independently, before turning on both.
  8. For casting type, select “Plane” only if your mesh is a flat plane, like a mirror or window. If the mesh has any other shape, select “Probe”.
  9. Save your scene to ensure the new properties are applied.
  10. In the same material properties “Reflection & Subsurface” expander, click “Select Connector”, then click the connector serving as the reflection/refraction target you created in step 1.
  11. Paint your mesh with the material.

 

Finally, add any finishing touches to your work.

  1. Find the material you are using.
  2. In the material properties, open the “Physical” expander.
  3. Adjust the metallic and roughness properties for a more realistic effect. Remember, if you are using the “Probe” casting type, the roughness property will have no effect. You may need to find another way to accomplish the same results.
  4. In the material properties, open the “Reflection & Subsurface” expander.
  5. Adjust the index of refraction, refraction intensity, and material thickness properties for a more realistic effect.
  6. If your mesh is using the “probe” casting type, and your material had a roughness effect which is no longer applied, consider other techniques to accomplish a similar roughness effect.

 

Using Reflection or Refraction

Here are common situations you may find once you begin using the reflection or refraction, and ways to solve them.

 

How can I make the refraction effect stronger? My mesh with a refractive material practically disappears. It’s too clear.

Try increasing the material’s roughness, so the surface is more pronounced.

Adjust the material’s albedo color, so it has a slight tint.

 

My refractive surface seems unrealistic: it seems to magnify or shrink the objects behind it.

Adjust the material’s index of refraction. The correct settings for various materials (water, glass, etc.) are easily found on the internet.

Adjust the material’s refraction intensity or material thickness properties.

 

My reflective surface seems odd: the reflected image seems like it’s coming from a different place, not from where my mesh is located.

  • If your casting type is “Plane”, ensure the vector of the connector you’re using is normal to the surface of the plane, and placed in the center of the mesh. Then fine tune the connector’s position from there.
  • Try moving the connector that’s serving as the target to another position within your mesh. For example, for a wide but short chrome bumper, maybe adjust the connector’s vector up or down so more or less of the scene above the bumper is included.
  • Instead of creating one reflective material for use on multiple meshes, as you normally would, try a different technique. Try creating a separate material for each mesh. For example, if a car scene has a shiny front and rear bumper both made of chrome, create two materials: “chrome for front bumper” and “chrome for rear bumper”. In this way, each material can have its own target: one aimed to objects in front of the car, and the other with a target aimed to the rear of the car.

 

 

Shadows

Shadows can slow the scene’s performance and distract your user with unnecessary details. While they are effective, consider if the visual clues they add to the scene are worth the effort.

Shadows can appear in your 3D scene. Three factors combine to create a shadow.

  1. One or more global lights in your scene must have the property “generate shadows” set to true.

  2. One or more meshes in your scene must have the property “cast shadows” set to true.

  3. One or more meshes, usually below the previous meshes, must have the property “receive shadows” set to true.

Only if all three are set will a shadow appear. In this way, you can use shadows to add a depth effect only where needed. Adding too many shadow calculations can slow the scene’s frame rate.

Shadow Properties

The properties of shadows are first set at the source: in the properties of the global light casting them. Then adjust how meshes cast or receive shadows by adjusting the shadow properties on each mesh.

Troubleshooting Shadows

If your shadows are not appearing as you would expect, try these troubleshooting steps:

  1. Ensure the source global light is aimed correctly. You can temporarily change the color of the light it emits to troubleshoot.

  2. Turn down or even remove environment lighting. In the scene node, set the environment lighting intensity to a low number or zero.

  3. Don’t combine the use of a hemispheric light and environment lighting. This results in redundant lighting which can be difficult to troubleshoot.

  4. Set the shadow filter of that source global light to 'Simple' which makes it easier to see.  If the filter is set to 'Advanced' the shadow becomes more realistically blurry, but more difficult to trace.

Was this article helpful?