Model loading · function

octahedralDirection

The direction a tile of the atlas was baked from, for an octahedral coordinate in [0, 1].

Explained in Importing models.

function octahedralDirection(u: number, v: number, out: Float32Array): void
import { octahedralDirection } from '@driftengine/assets';

Parameters

ParameterTypeDescription
unumber
vnumber
outFloat32Array

In depth

The whole sphere and not a hemisphere. A hemi-octahedral map spends its texels on the upper half and is right for anything standing on ground the viewer also stands on; a tree seen from a bridge, a rock seen from a cliff and anything at all seen by a flying camera need the underside, and a map that does not carry it substitutes the horizon view and reads as a card.