For game designers and 3D artists, texturing 3D meshes has traditionally been one of the most time-consuming phases of asset creation. Leonardo.ai features a dedicated 3D Texture Generation system that lets creators upload custom 3D models in Wavefront .OBJ format, apply prompt-driven AI surface textures directly across UV coordinates, and inspect or export production-ready texture maps for game engines like Unreal Engine and Unity.
Whether you are rapidly iterating on modular environment props, testing stylized visual aesthetics, or texturing background game assets, understanding how to prepare your mesh, structure your text prompts, and manage token costs makes Leonardo.ai a powerful asset accelerator.
Technical Prerequisites: Preparing Your OBJ Mesh
Before uploading any asset to Leonardo.ai, your 3D model must meet two strict technical requirements:
- File Format: The model must be exported in
.OBJformat. Other formats such as.FBX,.GLTF, or.BLENDare not accepted by the 3D Texture Generation tool. - Proper UV Unwrapping: The mesh must have UV coordinates. The AI relies on the UV layout to project and bake texture maps onto the 3D geometry. Models without UVs or with collapsed UV islands will produce distorted, scrambled, or failed generations.
UV and Geometry Best Practices
- Non-Overlapping UV Islands: Ensure UV shells do not overlap unless intentional symmetry mirroring is planned. Overlapping shells will receive identical texture details, which can create unnatural repetition.
- Seam Placement: Place seams along natural model crevices, bevels, or hidden angles. While the diffusion algorithm attempts seamless projection, UV seam discontinuities can occasionally show slight boundary artifacts.
- Uniform Texel Density: Keep texel density relatively consistent across the mesh so that material resolution appears balanced across large flat surfaces and smaller details.
- Clean Topology: Eliminate non-manifold edges, flipped normals, and duplicate vertices in Blender, Maya, or 3ds Max prior to export.
Step-by-Step Workflow: From 3D Model to Textured Asset
1. Uploading the Model
In Leonardo.ai, navigate to the creative tools menu and select Texture Generation (or use the REST API endpoint POST https://cloud.leonardo.ai/api/rest/v1/generations-texture).
Upload your UV-unwrapped .OBJ file. Once uploaded, Leonardo registers the mesh and generates a unique modelAssetId. In the web workspace, you can preview the raw untextured mesh in an interactive 3D viewport.
2. Crafting Material and Surface Prompts
Unlike general 2D image prompts that describe full camera compositions, lighting setups, and backgrounds, 3D texture prompts should focus exclusively on surface physical properties:
- Base Material: Define the core substance clearly (e.g., "weathered cast iron", "ancient chiseled sandstone", "scratched cyberpunk composite armor", "hand-painted stylized oak bark").
- Surface Wear and Tactility: Describe weathering, edge wear, rust spots, dust accumulation, surface roughness, or polished gloss.
- Color and Patterns: Mention accent colors, paint chipping, or specific motifs without adding camera or scene background keywords.
- Sample Prompt:
"ornate fantasy broadsword blade, damascus folded steel pattern, darkened battle scratches, polished brass crossguard with verdigris patina, aged leather wrapped grip"
3. Iterating with 3D Texture Preview (5 Tokens)
Generating a complete 3D texture set costs 30 tokens, while a 3D Texture Preview consumes only 5 tokens.
Always run a preview first. The preview projects the prompt onto your model and provides a fast turn-around render. Rotate the model in 360 degrees to verify:
- Does the texture scale match the physical proportions of the prop?
- Are material breaks occurring where logical seams exist?
- Is there unwanted artistic interpretation or discoloration?
If the preview misses the mark, adjust your prompt keywords or add negative prompts (such as --no blur, glossy, plastic look) before committing full tokens.
4. Running Full 3D Texture Generation (30 Tokens)
Once satisfied with the preview, trigger the full generation. Leonardo processes the mesh geometry and compiles multi-channel texture data, including:
- Albedo / Base Color Map: The diffuse color layer reflecting your prompt.
- Normal Map: Surface bump and relief details that simulate geometric depth without increasing polygon count.
- Roughness Map: Grayscale data controlling surface reflectivity and light scattering.
You can inspect the fully textured model in Leonardo's interactive 3D viewer, rotating lighting angles to check how the material reacts to directional illumination.
Exporting and Integrating into Game Engines
After generation completes, download the textured asset or the generated map bundle.
Importing into Unreal Engine 5
- Import your original
.OBJ(or its equivalent.FBX) and the downloaded texture maps into the Content Browser. - Create a new Material and open the Material Graph.
- Connect the Albedo map to Base Color.
- Connect the Normal map to the Normal input (ensure the texture compression setting is set to Normalmap).
- Connect the Roughness map to the Roughness channel.
- If the model includes metallic accents, you can blend a scalar parameter or isolate the metallic areas using the roughness contrast mask.
Importing into Unity (URP / HDRP)
- Drag the mesh and texture files into your Unity Project folder.
- Create a Material configured to the Universal Render Pipeline/Lit or HDRP/Lit shader.
- Assign the Albedo texture to the Base Map.
- Assign the Normal texture to the Normal Map slot and click Fix Now if Unity flags normal map texture settings.
- Slot the Roughness map into the Metallic/Smoothness input (inverting smoothness if required by the channel configuration).
Production Considerations and Limitations
- Baked Shadows vs. Dynamic Lighting: Because AI models learn from photographs and 2D renders, diffusion texturing may occasionally bake directional lighting or ambient shadow gradients directly into the Albedo map. In a dynamic lighting environment, this can create conflicting light sources. Inspect the diffuse texture in an image editor and perform a slight de-lighting or shadow lift pass if necessary.
- Hero Characters vs. Environment Props: Leonardo's 3D texturing excels at modular architecture, environmental props, crates, weapons, vehicles, and organic terrain rocks. For hero character faces or complex multi-material mechanical assemblies requiring strict UDIM workflows, professional artists typically use Leonardo for initial concept baking before doing final touch-ups in Substance 3D Painter.
- Token Budgeting: Free tier accounts receive 150 daily tokens (resetting every 24 hours), which yields up to 5 full texture generations per day. Studio teams running batch generations can leverage paid plans with monthly fast tokens, rollover banks, or automated REST API pipelines.