build-3d-character-selector
Build a 3D character selector
Use the generation recipe when creating new people or explaining how the driving game's four characters were made. If the project already has approved models, start with their own assets. The full-body stage reference shows the balance between the controls, floor and figure.
Watch the four-character demo or compare a reference with its model. The left panel holds the approved full-body generation input while the right panel shows the textured mesh in the game selector.
Prepare each runtime character
- Keep a high-detail master. Make a browser copy with a measured triangle and texture budget. Inspect the face, hands, ears, boots and garment silhouettes before and after decimation. Keep UVs and normals intact, and verify the mapping of materials on every visible primitive.
- Establish one canonical rest transform per model. Correct facing direction using a rendered front and profile, compute bounds after transforming all body parts, center horizontally and place the soles on one floor. Keep meaningful height differences if characters share an in-world scale.
- Import the base color as sRGB. Sample normals, roughness, metallic and occlusion as linear data. In glTF's metallic-roughness texture, green is roughness and blue is metalness. Preserve alpha mode and double-sided flags for hair and sheer clothing. Compare fabric and metal under a moving light before tuning exposure.
- Give each entry a stable ID, name, role, portrait, preview fallback, asset reference and optional facing correction. Keep the selected ID separate from the last confirmed player ID. Reuse the project's existing asset loader and save format. Supply a valid default for old or unknown IDs.
Compose the stage
Fit the full body into the free portion of the viewport after measuring the controls. In a side-by-side layout, aim the camera at the figure's center and use an off-axis projection or a separate stage viewport to keep it in the free area. Check both the figure's height and the width of its turning silhouette. On short and narrow screens, reflow the controls into a compact panel and refit the camera. Retain headroom and visible soles.
Use one broad warm key to reveal the face, a soft cool fill for the shadow cheek, and a narrow grazing light for hair, seams and implants. Give the feet a contact shadow. Place smoke and shafts behind the character. Keep their brightest values away from the eyes. When requested, let the floor dots move in shallow waves and keep their motion slow enough for fabric detail to read.