FACETCAM REFERENCE — GEM OPTICS

Why gems sparkle.

The complete journey of a photon through a cut stone — the same physics FacetCAM's renderer implements, equation by equation. Every “Try it” note drives the live renderer further down the page, where each effect is a toggle you can flip yourself.

Material
AIR · n 1.00DIAMOND · n 2.417θc 24.4°

At 15° the ray escapes, bending to 39° from the normal as it leaves. Critical angle for diamond: 24.4°.

Light inside a stone striking a polished facet — sweep the angle; escape ends at arcsin(1/n)

The Science of Sparkle

Ever wondered why a diamond dazzles but a piece of glass just sits there? It all comes down to physics — specifically, how light behaves when it enters a carefully shaped piece of crystal. Let's explore the science that makes gems magical.

1. Refractive Index (RI) — The Bending Power

When light crosses from air into a gem, it slows down and bends. How much it bends depends on the gem's refractive index:

n = c / v

Where n is the RI, c is the speed of light in vacuum, and v is its speed in the gem. Diamond has an RI of 2.417 — light travels 2.417× slower inside it than in a vacuum (air is close enough to make no practical difference). Quartz is 1.544. Higher RI = more bending = more of the light that gets in stays in.

2. Snell's Law — The Rule of Bending

When light hits a surface at an angle, Snell's law tells us exactly where it goes:

n₁ × sin(θᵢ) = n₂ × sin(θₜ)

Light entering a denser medium bends toward the surface normal (like a car wheel hitting sand — the first wheel to enter slows down, pulling the car sideways). This is why facet angles matter so much — they control where the light goes after entry.

3. Total Internal Reflection (TIR) — The Gem's Superpower

This is the one that matters most. When light inside the gem hits a facet at a steep enough angle, it can't escape — it bounces back inside like a ball off a wall. This is total internal reflection, and it's why gems sparkle.

Critical Angle = arcsin(1 / n)

Diamond's critical angle is just 24.4° — meaning almost any light that enters gets trapped and bounced back up to your eye. Quartz's is 40.4° — much more light leaks through the bottom. This is why the pavilion angle is so critical in design — cut too shallow and light escapes (windowing).

Try it: In the renderer above, drag the index down to Quartz — the lowest setting — and watch the gem go glassy and “windowy”: at 40.4° far more light leaks straight through the pavilion instead of bouncing back.

4. Fresnel Reflection — The Surface Sparkle

Even before light enters the gem, some bounces off the surface. The Fresnel equation (simplified by Schlick) tells us how much:

F(θ) = R₀ + (1 - R₀) × (1 - cosθ)⁵
R₀ = ((n₁ - n₂) / (n₁ + n₂))²

R₀ is the base reflectivity at head-on viewing. Diamond reflects 17.2% even when you look straight at it. At grazing angles, everything becomes a mirror — that's why water looks like a mirror when you look across it at a low angle.

Two engines, two levels of exactness: the browser preview uses the Schlick approximation above, because it has to solve this at 60 frames a second. The offline engine that produces a delivered render drops the approximation and solves the full Fresnel equations, computing the s- and p-polarisation terms separately and averaging them for unpolarised light.

Try it: Toggle Fresnel off in the renderer above and watch the surface lustre appear and disappear.

5. Fire — The Rainbow Flashes

Different colours of light have slightly different refractive indices in the same gem. Blue bends more than red. After several internal bounces, this tiny difference adds up — different colours exit through different facets, creating flashes of spectral colour. Faceters call this fire, physicists call it chromatic dispersion.

n(λ) = A + B / λ²   (Cauchy equation)

Diamond has a dispersion of 0.044 (high fire). CZ is 0.060 (even flashier — one reason experts can spot a CZ immediately). Quartz is only 0.013 (subtle).

FacetCAM's renderer traces red, green, and blue light at three different IOR values through the gem — just like a real prism splitting white light into a rainbow.

Try it: Toggle Fire off in the renderer above — the rainbow flashes at the facet edges vanish, because all three colours now follow one path instead of three.

6. Beer-Lambert Absorption — Where Colour Lives

No gem is perfectly transparent. As light travels through the stone, certain wavelengths are absorbed. Ruby absorbs green and blue but lets red pass — that's why it's red. The deeper the light travels, the more colour it picks up:

I = I₀ × e⁻αd

Where α is the absorption coefficient and d is the path length. This is why the centre of a ruby looks a deeper red than the edges — light travels a longer path through the middle. It is also why, cut to the same proportions in the same material, a 3-carat sapphire looks more saturated than a 0.5-carat one — the bigger stone gives light a longer path.

Try it: Select Corundum in the renderer above — it renders as a ruby — then toggle Beer-Lambert off: the deep-red centre fading to pink edges collapses to one flat red tint.

7. Putting It All Together — The Journey of a Photon

Every ray of light in FacetCAM's renderer follows this complete journey:

  1. Approach: Light ray from the environment hits a crown facet
  2. Fresnel split: some light reflects off the surface — that is the lustre — and the rest enters. Head-on, diamond splits about 17/83; quartz about 4/96
  3. Refraction: Light bends according to Snell's law as it enters the denser gem
  4. Internal bounce: Hits the pavilion facet — if the angle exceeds the critical angle, TIR kicks in and it bounces back up
  5. More bounces: The light pinballs between facets (4-6 times typically)
  6. Absorption: Each segment through the gem absorbs a bit more colour
  7. Exit: Eventually the light exits through a crown facet toward your eye
  8. Dispersion: Different wavelengths took slightly different paths, so you see coloured flashes

A real stone does this continuously — a photon crosses a 7 mm gem in well under a nanosecond. FacetCAM's GPU ray tracer runs the same journey once per colour channel per pixel: millions of ray paths per frame, fast enough to redraw the stone as you turn it.

Quick Reference — Common Gems

GemRICritical ∠DispersionR₀
Diamond2.41724.4°0.04417.2%
CZ2.17027.4°0.06013.8%
Zircon1.93031.2°0.03910.1%
Corundum1.77034.4°0.0187.7%
Garnet1.74035.1°0.0287.3%
Spinel1.72035.5°0.0207.0%
Peridot1.67036.8°0.0206.3%
Tourmaline1.64037.6°0.0175.9%
Topaz1.63037.8°0.0145.7%
Beryl1.58039.3°0.0145.1%
Quartz1.54440.4°0.0134.5%

8. FacetCAM's Render Engines

FacetCAM runs physically-based gemstone ray tracing in the browser, in real time — no downloads, no plugins. There are two engines, both built in-house for gemstone evaluation. You can switch between them with the Engine toggle in the renderer above.

GemMaterial — FacetCAM's Proprietary Gem Shader

Developed by the FacetCAM team, GemMaterial is a purpose-built GLSL shader that implements the full gemological optics pipeline described in this guide. It implements the standard Fresnel equations, Beer-Lambert absorption and Cauchy dispersion of gemmological optics, evaluated per ray, in real time on your GPU.

This is the interactive engine, tuned for 60fps. Delivered 360° videos are produced by a separate offline spectral ray tracer written in Rust, which trades speed for exactness: full Fresnel equations rather than Schlick, Möller–Trumbore intersection against an SAH-built BVH, and stratified hemispheric sampling at 10,000 rays and up to 15 internal bounces. The browser shows you the stone; the offline engine renders it.

Key features:

  • Schlick Fresnel with IOR-dependent R₀ — R₀ is the percentage of light that reflects off the surface when you look straight at it. Diamond reflects 17.2%; quartz only 4.5%. As your viewing angle becomes more grazing, reflectivity climbs toward 100% (this is why water looks like a mirror when you look across it). The formula:
    F(θ) = R₀ + (1 − R₀)(1 − cosθ)⁵
    Each gem's unique RI determines its R₀, so the surface lustre of a diamond looks fundamentally different from that of a tourmaline — not just brighter, but differently shaped in how it rolls across facets.
  • Beer-Lambert absorption — As light travels through a coloured gem, it is progressively absorbed according to colour(path / reference). A ruby's red channel (~0.69 transmittance) passes through easily, while its green channel (~0.06) is almost entirely absorbed. Short internal paths produce a light pink tint; long paths yield deep blood red. This is why the centre of a ruby looks more saturated than the edges, and why a 3-carat sapphire appears richer than a 0.5-carat one.
  • 3-ray spectral dispersion — GemMaterial traces red, green, and blue light at three separate refractive indices (red bends least, blue bends most). After several internal bounces, these three paths diverge enough that different colours exit through different facets — producing the rainbow flashes faceters call fire. This is the same Cauchy dispersion that makes a prism split white light.
  • Energy-conserving internal bounces — At each facet the ray hits inside the gem, Fresnel determines how much energy reflects back (TIR) versus how much refracts out. Even when refraction is geometrically possible, a high exit-angle Fresnel (>95%) is treated as TIR. This prevents energy from appearing out of nowhere — every photon's brightness is physically justified.

Performance: GemMaterial traces 3 full ray paths per pixel (one for each colour channel) and evaluates Fresnel at every internal bounce. Despite that, on a discrete GPU from roughly the last five years it holds 60 fps at typical window sizes. On older integrated graphics it can fall below 30, which is what Legacy mode exists for.

Try it: Select Corundum in the renderer above — the ruby — then toggle Beer-Lambert off. The deep red centre fading to pink edges flattens to one uniform red tint. That depth variation is what Beer-Lambert adds.

Legacy — Fast Preview Mode

A lightweight rendering mode optimised for speed. We include it as a fast-preview option for quick angle adjustments where physical accuracy isn't critical. It uses the same GPU ray tracing acceleration but with a simplified optics model:

  • No Beer-Lambert absorption — Coloured stones get a flat colour tint regardless of how far light travels through the gem. A thin edge looks the same colour as the deep centre.
  • Simplified Fresnel — Surface reflection is not IOR-dependent. Diamond and quartz produce the same lustre pattern, which doesn't match physical reality but renders fast.
  • Fast chromatic aberration — Instead of tracing separate R/G/B rays at different IOR values, Legacy offsets the ray direction slightly for each channel. This gives a rainbow fringe that approximates fire but doesn't follow real dispersion physics.
  • ~3× faster rendering — One ray trace per pixel instead of three, with no per-bounce Fresnel evaluation.

When to use Legacy: Quick previews while adjusting facet angles. Older or integrated GPUs where GemMaterial drops below 30fps. Colourless stones (quartz, white topaz, diamond) where Beer-Lambert absorption doesn't add visible information.

Try it: Flip the Engine toggle above from GemMaterial to Legacy while viewing a coloured stone (Beryl renders as an emerald). The colour depth disappears in Legacy — the stone reads uniformly green instead of rich centre-to-edge variation.

Render Engine Controls

The renderer above exposes the same controls that drive the ray tracing pipeline — each one a toggle or slider you can move now:

  • Internal Bounces (2–10) — How many times a ray bounces off internal facets before the trace ends. At 2 bounces, light barely pinballs inside the stone — you get minimal brilliance and fire. At 6, most light has found its way out through the crown. At 10, even the most deeply trapped rays exit, adding subtle secondary flashes. Most gems look their best at 4–6; going above 8 is visually subtle but costs GPU time.
  • Spectral Dispersion (3-ray) — When ON, the engine traces separate red, green, and blue rays at slightly different refractive indices. This is what produces fire — the rainbow flashes that make a diamond dazzle. When OFF, all three channels share one ray trace (3× faster), but fire disappears entirely.
  • Fresnel Reflection — When ON, a fraction of incoming light bounces off each polished facet surface (Schlick approximation) rather than entering the gem. This creates the surface lustre and sparkle, especially visible at shallow viewing angles. When OFF, 100% of light enters the gem — the stone looks less lively and the facet surfaces appear completely transparent.
  • Beer-Lambert Absorption — When ON, coloured gems show depth-dependent colour saturation. Rays that travel longer paths through the stone absorb more colour. When OFF, the gem gets a flat colour tint everywhere, losing the natural variation between thin edges and the deep centre.
Try it: In the renderer above, start with all toggles on and bounces at 6, then turn them off one at a time to see exactly what each feature contributes. Fresnel removes surface sparkle. Spectral Dispersion kills fire. Beer-Lambert flattens colour. Dropping bounces to 2 makes the gem look dull and dark. Each feature adds a distinct dimension of realism.

Every equation in FacetCAM's GemMaterial shader is based on real physics — the same Snell's law, Fresnel equations, and Beer-Lambert absorption that govern light in actual gemstones. Two simplifications are deliberate: three wavelengths (R/G/B) stand in for the full visible spectrum, and the material is treated as singly refractive, so birefringent species render on their mean RI.

The engine, running

Everything above is computed by the shader below — the same one the FacetCAM workspace uses. Drag the refractive index from quartz to diamond and watch the stone change: the critical angle falls, more light is trapped and returned, and the surface lustre climbs. The figures update in text beneath it, so nothing here depends on the 3D view loading.

Engine
Physics

n 2.417 → critical angle 24.4°, surface reflectance 17.2% head-on. Raising the index lowers the critical angle, so a wider range of pavilion angles returns light instead of leaking it — which is why diamond tolerates cutting error that quartz does not.

FacetCAM's GemMaterial shader, running live — the same engine as the workspace preview. Drag to rotate.
Reuse and citation

This page — its text, diagrams and data tables — is published under the Creative Commons Attribution 4.0 licence. Copy it, adapt it, translate it, put the figures in your slides — including for teaching and commercially. The software, the trade marks and the design library are not covered; the full carve-out is Terms §9.1, and the disclaimer you must keep with any copy is §10.2.

Citing this page
FacetCAM. (2026). Why gems sparkle — the optics of brilliance and fire. FacetCAM Reference. https://facetcam.net/reference/gem-optics (CC BY 4.0)
Reusing a figure or the text — use this credit
"Why gems sparkle — the optics of brilliance and fire" by FacetCAM, from the FacetCAM Reference (https://facetcam.net/reference/gem-optics), used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Disclaimer: facetcam.net/terms#reference-disclaimer

If you changed it, add what you changed — e.g. “Adapted from the original: translated into Spanish; figure redrawn.”

Last revised 19 July 2026