glTF for Ogre 1

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

glTF for Ogre 1

Post by Slicky »

I'm sure there are some good reasons but I don't think glTF is supported in Ogre 1. When I say supported I know that Ogre 2 uses a plugin. Is it because of pbs textures or something similar?

I used and added a small bit to the plugin for 2.1 and am currently using Ogre 1 and the thought crossed my mind.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
Contact:

Re: glTF for Ogre 1

Post by paroj »

Slicky wrote: Thu Apr 23, 2020 6:45 am I'm sure there are some good reasons but I don't think glTF is supported in Ogre 1.
yeah. nobody asked for it yet
Slicky wrote: Thu Apr 23, 2020 6:45 am When I say supported I know that Ogre 2 uses a plugin. Is it because of pbs textures or something similar?
well.. the PBS demo in Ogre1 is actually based on the official glTF2 sample and uses a glTF mesh that was converted with blender.
But there is definitely an issue with doing it fully automatically.

However glTF is a rather large thing: it covers the Ogre formats .scene .mesh and .material. Here, one could start by just covering the .mesh part and skip the rest. This is roughly equivalent to parsing .glb buffers.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: glTF for Ogre 1

Post by Slicky »

So in theory, if it were available, would it be possible to use it for meshes and materials with Ogre 1.x and get matching visuals to say what you could see in a glTF viewer?

The main part that I liked with using it with Ogre 2.x is that you get a rendered item that is the same or very close to expectations based upon what you see in a modeller/viewer.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
Contact:

Re: glTF for Ogre 1

Post by paroj »

Slicky wrote: Thu Apr 23, 2020 1:25 pm So in theory, if it were available, would it be possible to use it for meshes and materials with Ogre 1.x and get matching visuals to say what you could see in a glTF viewer?
yes, you only need to make sure that the materials inherit from the PBS shader material, like is done in the PBS sample.

edit:
in the long term I would like to add the the glTF2 lighting model to the RTSS, so it integrates with things like Fog, Shadows and skeletal animation
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: glTF for Ogre 1

Post by Slicky »

Ok good to know. On my list of things to look at.
Post Reply