Repository navigation
fix(snippets): export Y-up, meter glTF for Godot and Unreal too - #417
Merged
Merged
Conversation
The Godot preset exported Z-up glTF (export_yup=False) and the Unreal glTF preset baked a 100x scale. Both contradict the glTF 2.0 spec (+Y up, meters) and the engines: Godot is Y-up and imports glTF per the spec, so every Godot asset arrived rotated -90 deg about X; Unreal's glTF importer already converts meters to centimeters (Interchange import_scale defaults to 100), so a baked file landed 100x too large. The Z-up choice was justified in the skill only as keeping the axis test from being "untestable". All three engine glTF presets are now the same spec-compliant export (export_yup=True, meters). Engine differences are documented where they really live: Godot's node-name import hints (-convcolonly, -colonly, -rigid) and Unreal's FBX axis_forward/axis_up/global_scale, which is unchanged. The pipeline template's --preset now selects the same export for every engine. examples/export-preset-axis keeps its checks and still image but stops calling the lying mast "Godot": it now contrasts the engine preset with a naive export_yup=False file, which is what any glTF engine would show. Closes #346 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TMHSDigital
force-pushed
the
fix/gltf-engine-presets
branch
from
October 5, 2026 00:09
469cee2 to
1fe0898
Compare
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 141 passed, 3 skipped, 0 failed;136 passed, 6 skipped, 0 failed;143 passed, 1 skipped, 0 failed;142 passed, 0 skipped, 0 failed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #346.
Problem
export_yup=False). The glTF 2.0 spec fixes +Y up and meters, and Godot is right-handed Y-up and imports glTF per the spec. So every Godot asset exported this way arrived rotated −90° about X. The skill's only justification was that matching Unity would make "the axis contract untestable".import_scale, default 100), so a baked file imports 100x too large.Sources:
Change
snippets/export_preset_godot.py:export_yup=True. The header explains Godot's real per-engine lever: node-name hints such as-convcolonly.snippets/export_preset_unreal.py: the glTF function drops the 100x location/scale bake and exports meters, Y-up. The FBX function (axis_forward/axis_up/global_scale=100) is unchanged.skills/engine-export-presets:export_preset()is now one spec-compliant call for every--preset, kept as the hook for engine import hints. The README drops the "Unreal mutates selected meshes" pitfall, which no longer applies.examples/export-preset-axis: same mesh, checks, exit codes, falsifier and still. The second export is now named for what it is (a naiveexport_yup=Falsefile, which is what any glTF engine would show), not "Godot":unity_*→preset_*andgodot_*→zup_*;gallery.jsonteaches/alt/witness text updated, gallery regenerated.Evidence
Proven by live run (
--factory-startup; binaries report 5.2.1 LTS and 4.5.11 LTS). Results were identical on both versions.export_preset_axis.pycheckpreset_reimport z=0..2.46(standing),zup_reimport y=-2.46..0(lying), tip_err 2.4e-07export_preset_axis.py --same-axis(catalog falsifier)--preset godot/--preset unrealon the CI fixture--output --engine cycles(5.2.1)fit_err=0. The image has no text, so the committed hero is unchanged (the rename touches identifiers and gizmo object names only)Validators:
check_frontmatter,check_skill_refs,check_counts,check_import_export_rules,check_exit_code_readme,check_smoke_catalog,check_engine_id,check_render_gatesandcheck_site_links(135 pages, 0 failures) pass.build_claude_rules --checkis clean.Generated HTML read: the card and detail
alttext indocs/gallery/index.htmlanddocs/gallery/export-preset-axis/index.htmlcarry the new wording.Not done: an engine-side import test (Godot or Unreal are not available here). The Unreal behaviour rests on Epic's documented
import_scaledefault.🤖 Generated with Claude Code