Libgdx: [Feature request] Support for glTF game assets and physically based rendering

Created on 9 Dec 2018  路  18Comments  路  Source: libgdx/libgdx

We are discussing porting an existing game engine to LibGDX (the Terasology project). In parallel, I have been researching a game asset workflow to build 3D assets and bring them into the game. It seems common that open source projects, like Blender and Godot engine, are supporting glTF and physically based rendering. Sketchfab also converts many thousands of 3D meshes to glTF format automatically, making this somewhat of an industry standard.

What are some considerations related to glTF support in LibGDX? Are there any plans to support physically based rendering?

3D enhancement

Most helpful comment

@brylie and others : my POC is available here : https://github.com/mgsx-dev/gdx-gltf .

It still a Work In Progress but most of glTF features (including PBR shader) are implemented. You can try the runnable demos (i suggest the desktop demo to test lot more models than html demo).

According to a recent @NathanSweet post, i think it should remain a libgdx extension. However, I'll make few PRs to improve LibGDX API in order to avoid hacks and monkey patches i had to do.

I suggest to continue discussion about GLTF in my repository issue tracker and discord. I'll soon create issues on my tracker to have a better TODOs overview. Contrubtions welcome !

All 18 comments

We are mostly in maintenance mode around here, but you can ask on IRC or Discord as EtK2000 pointed out.

OK, thanks for the reply @NathanSweet. Happy Winter and solstice!

@brylie FYI i'm working on it. I made a POC which implements almost all the 2.0 specification.

If you or other devs want to contribute to it, we could discuss on libgdx discord about it ..

Thanks @mgsx-dev. I will ping the Terasology devs, as there is discussion about incorporating LibGDX into Terasology as well as the importance of the gLTF and PBR for contemporary game/asset development workflow.

With due respect to your freedom to triage the libGDX backlog, I believe this issue was closed prematurely. In effect, this is a feature request. I see there are several other feature requests in the issue queue, and request that this issue be treated similarly.

It was phrased more as a question, but feel free to change the title and question so it can be opened as a feature request.

OK, thanks for your help @EtK2000 :-)

I don't have the ability to reopen closed issues, but when you're ready you can ping someone who can (for example NathanSweet)

@brylie and others : my POC is available here : https://github.com/mgsx-dev/gdx-gltf .

It still a Work In Progress but most of glTF features (including PBR shader) are implemented. You can try the runnable demos (i suggest the desktop demo to test lot more models than html demo).

According to a recent @NathanSweet post, i think it should remain a libgdx extension. However, I'll make few PRs to improve LibGDX API in order to avoid hacks and monkey patches i had to do.

I suggest to continue discussion about GLTF in my repository issue tracker and discord. I'll soon create issues on my tracker to have a better TODOs overview. Contrubtions welcome !

i don't think gltf makes sense for libgdx, it adds too much bloat, g3dj and g3db are enought imo and are similar to gltf, just need PBR material

https://github.com/PWorlds/LibGDX-PBR

And update blender plugin to export the right material info

I would honestly see DAE support over GLTF support. DAE offers more features and better cross-platform support. GLTF works much better if you want to encapsulate some data and contain an entire scene in one file. However, GLTF tends to merge all its 3D data into one object, just like OBJ does. This make GLTF support regrettably a bad thing. DAE nicely keeps things separated the way they should, and over all, it provides superior 3D data support with more detail.

DAE is to FBX what GLTF is to OBJ. Therefore, DAE is superior for gaming.

@shatterblast https://github.com/mgsx-dev/gdx-gltf is already usable and pretty good so far. Importers exist for almost all engines anyway. This issue is/was about GLTF, i think other channels (discord) are more appropriate for such debates.

@mgsx-dev Good point. Why is the issue still open?

@brylie Is this repro sufficient for your needs? https://github.com/mgsx-dev/gdx-gltf If so, is this issue is resolved?

Actually, GLTF looks superior to DAE now. The lighting support seems much better. I don't see DAE natively supporting Emissives.

considering issue opener reactions on messages and that gdx-gltf extension being pretty stable now, i'm closing this request.

People are using gdx-gltf all the time now. GLTF is an accepted standard, and modern 3D tools support it. @brylie , I hope gdx-gltf fits your needs, about 1.7 years later, or that you've found some acceptable alternative, like the PBR material mentioned earlier. I was going to close this, but @mgsx-dev struck like lightning :zap: .

Was this page helpful?
0 / 5 - 0 ratings