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

blender-game-export

Skill1 starsChanged 59 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 Blender Lab server or MCP for Blender) - 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

3 rules. About 0 are common, 3 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If neither set of tools is available, stop and say so: the user has to install a Blender connection (Tools → Connections), give it to this …

    line 39
  2. Distinctive:

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

    line 50
  3. Distinctive:

    UVs: every textured mesh needs a UV map.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 a Blender connection. Exporting writes files on the user's disk: say where, and never overwrite a file without saying so. Export with code on either connection (the recipes are in the reference).

Which Blender connection you have

HydraOps offers two Blender connections. Your tool names tell you which one you were given; use the names of that column and never call a tool of the other.

What you needBlenderLab, the official Blender Lab server: tools blenderlab_…Blender, MCP for Blender: tools blender_…
What is in the sceneget_objects_summaryget_scene_info
One object in detailget_object_detail_summary (by name)get_object_info
The file: saved or not, its pathget_blendfile_summary_path_infocode: bpy.data.filepath
Run Pythonexecute_blender_codeexecute_blender_code
See the 3D viewportget_screenshot_of_area_as_image with area_ui_type: "VIEW_3D" (whole window: get_screenshot_of_window_as_image)get_viewport_screenshot
Point the viewport at an objectjump_to_view3d_object_by_namecode
Check the Python APIget_python_api_docs (an identifier such as bpy.types.BevelModifier), search_api_docs; the manual: search_manual_docsbpy_api_lookup, describe_node_type
Quick renderrender_thumbnail_to_path, render_viewport_to_path: the image goes to Blender's temp folder and the result gives the real pathcode
Exportcodeexport_scene, or code
Asset libraries, 3D generatorsnonePoly Haven, Sketchfab, Poly Pizza; Hyper3D, Hunyuan3D, Tripo

On both, do not count on anything surviving between execute_blender_code calls (carry your helpers in each script), and what the script prints comes back. On BlenderLab you can also assign a dict to result for structured data, and its guard refuses a few operators (quitting Blender, factory resets).

If neither set of tools is available, stop and say so: the user has to install a Blender connection (Tools → Connections), give it to this agent, and have Blender open with that connection's add-on running. 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.