Author Topic: glTF support  (Read 535 times)

0 Members and 1 Guest are viewing this topic.

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
After giving up on trying to implement OpenGEX support as The E said on GitHub weeks earlier due to license restrictions and low adoption, I've decided to initiate an effort to implement native support for a glTF format besides the POF format.

For those who aren't in the know, glTF, which stands for GL Transmission Format, is a royalty-free standard file format for 3D scenes and models. A glTF file uses one of two possible file extensions, .gltf or .glb. A .gltf file may be self-contained or may reference external binary and texture resources, while a .glb file is entirely self-contained.

glTF stores 3D model information in JSON format. The use of JSON minimizes both the size of 3D assets and the runtime processing needed to unpack and use those assets. This format could be read using the jansson library that came with FS2 Open.

For more information regarding this format, please visit https://www.khronos.org/gltf/.

My goal, is to create a native glTF support within FreeSpace Open. I believe this is important for not just my megaprojects (such as Shattered Stars), but also others as well.

Some of the key features of glTF is native physically-based rendering materials, and support for keyframed animations, as well as bone-based animations.

It may get updated to 3.0 and beyond in the distant future.
« Last Edit: March 13, 2021, 05:44:04 am by Bryan See »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: glTF: A new replacement for the POF format
Bryan, let me be absolutely clear here: you are not good enough a Coder to do this. Even if you were, and your previous efforts with other model formats make it absolutely clear that you aren't, replacing the pof format is a stupid idea that you should not pursue.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: glTF: A new alternative for the POF format
Bryan, let me be absolutely clear here: you are not good enough a Coder to do this. Even if you were, and your previous efforts with other model formats make it absolutely clear that you aren't, replacing the pof format is a stupid idea that you should not pursue.
I did not intend to replace the POF format. I want to implement the glTF format as an alternative. For this, I've changed the thread's title.

The E, I've just released a small campaign, entitled Lost in the Mist, though I plan to make at least one small campaign, without custom assets and voice acting, to start something small. They praised it for being "functional" and improved compared to past iterations. Now I plan to do the same for the coding part. I wanted to implement glTF, but I wanted to start something small first.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: glTF: A new alternative for the POF format
I did not intend to replace the POF format. I want to implement the glTF format as an alternative. For this, I've changed the thread's title.

Doesn't matter, it's still a stupid idea that is way more complicated to implement than the better alternative.

The basic problem you're trying to solve does not exist in a form that can be helped by incorporating support for non-POF model formats into the engine. On the contrary, it creates a whole ****ton of issues that you, in my considered opinion as a professional software developer, are not able to solve.
FSO, due to its lineage, makes certain assumptions. One of them is that models will always be in pof format, which means that everything that interacts with model data is optimized around pof, its features and limitations. In order to incorporate a new model format as seamlessly as possible, the engine would have to perform an on-the-fly conversion of that model file to POF - and that leaves out some issues that are created by the simple fact that other model formats do not contain the same metadata that pof files do. Subsystem data, firepoints, moment of inertia data, all of that needs to be supplied somehow, after all.
Now, that's not an insurmountable issue per se.
But: If you're doing all of these things in order to end up with a data structure that is indistinguishable from a POF, why aren't you just using a pof?

In other words, support for new model formats is great. But the proper place for it is in a POF authoring tool, not the engine.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Re: glTF: A new alternative for the POF format
FSO, due to its lineage, makes certain assumptions. One of them is that models will always be in pof format, which means that everything that interacts with model data is optimized around pof, its features and limitations. In order to incorporate a new model format as seamlessly as possible, the engine would have to perform an on-the-fly conversion of that model file to POF - and that leaves out some issues that are created by the simple fact that other model formats do not contain the same metadata that pof files do. Subsystem data, firepoints, moment of inertia data, all of that needs to be supplied somehow, after all.
Now, that's not an insurmountable issue per se.
But: If you're doing all of these things in order to end up with a data structure that is indistinguishable from a POF, why aren't you just using a pof?
POF is a binary format. glTF, on the other hand is based on JSON, which is a human-readable format, that proves advantageous.

I wanted to see key framed animations, as well as bone-based animations (i.e. inverse kinematics), as well as independent lighting and materials, in FSO. This is due to my desire to build the FSO replica of the Jenny Haniver as seen in the Mortal Engines film adaptation (its jet engines react whenever it's moving, its twin gasbags retract and expand, etc.), the spaceship with retractable robotic arms/legs (i.e. a Transformers-like object), and creatures like Zolgear from Attack of the Zolgear.

The Jenny Hanvier from Mortal Engines:


Source: Facebook

Transfomers-like spaceship:

The Canadarm2 robotic arm and Dextre extract Bartolomeo by NASA Johnson, on Flickr

POF is for ships, but for Transformers-like/Jenny Haniver-type ships and creatures, glTF is the proper place.

I know I can't handle it alone as it will take longer than a reasonable time. I believe others can help. Hint: The Jansson library can be able to read gltf files.

EDIT: Didn't I forgot to mention the NTF Boadicea, which splintered to reveal the NTF Iceni?
« Last Edit: March 13, 2021, 05:36:51 am by Bryan See »

 

Offline Novachen

  • 29
  • The one and only capella supernova
    • Twitter
Re: glTF: A new alternative for the POF format
I know I can't handle it alone as it will take longer than a reasonable time. I believe others can help.

And that is the problem already... once again.

Like all the other ideas you had before... you did not thought this through.

How you actually want to achieve this goal? What is your contribution to it apart the idea itself?
You "believe others can help"... you believe or you know?
Do you actually have a plan, what is needed to implement glTF properly into FSO?
What specific help you need for it?

Of course, i do not demand a detailed road map here... but a rough sketch atleast.
So this one made the impression "I read about it, it sounds cool and i want that in FSO". But without any in-dephts thoughts about it...
« Last Edit: March 13, 2021, 05:50:13 am by Novachen »
Female FreeSpace 2 pilot since 1999.
Former Global moderator in the German FreeSpace Galaxy Forum.
Developer of NTP - A Multi-Language Translation Library Interface, which allows to play FreeSpace in YOUR Language.

Is one of my releases broken or not working? Please send a PM here, on Discord at Novachen#2334 or on Twitter @NovachenFS2, a public tweet or write a reply in my own release threads here on HLP, because these are the only threads i am still participating in.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
How you actually want to achieve this goal? What is your contribution to it apart the idea itself?
You "believe others can help"... you believe or you know?
Do you actually have a plan, what is needed to implement glTF properly into FSO?
What specific help you need for it?
I want to achieve this goal through collaboration on GitHub. My contribution to it is giving FSO support for a human-readable model format that's gaining widespread adoption. Over the long-term, model physics with PhysX.

The jansson library is needed to implement glTF properly.

The ones I needed help is the streamlining of the model code to handle other model formats other than POF.

Of course, i do not demand a detailed road map here... but a rough sketch atleast.
Here's the sketch.


You can find out more on the concept at GitHub.
Subsystems, moment of inertia, firepoints, etc. could be defined arbitrarily as nodes.
« Last Edit: March 13, 2021, 06:14:22 am by Bryan See »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
POF is a binary format. glTF, on the other hand is based on JSON, which is a human-readable format, that proves advantageous.

Nope, wrong.

"Being human-readable" is a non-feature. It makes literally zero sense. It optimizes for the wrong thing (which is something you'd know if you were anywhere near the level of capability as a software developer you would need to be in order to be able to contribute meaningfully to either the code or the discussion).

Quote
I wanted to see key framed animations, as well as bone-based animations (i.e. inverse kinematics), as well as independent lighting and materials, in FSO. This is due to my desire to build the FSO replica of the Jenny Haniver as seen in the Mortal Engines film adaptation (its jet engines react whenever it's moving, its twin gasbags retract and expand, etc.), the spaceship with retractable robotic arms/legs (i.e. a Transformers-like object), and creatures like Zolgear from Attack of the Zolgear.

Another non-feature. Better animation support isn't something that's being held back by the pof model format, and neither is it something that would be enabled by adding support for a different one; this needs some work on the engine side that Goober has already started on and that will, ultimately, have to work with models in pof format.

Quote
I know I can't handle it alone as it will take longer than a reasonable time. I believe others can help. Hint: The Jansson library can be able to read gltf files.

EDIT: Didn't I forgot to mention the NTF Boadicea, which splintered to reveal the NTF Iceni?

Given your past track record, "others can help" means "others will have to do all the work for me".

So, to summarize:
* Adding support for non-POF model formats to the engine is a bad and stupid idea
* Making a better pof authoring tool is a good and smart idea.
* Enhancing the pof format may also be a good idea, if necessary (literally nothing you brought up here would make it necessary, Bryan)
« Last Edit: March 13, 2021, 06:22:10 am by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Let me also make something clear here:
There's a long-running discussion about the FSO model pipeline on the discord. What I've posted here is a distillation of its current state: We (that is, the SCP) believe that we would be better served by making a replacement for PCS2 that is easier to use and doesn't require as much up-frond setup on the modeller's side as PCS2 and its collada support currently do. Trying to add support for other, non-POF model formats makes the engine more complex and more prone to issues arising from said complexity, therefore any attempt to do so is a complete non-starter as far as we are concerned (as in, regardless of who brought it up and why, we would not accept it as part of mainline FSO).
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
POF is a binary format. glTF, on the other hand is based on JSON, which is a human-readable format, that proves advantageous.

Nope, wrong.

"Being human-readable" is a non-feature. It makes literally zero sense. It optimizes for the wrong thing (which is something you'd know if you were anywhere near the level of capability as a software developer you would need to be in order to be able to contribute meaningfully to either the code or the discussion).

Quote
I wanted to see key framed animations, as well as bone-based animations (i.e. inverse kinematics), as well as independent lighting and materials, in FSO. This is due to my desire to build the FSO replica of the Jenny Haniver as seen in the Mortal Engines film adaptation (its jet engines react whenever it's moving, its twin gasbags retract and expand, etc.), the spaceship with retractable robotic arms/legs (i.e. a Transformers-like object), and creatures like Zolgear from Attack of the Zolgear.

Another non-feature. Better animation support isn't something that's being held back by the pof model format, and neither is it something that would be enabled by adding support for a different one; this needs some work on the engine side that Goober has already started on and that will, ultimately, have to work with models in pof format.

Quote
I know I can't handle it alone as it will take longer than a reasonable time. I believe others can help. Hint: The Jansson library can be able to read gltf files.

EDIT: Didn't I forgot to mention the NTF Boadicea, which splintered to reveal the NTF Iceni?

Given your past track record, "others can help" means "others will have to do all the work for me".

So, to summarize:
* Adding support for non-POF model formats to the engine is a bad and stupid idea
* Making a better pof authoring tool is a good and smart idea.
* Enhancing the pof format may also be a good idea, if necessary (literally nothing you brought up here, Bryan, would make it necessary)
I guess that making a better pof authoring tool is a good and smart idea. I take this into account.

Features like keyframe-based animations, bone animations, morph targets, PBR materials with physics properties (which hints to possible physics engine support), individual glowpoint-independent lighting, deformable objects, support for Geo-mod ("Geometry Modification Technology"), etc. will be core to enhancing the pof format.

Geo-mod is the name of the engine developed by Volition for the Red Faction series (which released after FreeSpace 2) and also the name of a feature of that engine. I would love to see pof models are affected by Geo-mod. :)

Let me also make something clear here:
There's a long-running discussion about the FSO model pipeline on the discord. What I've posted here is a distillation of its current state: We (that is, the SCP) believe that we would be better served by making a replacement for PCS2 that is easier to use and doesn't require as much up-frond setup on the modeller's side as PCS2 and its collada support currently do. Trying to add support for other, non-POF model formats makes the engine more complex and more prone to issues arising from said complexity, therefore any attempt to do so is a complete non-starter as far as we are concerned (as in, regardless of who brought it up and why, we would not accept it as part of mainline FSO).

I noted. See above.

 

Offline Novachen

  • 29
  • The one and only capella supernova
    • Twitter
Geo-mod is the name of the engine developed by Volition for the Red Faction series (which released after FreeSpace 2) and also the name of a feature of that engine. I would love to see pof models are affected by Geo-mod. :)

Which however does not have much to do with Geo-Mod itself as with Models. Geo-Mod main feature is actually the destructable Terrain. So that you can make holes in Caves... however we are talking about a space combat simulator here which brought up only a handful of missions that take place on planets in the whole of 20 years. IIRC the buildings in RF:G consisted of several models put together, so that parts of them could be destroyed.

Nothing prevent you actually to create a pof where you can shot off every simple hull plate.
« Last Edit: March 13, 2021, 06:41:48 am by Novachen »
Female FreeSpace 2 pilot since 1999.
Former Global moderator in the German FreeSpace Galaxy Forum.
Developer of NTP - A Multi-Language Translation Library Interface, which allows to play FreeSpace in YOUR Language.

Is one of my releases broken or not working? Please send a PM here, on Discord at Novachen#2334 or on Twitter @NovachenFS2, a public tweet or write a reply in my own release threads here on HLP, because these are the only threads i am still participating in.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Geo-mod is the name of the engine developed by Volition for the Red Faction series (which released after FreeSpace 2) and also the name of a feature of that engine. I would love to see pof models are affected by Geo-mod. :)

Which however does not have much to do with Geo-Mod itself as with Models. Geo-Mod main feature is actually the destructable Terrain. So that you can make holes in Caves... however we are talking about a space combat simulator here which brought up only a handful of missions that take place on planets in the whole of 20 years. IIRC the buildings in RF:G consisted of several models put together, so that parts of them could be destroyed.

Nothing prevent you actually to create a pof where you can shot off every simple hull plate.
What if you make a hole through an asteroid or some large object in space? Geo-Mod could be interesting, besides terrain on any planet/moon.

Speaking of terrain, I would mean "planetary surfaces and atmospheres" That should be concerned with in another thread.
« Last Edit: March 13, 2021, 07:17:34 am by Bryan See »

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Features like keyframe-based animations, bone animations, morph targets, PBR materials with physics properties (which hints to possible physics engine support), individual glowpoint-independent lighting, deformable objects, support for Geo-mod ("Geometry Modification Technology"), etc. will be core to enhancing the pof format.

See, this is what I mean by you being incapable of contributing to this discussion: You don't know anything about any of these topics, let alone whether or not any of these things are a good thing to have or whether or not they are already part of the engine (2 of the items on your list have been in the engine for several years now!). You have not a single clue how to do anything in the FSO codebase beyond what amounts to trivial edits.

I've told you this several times over the last few years. You need to shut up or put up, as the saying goes: If you want to become useful to the SCP, you need to stop daydreaming about stupid stuff like this and start submitting bugfixes for open issues on our github or start submitting features that are complete and useful.

In other words: Prove that you can do something besides simple missions and posting about dreams you have. Until you can manage that, consistently, don't even think about posting a topic like this one here again.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem.
    • Skype
    • Steam
    • Twitter
Features like keyframe-based animations, bone animations, morph targets, PBR materials with physics properties (which hints to possible physics engine support), individual glowpoint-independent lighting, deformable objects, support for Geo-mod ("Geometry Modification Technology"), etc. will be core to enhancing the pof format.

See, this is what I mean by you being incapable of contributing to this discussion: You don't know anything about any of these topics, let alone whether or not any of these things are a good thing to have or whether or not they are already part of the engine (2 of the items on your list have been in the engine for several years now!). You have not a single clue how to do anything in the FSO codebase beyond what amounts to trivial edits.

I've told you this several times over the last few years. You need to shut up or put up, as the saying goes: If you want to become useful to the SCP, you need to stop daydreaming about stupid stuff like this and start submitting bugfixes for open issues on our github or start submitting features that are complete and useful.

In other words: Prove that you can do something besides simple missions and posting about dreams you have. Until you can manage that, consistently, don't even think about posting a topic like this one here again.
OK noted.