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

Add Open Asset Importer to Godot. #23837

Merged
merged 2 commits into from
Apr 5, 2019
Merged

Conversation

fire
Copy link
Member

@fire fire commented Nov 20, 2018

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
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
Copy link
Contributor

slapin commented Nov 20, 2018

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
Copy link
Member Author

fire commented Nov 20, 2018

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
Copy link
Member

Calinou commented Nov 20, 2018

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
Copy link
Member Author

fire commented Nov 20, 2018

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
Copy link
Contributor

samvila commented Nov 21, 2018

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
Copy link
Member Author

fire commented Nov 21, 2018

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

@fire
Copy link
Member Author

fire commented Nov 21, 2018

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
Copy link
Member Author

fire commented Nov 25, 2018

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
Copy link
Contributor

slapin commented Nov 25, 2018 via email

@fire fire force-pushed the asset_import branch 5 times, most recently from 4d361b9 to c7d40ec Compare November 27, 2018 03:01
@fire fire force-pushed the asset_import branch 2 times, most recently from afd2758 to 28a1f30 Compare April 3, 2019 17:19
modules/assimp/register_types.cpp Outdated Show resolved Hide resolved
scene/animation/animation_player.cpp Outdated Show resolved Hide resolved
scene/3d/mesh_instance.cpp Show resolved Hide resolved
platform/windows/detect.py Outdated Show resolved Hide resolved
@fire fire force-pushed the asset_import branch 2 times, most recently from 6d30e83 to e2a0866 Compare April 3, 2019 18:42
modules/assimp/register_types.cpp Outdated Show resolved Hide resolved
servers/visual/visual_server_scene.cpp Outdated Show resolved Hide resolved
@fire fire force-pushed the asset_import branch 4 times, most recently from 7562c1f to 25a280c Compare April 3, 2019 19:50
@fire fire force-pushed the asset_import branch 3 times, most recently from a2a1e64 to a113228 Compare April 4, 2019 13:10
modules/assimp/assimp.cpp Outdated Show resolved Hide resolved
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.
@fire fire changed the title [WIP] Add Open Asset Importer to Godot. Add Open Asset Importer to Godot. Apr 5, 2019
Copy link
Member

@akien-mga akien-mga left a comment

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 akien-mga merged commit 7ca9863 into godotengine:master Apr 5, 2019
@akien-mga
Copy link
Member

Thanks a ton!

@fire fire deleted the asset_import branch April 5, 2019 22:21
@suiradproject
Copy link

Is this no longer available?

@fire
Copy link
Member Author

fire commented Apr 11, 2019

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.