FreeDome warp mesh (FDMESH v1)

Source formats/fdmesh.ksy (Kaitai Struct). Grid of normalised dome-UV coordinates per display vertex. Row-major, row 0 = top of the display image, column 0 = left; vertex (c, r) sits at x = c / (cols - 1) * width, y = r / (rows - 1) * height. Dome UV (azimuthal equidistant, dome frame): r = (90 - elevation) / 180, u = 0.5 + r * sin(azimuth), v = 0.5 - r * cos(azimuth); (0.5, 0.5) = zenith, r = 0.5 = spring line, azimuth 0 = front (-Z), clockwise from above. Weight (channels = 3): >= 0 used (intensity multiplier), < 0 unused. File size is exactly 24 + 4 * cols * rows * channels bytes.

fdmesh

idtypesize / repeatdoc
magiccontents [70,68,77,69,83,72,0,0]"FDMESH\0\0"
versionu2
flagsu2reserved; writers write 0, readers ignore
colsu4
rowsu4
channelsu42 = (u, v), 3 = (u, v, weight)
verticesvertexrepeat expr cols * rows
trailingbytesno bytes may follow the grid

vertex

idtypesize / repeatdoc
uf4
vf4
weightf4if _parent.channels == 3

Graphviz: fdmesh.dot (render with dot -Tsvg).

NativeMindNONC · commercial use → NativeMind sales · [email protected]