Technology

Perfume bottle and box in 3D: states, sequence and a label with the buyer's name

How a 3D bottle-and-box set works: unbox, close and explode as states with a fixed sequence, a label drawn from the buyer's name, and finish options.

Short answer: a 3D set of bottle and box is, at its core, a small state machine. Presentation, unboxed, closed and exploded are states, some of which exclude each other, and every change runs in a fixed order: first the lid, then the bottle, then the cap. On top come two variant axes (liquid colour and finish) and a label drawn at runtime from the name the buyer types.

Perfume bottle and box – preview of the example configurator
Example configurator · fictional product · example values. Loads only when you click. Open the demo page →

Which controls does our example configurator have?

The demo shows a perfume bottle with box for a fictional brand. Every value is an example value; no manufacturer commissioned or reviewed the demo.

ControlTypeValuesDefault
LiquidSwatchesAmber, rosé, clear, smokeAmber
Cap and metalSwatchesGold, silver, gunmetal, blackGold
Label nameTextUp to 16 characters"Eau de Parfum"
UnboxToggleOn, offOff
Close boxToggleOn, offOff
Exploded viewToggleOn, offOff
Reset viewAction

In the presentation state the bottle stands in the open box, with the lid leaning behind it.

How do unbox, close and exploded view interact?

The three toggles are not independent. The demo applies these rules:

  • Unbox opens the box if it was closed.
  • Close box ends unboxing and the exploded view; the bottle returns to the box and the lid closes.
  • Exploded view opens the box, lifts the bottle out and pulls its parts apart. The cap is not set down as in unboxing; it becomes part of the explosion.

From these rules each state has a target for four motions: lid, bottle out, cap off and explosion. For "unboxed", for example, the lid is open, the bottle out, the cap off and the explosion off.

In which order do the motions run?

The order is what makes an animation believable, and it is easily left out of specifications. In the demo:

  1. Motions that are being undone run first, in the order explosion, cap, bottle, lid.
  2. New motions then run forward, in the order lid, bottle, cap, explosion.
  3. The starts of the steps are spaced by fixed gaps of up to 0.7 seconds, depending on the motion, so the set moves in steps rather than all at once.

When unboxing, the lid rises clear of the cap, tilts back and settles behind the box. The bottle is lifted out on a curve and set on the table; then the cap turns off and is set down beside it. The camera moves in parallel to a view of the new state.

If the device has "reduce motion" switched on, the demo jumps to the target state without animation [1].

For your project it pays to write these sequences down as a short script first. For a set like this it should at least contain:

  • every state, with one sentence on what the viewer sees,
  • for each state, which other states it ends,
  • the order of the motions and where each part ends up,
  • the camera view per state.

What an interactive exploded view can show, and what data it is built from, is covered on our exploded view page.

How is the personalised label made?

The label is not a finished image from the 3D model. The demo redraws it in the browser on every change and places it at the same position on the bottle. These rules apply:

  • Control characters and angle brackets are removed; repeated spaces are collapsed.
  • The name is cut to 16 characters. If the field is empty, the label shows "Eau de Parfum" again.
  • The type size is chosen so the name fits the intended width; long names are set smaller.
  • The lettering colour follows the selected finish, to match the foil.

These rules are set for the demo. A real personalisation offer adds your requirements: character set, upper and lower case, minimum type size, handling of special characters and accents, and whether the name goes to print or engraving.

What do liquid colour and finish change?

  • Liquid changes the colour and light absorption of the fragrance in the bottle. Clear liquid absorbs very little; amber or smoke absorb strongly, so thick areas look darker.
  • Cap and metal changes colour and sheen of the polished and satin metal parts, the foil on the lid, base and monogram of the box, and the lettering on the label.

The code also contains prepared states such as "Unboxed", "Exploded view" or "Custom label", which can be opened through a link parameter of the embed, for a presentation for example. They do not appear in the control bar.

Example configurator · fictional product

Perfume bottle and box

A perfume bottle with box: glass colour, cap, label with your own name, open and unpack the box – with an exploded view.

Packaging · Colours · Materials and finishes · Own text or logo

What is the end result?

The demo has no enquiry form and no basket. In a project the selection of liquid, finish and name would be handed to the shop or as an enquiry to sales, by email or webhook. Who benefits is covered in perfume bottle and box in 3D; the technical preparation of glass, foil and print data in implementing packaging in 3D.

Frequently asked questions

Can more states be added, such as a spray?

Yes, as a project feature. Each new state needs a rule for which other states it ends, and a place in the sequence.

Where do such rules live?

In the demo, in the code. For ranges with many variants it is better to keep options and exclusions as data your team can review.

How we build viewers and configurators: custom 3D configurator development.

Sources

  1. MDN Web Docs: prefers-reduced-motion, read 14 November 2026: developer.mozilla.org
  2. Demo features and values: the Perfume bottle and box library page and the demo source code (perfume.js: controls, state rules, sequence; label-art.js: label, 16 characters), read 14 November 2026

Read next