Anchors and distortion
Why a long wall bunches up near its ends
Section titled “Why a long wall bunches up near its ends”Godot models meshes in ordinary flat 3D coordinates. To place them on the 3-sphere, each S3Anchor3D opens a flat tangent chart centered at a point and projects vertices onto radially from the 4D origin (gnomonic projection).
Near the anchor center, 1 metre in Godot is 1 metre on . Farther from the center, each additional metre projects onto a shorter arc along : .
Suppose you line up nine fence posts spaced 2.00 m apart along a 16 m wall (−8 m to +8 m) inside a space with :
- Under one centered anchor, the inner span is
1.99 m, while the outer spans shorten to1.60 m. - Split across two anchors (each half authored locally from
−4 mto+4 m, placed3.90 mfrom the seam on opposite bearings with the seam post authored once), the outer span recovers to1.91 m.
When and how to split
Section titled “When and how to split”At tangent offset , local radial scale drops by . When , local radial compression reaches 10% (4.67 m at ). Selecting any anchor in the Inspector reports its farthest vertex distance, chart angle, and radial compression.
To split the 16 m wall above at :
- Divide the mesh into two 8 m halves authored from
−4 mto+4 m, placing the shared center post in one half only. - Give each half its own
S3Anchor3DwithChartPlacement = ArcMetres,ArcMetres = 3.90(), and opposite bearings (for exampleBearingDegrees = -90and90). - Keep each half’s vertices close to its own anchor origin.
Nesting a child S3Anchor3D in ParentChart mode with a translated position keeps accumulating offsets in the parent chart rather than opening a fresh center.
Placement modes
Section titled “Placement modes”Common authoring modes for S3Anchor3D.ChartPlacement (on the equatorial ground, BearingDegrees = 0° points toward +Z and 90° toward +X):
| Mode | Use |
|---|---|
ParentChart (default) |
Inherit the nearest enclosing anchor’s chart and compose intervening Node3D transforms. |
SphericalAngles |
Travel PolarDegrees along BearingDegrees, then lift by ElevationDegrees. |
ArcMetres |
Travel ArcMetres metres along BearingDegrees, then lift by ElevationDegrees. |
The remaining eight preset modes (Origin, Antipode, and the six cardinal poles PositiveX/Y/Z, NegativeX/Y/Z) are listed in PlacementMode reference.
LocalOffset: tangent translation in metres (paired with the anchor’sBasisin absolute modes; mirrorsPositioninParentChart).RelativeSpin: displacement authored by the S³ viewport gizmo, serialized as two unit quaternions (8 doubles: left XYZW, right XYZW).EditorChartRadius: blend radius (m) used by the editor’s From 3D camera action; does not alter baked geometry.
Projection math
Section titled “Projection math”Given unit chart center , transformed tangent offset (in metres), and curvature radius , ChartVertex.Project maps vertices and inverse-transpose normals onto as:
This preserves even for off-center or nonuniformly scaled meshes. Editor workflow