-
Notifications
You must be signed in to change notification settings - Fork 64
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
Issues in the jgltf-viewer example #79
Comments
The PBR-based rendering has never been fully implemented. The 'warnings' are not critical, but of course, they should not appear if everything was implemented correctly. This is mentioned in the main README:
Now, the statement that this 'will be implemented soon' turned out to be wrong. It has been that way for several years now. Iff I had the chance to try and implement full PBR support, I'd start with porting the https://github.com/KhronosGroup/glTF-Sample-Viewer to Java. But this would mean several weeks (or a few months) of unpaid work, so I cannot tackle this now ... unless I win the lottery or so. |
Thanks for the information |
I've found an alternative Java gltf2 loader + animation viewer https://github.com/MESLewis/SimpleGLTF2 which had used the same porting base (according to the readme) glTF-Sample-Viewer you also would use gltf-chicken.mp4The above duck is displayed correctly |
I have not yet looked at the SimpleGLTF2 repository. From a quick glance, it seems like that there have been ~100 commits, but all of them have been done within one week, ~3 years ago, and no activity since then. It looks like it is not really actively maintained and developed. (I know, JglTF is also not very "active" in this regard, but I occasionally carve out a bit of time to work on it, and there are some larger updates/extensions "in the pipeline" of which I hope that I can finalize them at some point...) Looking at the last comment in the issue in Most rendering engines on the web, like three.js and babylon.js, already have Physically-Based Rendering and material models. So it made sense for glTF to use this model as the common denominator. But implementing this rendering functionality from scratch is a lot of work. The only Java-based rendering engine that I'm aware of and that may already contain much of that functionality is jMonkeyEngine. They do have glTF support, as of https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/TestGltfLoading.java , but I don't know many technical details here. It may still be worth a look for you in the context of But as an aside: The issue in |
Yesterday I discovered, that LibGDX is also supporting glTF2. LibGDX is the base app for the 2.5D map but I also discovered that the required libGDX 1.9.11 is not yet supported by the map, it is based on libGDX 1.9.10. When I try to raise the version number to 1.9.11 then compile errors occure in https://github.com/mapsforge/vtm 2 days ago I also discovered jMonkeyEngine to support glTF2 but such a big engine may be too much what I want. MyTourbook is not a game, I just want that an animated figure can be moved along a tour track and for this, SimpleGLTF2 seems to be what I want for now. |
It was about 4 weeks of work After testing some other glTF2 examples from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0 some examples are only partly corretly displayed. |
'papsforge/vtm' - another library that I should have had on the radar. Any plans to integrate 3D Tiles there? 😁 However, when you mention that not all models are displayed properly, then this might be caused by certain more sophisticated features. Earlier, you mentioned an "animated figure", which sounds like https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/CesiumMan , and if that works, then that could be a start (although this involves skinning, and from my observations, that's what most implementations seem to struggle with...) |
Since 9 years, the NASA 3D map https://worldwind.arc.nasa.gov/java/ is integrated into MT https://mytourbook.sourceforge.io/mytourbook/index.php/documentation/show-tours/3d-map This was 2 years before CesiumGS 3D started Yesterday I tested some glTF examples with jMonkeyEngine and all worked as they should 😉 |
WorldWind is one of the projects that I already stumbled over quite a while ago, but I did not actively follow its development. I probably should have done that. And am somewhat surpised to see that they made a new release a few months ago, even though the project was said to be shut down... WorldWind (BTW: NASA also published https://github.com/NASA-AMMOS/3DTilesRendererJS a while ago)
That's good to hear. You know, on the one hand I think that it could be nice to have a project like the |
After jMonkeyEngine is also running an OpenGL main loop jMonkeyEngine/jmonkeyengine#1862 (comment), the code had to manage 2 different main loops -> too complicated for now I will try now plan B by using https://github.com/mgsx-dev/gdx-gltf, libGDX is already the OpenGL main loop in my app |
I don't understand all the technical aspects here, because I'm not really familiar with jMonkeyEngine. But when it is already using LWJGL, then I don't see why there should be "two main loops". Usually, everything that is related to OpenGL has to happen on the same thread. What exactly are the "different main loops" that you mentioned? |
I wanted to implement the animation with jME in my 2.5D map which is using libGDX as backend, so the main loops would be in jME and libGDX |
I'll probably not be able to say anything profound or constructive here, as long as I didn't read more about the thread management and implementation of jME, and how it interacts with the underlying OpenGL binding. From what I understood so far, on a very shallow level, the scenario could be described with the pesudoest pesudocode ever: class YourApplication {
// The jME main loop, started and run by jME,
// in a thread that is dedicatedly created by jME:
void jmeMainLoop() {
while (true) {
jme.updateEverything();
// This will trigger the rendering, which is doing the
// operations that are done on the "OpenGL thread"
jme.triggerRendering();
}
}
// LibGDX: The same, with 'libgdx' instead of 'jme' everywhere :-)
} So there are two threads that are running the A crucial question here is how the libGDX- and jME-rendering are intertwined on the OpenGL-thread. But assuming that there is something like
then I think the question of "where the animation is implemented" should not mater so much. But again, I know this is a very naive and shallow way of looking at this, and that there are a bazillion caveats that are not reflected in this pseudocode... |
I'm now using https://github.com/mgsx-dev/gdx-gltf to load and rund glTF animations The animation renderer is now integrated into the map renderer. This code contains still a lot of debug code which needs to be cleaned up when all is working. m25-animation.mp4 |
Thanks for the pointer. The As long as this offers the sought-for functionality of easy loading, animating and rendering in the context where you need it, the implementation details may not matter. (I considered closing this issue - but keeping it open, as a reminder that "the gltf-viewer does not support PBR" is fine, I guess...) |
For now I'm very happy with gdx-gltf code 😄 |
I'm very new to understand glTF/JglTF (2.0.3), so I tried to test this simle example https://github.com/javagl/JglTF/tree/master/jgltf-viewer with the Lwjgl platform.
Part of the duck is displayed but there are some issues in the log, how can these issues be solved?
The text was updated successfully, but these errors were encountered: