Mesh vs OpenGEX vs glTF

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 4

Mesh vs OpenGEX vs glTF

Post by Mako_energy » Fri Aug 04, 2017 6:38 am

A quick disclaimer, I realize serializers for various formats aren't the current focus of efforts in Ogre and that more important things are being worked on right now. That said, supporting more than just the proprietary Mesh format out of the box can/will do wonders for workflows of everyone using Ogre. This is a discussion this board has seen a few times before. I particularly enjoyed this post.

OpenGEX has been mentioned to address this and has been on Dark Sylinc's Trello for over 2 years (I'm not trying to beat up on you, I swear). But more recently there is another format that has come to my attention that seems to do many (or more) of the things that OpenGEX does, glTF 2.0(link below). I don't know if it's reasonable to support both, or if having only one is more reasonable. I'm curious both what is the Ogre Teams current plans and timetable on adding serializers for other formats. Is glTF 2.0 a good format for Ogre or does it have some shortcomings I'm unaware of?

https://github.com/KhronosGroup/glTF
0 x

User avatar
Daixiwen
Greenskin
Posts: 104
Joined: Fri Feb 08, 2013 11:30 am
Location: Oslo
x 1

Re: Mesh vs OpenGEX vs glTF

Post by Daixiwen » Fri Aug 04, 2017 9:42 am

I was very interested in OpenGEX, mostly because it was an open format, easy to parse, and exporters are available for the most current 3d modellers. But the OpenDDL syntax is weird (why didn't he chose to just use JSON?), with some strange technical choices and even if Eric is a real genius, having the format and the exporters under the control of one man that can shut down everything one day or require a license or whatever isn't really futureproof IMHO.
That's why I'm more excited about glTF 2.0. I haven't read it all yet but it seems to be a very well designed format, light years from collada or other nightmareish formats. I haven't looked into details yet, but it looks like it supports PBR too, I hope it can be mapped well to Ogre's HLMS.
0 x
Hardware, n.: part of the computer you can kick

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mesh vs OpenGEX vs glTF

Post by frostbyte » Fri Aug 04, 2017 11:07 am

this has been discussed...http://ogre3d.org/forums/viewtopic.php? ... tf#p534289
afaik openGEX is open source, the fact that its being run by one guy doesn't change that
i looked at gltf2.0 spec, and i can't really see who would write an ogre importer for it( i got a headache from staring at the spec )
assimp seem to support both exporting and importing glft( don't know version or status of this )
and you can use ogreAssimp converter http://www.ogre3d.org/tikiwiki/OgreAssi ... ture=Tools
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 4

Re: Mesh vs OpenGEX vs glTF

Post by Mako_energy » Fri Aug 04, 2017 11:58 am

Thanks for the link to the discussion. I hadn't seen it. However I believe that discussion is referencing glTF 1.0, not 2.0. I could be mistaken about that though.

OgreAssimp is something I have seen, but it is a bit overengineered in my opinion. Every time I've looked at it there is some new issue someone has found with it and needs fixing. Direct serializers for these formats supported by the Ogre team/community would be a much leaner, easier, and more maintainable solution.
0 x

farrer
Halfling
Posts: 63
Joined: Mon Sep 12, 2011 7:35 pm
x 6

Re: Mesh vs OpenGEX vs glTF

Post by farrer » Fri Aug 04, 2017 12:48 pm

glTF 2.0 integration in Ogre would be great. Yesterday Godot integrated it as a importer to their engine, and the programmer who made the integration seems very happy with glTF. Quick looking at their code, it seems not too much pain.

Maybe worth a community effort to integrate glTF to Ogre... I could give a try to start some integration when I'll have some free time, if anyone not start before (in fact, I'm at just two steps from stopping everything I had to do and starting to code it now...).
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mesh vs OpenGEX vs glTF

Post by frostbyte » Fri Aug 04, 2017 12:59 pm

Mako_energy wrote:Thanks for the link to the discussion. I hadn't seen it. However I believe that discussion is referencing glTF 1.0, not 2.0. I could be mistaken about that though.
thanks for the update, i revisited the glTF site and it seem to finally gaining momentum....
this is very exciting https://github.com/sketchfab/Unity-glTF-Exporter as it may enables a path from unity to ogre( for the time being using ogreAssimp ) and supported by sketchFAB( major company and my favorite content-site :D )
Mako_energy wrote:OgreAssimp is something I have seen, but it is a bit overengineered in my opinion. Every time I've looked at it there is some new issue someone has found with it and needs fixing. Direct serializers for these formats supported by the Ogre team/community would be a much leaner, easier, and more maitainable solution.
i'm not sure if dark_sylinc would resist adoptation if someone drops a glTF2 importer commit/pull request at his doorstep
but i think he has more urgent priorities to attend to, so i'm not sure if there is any point in adding this to his trello
farrer wrote:glTF 2.0 integration in Ogre would be great. Yesterday Godot integrated it as a importer to their engine, and the programmer who made the integration seems very happy with glTF. Quick looking at their code, it seems not too much pain.
thanks for the link( https://godotengine.org/article/we-shou ... me-engines )
it looks like gltf2 is completely different from gltf...
i think we/ogre team should re-examine the situation with glTF2 vs openGEX adoptation as gltf2 eco-system is growing larger and the format seems to be getting easier to handle leaning towards an interchange format( pure json support? )

edit: i see from the buttom of the article that dark_sylinc point about lack of industry grade middle-ware exporters is still valid( or am i wrong? ), a few unmaintained gltf converters on github just won't cut it...
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

User avatar
Zonder
Ogre Magi
Posts: 1102
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 12

Re: Mesh vs OpenGEX vs glTF

Post by Zonder » Fri Aug 04, 2017 4:40 pm

if someone did this it should just be an externall library not part of ogre (it's trying to get slimmed down)
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...
My Blog - http://www.This post is suspected as SPAM! If you feel otherwise contact a moderator.

User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 4

Re: Mesh vs OpenGEX vs glTF

Post by Mako_energy » Fri Aug 04, 2017 8:39 pm

frostbyte wrote:edit: i see from the buttom of the article that dark_sylinc point about lack of industry grade middle-ware exporters is still valid( or am i wrong? ), a few unmaintained gltf converters on github just won't cut it...
On the glTF github it says there is support for export in blender as well as the Unity exporter. I didn't see anything obvious for Max/Maya. But still looks like there are a bunch of smaller tools that can use it and I'd imagine adoption will increase.

https://github.com/KhronosGroup/glTF#gltf-tools
Zonder wrote:if someone did this it should just be an externall library not part of ogre (it's trying to get slimmed down)
I totally agree with the sentiment of slimming down Ogre and resolving it's identity crisis. 3 years ago Ogre seriously was half way between a game engine and a rendering engine in some of the most awkward of ways. Some of those ways still exist (decouple the resource system!). Despite that, I think serializers for other formats should instead be a part of the core lib. At worst, a component. Otherwise it would be far too easy to forget about it and let it fall into disrepair as core changes occur in Ogre. Ideal situation would go to even further and have Unit Tests for it, but I'm trying to not get too far ahead of myself.
0 x

farrer
Halfling
Posts: 63
Joined: Mon Sep 12, 2011 7:35 pm
x 6

Re: Mesh vs OpenGEX vs glTF

Post by farrer » Fri Aug 04, 2017 10:02 pm

frostbyte wrote: edit: i see from the buttom of the article that dark_sylinc point about lack of industry grade middle-ware exporters is still valid( or am i wrong? ), a few unmaintained gltf converters on github just won't cut it...
As the glTF 2.0 specification was released on June 5, 2017, I would be impressed if it became 2 months after the industry the-facto standard :lol: (the 1.0 is, AFAIK, a very different beast).

Thinking about, and looking more deeply on the specification, it seems, for me, that makes much more sense a converter (integrated or not to MeshTool) than an importer (that I initially though) for Ogre for following reasons (not in importance order):
  • The specification misses Light definitions (seems that will be added as an extension, not yet released), which makes it insufficient for a 'complete scene' definition;
  • Even if - or when - lights will be present, the definition of multiple scenes will make the importer acting more like a Scenes Controller component or something like that which is far from the graphics-rendering scope of Ogre and would make it too resource-wasteful to integrate on any engine that uses Ogre (duplication of definitions, for example);
  • I never looked into the deeps, but I'm sure that Ogre's formats are optimized for Ogre's usage, specially with the 2.1 memory model. That being, the common implementation of an importer would be to convert to Ogre's mesh/skeleton format, what would be awful to do on every application run.
Thus, I believe it makes more sense a standalone converter, with the restrictions: No support for scenes/cameras, and no - yet - support for morph targets (it isn't implemented on 2.1 yet, if I not missed something).

Anyway, I do believe it's a converter what Mako_energy is proposing when talking about a Serializer, isn't?
0 x

User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 4

Re: Mesh vs OpenGEX vs glTF

Post by Mako_energy » Fri Aug 04, 2017 10:56 pm

farrer wrote:Anyway, I do believe it's a converter what Mako_energy is proposing when talking about a Serializer, isn't?
I suppose I should clarify. I say "serializer" because that is the term used in the name for the existing class that parses Mesh files.

http://www.ogre3d.org/docs/api/1.9/clas ... lizer.html

I imagine a similar class for glTF 2.0.
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mesh vs OpenGEX vs glTF

Post by frostbyte » Fri Aug 04, 2017 10:57 pm

Anyway, I do believe it's a converter what Mako_energy is proposing when talking about a Serializer, isn't?
i dont know, but i think its more reasonable, Ogre doesn't need another format support( .mesh is perfectly tailored )
the problem lies with providing a painless and well maintained DCC tool to ogre pipeline, right now i don't see that glTF provide that, but i'm hoping DCC companies politics/strategy won't get in the way( am i being naive? )
i guess that waiting and sitting on the fence is the smart move( actually non-move :wink: )

mean while on another thread...http://ogre3d.org/forums/viewtopic.php? ... 45#p537912
xrgo just released his blenderLoader repo.... :D
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3773
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 133
Contact:

Re: Mesh vs OpenGEX vs glTF

Post by dark_sylinc » Fri Aug 04, 2017 11:13 pm

Ok, I'll weigh my opinion here:

Probably this thread sparked after Juan posted that the Godot Engine now supports glTF importer and encourages others to follow the same.

1. OpenGEX. I disagree with Juan that OpenGEX isn't open; because everything's open source and the license allows anyone to just fork the project. But I do agree that it doesn't have warm welcoming feeling given that the development seems pretty much done behind closed doors.
Main advantage of OpenGEX is that it's easy to parse, and Eric provides good exporters for all 3 major tools: Maya, Max & Blender.
The main con is that OpenGEX is pure text, which means it will be slower overall (specially worry-some for models with either lots of vertices, lots of bones and lots of animations)
Really, the exporters is 99% the reason for a format's success.

2. glTF. Juan is trying to convince me to support it, and I'm thinking about it, following its progress. Right now my main issue is the lack of quality exporters for any of the major tools. But the format is very new.
The advantage is that it is in binary and that means it could be faster, and it may even be possible to load the model directly from that file (though probably for Ogre 2.1 our own format will still be preferred due to some optimizations; but I have yet to see if we could put that data in an implementation-specific section), and also it's Khronos backed.
The disadvantage is the lack of quality exporters right now.

At the moment Juan & I have raised an issue to the glTF tracker that all provided samples (including the exporters and converters) are generating one animation track per node, which makes the format completely useless for animation. It's not a problem with the format specification, but rather the exporters. We hope this problem won't become widespread and gets fixed soon.

Now... like Mako_energy said, the OpenGEX ticket has been on my TODO like for 2 years now. I don't know when I will personally be able to start working on this. So if no one steps up sooner, it's possible that by the time I start all of the pending issues with glTF will be resolved (which hopefully it's just a matter of time). Or at the worst Juan will end up adapting his superior Blender Collada Exporter to support glTF :roll:

As for lights & camera other scene stuff:
Really what I care the most about are meshes and materials. Exporting a scene often gets in the way (because lots of unnecessary gets included, and may even mess up the initial location instead of having a centered mesh, etc). While there's a need for having scene support, I personally believe scene files should be separate from individual the files that hold information about meshes, animations & materials.

PS. In case you're wondering or you may have guessed, Godot developers and I are in very good relations (it does help a lot we all live in the same Country...). If you didn't see a merger between Ogre & Godot is because we've analyzed the idea but unfortunately Godot approaches rendering in a very different way than Ogre does; which makes such endeavor extremely difficult.
0 x

User avatar
Mako_energy
Greenskin
Posts: 125
Joined: Mon Feb 22, 2010 7:48 pm
x 4

Re: Mesh vs OpenGEX vs glTF

Post by Mako_energy » Fri Aug 04, 2017 11:21 pm

frostbyte wrote:Ogre doesn't need another format support( .mesh is perfectly tailored )
It's also "perfectly" proprietary. Nothing else uses it and it's ENTIRELY up to the fluctuating Ogre community to support any conversion tool.
frostbyte wrote:xrgo just released his blenderLoader repo....
Not to disparage Xrgo, but converters come and go. I will cite Xrgo feeling the need to make one as evidence of this. glTF 2.0 and OpenGEX have much stronger backings and their converters in other tools will be tested and updated more diligently than 3rd party converters for Ogres mesh will.
dark_sylinc wrote:Probably this thread sparked after Juan posted that the Godot Engine now supports glTF importer and encourages others to follow the same.
I'll confess, guilty. That is what prompted me to post.
dark_sylinc wrote:PS. In case you're wondering or you may have guessed, Godot developers and I are in very good relations (it does help a lot we all live in the same Country...). If you didn't see a merger between Ogre & Godot is because we've analyzed the idea but unfortunately Godot approaches rendering in a very different way than Ogre does; which makes such endeavor extremely difficult.
That's a lot to take in at once. That raises more questions than it answers, but I don't want to derail the thread.
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mesh vs OpenGEX vs glTF

Post by frostbyte » Sat Aug 05, 2017 12:41 am

Mako_energy wrote:
frostbyte wrote:Ogre doesn't need another format support( .mesh is perfectly tailored )
It's also "perfectly" proprietary. Nothing else uses it and it's ENTIRELY up to the fluctuating Ogre community to support any conversion tool.
i agree ogre needs a steady reliable way to communicate with DCC tools, if glTF turns to be the promise Collada could'nt fulfill then i'm all in. but i think its too early to streamline/adopt( pain vs gain... )
Mako_energy wrote:Not to disparage Xrgo, but converters come and go. I will cite Xrgo feeling the need to make one as evidence of this. glTF 2.0 and OpenGEX have much stronger backings and their converters in other tools will be tested and updated more diligently than 3rd party converters for Ogres mesh will.
converters may come and go, but blender stays, also if i understand correctly the .blend DNA/RNA architecture is designed in order to allow backward/forward compatibility making it somewhat time-proof and easier to maintain...
right now blender also enjoy much larger support than gltf, its steady, and anyway the code is there, use it or not, its much better than nothing( at least until gltf2 takes off and i get rich enough to pay bounties ), kudos to xrgo...
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

farrer
Halfling
Posts: 63
Joined: Mon Sep 12, 2011 7:35 pm
x 6

Re: Mesh vs OpenGEX vs glTF

Post by farrer » Sat Aug 05, 2017 12:50 pm

dark_sylinc wrote: As for lights & camera other scene stuff:
Really what I care the most about are meshes and materials. Exporting a scene often gets in the way (because lots of unnecessary gets included, and may even mess up the initial location instead of having a centered mesh, etc). While there's a need for having scene support, I personally believe scene files should be separate from individual the files that hold information about meshes, animations & materials.
Agreed. Support to convert meshes/materials/animations would be sufficient for Ogre.
frostbyte wrote:converters may come and go, but blender stays, also if i understand correctly the .blend DNA/RNA architecture is designed in order to allow backward/forward compatibility making it somewhat time-proof and easier to maintain...
right now blender also enjoy much larger support than gltf, its steady, and anyway the code is there, use it or not, its much better than nothing( at least until gltf2 takes off and i get rich enough to pay bounties ), kudos to xrgo...
I do love Blender, but... It's just one of the 3d modellers applications, and not even the most used one. So, support/convert from blend files is great and very useful, but will keep it restricted to Blender and in need for something else for other applications, which won't solve the middle-format problem. Or there are .blend exporters for the other major 3d applications?
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Mesh vs OpenGEX vs glTF

Post by frostbyte » Sat Aug 05, 2017 10:03 pm

farrer wrote:I do love Blender, but... It's just one of the 3d modellers applications, and not even the most used one. So, support/convert from blend files is great and very useful, but will keep it restricted to Blender and in need for something else for other applications, which won't solve the middle-format problem.
yes i know that, i didn't suggest .blend as an ogre mesh format and did'nt suggest its a perfect solution, just pointed out that it is now possible to load it with ogre c++ code... i find some condolence in this option... :D
farrer wrote:Or there are .blend exporters for the other major 3d applications?
i guess that expecting autodesk/adobe/other DCC companies to support exporting to .blend or glTF2 is a bit like expecting unity to provide an "export to ogre" button or MS to provide a c#->java converter, but maybe sketchFAB or some other company with different agendas are working on this
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1139
Joined: Tue Jul 06, 2004 5:57 am
x 15
Contact:

Re: Mesh vs OpenGEX vs glTF

Post by spookyboo » Sun Aug 06, 2017 4:58 pm

I was looking into integration of glTF 2.0 in my HLMS editor (as an import plugin). This post triggers me again to pick it up...
0 x

User avatar
devxkh
Halfling
Posts: 84
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany
x 3

Re: Mesh vs OpenGEX vs glTF

Post by devxkh » Sun Aug 06, 2017 7:21 pm

I've experimented with gltf, too.
Reasons:
much smaller mesh(binary) files than ogre
full scene, pbs materials possible

You can't use morphing, emissive value - ogre doesn't support this...

Problems:
gltf 1.0:
- I've tried the header only loader tinygltfloader https://github.com/syoyo/tinygltfloader
-> doesn't load the unity3d gltf exported models and Vice Versa
-> tried the laugh engine loader:
https://github.com/jian-ru/laugh_engine
this loader only works with unity exported models, but not with the official generated gltf files
- tried the obj2gltf converter that only works with tinygltfloader not with the laugh engine loader ..
-> https://github.com/AnalyticalGraphicsInc/obj2gltf

I'm not sure why the model version doesn't work with every loader since it should be the same file schema ....

gltf 2.0:
objtogltf still WIP https://github.com/AnalyticalGraphicsIn ... e/gltf-2.0
tinygltfloader can't load the generated 2.0 files from objtogltf

Didn't tried, because its new and i wanted a light weight fast direct loader:
- assimp already implemented a gltf loader with compression!

So i gave up on gltf because i didn't find a c++ loader that can successfully load gltf 2.0 files generated from obj, fbx files ...
0 x
My little OGRE engine -> FrankE WIP

User avatar
devxkh
Halfling
Posts: 84
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany
x 3

Re: Mesh vs OpenGEX vs glTF

Post by devxkh » Sun Sep 10, 2017 12:42 pm

Well .. got some time and motivation to revisit the gltf progress.
Looks like gltf 2.0 is getting a lot of support: https://github.com/KhronosGroup/glTF

can load my first gltf 2.0 mesh into ogre 2.1 now:
Image

next steps:
- add texture, material
- test more gltf 2.0 files
- load glb files


If someone else has already made more progress, please share! I will opensource all my code, as always. :)
1 x
My little OGRE engine -> FrankE WIP

LePawel
Halfling
Posts: 53
Joined: Tue Jan 22, 2013 10:39 am

Re: Mesh vs OpenGEX vs glTF

Post by LePawel » Wed Sep 27, 2017 11:33 pm

devxkh wrote:-nom-
Hey,

Not trying to be a leech or anything here, but I'm currently through 3DS Max's Easy Exporter combined with HLMS Editor in order to get v2 Meshes through without runtime conversions, any progres on the plugin?

Thanks :)
0 x

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1139
Joined: Tue Jul 06, 2004 5:57 am
x 15
Contact:

Re: Mesh vs OpenGEX vs glTF

Post by spookyboo » Thu Sep 28, 2017 6:06 am

Progress is slow but I'm still working on it. Can't tell when there is a usable version.
0 x

LePawel
Halfling
Posts: 53
Joined: Tue Jan 22, 2013 10:39 am

Re: Mesh vs OpenGEX vs glTF

Post by LePawel » Thu Sep 28, 2017 12:38 pm

k, thanks for the update, I'll keep using my workaround for now then.
Is there a spec for v2 meshes in case I felt like learning a new language and doing an exporter for Max / Importer for Ogre?
0 x

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1139
Joined: Tue Jul 06, 2004 5:57 am
x 15
Contact:

Re: Mesh vs OpenGEX vs glTF

Post by spookyboo » Sun Oct 01, 2017 6:20 pm

Some progress, but the basics are there :D
Image
Image
1 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 911
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 51

Re: Mesh vs OpenGEX vs glTF

Post by xrgo » Sun Oct 01, 2017 6:54 pm

fantastic work!!
0 x

User avatar
cybereality
Hobgoblin
Posts: 563
Joined: Wed Jul 12, 2006 5:40 pm

Re: Mesh vs OpenGEX vs glTF

Post by cybereality » Tue Oct 03, 2017 3:56 am

Awesome job!
0 x

Post Reply