Skip to main content

Variants

A variant is a rule saying "when the customer picks this, the model does that". Everything that makes a configurator a configurator rather than a 3D photograph comes down to these.

There are five kinds, and they solve different problems. Most configurators use two or three.

Showing and hiding parts

The workhorse. A part of your model is visible only when a particular option is chosen.

Your table has an oak top and a walnut top, both present in the file. The oak one appears when the material choice is Oak and the walnut one when it is Walnut. The customer sees one table that changes wood, when really it is two tops taking turns.

This is how most configurators are built, and it works because it is honest about what it does: you prepared both, so both look exactly right.

You set these conditions on models, and on individual parts inside a glTF file after using Parse Structure in the Models section.

Material variants from your 3D file

If your model was exported from Blender with material variants, those come across automatically. Composer detects them and you connect each one to an option.

This is the neatest route for colour and finish changes, because the alternatives are already defined in the file by whoever made it. One chair, five fabrics, no duplicated geometry.

Colours and textures set here instead

When the file does not carry material variants, you can define the alternatives in Composer directly. Point at a part and give it a different base colour, or a different texture image, for a given option.

Colours are ideal for products that come in many shades, since defining twenty colours here is far lighter than shipping twenty copies of the model. Texture swaps suit patterned finishes where you have the images.

Moving, rotating and scaling

A transform variant changes where a part sits, how it is turned, or how big it is, when a condition matches.

This is what you use for an adjustable shelf that moves up a notch, a lid that opens, or a component that shifts when a longer frame is chosen. If several rules could apply at once, the first one in the list wins, so you can order them from most specific to most general.

Transforms can move smoothly rather than jumping, which looks considerably better when a customer is clicking between options.

They apply to models, to parts inside them, to lights, and to markers.

Animations baked into the file

If your glTF contains animation clips, you decide when they play. A drawer that slides open when the customer selects the drawer option, or a fan that spins while a particular mode is chosen.

You can preview a clip in the editor with a play button rather than guessing which one is which.

Writing the conditions

Every kind of variant uses the same condition editor, so you learn it once.

The simple form is a pairing: this option equals this value. That covers the large majority of cases.

The advanced form lets you combine conditions, so a part can appear only when the material is oak and the size is large, or when either of two options is chosen. You build these as nested groups rather than by writing anything.

There is also a free text expression form for the rare case that neither shape fits.

Getting the parts right in the first place

None of this works if the parts are not separate in your 3D file. If the tabletop and the legs are one merged object, no rule can show one without the other.

Use Parse Structure in the Models section early, before you build anything. It lists what is actually inside the file, and it will tell you in ten seconds whether your model is ready. If it is not, the fix is in the software that made it, not here.

Checking your work

Press Play and click through every option. Edit mode deliberately shows everything at once so you can work on it, which means variants only really tell you the truth in Play.

Watch particularly for two things: a part that stays visible when it should be gone, which usually means a missing condition, and two parts appearing in the same spot, which usually means two rules both match.