Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Scene export native gltf #33904

Closed
wants to merge 1 commit into from

Conversation

fire
Copy link
Member

@fire fire commented Nov 26, 2019

Need some CICD.

Alternative to #32218 that directly uses Godot's importer to write an exporter.

Features:

Export the scene to glTF2.

Updated 2019-12-04.

Done:

  • Meshes
  • CSG
  • Gridmap
  • Materials
  • Bone weights
  • Bones
  • Blendshapes
  • The root node is put under the new root node.
  • Cameras
  • Debugged skins and animation skeletons
  • More debugging of meshes
  • Material caching
  • Use node index instead of bone names to do child parent relationships
  • Support all meshes instead of just array meshes
  • Debugged crash with Gridmaps
  • Removed extra node under skeleton for the skeleton
  • Bone animations
  • Blend shape animations (2019-12-05)
  • Camera crashes (2019-12-06)

Todo:

  • Duplicate AnimationPlayer node
  • Duplicate Skeleton node
  • Move from the the tools menu to an export menu. Use this new plugin interface to add an "export gltfs" option.
  • Cruft in accessor generation
  • No lights
  • Robust compatibility with blender

@fire fire requested a review from BastiaanOlij as a code owner November 26, 2019 01:31
@fire fire mentioned this pull request Nov 26, 2019
@akien-mga akien-mga added this to the 4.0 milestone Nov 26, 2019
@fire fire force-pushed the scene_export_native_gltf branch 3 times, most recently from 056359c to a941177 Compare November 28, 2019 14:32
@fire fire force-pushed the scene_export_native_gltf branch 3 times, most recently from deda206 to c7f8c17 Compare December 2, 2019 00:29
@fire fire requested review from akien-mga and vnen as code owners December 2, 2019 00:41
@fire fire force-pushed the scene_export_native_gltf branch from 8e62072 to c7f8c17 Compare December 2, 2019 00:49
@fire fire force-pushed the scene_export_native_gltf branch 5 times, most recently from df887e9 to 8109901 Compare December 6, 2019 07:56
@fire fire force-pushed the scene_export_native_gltf branch from 003fd35 to 8a2bb09 Compare December 8, 2019 04:47
Add initial editor saver plugin and resource saver scene.

Begin EditorSceneSaverGLTF.

Rename to save scene and save animation.

Rename get save flags for saving.

Initial work on save scene and save animation.
Move editor scene saver gltf and its plugin out.

Work on EditorSceneExporter.

Keep the exporter names in sync.
Extract EditorSceneImporterGLTF into a GLTFDocument.


Extract gltf_document.


Work on export from gltf documents.


Work on _generate_gltf_scene.


Work on _convert_mesh_instance.


Convert camera and convert spatial.


Link children and parents of a gltf node.


Improve _convert_mesh_instances.


Can export json.


Export basic gltf2 nodes without meshes.


Initial all elements of the matrix array.


Stub encoding accessor.


Create a stub of _encode_accessor.


Checkpoint.


Scene shows.


Can see triangles now!


Can now duplicate meshes.


Default byte_stride to -1.


Need to cascade change to byte_stride.


Add normals, uv1 and uv2.


Add tangent, weight_0 and bone_0.


Avoid crashing in uvs.


Serialize materials.


Avoid crashes and improve materials.


A mesh instances has meshes, not just array meshes.


Avoid crashes.


Partial material support.


Save to folders.


If the material is transparent, set it as blend.


Support more materials.


Tangents must be reordered.


Size must be greater than zero.


Don't process mesh_instances twice.


Revert "Tangents must be reordered."

This reverts commit 70e0e53a3854973f1e02cac1da88bcb2517cd281.

Remove joints and weights.


Cleanup.


Remove old code from savers and exporters.


Divide the gltf classes that are serializing and converting.


Add copyrights.


Whitespace changes.


Whitespace.


Whitespace.


Code cleanup from cicd.


Cleanup.


Whitespace.


Fixing cicd errors.


Error is not being used.


CICD errors.


CICD fixes.


Restore GDCLASS on resource saver.


Don't double nest the root node.


Avoid material crash.


Don't need to set gltf parent.


Don't lose root node.


Create hierarchy for skeleton.


Better skeleton.


Restore skins.


Add work on skins.

Buggy.
Disable skeletal animation for now.


Revert "Disable skeletal animation for now."

This reverts commit 1dc939c753ec7f249d4a065384386f2e273f414b.

Disable skeletal animation.


Whitespace changes.


Handle materials in mesh instancce and geometry material overrides.

Whitespace changes.

Images array cannot be empty.

Restore animations and bugfix scene conversion.

Disable animations.

Set the skeleton node to have the global transform removed.

Revert "Set the skeleton node to have the global transform removed."

This reverts commit f4a9b5e79af6938ec05d1d9e3b30a06c200f6a7e.

Revert "Disable animations."

This reverts commit 15513b7d2c113d7b4110b8daebebc988a1d8ab45.

Support blend shapes.


Add wip.


Bugfixes.


Restore blend shape support.


Add error message.


Better blend supports.


Whitespace.


Avoid code warnings.


Duplicate and reown removed the top node.


Break apart matrix.


Remove duplication of code in _convert_scene_node.


Change textures to srgb.


Undo correction.


Skins work!


Whitespace.


Skeleton skins meshes.


Use a type that exists on windows.


numerical limit of min is not lowest.


Redo max and min accessor values.


Change accessors for encoding.


Checkin wip.


Fix normalization math and don't normalize.


Disable animations.


Consistently use get_rotation_quat.


Avoid warnings.


Normalizing weights is not needed.


Handle empty materials.


Indices is a boolean value.


Save tangent directly.


Avoid gltf validation errors.


Avoid invalid camera data in the nodes.


Bugfixes

Stepify matrix to avoid min and max float problems. Normalize tangent and normals.
Add some storage for bone to node mappings and node to parent mappings.


Add a material cache.


Make more robust.


Renumber comments.


Support all meshes not just array meshes.


Support gridmaps.


The scene does not have extra nodes now.


Save only visible nodes.


Cleanup skeletons.


Make the code less messy by storing the skeleton to node mapping.


Remove the duplication of the skeleton node.


Cleanup and make bone animations work.


Avoid variable shadowing.


Remove comment.


Cleanup and support blend shape animations.


Cleanup.


Cleanup parenting logic.


Find mesh or skeleton by name.


Use full paths again to get nodes.
@fire fire force-pushed the scene_export_native_gltf branch from 8a2bb09 to 2cafc0d Compare December 8, 2019 04:57
@fire fire closed this Dec 8, 2019
@fire fire deleted the scene_export_native_gltf branch December 8, 2019 06:19
@fire
Copy link
Member Author

fire commented Dec 8, 2019

Whoops, will reset.

@fire fire restored the scene_export_native_gltf branch December 8, 2019 06:21
@fire
Copy link
Member Author

fire commented Jan 9, 2020

The new location of the pr is at #34193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants