Magical gene / spots and rings
Contour Cells
A patch of coat goes dark and fills with tiling polygons, each drawn as two concentric contour rings around a central pip.
What it can come out as
| Outcome | Carrying |
|---|---|
| Contour | Cl/Cl · Cl/cl · Cl/n |
| Contour, coloured | cl/cl |
| Wild type | cl/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 3,571 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 pair | Shows as | How often |
|---|---|---|
Cl/Cl | Contour | 0.001% — 1 in 100,000 |
Cl/cl | Contour | 0.004% — 1 in 25,000 |
Cl/n | Contour | 0.019% — 1 in 5,263 |
cl/cl | Contour, coloured | 0.004% — 1 in 25,000 |
n/n | Wild type | 99.972% |
Its gene carrot
The file
common/src/main/resources/horsegenetics/genes/contour_cells.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.
| Key | horsegenetics.contour_cells |
|---|---|
| Phase | magical — it adds signed colour in phase 3, after the pigment has resolved |
| Priority | 327 — where it sits in the one (priority, key) paint order |
| Alleles | Cl · cl · n |
| Varies per horse | 3 values drawn once off the expressing allele copy, so a foal that inherits the copy inherits the look |
| Built from | CRACKLE, PARTS, PATCHES, TOWARD |
Why it is built this way
The rings are bands of distance to the cell WALL, not to the cell centre - a wall-distance band inside a polygon is that polygon shrunk, which is what a contour ring is, and it is concentric with the tessellation by construction because it is measured from the same walls. A band [a, b] is CRACKLE at gap 2a times CRACKLE at gap 2b inverted: outer ring 0.35 to 0.85 units in from the wall, middle ring 1.35 to 1.85, and the pip is everything more than 2.6 in. The bare coat between the wall and the outer ring is the dark ground, which is what draws the tiling itself.
REBUILT ON THE WAY IN. It arrived measuring centroid - distance from the cell centre - which reads as circles, not polygons, and did not survive a render. Two things were wrong. Under centroid, a CRACKLE mask covers everything FARTHER than gap/2 body units from the centre, and the gaps were written as fractions of the cell (the schema calls the field 0 at the middle and 1 at the rim, which reads that way), so every ring selected nothing. Fixing the units and the polarity gave rings, but hardly ever: the lattice is three-dimensional and most cell centres lie well off the skin, so the surface rarely comes near one and a centre-measured ring mostly appeared as a stray arc. Wall distance has no such problem - every cell the skin cuts has walls on the skin.
scale is 9 rather than the default 5 so a cell holds two rings and a pip with bare coat between each: the rings are half a unit wide (a texel) with half a unit of ground either side. At 5 the pip would only appear in the few cells the skin cuts near their middle.
The PATCHES mask is the whole of the restraint. Without it this tiles the entire barrel, which is what the source image actually looked like and is not what this gene is for. Its threshold went from 0.66 to 0.54 because at 0.66 a third of the horses rendered showed no patch at all on the near flank.
Renamed on the way in. It arrived as 'Contour', which is already a gene here - a whole coat stacked into hypsometric bands off one FRACTAL field. This one is a patch of CRACKLE cells, each drawn as rings round a pip, and the two have nothing in common but the word, so this one took the longer name. Its alleles were Ct and ct, which are the shipped Contour's own token, so they became Cl and cl: a genotype reading Ct/n would otherwise not say which gene it meant.
Arrived at priority 126. Moved to 327: spots and rings - a repeating figure in a patch, not a replacement ground. 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.
Contour
One or two dark patches on the barrel, each tiled with blue contour polygons.
- the dark ground the contours sit on —
PARTS×PATCHES, painted withTOWARD - outer contour —
PARTS×PATCHES×CRACKLE×CRACKLE inverted, painted withTOWARD - middle contour —
PARTS×PATCHES×CRACKLE×CRACKLE inverted, painted withTOWARD - the pip at each centre —
PARTS×PATCHES×CRACKLE, painted withTOWARD
Contour, coloured
The same tiling in the colour this line carries.
- the dark ground the contours sit on —
PARTS×PATCHES, painted withTOWARD - outer contour —
PARTS×PATCHES×CRACKLE×CRACKLE inverted, painted withTOWARD - middle contour —
PARTS×PATCHES×CRACKLE×CRACKLE inverted, painted withTOWARD - the pip at each centre —
PARTS×PATCHES×CRACKLE, painted withTOWARD
Wild type
No contouring.
Paints nothing.