Inspiration
I wanted to bridge the gap between cultural AI and 3D web graphics. While exploring the Qloo API, I realized that a brand's "Taste DNA" is usually just used for text recommendations. I wanted to see if I could take that cultural data and feed it into Gemini to dynamically generate the physical properties of a 3D garment (like its fabric, fit, and sheen). The goal was to build a functional pipeline that turns abstract cultural signals into tangible, spatial visuals.
What it does
3D Viewer is an autonomous spatial showroom. When a user enters a brand name (e.g., Gucci, Nike, or Balenciaga), the app queries the Qloo cultural graph to extract the brand's specific style signals, lifestyle tags, and affinities. It then passes this data to the Gemini API, which acts as an expert fashion director, calculating precise physics properties (roughness, sheen, scale, and color). Finally, the app applies these properties to a Three.js WebGL model in real-time, instantly morphing the 3D hoodie's fabric and silhouette to match the brand's exact vibe.
How I built it
Backend: Built with Python (FastAPI). I integrated the Qloo API (/search and /v2/insights) to fetch the brand's entity data. I then used the Google GenAI SDK(Gemini 3.8) with a structured JSON schema to force the AI to output precise numerical PBR (Physically Based Rendering) values. Frontend: Built with Three.js (WebGL). I wrote custom shader logic to generate procedural fabric micro-weave textures, allowing the 3D model to physically look like matte fleece (for Nike) or high-sheen silk (for Gucci). Resilience: I added a robust fallback dictionary. If the backend drops or the AI times out, the frontend catches the error and seamlessly applies local aesthetic presets so the user experience never breaks.
Challenges I ran into
One of the biggest challenges was the 3D mathematical anchoring. When the AI instructed the model to scale up for Balenciaga's oversized fit, the 3D hoodie would float upward off the screen because its center was anchored to the middle.
Accomplishments that I am proud of
the visual polish of the UI. The panel, the smooth parametric scaling of the hoodie, and the dynamic PBR material switching (silk vs. fleece) feel premium. I’m also proud of the fault-tolerance architecture—the fact that the UI can dynamically fall back to local data without crashing shows strong engineering resilience.
What I learned
I learned how to effectively use structured JSON schemas with Generative AI. Getting LLMs to output precise, usable numerical data (rather than just conversational text) is tricky, but it is the key to connecting AI to real-time graphics. I also deepened my understanding of Three.js materials and how to map abstract data to physical shader properties.
What's next for 3D-Viewer
In the future, I would expand the library of 3D assets beyond just a hoodie. I would add T-shirts, sneakers, and sarees, and use AI to not only morph the fabric but also generate entirely new textures and 3D meshes on the fly.