Magical gene / fields and regions

Opaline

A network of raised glassy veins divides the coat into a mosaic of small irregular cells - pale-on-pale in the common form, and in the rare one blazing blue and violet, each cell rimmed near-black and starred with tiny bubbles.

What it can come out as

OutcomeCarrying
Opaline, whiteOpw/Opw · Opw/Opd · Opw/n
Opaline, deepOpd/Opd
Wild typeOpd/n · n/n

How each one is actually drawn - region by region, and the layers it is built from - is on the coding tab.

Crossing two of them

Finding one

About 1 in 1,786 wild horses is born showing this. That is the whole of the supply: catch one, or make one with the carrot below. Breeds set their own pools and a breed built around this gene will carry it far more often than the wild population does.

Wild pairShows asHow often
Opw/OpwOpaline, white0.002% — 1 in 50,000
Opw/OpdOpaline, white0.008% — 1 in 12,500
Opw/nOpaline, white0.038% — 1 in 2,632
Opd/OpdOpaline, deep0.008% — 1 in 12,500
n/nWild type99.944%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/opaline.json — a data-driven gene, not a Java class. It is listed in the index.json beside it and registered by Genes' class initialiser at startup.

Keyhorsegenetics.opaline
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority286 — where it sits in the one (priority, key) paint order
AllelesOpw · Opd · n
Varies per horse10 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromCRACKLE, PARTS, RAMP, SPOTS, TOWARD

Why it is built this way

The import gave each cell one of three tints with a CHOICE mask. CHOICE is a coin flip made ONCE PER HORSE - it returns the same answer on every texel - so all three layers would have painted the entire marking one colour, or nothing at all, and which one depended on the seed. The tint is a RAMP on axis 'cellId' instead: a key drawn per cell of a lattice, constant across that cell, which is what the import was describing.

Every mask runs in the whole-horse frame, so the cell lattice carries across the body/neck/head/leg seams instead of restarting at each part boundary. That is the difference between one sheet of cracked glass and eleven.

The rim is an annulus - the wider wall reading minus the narrower one, both inverted - so the near-black band and the pale vein it surrounds share an edge exactly rather than leaving a seam or overlapping.

Mane, tail and ears are excluded. This is a skin effect, and hair keeps whatever colour the genes that govern hair gave it.

What it paints

Each outcome, described the way the gene file describes it, and then the layers that draw it in the order they are painted. The prose is the part a reader checks a bake against; the list underneath is what the engine actually did.

Opaline, white

A faint webbing of pale glassy veins divides the coat into soft cream-on-cream cells, like frost on a window.

  1. the cells, each its own tint — PARTS × CRACKLE, painted with RAMP
  2. the rim inside every wall — PARTS × CRACKLE inverted × CRACKLE inverted, painted with TOWARD
  3. the glassy vein itself — PARTS × CRACKLE inverted, painted with TOWARD
  4. bubbles caught in the cells — PARTS × SPOTS × SPOTS × CRACKLE, painted with TOWARD
  5. and the light in each bubble — PARTS × SPOTS × CRACKLE, painted with TOWARD

Opaline, deep

The coat breaks into a stained-glass mosaic of blue and violet cells, each ringed in near-black and lit with tiny pale bubbles where the veins meet.

  1. the cells, each its own tint — PARTS × CRACKLE, painted with RAMP
  2. the rim inside every wall — PARTS × CRACKLE inverted × CRACKLE inverted, painted with TOWARD
  3. the glassy vein itself — PARTS × CRACKLE inverted, painted with TOWARD
  4. bubbles caught in the cells — PARTS × SPOTS × SPOTS × CRACKLE, painted with TOWARD
  5. and the light in each bubble — PARTS × SPOTS × CRACKLE, painted with TOWARD

Wild type

Nothing.

Paints nothing.