Creating a Dog Run Game with Tripo-SG and Three.js

Background
I had been scheming since around 2022 to create a deformed 3D model of my dog (well, technically my partner's dog) and turn it into a figurine or something.
At the time, I desperately reproduced the environment for BARC (BARC: Learning to Regress 3D Dog Shape from Images by Exploiting Breed Information), which was probably the SoTA for dog model generation from images, and generated models using my own GPU.

However, I couldn't recreate my dog's proportions well, and I also lacked the Blender skills to model from scratch, so I gave up for a while.
Incidentally, BARC itself takes an interesting approach: it incorporates breed domain information to devise the loss function (e.g., how similar it is to the breed / solving a breed classification task), and extends SMAL (Skinned Multi-Animal Linear — the animal version of the human SMPL model), a parametric 3D model for animals, into a dog-specific subspace.
Image-to-3DModelGenerationandPost-Processing
Since the quality of single-image generation had improved dramatically by 2025, I decided to try again.
After researching various options, I concluded that GPU inference on Hugging Face (subscription) + using models in Hugging Face Spaces was the easiest and fastest for experimentation. Ultimately, Tripo-SG produced the highest quality results, so I adopted it.
Here, because the generation quality was so high, directly generating a 3D model from my dog's photos produced an almost taxidermy-like realism with a considerable uncanny valley effect. So I added an intermediate step of converting the image through ChatGPT (4o) first.
RemeshingandBaking
To resolve the issue of Tripo-SG's generated model having separated polygroups, I performed remeshing.
- Remesh to integrate the scattered parts into a single mesh.
- Retopologize to create a low-poly geometry suitable for games.
- Bake the texture onto the low-poly geometry (create new material → create new texture image → unwrap with Smart UV Unwrap → bake with Diffuse).
Note that remeshing deletes the original UV map, so you need to configure it to reference the material of the original model before baking (using Transform along normals).

AddingBonesandRigging
To animate the dog in the game, the 3D model needs bones (skeleton) and a rig (linking the skeleton to the vertices).
TryingAuto-Rigging
I tried several auto-rigging services.
- anything.world — A service that supports auto-rigging for quadruped models. You can even specify "Pomeranian." However, I gave up this time because an error occurred during generation.
- AutoRig Pro (paid Blender plugin) — There were reports that auto-rigging didn't work well even when trying to add dog bones to Eevee (Pokémon), so it was difficult for a model with unique proportions like my dog.
UsingRigify
In the end, I decided to manually rig the model using Blender's Rigify. I referred to the following resources to add a skeleton to the prepared model.
For the running animation, I referred to assets like AnimBox that can utilize dog rigs.
This allowed the model to walk and run.
BuildingtheGamewithThree.js
Developed with Vite + Three.js (react-three-fiber). For parts where my understanding of Vector-related scene structure was shallow, I supplemented with Vibe Coding using Gemini 2.5 Pro.
- Basic controls are like an RC car (OrbitControls when not operating).
- Obtained an HDR spherical image from Poly Haven and used it for the background.
- Picking up my dog's favorite Aloe Yogurt adds to the score.
- Placed tree models (external assets) and rocks (drawn in low-poly) as obstacles.
- There was an issue where rendering became heavy if the tree material wasn't fixed.
- Implemented an intro screen and score display.
- Referred to resources such as Three.jsで新宿駅構内の3D探索ゲームを作ってみる - Qiita.
- Considered mobile support referring to 【Three.js】ジョイスティック風UIでARオブジェクトを操作する - Zenn.
- Referred to techblog.kayac.com for bone animation.
Summary
While generating the model itself takes only a moment with AI, the most time-consuming part was remeshing, retopologizing, baking, and rigging to bring it to a quality usable in a game. On the other hand, game logic and scene construction with Three.js have good synergy with Vibe Coding, allowing me to build a prototype quickly.