Magical gene / magical coat genes

Overcast

Banks of grey cloud drift across the horse - rounded blobs packed shoulder to shoulder, each shaded darker at its middle, with thin bright channels of sky between them. A third allele carries the same four-step cloud in the dark end of the scale - a thunderhead rather than an overcast.

What it can come out as

OutcomeCarrying
OvercastCu/Cu · Cu/Cc · Cu/n · Cu/Ck
Black skyCk/Ck · Ck/Cc · Ck/n
Coloured skyCc/Cc
Wild typeCc/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
Cu/CuOvercast0.002% — 1 in 50,000
Cu/CkOvercast0.0027% — 1 in 37,495
Cu/CcOvercast0.0027% — 1 in 37,495
Cu/nOvercast0.038% — 1 in 2,632
Ck/CkBlack sky0.0027% — 1 in 37,495
Ck/CcBlack sky0.0027% — 1 in 37,495
Ck/nBlack sky0.0027% — 1 in 37,495
Cc/CcColoured sky0.0027% — 1 in 37,495
n/nWild type99.944%

Its gene carrot

The file

common/src/main/resources/horsegenetics/genes/overcast.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.overcast
Phasemagical — it adds signed colour in phase 3, after the pigment has resolved
Priority116 — where it sits in the one (priority, key) paint order
AllelesCu · Ck · Cc · n
Varies per horse6 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look
Built fromFRACTAL, NOISE, SPOTS, TOWARD

Why it is built this way

The source was an SVG: eight posterised greys traced off a photograph of a mackerel sky, about 330 KB of path data across eight subpath-heavy layers. Past the SVG mask's point ceiling, and the wrong kind of thing anyway - it is a field, not an outline, so there is nothing to place and every horse should get its own. Rebuilt as a rule.

Reading of the source: rounded blobs at a fairly even pitch, packed close but never merged, each with a darker core inside a mid-grey body; a thin pale channel of sky between every pair; the blobs slightly drawn out along one diagonal; and the whole field clumping - dense and dark over part of the frame, open and washed out over the rest.

The three greys are three SPOTS draws on ONE seed, spacing, stretch and vary, differing only in radius. That is what keeps them concentric: stretch divides the sample before the lattice walk, so a single mismatched value is a different lattice and the cores scatter out of their own blobs. If the shading ever lands beside a cloud instead of inside it, that is the parameter that drifted.

Radius is set against spacing rather than picked: the pale channel between blobs is roughly spacing minus twice the radius, so at spacing 3.6 a radius of 1.4 leaves about 0.8 body units of sky - a hair over a texel and a half, which is the thinnest a channel can be and still read. Push the radius up and the field closes into a flat grey horse; the channel is the whole reason it reads as cloud.

The clouds do not cover the horse. A soft FRACTAL decides where the banks sit and everything is multiplied by it, so there are open stretches of bare coat between them, and the haze layer runs on the same seed and scale at a lower threshold - the same banks, drawn larger - which is what gives each one a pale halo instead of a cut edge.

The vary of 0.35 is doing more work than it looks. It scales each cell by its own factor, so neighbouring blobs come out unequal and the big ones crowd their neighbours into clumps, which is the half of the source that a regular lattice cannot say.

The black allele is the white one with the light taken out of it, and it sits one rung under white in the dominance series - so every combination that existed before it keeps the outcome it had, and only the pairs carrying Ck are new. The re-toning is a mapping rather than a repaint: every achromatic target moves into the dark end of the scale keeping its order and its spacing, and every SATURATED one is left alone, because that colour is the gene rather than its lightness.

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.

Overcast

Banks of grey cloud lie across the coat in packed rounded blobs, each one shaded darker through its middle, with thin channels of bright sky running between them.

Layer order is the value order: haze, body, shade, core, brightest first and darkest last. Each is painted over the one before, so the darker draws sit inside the paler ones rather than beside them.

  1. the haze - the same banks drawn larger, for a halo — FRACTAL, painted with TOWARD
  2. the cloud body — FRACTAL × SPOTS × NOISE, painted with TOWARD
  3. the shaded middle of each blob — FRACTAL × SPOTS × NOISE, painted with TOWARD
  4. the deep core, on some blobs only — FRACTAL × SPOTS, painted with TOWARD

Black sky

The same marking as the white form with the light taken out of it: the same 4 steps, moved to the dark end of the scale.

  1. the haze - the same banks drawn larger, for a halo — FRACTAL, painted with TOWARD
  2. the cloud body — FRACTAL × SPOTS × NOISE, painted with TOWARD
  3. the shaded middle of each blob — FRACTAL × SPOTS × NOISE, painted with TOWARD
  4. the deep core, on some blobs only — FRACTAL × SPOTS, painted with TOWARD

Coloured sky

The same cloud, lit from somewhere else - the banks carry a colour this line of horses runs to, still shading from a washed-out rim down to a deep core.

The recessive coloured half of the usual pair. Identical masks and identical knobs, so a foal that changes form keeps its parents' cloud shapes; only the four colours move, and they move together on one hue. The lightness ladder - 0.88, 0.66, 0.5, 0.36 - is the greyscale of the source read off as values, which is what stops a saturated hue from flattening the shading.

  1. the haze - the same banks drawn larger, for a halo — FRACTAL, painted with TOWARD
  2. the cloud body — FRACTAL × SPOTS × NOISE, painted with TOWARD
  3. the shaded middle of each blob — FRACTAL × SPOTS × NOISE, painted with TOWARD
  4. the deep core, on some blobs only — FRACTAL × SPOTS, painted with TOWARD

Wild type

Clear.

Paints nothing.