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.
Give the cloned material a descriptive name and change the material properties in the inspector as needed.
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.
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.
Use Material Variants
You can now switch between the material variants in the viewport settings.