Skip to content

Add Open Asset Importer to Godot. - #23837

Merged
akien-mga merged 2 commits into
godotengine:masterfrom
fire:asset_import
Apr 5, 2019
Merged

akien-mga merged 2 commits into
godotengine:masterfrom
fire:asset_import

Conversation

@fire

@fire fire commented Nov 20, 2018 •

Copy link
Copy Markdown
Member

Supports various formats from Open Asset Import Library (assimp). The focus is on FBX and MMD.

This code is contributed by IMVU Inc.

Thanks to everyone who has helped me.

For code review and code: @punto- @JFonS @reduz

For debugging: TheDuriel#1087 and Cthluhu Elden#2299

Others from IMVU Inc: Robert, Eric and Yu.

@fire
fire force-pushed the asset_import branch 3 times, most recently from 2cb29c2 to 345e14c Compare November 20, 2018 04:33
@NathanWarden

Copy link
Copy Markdown
Contributor

This would be a great addition! Thanks for getting started on this :)

@fire
fire force-pushed the asset_import branch 2 times, most recently from 41fdae9 to 90eed1f Compare November 20, 2018 05:00
@slapin

slapin commented Nov 20, 2018

Copy link
Copy Markdown
Contributor

That is great work indeed.
But why not directly into Godot format?

@akien-mga akien-mga added this to the 3.2 milestone Nov 20, 2018
@akien-mga akien-mga changed the title Add Open Asset Importer to Godot. [WIP] Add Open Asset Importer to Godot. Nov 20, 2018
@fire

fire commented Nov 20, 2018

Copy link
Copy Markdown
Member Author

godot windows opt tools 64_2018-11-19_21-46-45

Bugfix with the chained image relocation. It allows gltf2 image locations to be relocated from .import to the original location.

@Calinou

Calinou commented Nov 20, 2018

Copy link
Copy Markdown
Member

I just tested it, it's working on a model in .md5mesh format (IronSnout X10K from Cube 2: Sauerbraten, licensed under CC BY 3.0):

snoutx10k_godot

There seems to be an issue with normals, as I cannot get lighting or normal maps to show up on the model (I just bumped the ambient light value for the screenshot).

Good work so far 😃

@fire

fire commented Nov 20, 2018

Copy link
Copy Markdown
Member Author

godot windows opt tools 64_2018-11-20_15-26-02

from https://developer.nvidia.com/orca/amazon-lumberyard-bistro

Interior: 814,435 triangles

Format: FBX

@samvila

samvila commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

Wait... is this going to bring the possibility of baking an animation using MDD and then play that baked animation inside Godot? Because that's one of the things I miss from the Godot pipeline. For example I always wanted to simulate something in blender and bake that simulation for then play the same animation in Godot. Being able to play baked simulations inside Godot would be amazing!

@fire

fire commented Nov 21, 2018

Copy link
Copy Markdown
Member Author

This is a proof of concept, but it's starting to look usable. @samvila So maybe..

@fire

fire commented Nov 21, 2018

Copy link
Copy Markdown
Member Author

Irc logs regarding automated testing:

<Calinou> iFire: https://en.wikipedia.org/wiki/Structural_similarity
<Calinou> I'm not sure if it's the best algorithm for just checking whether there's *any* difference between two images
<Calinou> it's typically used for quality comparisons
<iFire> Calinou: I'm not looking for a sha512sum
<iFire> so this is what I want
<Calinou> yeah, I know checksums are not adequate for this
<Calinou> but SSIM metrics are usually the most relevant for image quality, not really for checking if rendering is broken
<Calinou> it's still worth a try :)
<mrcdk> dolphin uses/used this to find rendering regressions between versions https://github.com/dolphin-emu/fifoci/

@fire
fire force-pushed the asset_import branch 2 times, most recently from f956fcf to d5148ba Compare November 24, 2018 08:22
@fire

fire commented Nov 25, 2018

Copy link
Copy Markdown
Member Author

Currently unable to solve problems with bone rotation.

If you guys can send some broken models, I can debug them. Been stuck.

For example here is a broken screenshot of a FBX import.

Note that the display of the first frame is what I'm looking at.

godot windows tools 64_2018-11-24_20-08-21

This without playing the animation.

godot windows tools 64_2018-11-24_20-08-43

@slapin

slapin commented Nov 25, 2018 via email

Copy link
Copy Markdown
Contributor

@fire
fire force-pushed the asset_import branch 5 times, most recently from 4d361b9 to c7d40ec Compare November 27, 2018 03:01
Comment thread modules/asset_import/assimp.h Outdated
Comment thread modules/asset_import/assimp.h Outdated
Comment thread modules/asset_import/assimp.h Outdated
Comment thread modules/asset_import/assimp/config.h Outdated
Comment thread modules/asset_import/register_types.cpp Outdated
Comment thread modules/asset_import/revision.h Outdated
Comment thread platform/windows/detect.py Outdated
Comment thread platform/windows/detect.py Outdated
Comment thread scene/3d/mesh_instance.cpp Outdated
Comment thread scene/animation/animation_player.cpp Outdated
Comment thread scene/animation/animation_player.h Outdated
Comment thread scene/animation/animation_player.h Outdated
Comment thread scene/resources/surface_tool.cpp Outdated
Comment thread servers/visual/visual_server_scene.cpp Outdated
Comment thread modules/asset_import/assimp.h Outdated
Comment thread modules/asset_import/config.py Outdated
Comment thread modules/assimp/register_types.cpp Outdated
Comment thread scene/animation/animation_player.cpp Outdated
Comment thread scene/3d/mesh_instance.cpp Outdated
Comment thread platform/windows/detect.py Outdated
Comment thread modules/assimp/register_types.cpp Outdated
Comment thread servers/visual/visual_server_scene.cpp Outdated
Comment thread scene/3d/mesh_instance.cpp Outdated
Comment thread modules/assimp/assimp.cpp Outdated
Comment thread modules/assimp/assimp/config.h Outdated
fire added 2 commits April 5, 2019 07:17
From https://github.com/assimp/assimp repo at d2b45377e4b09a1f43be95e45553afcc06b03f4b
FBX support and MMD (pmx) support.

Normals, Albedo, Metallic, and Roughness through Arnold 5 Materials for Maya FBX.

Maya FBX Stingray PBS support.

Importing FBX static meshes work.

Importing FBX animations is a work in progress.

Supports FBX 4 bone influence animations.

Supports FBX blend shapes.

MMDs do not have an associated animation import yet.

Sponsored by IMVU Inc.

@akien-mga akien-mga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, can be merged once the CI passes.

@akien-mga

Copy link
Copy Markdown
Member

Thanks a ton!

@suiradproject

Copy link
Copy Markdown

Is this no longer available?

@fire

fire commented Apr 11, 2019

Copy link
Copy Markdown
Member Author

The assimp importer is merged into godot 3.2 master.

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.