Magical gene / lines and strokes

Foamed

A raft of round bubbles sits on the flank, drawn as the web between them rather than as the bubbles - heavy where three meet, thin along each wall.

What it can come out as

OutcomeCarrying
Sea foamW/W · W/B · W/C · W/n
Pitch foamB/B · B/C · B/n
Coloured foamC/C
Wild typeC/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
W/WSea foam0.002% — 1 in 50,000
W/BSea foam0.0027% — 1 in 37,495
W/CSea foam0.0027% — 1 in 37,495
W/nSea foam0.038% — 1 in 2,632
B/BPitch foam0.0027% — 1 in 37,495
B/CPitch foam0.0027% — 1 in 37,495
B/nPitch foam0.0027% — 1 in 37,495
C/CColoured foam0.0027% — 1 in 37,495
n/nWild type99.944%

Its gene carrot

The file

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

Why it is built this way

CRACKLE inverted. The mask fills its polygons solid and leaves a channel between them; inverting it keeps only the channel, which is the web. SPOTS and DAPPLES both measure distance to a cell CENTRE, so neither will ever draw the thing that lives on the wall between two cells - that is what CRACKLE is for.

vertexWeight 0.8 is what makes it read as foam rather than as cracked glaze. At 0 the channel is the even width a distance-to-a-plane always is; wound up, the web pools where three cells meet and thins to a hairline along each wall - which is exactly what surface tension does to a bubble raft, and what a crack does not do.

gap 0.85 against a 0.5-unit texel. The thin part of the web after vertexWeight has taken its cut is narrower than gap, so anything much below 0.8 leaves a marking that is nothing but disconnected blobs at the junctions with no walls between them.

The two layers share ONE foam seed and ONE scale, so the fringe fragments are the same raft continuing - not a second, unrelated foam laid beside it. Only the gate threshold and chance differ. The PATCHES gate is what stops this tiling the whole horse.

Sourced from a traced SVG, but not drawn with the SVG mask. The trace runs to thousands of path commands over hundreds of subpaths, most of it trace noise - well past the point ceiling, which exists to keep a traced photograph out of a gene file, and it would have made the marking identical on every horse. The reference was read for what KIND of shape each element is and rebuilt from field masks. A hand-drawn, low-node version of the source would be worth the SVG mask with its d string verbatim.

Arrived keyed 'ixora.foamed'. Renamed to the horsegenetics namespace every other gene in the mod uses - the format allows a modder their own, but a gene shipping INSIDE this mod under a second namespace breaks the tooling that builds a key from a slug.

Arrived at priority 155. Moved to 390: lines and strokes, with the other CRACKLE webs (kintsugi 376, stained glass 382). The arriving number was taken, or sat in a band whose family does not describe this marking - priority is both the paint order and the family the sidebar files a gene under.

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.

Sea foam

A white bubble web across the flank, thickest at its junctions.

  1. the web between the bubbles — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD
  2. fragments at the fringe — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD

Pitch foam

The reference form - a black web of bubble walls on the flank.

  1. the web between the bubbles — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD
  2. fragments at the fringe — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD

Coloured foam

A bubble web in the line's own colour, deepest along the walls.

  1. the web between the bubbles — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD
  2. fragments at the fringe — PARTS × PATCHES × CRACKLE inverted, painted with TOWARD

Wild type

No marking.

Paints nothing.