LLM-Driven 3D Modeling: Selection, Examples, and QA Workflows
This article explores the role of Large Language Models (LLMs) in 3D content production, comparing parametric and generative modeling approaches. It outlines an engineering workflow for 3D asset generation, provides a practical Python example for generating standard spur gear outlines in Blender, and details QA thresholds and feedback loops for art assets.
1. The Role and Boundaries of LLMs in 3D Production
The production of 3D game content faces two long-standing challenges. First, the high learning curve of professional software requires accumulated experience in every stage: modeling, texturing, animation, and rendering. Second, the production pipeline is lengthy, involving substantial repetitive labor from concept to an interactive final product.
LLMs can help address these two points through three main applications:
- Natural Language to Script: Models can translate descriptions like “generate a chamfered gear” into Python code for software like Blender and Maya, lowering the tool barrier.
- Parameter Drafting: Models can provide candidate values for parameters such as the number of teeth, module, and dimensions based on descriptions. These values are only drafts and require script calculation and manual verification before entering production.
- Ideation Divergence: During the prototyping phase, models can quickly provide multiple appearance or structural solutions for the team to filter.
Models are well-suited to act as an intermediate layer between tools and humans, translating design intent into executable commands. Their inferences regarding dimensional relationships, symmetry, and hierarchical structures may be incorrect, so every parameter must be verified by scripts or manually. Geometric precision, topology quality, and artistic style remain the responsibility of human judgment.
2. Selecting Between Parametric and Generative Modeling
The division of labor between these two routes depends on precision requirements, repetitive production needs, and modification frequency. Selection should be completed before starting work; choosing the wrong route will lead to rework.
| Object | Precision Requirement | Reproducibility | Modification Cost | Recommended Route | Main Acceptance Metrics | Inapplicable Cases |
|---|---|---|---|---|---|---|
| Gears, screws, connectors | Millimeter-level tolerance | High | Low, just change parameters | Parametric | Dimensional tolerance, assembly interference | When stylized appearance is needed |
| Regular building modules | Medium | High | Low | Parametric plus random perturbation | Consistent module size, polygon count limit | Buildings with organic shapes |
| Characters, monsters | Medium | Low | High | Generative plus manual refinement | Topology, rigging, polygon count | When precise mechanical structures are needed |
| Vegetation, rocks | Low to Medium | Low | Medium | Generative plus procedural scattering | Polygon count, LOD levels | Main props for close-up shots |
| Freeform surfaces, highly stylized assets | Depends on style | Low | High | Primarily generative, assisted by parametric | Style consistency, topology quality | When strict assembly relationships exist |
Solids of revolution, such as wheel hubs, bottle bodies, and tire cross-sections, are suitable for construction using the Revolve operation. A gear is not a solid of revolution. For a spur gear, the tooth profile section is generated first, then extruded into a solid. A helical gear requires sweeping along a helix; the example in this article only covers spur gears.
3. Engineering Workflow
| Step | Owner | Input | Output | Failure Fallback |
|---|---|---|---|---|
| 1. Requirements | Designers, Artists | Usage, size range, polygon budget | Requirement sheet | Return for clarification if requirements are unclear; do not proceed to generation |
| 2. Selection | Technical Artist | Requirement sheet, selection table | Route and parameter range | Switch to manual modeling if the route is uncertain |
| 3. Script Generation | Technical Artist | Parameter range, script template | Executable script and parameter table | Keep logs and troubleshoot item by item if the script fails |
| 4. Manual Review | Technical Artist | Script, parameter table | Review record | Modify parameters and regenerate if parameters are out of range |
| 5. Import | Artist | Model file | In-scene asset | Uniformly correct units if scale or orientation is wrong after import |
| 6. QA | QA Inspector | Asset, Section 5 threshold table | Pass or fail report | Return to Step 3 if failed |
| 7. Feedback | R&D, Artists | Live data, player feedback | Problem categorization and improvement items | Enter into the next round of requirements; do not directly modify live assets |
4. Gear Example: Spur Gear Profile Generation
4.1 Prerequisites
- Software: Blender 4.2 LTS or newer, with built-in Python 3.11. The script does not rely on third-party libraries.
- Execution: Run in Blender’s Scripting workspace, or execute via command line:
blender --background --python gear.py. - Units: The module is input in millimeters and multiplied by a scaling factor of 0.001 inside the script to convert to meters.
- This example was designed based on the interfaces of the versions mentioned above. Please re-run on the target version before release to ensure the output passes the assertions at the end.
4.2 Principle
The involute tooth profile of a standard spur gear is determined by the following parameters: module $m$, number of teeth $z$, and pressure angle $\alpha$ (commonly 20°).
- Pitch circle radius: $r = m \cdot z / 2$
- Base circle radius: $r_b = r \cdot \cos \alpha$
- Tip circle radius: $r_a = r + m$
- Root circle radius: $r_f = r - 1.25 \cdot m$
The polar angle of a point on the involute is calculated using $inv(\alpha) = \tan \alpha - \alpha$. At radius $r$, the half tooth angle is:
$\theta(r) = \pi / (2z) + inv(\alpha) - inv(\alpha_r)$, where $\cos \alpha_r = r_b / r$
This example includes two simplifications. First, the segment between the root and base circles is approximated by radial lines, whereas the true profile is cycloidal in this region. Second, profile shift coefficients and tip relief are not considered. Undercutting occurs when the number of teeth is less than 17, in which case the script directly raises an error.
4.3 Code
import mathimport bpyimport bmeshdef polar(r, a):return (r * math.cos(a), r * math.sin(a))def gear_outline(module, teeth, pressure_angle_deg=20.0,flank_steps=12, tip_steps=3, root_steps=3):"""Return a closed, counter-clockwise 2D outline in mm, centered at origin."""if teeth < 17:raise ValueError("teeth must be at least 17 for this generator")alpha_p = math.radians(pressure_angle_deg)r_pitch = module * teeth / 2.0r_base = r_pitch * math.cos(alpha_p)r_tip = r_pitch + moduler_root = r_pitch - 1.25 * moduleinv_p = math.tan(alpha_p) - alpha_ppitch_half = math.pi / (2 * teeth)pitch_step = 2 * math.pi / teethdef half_angle(r):alpha_r = math.acos(min(1.0, r_base / r))return pitch_half + inv_p - (math.tan(alpha_r) - alpha_r)flank = []for i in range(flank_steps + 1):r = r_base + (r_tip - r_base) * i / flank_stepsflank.append((r, half_angle(r)))th_b = flank[0][1]th_tip = flank[-1][1]outline = []for k in range(teeth):c = pitch_step * k# left flank, root to tipoutline.append(polar(r_root, c - th_b))for r, t in flank:outline.append(polar(r, c - t))# tip arc, endpoints already added by the flanksfor i in range(1, tip_steps):outline.append(polar(r_tip, c - th_tip + 2 * th_tip * i / tip_steps))# right flank, tip to rootfor r, t in reversed(flank):outline.append(polar(r, c + t))outline.append(polar(r_root, c + th_b))# root arc, the end point is the next tooth's start pointfor i in range(1, root_steps):a = c + th_b + (pitch_step - 2 * th_b) * i / root_stepsoutline.append(polar(r_root, a))return outlinedef check_outline(pts, module, teeth):r_pitch = module * teeth / 2.0r_tip = r_pitch + moduler_root = r_pitch - 1.25 * moduleradii = [math.hypot(x, y) for x, y in pts]assert abs(max(radii) - r_tip) < 1e-9, "tip radius mismatch"assert abs(min(radii) - r_root) < 1e-9, "root radius mismatch"n = len(pts)for i in range(n):assert pts[i] != pts[(i + 1) % n], "duplicate consecutive vertex"area2 = 0.0for i in range(n):x1, y1 = pts[i]x2, y2 = pts[(i + 1) % n]area2 += x1 * y2 - x2 * y1assert area2 > 0, "outline is clockwise or degenerate"return area2 / 2.0def build_gear(pts, face_width_mm, name="Gear", scale=0.001):mesh = bpy.data.meshes.new(name)obj = bpy.data.objects.new(name, mesh)bpy.context.collection.objects.link(obj)bm = bmesh.new()base = [bm.verts.new((x * scale, y * scale, 0.0)) for x, y in pts]face = bm.faces.new(base)ret = bmesh.ops.extrude_face_region(bm, geom=[face])top = [v for v in ret["geom"] if isinstance(v, bmesh.types.BMVert)]bmesh.ops.translate(bm, vec=(0.0, 0.0, face_width_mm * scale), verts=top)bmesh.ops.recalc_face_normals(bm, faces=bm.faces[:])bm.to_mesh(mesh)mesh.update()bm.free()return objif __name__ == "__main__":MODULE_MM = 2.0TEETH = 24FACE_WIDTH_MM = 10.0SCALE = 0.001pts = gear_outline(MODULE_MM, TEETH)area = check_outline(pts, MODULE_MM, TEETH)obj = build_gear(pts, FACE_WIDTH_MM, scale=SCALE)expected_dia = 2 * (MODULE_MM * TEETH / 2 + MODULE_MM) * SCALEd = obj.dimensionsassert abs(d.x - expected_dia) < 1e-6, d.xassert abs(d.y - expected_dia) < 1e-6, d.yassert abs(d.z - FACE_WIDTH_MM * SCALE) < 1e-6, d.zprint(f"OK: points={len(pts)}, area={area:.3f} mm^2")
4.4 Verification
The script includes three types of checks; any failure will halt execution.
- Radius check: The maximum radius equals the tip circle, and the minimum radius equals the root circle.
- Profile check: No duplicate consecutive vertices, and the polygon area is positive, indicating the outline is counter-clockwise and non-degenerate.
- Dimension check: The outer diameter after import is $2 \cdot (m \cdot z / 2 + m)$, and the thickness equals the face width. Using the above parameters, the outer diameter is 52 mm.
These checks only indicate that the geometric parameters are correct. Whether the gear can mesh with its mating gear still requires checking interference and backlash in an assembly scenario.
4.5 Known Limitations
- Does not handle profile-shifted gears, helical gears, or internal gears.
- The radial approximation between the root and base circles alters the root fillet. For strength-sensitive applications, use tooth profiles output by CAD software.
- Game assets typically do not require true meshing precision. If used only for display,
flank_stepscan be reduced to lower the polygon count.
5. Art Asset QA Thresholds and Feedback Loops
The table below provides initial reference values, which need to be calibrated based on the project’s platform performance, visual style, and team experience. Measurement criteria should be specified in the QA guidelines; otherwise, different inspectors may reach inconsistent conclusions.
| Metric | Reference Range | Measurement Criteria | Description |
|---|---|---|---|
| Dimensional tolerance | Per drawing, commonly ±0.02 mm level or ±1% | Compare with nominal value in requirement sheet | Prioritize this for mechanical parts like gears |
| Polygon count | Budget per asset category | Triangle count, including LOD0 | Reduce polygons first instead of deleting details when over budget |
| Non-manifold edges | 0 | Built-in non-manifold check in software | Import not allowed if non-zero |
| Isolated vertices | 0 | Mesh statistics | Usually export residues |
| N-gons | 0 for characters and animated bodies | Count faces with more than 4 sides | Can be relaxed for static objects |
| UV overlap | 0 (characters and props) | Overlap area as a percentage of UV area | No overlap required for texture baking |
| UV utilization | Not less than 0.6 | Effective UV area as a percentage of UV space | Too low wastes texture resolution |
| Material count | Max 2 for characters, max 3 for props | Material slot count | Every added material increases draw calls |
| Bone weights | Max 4 bones per vertex, weight sum equals 1 | Compare after weight normalization, error within 0.001 | Unnormalized weights cause deformation anomalies |
| LOD polygon count | ~50% reduction per level compared to the previous | Count polygons level by level | Used for distant view switching |
The feedback loop proceeds in four steps. First, collect live crash logs, performance data, and player feedback. Second, categorize the problems into five types: dimensions, topology, textures, performance, and style. Third, determine whether the problem originates from requirements, parameters, scripts, or manual modifications. Fourth, write the improvement items into the next round of requirements and update the threshold table. Live assets should not be modified directly to prevent unverified changes from entering the release version.
6. Copyright, Licensing, and Execution Safety
The legal risks of generated content are often underestimated and should be verified item by item before launch.
- Licensing: Confirm whether the generation tool’s terms of service allow commercial use and the ownership of the output content. Terms vary significantly among different tools.
- Training data: Understand the source of the model’s training data. If the output is highly similar to an existing work, it should not be directly used in commercial projects.
- Trademarks and characters: Generated content should not include others’ trademarks, protected character images, or real people’s portraits.
- Code review: Scripts generated by the model must be read manually before being committed to the repository. Do not directly run scripts from unknown sources.
- Execution environment: Run generated code in an isolated environment, restricting its file and network permissions.
- Version locking: Record the versions of Blender, Python, and the generation tool, as well as the prompts and parameters, for traceability.
7. Acceptance Checklist
- The requirement sheet includes usage, size range, and polygon budget.
- The selection result matches the comparison table in Section 2, or exceptions are recorded.
- The script runs successfully on the target software version, and all assertions pass.
- Manual review records exist when parameters exceed the threshold table range.
- The asset passes all mandatory checks in Section 5, with a QA report attached.
- The licensing terms for generated code and assets have been confirmed and recorded.
- Feedback issues have been categorized, and improvement items have been written into the next round of requirements.
