News

The 3-Day Journey To Make A 3D Town

What if FPT Token Factory can come to life as a 3D town where visitors can explore AI models in a more immersive way?

FPT Token Town is an interactive 3D experience designed to bring FPT Token Factory to life, giving visitors a more engaging way to explore AI models and understand the platform’s capabilities. Created by Tien Duong Quang, Developer Community Manager and AI Engineer at FPT AI Factory, the project serves as a visual showcase of FPT Token Factory. The project took him three days, combining coding manually and coding with AI, spending a total of $44 on Tokens across Qwen3.8, DeepSeekFlash-V4, and GLM-5.2. coding with AI, spending a total of $44 on Tokens across Qwen3.8, DeepSeekFlash-V4, and GLM-5.2.

This article will walk through how he built FPT Token Town, from choosing the architecture, building a prototype, and preparing the 3D assets to connecting data sources, fixing bugs, and optimizing performance.

3D Town of FPT Token Factory

Reference for the project

His project took the inspiration from two references: 

Planning phase

Tien built the town with Three.js and used WebGPU for rendering.

His reasoning for this is that the town only needs UI, so working with Three.js kept the code simpler than adding a React layer with React Three Fiber. WebGPU lets offload the calculations for moving and animating thousands of people and vehicles to the GPU, which helps the animations and visual effects run more smoothly. The 1st version of the project was manually coded as much as possible to keep the quality high. Only when needed help, Tien turned to AI and reviewed the resulting code by the end.

Also, knowing LLMs handled quantitative instructions better than qualitative descriptions, FPT AI Factory’s AI Engineer had to be precise about what he wanted and used the right terminology. To prepare for the project, he started learning the basics of game design, which includes industry terms to fully describe by prompts what he envisioned for the project.

The build

The project building phase was broken down into smaller tasks.

Create assets

Down below are the assets categories and their description 

  • Town layout – Need houses, trees, roads, moving vehicles, and people.
  • Houses – Each house needs a door, windows, and a roof.
  • Vehicles – Low-poly models. This is due to the fact that vehicles move quickly, and fine details are hard to see. 
  • Characters – Each character needs a body, arms, and legs. It will be animated to represent movements. 
  • Lighting effects – Light trails should be clearly visible behind moving vehicles, and each lamp should cast a visible glow after dark. 

Buildings, trees, and roads: Most assets can be found free on the web or being permitted to be used by the creator. 

  • Buildings – StreetPack asset pack. Exported from Blender as GLB files for the web. 
  • Trees –  Quaternius’s free low-poly tree pack with CC0 license for commercial use. The models came as FBX files with no separate textures, so they were converted to GLB and baked the colors into the models.
  • *Logos – LobeHub’s open-source icon collection.

Main characters: Custom designed 

  1. Create low-poly characters by using text-to-image model Hunyuan
  2. Create mesh file (3D) by hosting Hunyuan3D-2.1 on FPT AI FACTORY RTX PRO 6000 GPU
  3. Split the character into parts: torso, legs, arms,… to create walk action. This can be done via AI by imported the imported the mesh into Blender and used OpenCode Agent, connected to Blender via MCP.
  4. Exported the animated model & Add the character to the codebase through GLB file.
Shipper character – 4 POVs, and his color pallete texture

Visual effects: Can be created by AI. For this, Tien did note that that Three.js had examples of both effects, which helped his agent follow the prompt closely and correctly. 

The house – From blue blocks, then added textures, and finally added glaring lights

Fix bug 

Checking the frontend scene after each prompt, the engineer ran into two issues with the FPT Token Town and quickly fixed them. 

  1. The delivery driver’s wrong proportions
  • Issue – When the delivery driver was added to the crowd, the character looked short and flattened. The agent didn’t flag it. 
  • Cause – The 3D file stored coordinates as floating-point values between −1 and 1. The scene used a different coordinate convention, and the mismatch caused an overflow during the calculations. 
  • Fix – Converting the coordinate values to a different numeric type before running the calculations. After that, checking the driver alongside the other characters to confirm its proportions were correct. 
Shipper character – Short and flattened, before and after fixed
  1. Doorways with wrong window lighting
  • Issue – People in each queue needed to enter through the front door, and the light beam effect needed to line up with each window. The AI model struggled with front door segmentation: Some marked regions extended beyond the door frame, while others covered only part of the doorway. 
  • Check – Followed each queue to see whether people entered through the correct doorway. 
  • Fix – Exporting each building’s visual mapping as JSON and manually outlining its windows to place the light beam effect inside each frame. 

Extract data

For this, Tien pulled the model’s token usage data from ClickHouse and double-checked the figures. Queue lengths and token flow in the town are scaled to reflect actual usage. 

Display layout

In the first version, FPT Token Town has seven buildings, each representing one of the platform’s featured models. Down below are some facts about the town layout  

  • DeepSeek-V4-Flash gets the most use, so Tien placed the building in the center of town.
  • FPT.TTS-ultra is the text-to-speech model in the seventh building. Due to that, he measured the usage by the number of input characters it processes, instead of token count. 
DeepSeek-V4-Flash with 41,82 billions Token spent per week; and FPT.TTS-ultra with 11,09 millions Letter

Optimize Performance

Tien’s project follows one rule: measure first, then decide what to cut – Which has improved the project overall performance. 

  1. Measure the busiest part of the scene

The first version had more than 360 town blocks, each packed with detail, plus several layers of blur. At the center of town, the renderer was drawing 1.76 million triangles per frame. 

Pedestrians accounted for about three-quarters of that count. Each person was rendered more than a hundred times, and shadow passes drew them several more times.  

  1. Simplify what the camera has to draw

Pedestrians – The character models were simplified while remaining recognizable from a distance, with their walking animations still clearly visible.

Town layout – Prompts were used to reduce the town from over 360 blocks to 81, rendering only the areas visible to the camera. 

Repeated objects – Windows, trees, pedestrians, and vehicles were grouped by type, allowing the renderer to process similar objects together more efficiently.

Shadows and blur – Shadows were disabled where their visual impact was minimal, such as on thin lampposts or from headlights during the day. The blur effect was also reduced to two low-resolution layers.

  1. Adapt loading to the device

Loading optimization – On less powerful devices, the client was configured to lower the rendering resolution during loading and restore it once loading was complete. Loading and rendering were also set to run in parallel, with a loading screen indicating which part of the town was being loaded. 

Results – At the center of town, the triangle count dropped from 1.76 million to 620,000 per frame, a reduction of approximately 65%. The delivery driver’s 3D model was also reduced in size from 3 MB to just 64 KB. 

Display – Optimized view for Desktop & Mobile

What does the finished town look like?

The reviews show that FPT Token Town can offer a more colorful and engaging way to explore FPT Token Factory. Navigating the 3D town feels much like exploring the world of a role-playing game. 

 Some first-time visitors particularly enjoyed the sense of discovery. The FPT Token Town creator shared that one visitor mentioned enjoying rotating the camera, exploring each building, and counting the people in line to see how frequently each model was being used. With more development time, the project could have included more detailed information about each model. 

Tien sees the first version of FPT Token Town as just the beginning, with plenty of room to expand what visitors can learn about the models and how they interact with the virtual environment. He hopes to continue developing the experience, exploring new possibilities, and sharing insights along the way. Future versions could introduce a more distinctive visual style, allow visitors to enter buildings and interact with objects, or even enable users to meet and connect through their avatars. However, these features remain in early-stage ideas rather than confirmed development plans. 

What to learn from this project?

Building FPT Token Town helped Tien realize the importance of having a clear direction when vibe coding. By defining his vision, communicating it effectively to AI, and staying actively involved throughout the development process, he was able to bring the final product closer to what he originally envisioned. 

  • Design by hand first – He researched frameworks and tools, reviewed documentation, and sketched out the design himself before assigning AI small, clearly defined tasks, allowing him to understand and follow each step of the process. 
  • Ask before handing over a task – When working with unfamiliar technologies or concepts, he asked AI to explain its proposed approach before allowing it to make changes. 
  • Inspect the output and measure what matters – He personally reviewed the results after each step, checking how characters looked and moved to identify visual issues, while using measurable metrics such as triangles per frame and model file size to evaluate performance. 

Appendix: Performance figures and references

Github link: https://github.com/littlebeanhp/fpt-token-town-oss  

  Before  After 
Static town geometry  487.878 triangles  28.522 triangles 
Number of town blocks  361  81 (only 60 contain background buildings) 
Triangles per frame in the town center during the day  1.76 million across 3 render passes  620,000 across 2 render passes 
FPT character  3.288 triangles  948 triangles 
Grab character  3.594 triangles  1.776 triangles 
Number of trees  39  31 
Delivery driver’s 3D model file size  3,0 MB  64,2 KB 
Total size of GLB files loaded with the page  1,60 MB  1,25 MB 

About the creator: 

Tien Duong Quang is the Developer Community Manager and Delivery Consultant at FPT AI Factory, where he led the go-live of the Token Factory platform within 1.5 months, scaling production token usage from 10B to 300B. He also serves as an AI Engineer on Text-to-Speech, developing and optimizing TTS models for production, while leading consulting engagements that bring AI solutions to FPT Software and developer communities across Vietnam, Indonesia, and Singapore.

***

Enjoy FPT Smart Cloud’s technical blogs? Get to know the products they are building! 

  • FPT GPU Cloud 
  • FPT Token Factory 
  • FPT AI Agents 
  • FPT.AI 

All details are at: https://factory.fpt.ai/

Share this article: