Skip to main content

Material Variants

Material Variants are available through the glTF extension KHR_matarials_variants. This extension allows to define multiple material variants in a single glTF file. Each material variant specifies a material that can alternatively be applied to a primitive. The material variant is selected by a variant key, which is a string that is used to select the material variant. The extension falls back to the primitives default material if no material variant is found for the variant key.

Create Material Variants

Clone the material for which you want to create a variant from the resources panel.

  • Clone linked creates a shallow copy of the material, the clone does not create copies of the textures and images.
  • Clone Deep creates a deep copy of the material, the clone creates copies of the textures and images.

Context Menu for the material shows "Clone linked" and "Clone Deep"

Give the cloned material a descriptive name and change the material properties in the inspector as needed.

Inspector panel of the cloned material where the name is changed to "bike_blue_variant"

Navigate to the primitive for which you want to create a material variant and open it in inspector. From there, click on the Manage Material Variants button to open the Material Variants dialog.

A screen recording where first the node is selected in the viewport and then the inspector is used to navigate to the primitive to eventually open the material variants dialog

Then in the Material Variants dialog, click on the Add Material Variant button to add a new material variant, give it a name and assign the material to the variant.

A screen recording where the "Add Material Variant" button is clicked and a new material variant is created and assigned to the primitive

Use Material Variants

You can now switch between the material variants in the viewport settings.

A screen recording where the material variant is switched in the viewport settings