glTFast icon indicating copy to clipboard operation
glTFast copied to clipboard

GameObject/Export glTF menu option excludes transforms of parent nodes

Open chrisdjali-wrld3d opened this issue 1 year ago • 0 comments

Describe the bug When using the GameObject/Export glTF/glTF-binary (.glb) menu option with several scene objects selected, only transforms directly on those objects are reflected in the exported glTF. This can lead to issues like objects overlapping in the model.

Files

N/A - this is an export issue, and it's probably simpler to describe how to create an affected scene than upload one.

To Reproduce Steps to reproduce the behavior:

  1. Add a new Unity scene.
  2. Add a cube.
  3. Add an empty.
  4. Add a sphere.
  5. Make the empty the parent of the sphere.
  6. Transform the empty, e.g. increase its z coordinate by two.
  7. Select the cube and sphere (but leave the empty unselected).
  8. Click the GameObject/Export glTF/glTF-binary (.glb) menu option.
  9. Open the resulting glTF in a glTF viewer.
  10. Observe that the sphere is enveloped within the cube.

Expected behavior I'd expect that when multiple objects are selected, the transforms necessary to preserve their relative transforms would be preserved (either as glTF nodes or by applying them directly to the meshes). This would effectively be the same as implicitly selecting parent nodes until everything selected had a common ancestor, then running the export, but without selecting siblings as doing that manually currently does.

Screenshots N/A

Desktop (please complete the following information):

  • glTFast version 5.0.4
  • Unity Editor version 2021.3.9f1
  • Render Pipeline and version Built-in
  • Platform: Editor

Additional context This isn't in any way a priority for me, I just thought the button would be a quick way to get a scene into Blender for a pretty render, and was surprised by what I got. I can get what I want by additionally selecting parent nodes as I've got no need to exclude siblings.

chrisdjali-wrld3d avatar Jun 13 '23 13:06 chrisdjali-wrld3d