Magical gene / magical coat genes

Ringwork

A dark network runs over the coat, pooling where its lines meet, and inside every space it encloses sit two or three concentric rings around a small dark core - a contour map of something nobody drew.

What it can come out as

OutcomeCarrying
RingworkRw/Rw · Rw/Rc · Rw/n
Coloured ringworkRc/Rc
Wild typeRc/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
Rw/RwRingwork0.002% — 1 in 50,000
Rw/RcRingwork0.008% — 1 in 12,500
Rw/nRingwork0.038% — 1 in 2,632
Rc/RcColoured ringwork0.008% — 1 in 12,500
n/nWild type99.944%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/ringwork.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.ringwork
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority117 — where it sits in the one (priority, key) paint order
AllelesRw · Rc · n
Varies per horse3 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromCRACKLE, TOWARD

Why it is built this way

The source was an SVG: four posterised greys traced off a photograph of a dark branching growth on a pale ground, about 130 KB of path data. Too many points for the SVG mask, and the wrong kind of thing besides - it is a field with a rule in it, not an outline, so it is rebuilt as the rule.

Reading of the source: thick dark ribbons that swell where they meet and thin between; rounded lobes hung on those ribbons; and inside each lobe a set of nested contour outlines around a small dark middle. What makes it read as one object rather than two is that the rings sit INSIDE the network's own spaces - they are not a separate scatter that happens to land nearby.

That is the whole reason this is CRACKLE and not RINGS. RINGS and SPOTS lay their own centres down from their own seed, and those have never had anything to do with where a wall fell, so a ring field over a stroke field gives rings that miss the lines - which is what the picture is not. CRACKLE's measure: centroid is the only per-cell radial coordinate in the vocabulary and the only one guaranteed concentric with the wall layer: one seed, one scale, one warp, and the wall layer and every centroid layer are talking about the same polygons.

So every CRACKLE mask in this file shares $netSeed, $cellScale and warp 0.35. Change warp on one of them and the rings walk out of their own cells. That is the first thing to check if it comes out looking like two unrelated markings.

gap is the number to verify first. Under measure: wall it is a channel width in body units; under centroid the docs say it becomes a radius, and this file reads that as a fraction of the cell (0 at the middle, 1 at the boundary). If the rings come out as either full cells or nothing, that reading is wrong and every centroid gap here wants rescaling into body units instead.

Ring thickness is set against the cell, not picked. At scale 6 a cell's half-width is about 3 body units, so a 0.20 slice of the centroid field is 0.6 units - a hair over a texel. Every ring here is 0.18 to 0.20 wide for that reason, and winding cellScale down below about 5 puts them under a texel and breaks them into stipple.

The source has a soft grey drop shadow offset down and left of everything. Nothing in this vocabulary offsets a mask, so layer one is a wide soft wall band in mid grey instead - a halo rather than a shadow. Close, and not the same mechanism; worth knowing before anyone tries to make it directional.

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.

Ringwork

A near-black network runs across the coat, thickening where three lines meet, and each space it closes off holds a pale ground with two concentric rings and a dark dot at the middle.

Layer order is outside-in and pale-first: halo, cell ground, network, outer ring, inner ring, core. Each draw is smaller than the one before it and painted over it, so a ring reads as a ring rather than as a disc with a disc beside it.

  1. the halo standing in for the source's drop shadow — CRACKLE, painted with TOWARD
  2. the pale ground inside each cell — CRACKLE, painted with TOWARD
  3. the network, pooling where lines meet — CRACKLE, painted with TOWARD
  4. the outer contour — CRACKLE × CRACKLE inverted, painted with TOWARD
  5. the inner contour — CRACKLE × CRACKLE inverted, painted with TOWARD
  6. the core, on most cells — CRACKLE, painted with TOWARD

Coloured ringwork

The same network and the same nested rings, carrying a colour this line of horses runs to instead of the greys.

The recessive coloured half of the usual pair. Same seed, same scale, same warp, same gaps - so a foal that changes form inherits its parents' exact tessellation and only the colours move. The lightness ladder is the source's four greys read off as values, which is what keeps the contours legible once a saturated hue is on them.

  1. the halo standing in for the source's drop shadow — CRACKLE, painted with TOWARD
  2. the pale ground inside each cell — CRACKLE, painted with TOWARD
  3. the network, pooling where lines meet — CRACKLE, painted with TOWARD
  4. the outer contour — CRACKLE × CRACKLE inverted, painted with TOWARD
  5. the inner contour — CRACKLE × CRACKLE inverted, painted with TOWARD
  6. the core, on most cells — CRACKLE, painted with TOWARD

Wild type

No ringwork.

Paints nothing.