Spatial Module Technical Specifications
WebXR-native 3D platform built on React Three Fiber + Rapier WASM physics, with Yjs CRDT collaboration, multi-provider AI 3D generation, a custom WebGPU ray tracer, MetaHuman procedural animation, IFC4 BIM export, a visual scripting node graph, and a plugin runtime + marketplace.
System Capabilities
Rendering
React Three Fiber + Three.js; custom WebGPU compute-shader ray tracer with WebGL2 fallback
Physics
Rapier WASM — deterministic for multiplayer; XPBD soft-body solver; SPH fluid sim; ocean/fluid surface
AI 3D generation
5 providers — Luma, Meshy, Tripo3D, Stability, OpenAI
AI job types
6 — text_to_3d, image_to_3d, texture_generation, style_transfer, scene_generation, mesh_optimization
Asset formats
8+ input / 4 output
CRDT engine
Yjs with sub-ms sync latency
Texture compression
KTX2 + Basis Universal (GPU-native, no CPU decompression)
XR deployment
Pure WebXR — Quest, Vision Pro, any WebXR-capable browser
Character animation
MetaHuman MotionDNA — full-body procedural animation driven by AI state
Visual scripting
Geometry, game, and deformation node graphs, backed by a typed node library
Procedural generation
Dungeons, terrain, music, equipment, creatures — seeded for reproducibility
Plugin runtime + marketplace
Capability-scoped sandboxed plugins with marketplace search
Behavior trees + cognitive architecture
BT executor + semantic memory for autonomous NPC agents
Mesh editing
Retopology, subdivision surfaces, sculpt brushes, decimation, UV unwrap
NLP + command routing
Natural-language parsing (intent + adjective + grammar resolution) drives editor commands
BIM export
Architecture Editor floor plans → IFC4, plus SVG/DXF/PDF and JSON export
Embed security
AES-256-GCM encryption with per-tenant key derivation
Architecture Overview
┌──────────────────────────────────┐ │ Spatial Editor (Admin / WebXR) │ └──────────────────┬───────────────┘ │ ┌────────────────────────────┼────────────────────────────┐ ▼ ▼ ▼ ┌───────────┐ ┌───────────┐ ┌────────────┐ │ Scene │ │ Yjs CRDT │ │ WebXR │ │ graph + │◄──────────────┤ realtime │───────────────►│ meeting │ │ nodes │ │ collab │ │ + spatial │ └─────┬─────┘ └─────┬─────┘ │ audio │ │ │ └────────────┘ ▼ ▼ ┌───────────┐ ┌──────────────────┐ │ Asset │ │ Rendering │ │ pipeline │ │ R3F + Three.js │ │ (KTX2 + │ │ + WebGPU RT │ │ streams) │ │ + WebGL2 fallback│ └─────┬─────┘ └──────────────────┘ │ ▼ ┌────────────────────────────────────────────────┐ │ Subsystems (parallel) │ │ │ │ Physics • Rapier WASM (deterministic) │ │ • XPBD soft body • SPH fluid │ │ • Ocean / fluid surface │ │ │ │ AI 3D • Luma / Meshy / Tripo3D / Stability │ │ • text→3D, image→3D, scene gen │ │ │ │ Visual • Geometry / game / deformation │ │ script • Typed node library │ │ │ │ Plugins • Sandboxed runtime + marketplace │ │ • Capability-scoped access │ │ │ │ NPCs • Behavior trees + semantic memory │ │ • Cognitive architecture │ │ │ │ Mesh • Sculpt / retopo / subdiv / decimate│ │ editing • UV unwrap │ │ │ │ BIM • Architecture Editor → IFC4 export │ │ export • SVG / DXF / PDF / JSON │ │ │ │ NLP • Intent + adjective + grammar │ │ • Natural-language editor commands │ └────────────────────────────────────────────────┘Scene & Node Tree Management
Every scene is a tree of nodes (objects, lights, cameras, audio sources, particle systems) with a mesh, light, camera, group, portal, terrain, water, particle, audio, trigger, collision, navmesh, annotation, ui_panel, avatar_spawn, or spawn_point type. Scenes carry a type of their own — generic, digital_twin, product_viewer, vr_environment, ar_experience, architectural, or training — which the editor and renderer use to pick sensible defaults.
Core operations exposed via the API: create / read / update / delete / publish / list scenes; add / update / move / delete nodes within a scene; fetch the full node tree recursively, or a flat node list for bulk operations.
Bulk fetch optimization: batched node fetches are capped per call (with pagination) to keep large scenes — thousands of objects — responsive rather than causing a single unbounded query.
Publishing flow: publishing a scene emits a platform event that other modules (Commerce, Smart Spaces) can subscribe to, so a published scene shows up live wherever it's referenced.
AI Generation — Multi-Provider Dispatch
| Provider | Best for | Typical processing time | Output formats |
|---|---|---|---|
| Luma AI | High-quality 3D from text/images (Neural Radiance Fields) | 30-120 seconds | glb, gltf, usdz |
| Meshy | Fast text-to-3D with PBR textures | 15-90 seconds | glb, fbx, obj, stl |
| Tripo3D | Rapid generation, production-ready topology | 10-60 seconds | glb, gltf, obj |
| Stability AI | Texture/material generation (Stable Diffusion) | 5-30 seconds | png, exr |
| OpenAI | Multi-modal scene descriptions | 20-90 seconds | glb, gltf |
| Job Type | Default Provider | ||
| ---------- | ----------------- | ||
| `text_to_3d` | Meshy | ||
| `image_to_3d` | Luma | ||
| `texture_generation` | Stability | ||
| `scene_generation` | Luma | ||
| `style_transfer` | Stability | ||
| `mesh_optimization` | Tripo3D | ||
WebXR — VR/AR Experience Lifecycle
| State | Meaning |
|---|---|
| Available | QR generation ready |
| Fallback | Uses a placeholder image |
| Unavailable | Not available in strict mode |
Multi-User VR Meetings
A meeting tracks its scene, template, status (scheduled → active → ended/archived), host, and participants. Each participant carries their avatar state, device info, audio state, hand-tracking data (per-hand position + recognized gestures), optional eye-tracking data, and world-space position/rotation — plus host/presenter flags.
Meetings also carry their own spatial audio zones (named, positioned, with a radius, a max-participant count, and an optional private flag) and shared whiteboards (canvas data plus authorship/last-modified metadata).
Integrations:
- Collaboration — session management, participant roster
- Avatar — full-body avatar state per participant
- Spatial audio — 3D positional audio per zone
- Gesture / hand tracking — hand-tracking input → recognized gestures
- Hand / eye data — raw device input from WebXR
- Gestures — recognized library (point, grab, wave, thumbs_up)
Meeting lifecycle: create (scheduled) → start (active) → join (adds a participant) → end (ended) → archive (archived).
Realtime Collaboration — Yjs CRDT Engine
Presence data tracks each user's status (active / away / focused / idle), cursor position (both viewport and world-space), current selection, and focus target (a node, the viewport, or a UI element) — including camera position for viewport focus.
Core features:
- Cursor presence — See other editors' cursors in real time with name labels
- Selection sync — All participants see which nodes are selected
- Object locking — Prevent simultaneous edits to the same node
- Undo/redo replay — Operations replay across all participants' undo stacks
- Conflict resolution — CRDT-based (Yjs), no central authority needed
- History — Operation history with replay capability
Locking: locking a node returns who holds the lock and when it was acquired; attempting to lock an already-locked node returns the current holder instead of granting a conflicting lock.
Yjs integration: each scene is backed by a Yjs document — the scene graph as a shared map keyed by node ID, with child ordering as a shared array. Concurrent edits merge automatically under CRDT semantics, with no central coordinator required.
AI Character Animation — AeionClaw + MetaHuman MotionDNA
AeionClaw integrates with MetaHuman-grade procedural animation. Given a personality profile and emotional state, it drives full-body animation procedurally — blend weights, gestures, locomotion commands, and lip-sync — without hand-authored animation clips.
Big Five personality → body language:
- Openness → gesture frequency
- Conscientiousness → posture rigidity
- Extraversion → movement amplitude
- Agreeableness → eye contact duration
- Neuroticism → micro-movement jitter
Personality maps to a MetaHuman MotionDNA preset — "friendly_neighbor," "professional," "energetic," and similar archetypes.
Emotion → facial expression: each emotion (happy, sad, angry, fearful, surprised, disgusted) maps to a weighted combination of facial action parameters (mouth, brow, eye, jaw), scaled by intensity.
Also supported: live lip-sync driven directly from an audio stream, gaze targeting (a world point, the camera, or a conversation partner), and locomotion commands (walk, run, idle, turn, teleport).
Runtime integration: the animation bridge and the multi-user scene synchronization layer both attach at character initialization time, so procedural animation and multiplayer sync work together inside any published scene.
Asset Pipeline — Upload to Stream
Supported input formats: glb, gltf, fbx, obj, usdz, stl, ply, 3ds Supported output textures: ktx2, png, exr, jpg
Pipeline stages:
- Upload — Accept file, validate MIME type, check size limits
- Validate — Mesh topology, material references, animation tracks, skeleton hierarchy
- Reduce polygons — real vertex-clustering decimation on GLB geometry
- Generate LODs — 3 levels: high (source), medium (-50%), low (-90%), each a genuinely decimated mesh
- Create manifest — Index of all chunks, textures, animation tracks
- Store — Upload the optimized GLB to cloud object storage
- Index — Record measured before/after triangle and byte counts for every conversion
A streaming manifest exposes total size, available LOD levels (with triangle count and resolution per level), texture variants, geometry variants, and animation tracks, so clients can fetch exactly the level of detail they need as a viewer approaches an object.
Floor Plan + BIM Export — Architectural Models
Purpose-built for architectural and engineering workflows:
IFC4 export: Floor plans authored in the Architecture Editor export to an IFC4-schema BIM file — project, site, building, and per-storey entities, with each room exported as an IfcSpace (name, bounding box, space type, occupancy capacity, building-code attributes, finishes, and stair/roof design where configured). This is the same format the Construction module and external CAD/BIM tools consume for interop.
Other export formats: floor plans also export to SVG (for print/reference), DXF (for AutoCAD-compatible tools), PDF, and Aeion's own JSON format for round-tripping.
Space mesh generation: Converts authored floor-plan rooms to 3D mesh volumes. Used for digital twin occupancy visualization, IoT sensor binding per space, and wayfinding.
Embeds — Secure Embeddable Viewers
Any scene can be published as a secure embeddable viewer at a dedicated embed URL.
Configuration options: domain allowlist (restrict which sites may embed), password protection, expiration dates, view-count limits, toolbar/annotation visibility, custom branding, and optional AES-256-GCM encryption of the embed configuration itself.
Domain allowlisting: requests from domains not on the allowlist are rejected, preventing hotlinking.
View count limits: once the configured limit is hit, further loads are rejected rather than silently continuing to serve the embed.
Encryption: when enabled, embed configuration is encrypted at rest using per-tenant derived keys and decrypted only at render time.
HTML snippet: a single generated <iframe> tag (with allow="xr-spatial-tracking; fullscreen") is all a customer's website needs to embed a scene.
Data Model Overview
Spatial persists everything a scene needs as typed, queryable records: scenes (metadata, status, settings), assets (uploaded files plus pipeline metadata) and their LOD/texture variants, scene graph nodes, PBR materials, environment/skybox configurations, animation tracks, active collaboration sessions, XR meeting records, embed configurations, AI generation job history, per-scene version history, and per-scene access control.
Every record inherits the platform's standard RBAC, audit-trail, versioning, and Aegis backup model.
Key Architecture Decisions
Rendering
React Three Fiber + Three.js — Declarative UI → scene graph mapping
Physics
Rapier (WASM) — Near-native speed in browser
Collab sync
Yjs CRDT — Sub-ms, no central authority, offline-capable
Texture compression
KTX2 + Basis Universal — GPU-native, no CPU decompression
AI providers
Multi-dispatch — Best model per job type, automatic fallback
XR delivery
WebXR Device API — Universal — Quest, Vision Pro, mobile AR
BIM export
Architecture Editor → IFC4 — Plus SVG/DXF/PDF/JSON, for Construction + external CAD
Embed security
AES-256-GCM, per-tenant derived keys — Per-scope key derivation, tamper-proof
Character animation
MetaHuman MotionDNA — Full-body, procedurally animated from AI state