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 to FBX with Assimp #28459

Closed
wants to merge 1 commit into from

Conversation

fire
Copy link
Member

@fire fire commented Apr 27, 2019

@fire fire force-pushed the mesh_export branch 4 times, most recently from a7590fd to 479f7d3 Compare April 27, 2019 03:43
@fire fire force-pushed the mesh_export branch 8 times, most recently from e0241c1 to 44d356d Compare April 27, 2019 04:49
@fire
Copy link
Member Author

fire commented Apr 27, 2019

What is wrong with the Linux builds?

@qarmin
Copy link
Contributor

qarmin commented Apr 27, 2019

modules/assimp/convert_scene_gltf.cpp:189:17: error: declaration of 'j' shadows a previous local [-Werror=shadow=local]
    for (int32_t j = 0; j < vertices.size(); j++) {
                 ^
modules/assimp/convert_scene_gltf.cpp:124:16: note: shadowed declaration is here
   for (int32_t j = 0; j < num_surfaces; j++) {

@fire fire force-pushed the mesh_export branch 4 times, most recently from 9333a3c to 04d2693 Compare April 27, 2019 14:08
@fire
Copy link
Member Author

fire commented Apr 27, 2019

The problem was the unused includes to assimp. The problem should be resolved now.

@fire fire force-pushed the mesh_export branch 4 times, most recently from b8bdebc to fffbe6c Compare April 27, 2019 15:41
@fire fire changed the title Scene export to GLTF2 [WIP] Scene export to GLTF2 Apr 27, 2019
@fire
Copy link
Member Author

fire commented Apr 27, 2019

Need to make a plugin that crosses into editor boundary :|

@reduz
Copy link
Member

reduz commented May 6, 2019

Why are you using Assimp for this? It should be much simpler to just write it yourself, so we can also add our own Godot extensions..

@fire
Copy link
Member Author

fire commented May 6, 2019

Why are you using Assimp for this?

  1. The initial concept only took 1.5 days. Total time spent is around a week.
  2. The scene export interface code is around 300 lines in the .cpp. 7b83167#diff-2ed0cc88f82d31932b2d98268648552b
  3. Not sure when we'll have time to work on writing our gltf2 exporter.
  4. If GLTF2 is modified, bug fixed or upgraded, Assimp will upgrade. This Assimp GLTF2 exporter simplifies maintenance of the code. We discussed a few months ago the lack of maintainers for the Godot internal import and export code.
  5. Assimp has a concept of metadata which allows Godot to put metadata per node. Can you list some concrete Godot extensions? They could be done without modifying the third party Assimp library.
  6. Assimp has mesh optimizers.

@akien-mga akien-mga added this to the 3.2 milestone May 28, 2019
@akien-mga akien-mga changed the title Scene export to GLTF2 Scene export to glTF 2.0 with Assimp Jun 19, 2019
@fire fire changed the title Scene export to glTF 2.0 with Assimp [WIP] Scene export to glTF 2.0 with Assimp Jul 2, 2019
@fire
Copy link
Member Author

fire commented Jul 12, 2019

Reminder to self, merge the changes that preserves the spatial node organization.

@fire fire changed the title [WIP] Scene export to glTF 2.0 with Assimp [WIP] Scene export to glTF 2.0 and FBX with Assimp Aug 3, 2019
@fire
Copy link
Member Author

fire commented Aug 3, 2019

Trialing FBX export. There's a scale problem.

The scene has initial work for copying the graph, but it's not perfect. Anything other than meshes are ignored.

image

@fire fire force-pushed the mesh_export branch 2 times, most recently from 796ea5e to 0386454 Compare August 4, 2019 01:17
@fire fire changed the title [WIP] Scene export to glTF 2.0 and FBX with Assimp [WIP] Scene export to FBX with Assimp Sep 1, 2019
@fire
Copy link
Member Author

fire commented Sep 1, 2019

Removed GLTF2 support and current changes in master cause the scene to be scaled 0.01.

@fire fire force-pushed the mesh_export branch 3 times, most recently from aae49a8 to f830197 Compare September 2, 2019 00:15
@fire
Copy link
Member Author

fire commented Sep 2, 2019

Added a workaround for assimp's lack of exporter scaling. Will remove when implemented in assimp. Scales correct now.

Convert Scene to FBX.

Use Assimp to export MeshInstances, CSGShape and GridMaps to FBX.

The is no material or animation support.

Implement both exporting and merging scenes.

The Scene Convert to FBX is put into the tools menu.
@fire
Copy link
Member Author

fire commented Dec 2, 2019

At this point, I'm closing this pull request because #33904 is so much better featured.

@fire fire closed this Dec 2, 2019
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.

4 participants