ORTS new shape format???
#141
Posted 18 January 2022 - 06:20 AM
I've also added animation support for the gltf files. For this tech demo purposes I temporarily assign the "ORTSITEM1CONTINUOUS" name in the gltf loader automatically for the first animation clip found. This is a looping animation controller, that can be activated by the <Shift+,> (comma) key sequence in the default configuration. If the gltf loaded contains an animation sequence, then it starts playing.
For example download this nice rhino: https://sketchfab.co...ea9e3fd421f55b4
When it is loaded as a kiha31 engine and the animation is activated, he starts his idle loop animation by moving around his head and screwing ears.
But many other gltf-s will work, although some don't yet. Some have extensions that are not yet supported, but some others just don't show up properly. Some more work definitely will be needed on this.
EDIT: I've limited the number of the skinning bones to 50. I believe the current architecture's (DX10) hard limit is 128, but I have no clue if it is good or bad to maintain a lower limit than that, just 50 looked like a good number. :-)
#142
Posted 18 January 2022 - 06:39 AM
gpz, on 18 January 2022 - 06:20 AM, said:
I've also added animation support for the gltf files. For this tech demo purposes I temporarily assign the "ORTSITEM1CONTINUOUS" name in the gltf loader automatically for the first animation clip found. This is a looping animation controller, that can be activated by the <Shift+,> (comma) key sequence in the default configuration. If the gltf loaded contains an animation sequence, then it starts playing.
For example download this nice rhino: https://sketchfab.co...ea9e3fd421f55b4
When it is loaded as a kiha31 engine and the animation is activated, he starts his idle loop animation by moving around his head and screwing ears.
But many other gltf-s will work, although some don't yet. Some have extensions that are not yet supported, but some others just don't show up properly. Some more work definitely will be needed on this.
Hi Peter,
PBR textures were a "game changer" when introduced in Flight Sim - I'm intrigued. Thanks for your efforts.
:)
Regards,
Scott
#143
Posted 18 January 2022 - 09:35 AM
Serana, on 10 January 2022 - 06:13 PM, said:
Would you happen to know if they have DRMed there files? This is what happened with Trainz and FBX. It needs to be "converted" to a .trainzmesh format before it can be used!
#145
Posted 18 January 2022 - 10:22 AM
gpz, on 18 January 2022 - 06:20 AM, said:
I've also added animation support for the gltf files. For this tech demo purposes I temporarily assign the "ORTSITEM1CONTINUOUS" name in the gltf loader automatically for the first animation clip found. This is a looping animation controller, that can be activated by the <Shift+,> (comma) key sequence in the default configuration. If the gltf loaded contains an animation sequence, then it starts playing.
But many other gltf-s will work, although some don't yet. Some have extensions that are not yet supported, but some others just don't show up properly. Some more work definitely will be needed on this.
I have looked at these sites to get a better understanding:
https://en.wikipedia.org/wiki/GlTF
https://www.khronos.org/gltf/
This of course is a trial run to perhaps understand performance parameters. I suppose we will ONLY support version 2.0? While 2.0 seems to have been around since 2017, I wonder if there is movement afoot to expand on this format? Already there are giTF file viewers online that do NOT support 1.0. Modelers will want some stability to work with. While this is still experimental for OR, backwards compatibility will be important. The redeeming quality of the MSTS shape file is that it is frozen. If suddenly there is a 3.0 version of giTF are we going to support it as well, even if the file is not backwards compatible?
This issue already occurs with .blend files, where version X will not load in version Y and vice-versa. Also I am worried about the maintenance of exporters for programs like Blender, not many of us are willing to invest in expensive modelling programs and Blender for all its shortcomings is at least free.
The intriguing aspect of giTF is the binary version, where everything is in a single file. Blender apparently allows you to load such a file, but does it also break down the constituent parts, such that I can extract the animations, textures, mesh etc? Are we going to support the binary only version of giTF? However simple this might be to deliver, it is NOT my first choice.
I am not sure whether 50 bones limit is a good idea. Speaking of the outside of a train model, there are situations right now that the .s file cannot address. These include louvers for radiators, which can have multiple vanes that could chew up 50 bones with little effort. Additionally, the inside of a 3D cab can and will have more than moving needles to deal with, these can include many switches/levers/wipers etc. The 50 bone limit might be too little. But as stated, this is a trial only.
From a modelers point of view, the sheer number of parameters to deal with, compared with a .s file will be a very steep learning curve! While not conclusive, there seems to be multiple instances where the expected results are not what was programmed into the model. There are some giTF models at the Smithsonian Institute website, but oddly enough the .obj formats are full resolution, but the giTF are not. This is a shame, as the examples provided have a lot of nice textures and mesh detail to work with. I am a bit of a coward for trying out "new" things, until there are good examples to work with and to learn from. I hope a rather detailed model of a train will show up in the giTF format that I can learn from.
Our opinions at times vary greatly, but I acknowledge that you are a courageous trailblazer when you have the time and energy to do it. So above all, thank you, for moving ahead with this. I hope it is not too much of a programming headache to accomplish.
Steve
#146
Posted 18 January 2022 - 11:31 AM
I haven't read about any upcoming 3.0 version. Companies not satisfied with the feature set add extensions to the 2.0 format, which can also be done in a standardized way, see e.g. https://github.com/K...Vendor/MSFT_lod
I would like the binary version be also supported, actually I think as much of the gltf ecosystem would be good to be supported as possible. There's nothing wrong with supporting anything standard, the problems come when we need semi-standards to be supported, like the definition of whether the emissive texture follows the day-night cycle or not, and such.
The 50 bones limit only applies to a "skin", not the overall number of nodes. The "skin" term here means the vertex shader's skinning math, not the textures, that we sometimes also call as skins. Probably this type of skinning would not be used at all for vehicle and building models. It's main use is to model real skins, like the human skin, or the rhino skin I showed above as an example.
#147
Posted 18 January 2022 - 12:37 PM
Now I imagine grazing 3D animals blocking the track and getting spoked by the train whistle and start running away :-)
okay collision maps and interaction between player and scenery objects aside (but that's working for the turntable I assume)
for a start it would be great if it was just in 3D and was moving a bit.
I'm hoping for a 3D file format that I can open directly in Blender and export again after a few changes and see the results,
just like the PNG's in the Content folder, or DDS's when using Gimp, with no converting prolonging the process,
glTF sounds like a step in that direction.
#148
Posted 18 January 2022 - 11:07 PM
Eldorado.Railroad, on 18 January 2022 - 10:22 AM, said:
Just out of curiosity, can you provide a source for this statement? I'm asking because this doesn't sound logical to me, given that Smithsonian seems to have its own obj to gltf converter: https://github.com/S...n/dpo-meshsmith
Anyway, the model library is really interesting, indeed. I haven't heard about it before, thanks for the heads up!
Answering your other question: binary and non-binary gltf-s can be converted one from the other, they have the same data content, just stored differently. See for example: https://marketplace....ium.gltf-vscode
#149
Posted 19 January 2022 - 03:17 AM
#150
Posted 19 January 2022 - 06:53 AM
gpz, on 18 January 2022 - 11:07 PM, said:
Anyway, the model library is really interesting, indeed. I haven't heard about it before, thanks for the heads up!
The website for the Smithsonian Institution, 3D Digitization, in general:
https://3d.si.edu/explore
Items that are more "mechanical" in nature (Keep in mind this is the USA!):
https://3d.si.edu/ex...m%2BCollection
Something you might have seen/heard about:
https://3d.si.edu/ob...25-120ff7f8d652
In every case the hover/pull down menu for downloads indicate FULL RESOLUTION 3D Mesh for .obj format only, all other downloads are in low resolution. Hard to explain why this is.
gpz, on 18 January 2022 - 11:07 PM, said:
How I wish this was a standalone tool and NOT integrated into Visual Studio. I will have to see what Blender does with binary .glb files, whether it can load and "dissect" them into mesh/textures/effects etc. Maybe Mr. Willard might want to take a look at this (please)? I cannot run the latest version of Blender in Win7, which also has a "newer" giTF importer/exporter. I can most likely run the latest version of Blender in Linux Mint, live from a USB thumb drive.
For anybody who might like to look at this I will attach a free .gib I found yesterday:
GroundVehicle.zip (5.36MB)
Number of downloads: 161
Steve