Verge3D for 3ds Max: Transparency — Soft8Soft
Description: Learn what kinds of transparency can be enabled for 3ds Max materials and used in Verge3D.

# Transparency / 3ds Max

Here we show how to enable and tweak transparency for Physical, OpenPBR, Standard, and glTF-compliant PBR materials in 3ds Max.

For usage example, check out the Transparency demo (source files available in the Asset Store).

- Blended vs Masked
- Additive Compositing (aka Additive Blending)
- Order-Independent Transparency (OIT)
- Transparency for Physical Materials
- Transparency for Standard Materials
- Transparency for glTF-compliant PBR Materials

#

## Blended vs Masked

Being a real-time 3D engine, Verge3D offers two main methods to handle transparent objects: alpha blending and alpha clipping (usually with an image mask). Blending enables combining a translucent foreground color with a background color, using the foreground color's alpha as blending factor. Clipping, on the other hand, simply discards all pixels with alpha less than some predefined threshold (always equal to 0.5 in Verge3D for 3ds Max).

Blending enables for smooth transitions, generally looks nicer but computationally more expensive than clipping. It may also produce z-sorting artifacts when polygons appear to be rendered in wrong order. Clipping works best for visualizing numerous small objects (such as grass or tree leaves). It also produces hard edges without any transitions which may be aliased.

Use Alpha Mode dropdown in material settings to choose between blending and masking.

There is also variation of the Mask mode called Coverage. It uses MSAA rendering to improve the quality of alpha clipping.

#

## Additive Compositing (aka Additive Blending)

Verge3D also offers a special method for rendering transparent surfaces called additive compositing. By blending in additive manner and excluding polygons from pixel depth comparison you can get rid of transparency artifacts.

To enable this mode select Add in the Alpha Mode dropdown and uncheck the Depth Write option in material settings to enable this mode. In addition, you'll need to increase the Rendering Order value in object settings to make your transparent object rendered above all.

#

## Order-Independent Transparency (OIT)

Verge3D allows the use of an approximate order-independent transparency technique, which do not require rendering geometry in sorted order, so it solves most transparency issues without any of the above considerations.

OIT can be enabled on the Verge3D Export Settings dialog.

Known limitations:

- OIT is only compatible with WebGL 2, otherwise it has no effect.
- OIT is ignored by Reflection Cubemap Light Probes and Reflection Plane Light Probes.
- May not work well with high opacity objects.
- Should not be used together with MSAA (multisample anti-aliasing) in scenes with 2 or more opaque objects. Instead you can use FXAA (fast approximate anti-aliasing) which is fully compatible with OIT.

#

## Transparency for Physical Materials

Transparency of Physical (as well as OpenPBR) materials can be tweaked using the material setting of the same name.

Parameters:

Transparency
  Transparency amount, color and roughness. The color and roughness parameters supported only for refraction-based transparency (Thin-walled off).
Thin-walled
  Use generic (Thin-walled on) or refraction-based (Thin-walled off) transparency.
Alpha Mode
  Material transparency mode.
  Auto
    Look into material to resolve possible transparency method: Opaque or Blend.
  Opaque
    Render material with no transparency.
  Blend
    Blended transparency (see above).
  Add
    Additive transparency compositing (see above).
  Mask
    Masked transparency (see above).
  Coverage
    Hashed transparency, aka alpha to coverage. This method takes an intermediate position between masked and blended transparency. It uses MSAA rendering to improve the quality of alpha clipping.
Transparency Hack
  Enable one of the two non-standard rendering methods to eliminate transparency artifacts:
  Nearest Layer
    Render only the closest-to-the-camera transparency layer by using a separate depth buffer for culling (aka "depth prepass").
  Two-Pass
    Render back-face surfaces first followed by front-face surfaces. This method works only for double-sided materials, i.e. the 2-Sided property should be set.
  Both transparency hacks reduce performance, so use them only when it's really necessary.
Depth Write
  Disable for additive transparency compositing (see above).

By default in 3ds Max, the Thin-walled parameter is unchecked, which disables the most typical transparency rendering you expected to see in your interactive app. Always keep an eye on this setting when you're dealing with the transparent materials.

Any combination of maps and images can be used to influence the transparency via the Transparency Map input.

#

## Transparency for Standard Materials

Transparency in standard materials can be tweaked using Opacity in material settings.

The Opacity input of standard materials can be used to create interesting dependencies for better realism.

An image with transparency information in its alpha channel can be used as input. A separate alpha image can also be used instead.

Use the Alpha Mode dropdown to choose between transparency modes.

#

## Transparency for glTF-compliant PBR Materials

In order to enable transparency for such materials, one should use a separate alpha map connected with the Transparency Map input of the physical material.

Use the Alpha Mode dropdown to choose between the supported transparency modes: Auto, Opaque, Blend, or Mask.

## Got Questions?

Feel free to ask on the forums!