Freshman year, I built a small pet project using Stable Diffusion to stitch together looping AI GIFs. Watching those prompts flicker to life made me wonder what it would feel like to actually step inside the frame and walk around. Modern virtual worlds force a rough tradeoff: hand-crafted RPGs like Skyrim take years to build with rigid geometry, procedural games like No Man's Sky can feel sterile, and 2D AI text adventures like AI Dungeon sacrifice physical space entirely. Meanwhile, most text-to-3D tools either make you wait twenty minutes for a heavy scene to train or trap you inside a flat, warped 360° bubble.

I built Mira to bridge that gap, inspired by the tactile node-to-node exploration of Myst and Google Street View, living AI companions, and the famous JoPano paper (arXiv:2512.06885) on unified spherical panorama generation. Type any idea like "an ancient, forgotten Giza tomb" or "a neon-drenched subterranean cyber-slum", and Mira drops you into a multi-room, walkable 3D RPG world in seconds. You can navigate across connected zones, track your path on a live 2D topological radar minimap, and explore alongside embodied 3D companions (Pathfinders, Curators, and Rivals) who remember what you say and walk beside you.

How It Works

  • Seamless 360° Vision via JoPano & Depth: Directly inspired by the JoPano paper (arXiv:2512.06885), Mira treats 360° environments not as flat equirectangular images that pinch at the poles, but as geometrically unified 6-face cubemaps. Using PyTorch CUDA and HuggingFace Diffusers, Mira generates 6-face cubic perspectives in 6 to 8 DPM steps with RealVisXL V4.0 Lightning and unifies them via JoPano's joint-face attention, shared group normalization, and 3D spherical positional embeddings. Following the JoPano framework, a 200-iteration Discrete Poisson Cross-Face Blending (CFB) solver relaxes all 12 cube edges to eliminate seam lines, achieving a Seam-SSIM of 0.9999 and Seam-Sobel of 0.01:

$$\Delta u = \nabla \cdot \mathbf{v}$$

  • 16-Bit Vertex Displacement & Portal Shaders: Depth Anything V2 extracts a 16-bit metric displacement map, which our Next.js 15, React Three Fiber, and Three.js frontend uses in a custom GLSL vertex shader (PanoramaSphere.tsx) to extrude real 3D heightfield terrain at 60 FPS:

$$\mathbf{p}' = \mathbf{p} + \mathbf{n} \cdot (d \cdot s + b)$$

  • Directional Warp & Dynamic Fog: As you move between zones, custom shaders modulate spherical UV coordinates (uTransitionDir) along your movement vector for a directional forward warp, perform dual-texture cross-face morphing (uTexA, uTexB, uMix), and render undulating iridescent environmental fog (uNoise, uRainbowFog) matched to the active biome's color palette.
  • World Graph & Threaded Pre-Rendering: A FastAPI and Pydantic v2 backend uses Google Gemini 3.8 Flash (google-genai) to compile a 4-room topological graph and allocate character personas. Room 0 synthesizes synchronously in under 10 seconds for instant entry, while Rooms 1, 2, and 3 render in isolated background threads. If you reach a door before a neighbor room finishes rendering on disk, your guide character performs an in-character stall (like inspecting ancient runes on a shifting archway) until the texture seamlessly unlocks. Zustand (useWorldStore.ts) acts as the single source of truth syncing topologies, Mixamo PBR 3D character vectors, telemetry, and a 15-room offline fallback cache.
  • Thinking Companions & Cognitive Cascade: Story and NPC reasoning run on NVIDIA NIM (Nemotron-70B) paired with local CUDA Nemotron-Mini-4B-Instruct in bfloat16 for sub-800ms narrative turns ([MEMORY] → [REFLECTION] → [PLANNING] → [ACTION]). Guardrails enforce a middle-grade adventure tone (inspired by Percy Jackson and National Treasure) and strip out robotic AI preambles. Every interaction is backed by a 3-tier circuit breaker (Tier 1 Nemotron, Tier 2 Gemini Flash with key rotation, and Tier 3 offline cached worlds) so live demos never fail.

Challenges & Takeaways

Building Mira meant solving brutal hardware and latency bottlenecks. Early on, running heavy CPU Poisson blending and GPU tensor generation inside async def FastAPI routes hijacked Python's single-threaded asyncio event loop, causing ECONNRESET socket hang-ups; converting compute-heavy routes to synchronous worker threadpools kept health probes and character ticks stutter-free. We also beat a 3-minute sequential 4-room timeout by architecting the instant Room 0 background-thread pipeline, eliminated 360° skybox seams by implementing JoPano's 200-iteration Poisson boundary relaxation, and built a build-isolation recovery script to prevent Next.js .next webpack chunk race conditions during hot reloads.

Building Mira showed me that generative worlds no longer need to be flat text or static 2D images. When JoPano-powered spherical diffusion, 16-bit depth extrusion, and multi-character cognitive architectures click together as a single loop, players become explorers of infinite reality and characters become true companions.

Built With

Share this project:

Updates

Submission history