agentleFS
TraX22TraX22/HydraOps-Skills/blender-game-export/SKILL.md

blender-game-export

Skill1 starsChanged 38 days agoApache-2.0View on GitHub

Prepares a Blender model for a game engine and exports it as glTF/GLB or FBX through a Blender connection (the official BlenderLab server) - applied transforms, origin and pivot, scale and axes, triangle count, normals, UVs, material slots, naming, and a check of the exported file. Use when the user wants a Blender model in Unity, Godot, Unreal or a web viewer, asks to export to GLB, glTF or FBX, or reports that an exported model arrives rotated, tiny, huge, untextured or with broken shading.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run Python: execute_blender_code.

    line 24
  2. Very specific:

    Check the Python API: get_python_api_docs (an identifier such as bpy.types.BevelModifier), search_api_docs.

    line 30
  3. Distinctive:

    If these tools are not available, stop and say so: the user has to install the BlenderLab connection (Tools → Connections), give it to this …

    line 38
  4. Distinctive:

    If the user did not say, state your assumptions and go on.

    line 49
  5. Distinctive:

    UVs: every textured mesh needs a UV map.

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Exporting a Blender model for a game engine

You work in the user's Blender through the BlenderLab connection. Exporting writes files on the user's disk: say where, and never overwrite a file without saying so. Export with code (the recipes are in the reference).

Your Blender connection

You work through BlenderLab, the official Blender Lab server; its tools are blenderlab_…:

  • What is in the scene: get_objects_summary; one object in detail: get_object_detail_summary (by name). The file, saved or not, and its path: get_blendfile_summary_path_info.
  • Run Python: execute_blender_code. Nothing survives between calls (carry your helpers in each script); what the script prints comes back, and a dict assigned to result comes back as data. Its guard refuses a few operators (quitting Blender, factory resets).
  • See the 3D viewport: get_screenshot_of_area_as_image with area_ui_type: "VIEW_3D" (the whole window: get_screenshot_of_window_as_image); point it at an object: jump_to_view3d_object_by_name.
  • Check the Python API: get_python_api_docs (an identifier such as bpy.types.BevelModifier), search_api_docs; the manual: search_manual_docs.
  • Quick render: render_thumbnail_to_path, render_viewport_to_path; the image goes to Blender's temp folder and the result gives the real path.
  • Export: code (bpy.ops.export_scene.gltf, bpy.ops.export_scene.fbx).
  • Asset libraries and 3D generators: none. Build the object, or ask the user for a file to import.

If these tools are not available, stop and say so: the user has to install the BlenderLab connection (Tools → Connections), give it to this agent, and have Blender open with the add-on's server started. Do not describe work as done when you could not do it.

Ask or state, once

  • Target: Unity, Godot, Unreal, or the web (three.js and similar). It decides the format and the axis settings.
  • What to export: the whole scene or named objects, as one file or one per object.
  • Where: the folder. For Unity, a folder under the project's Assets/.

If the user did not say, state your assumptions and go on.

TargetFormatWhy
Godot, web, anything modernGLB (binary glTF)One file, materials and textures inside, axes handled by the format
UnityFBX, or GLB if the project has a glTF importer (glTFast)FBX is what Unity imports natively
UnrealFBX, or glTFBoth are imported natively

Preparation checklist

Work on the objects to export, in this order. Code for every step is in references/export-recipes.md.

  1. Inspect first: for each object print name, type, scale, rotation, dimensions, modifier list, material slots, vertex and triangle counts, UV layers.
  2. Do not destroy the user's model. Applying modifiers, joining and triangulating are one-way. Export with "apply modifiers" on (the file gets the final geometry, the scene keeps the modifiers), or work on duplicates in an Export collection. Say which you did.
  3. Apply scale and rotation (scale 1, 1, 1 and rotation 0 on export objects). An unapplied scale is the usual cause of wrong sizes, skewed normals and physics that misbehave in the engine.
  4. Origin where the engine needs the pivot: bottom center for props and characters that stand on the ground, the hinge for a door, the center for a pickup. Then put the object at the world origin unless the layout of a whole scene is being exported.
  5. Real scale: 1 Blender unit = 1 m = 1 Unity unit. Check the dimensions against the real object.
  6. Normals and shading: faces pointing outwards (recalculate if lighting looks inverted), smooth shading with sharp edges where needed.
  7. Geometry budget: report triangles per object. Rough guides: a small prop 500-5,000, a hero prop 5,000-30,000, a character 20,000-80,000. Lower Subdivision or Bevel segments, or add a Decimate modifier, if it is far over; ask before reducing detail the user built on purpose.
  8. UVs: every textured mesh needs a UV map; engines also want a second, non-overlapping one for baked lighting only if the project bakes lightmaps.
  9. Materials: few slots (each is a draw call), named clearly. Only what the format can carry survives: Principled BSDF base color, metallic, roughness, normal, emission and their image textures. Procedural node textures do not export: bake them to images first, or tell the user the engine material will need to be rebuilt.
  10. Names: objects and meshes named for the engine (SM_Crate_01, no .001 suffixes, no spaces or accents).

Export settings that matter

GLB / glTF: selected objects only, apply modifiers, +Y up (the default), include materials, images embedded. Add animations only if there are some.

FBX for Unity: selected objects only, object types Mesh (plus Armature if rigged, with "add leaf bones" off), apply modifiers, scale option FBX Units Scale, forward -Z, up Y, and "apply transform" so the object does not arrive rotated -90° on X with a scale of 100. With a rig, leave "apply transform" off and fix the rotation in the import settings instead: baking it breaks armatures.

FBX for Unreal: same, with forward X, up Z, and smoothing set to Face.

Operator keywords change between Blender versions: check with the API tool of your connection when one is rejected (on BlenderLab, get_python_api_docs with bpy.ops.export_scene.gltf or bpy.ops.export_scene.fbx), rather than dropping settings silently.

Verify the file

  • The file exists, and its size is plausible (a GLB of a few hundred bytes is empty).
  • Print what was exported: object count, total triangles, materials, file size, path.
  • For GLB you can re-import the file into a temporary collection, compare object and triangle counts, then remove that collection; do this when the user reported a broken export, and make sure you remove only what the re-import created.
  • You cannot see the model inside the engine. Say what to check there: scale next to a 1 m cube, the pivot, the rotation (should be 0, 0, 0), and the materials.

When it arrives wrong in the engine

SymptomCauseFix
Rotated 90°Axis settings, or unapplied rotationApply rotation; FBX forward/up as above with apply transform
100 times too big or small in UnityFBX unit scaleFBX Units Scale, scene unit scale 1.0
Dark or inside-out facesFlipped normals, negative scaleApply scale, recalculate normals outside
No texturesProcedural materials, or images not packedBake to images; GLB embeds them, FBX needs the image files alongside or "embed" path mode
Faceted or melted shadingMissing smooth/sharp dataSmooth shading with sharp edges; FBX smoothing Face
Pivot far from the objectOrigin not setSet origin, move object to world origin
Many objects instead of oneSeparate objects exportedJoin duplicates before export, if one mesh was wanted
Huge fileSubdivision applied at a high level, 4K texturesLower levels, resize textures

Report

Give the path and size of each file, the format and the key settings used, triangles and material slots per object, what you changed in the scene (or that you worked on duplicates), and the import settings to use in the engine.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.