Elvas Tower: ORTS new shape format??? - Elvas Tower

Jump to content

  • 37 Pages +
  • « First
  • 26
  • 27
  • 28
  • 29
  • 30
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

ORTS new shape format??? Rate Topic: ****- 3 Votes

#271 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 05 February 2023 - 12:32 PM

For those would like to check how some glTF models look like in Openrails, it is possible to display the official test models easily in the unstable version by:
  • git clone https://github.com/KhronosGroup/glTF-Sample-Models.git
    into the TRAINS/TRAINSET/glTF-Sample-Models/ folder
  • Add VS debug options command line parameters or run the RunActivity.exe like: -start -explorer "C:\Devel\MSTS\ROUTES\USA2\PATHS\tut6path.pat" "glTF-Sample-Models" 12:00 1 0
  • When running this test, the animations can be switched on-off by [V], [Shift+,] and [Shift+.], go to the next/previous model with [Alt+PgUp], [Alt+PgDn].

It is just a test to ease the development, but also it may be a fun for some... It is like a toy store.

#272 User is offline   ErickC 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,001
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 08 February 2023 - 09:28 PM

View Postgpz, on 05 February 2023 - 12:32 PM, said:

For those would like to check how some glTF models look like in Openrails, it is possible to display the official test models easily in the unstable version by:
  • git clone https://github.com/KhronosGroup/glTF-Sample-Models.git
    into the TRAINS/TRAINSET/glTF-Sample-Models/ folder


I will be honest, I don't understand what that any of that means so I'm not going to even try to install them. But the models look impressive so far! I have a whole bunch of rolling stock that I'd be more than willing to donate for testing and development, if you're interested. I can send pretty much anything over in 3DS or FBX format, including a 70-tonner with a 3D cab.

#273 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 10 February 2023 - 02:28 AM

Erick, thank you very much for your offering. Originally I didn't plan to deepdive into the exporters spiritual world, not even talking about the 3dsmax itself. If you feel like you would like to see how your models perform as gltf's by trying to export them to this format, I would gladly participate in a testing session, like I do with Robert. But I would rather stay at the coding side for now. I have quite a lot to do. For example currently I am rewriting the binary loader of the gltf's, because I am not satisfied with how I coded it originally. I try to modify the code to shovel all the binary data directly over to the GPU at load time, without any further midtime processing, and set up the buffer structures (ibo/vbo) accordingly later. Actually this is how it supposed to work in the first place, but it would have been hard to do this all together with all the other modifications, so I've chosen an easier path. (With this modification loading a gltf will be much faster than loading an s file.) When I am finished with this, and make all the necessary visual tests pass (the models available with the git clone above), I will ask James to review the code, and merge eventually.

#274 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 16 February 2023 - 01:55 PM

View Postgpz, on 31 January 2023 - 02:51 AM, said:

Looks like the existing viewers have problems with the gltf-s having "../" in their texture paths.
...
Because of this I am thinking on invalidating this scenario for gltf-s. So the textures of the gltf-s will be needed to be stored either in the .gltf file's folder or in that folder's subfolder. What do you think?

Please follow whatever limitations are in the spec and other existing editors and viewers, making our code as strict as reasonable; we can always relax the rules later, but we cannot do the opposite :)

#275 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,341
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 February 2023 - 02:13 PM

FWIW the Kronos group has a .dae to .gltf converter available in github. Here's the link to the source code for that... perhaps it might be of some use in creating a converter for other modeling source file formats we've used over the years.

#276 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 22 February 2023 - 02:34 AM

To the related github PR I noted to myself, that there are some topics that need to be clarified regarding the glTF support:

  • If Y elevation adjustment to be applied (the cars are placed below the rail-top by some centimeters). It is a heritage of the .s file placement, but it is possible to add a correction factor now. Needs an inspection if the models are off only by using them as trains, or also as scenery items.
  • Looping animations whole loop is to be (a.) the total length of the animation clip or (b.) a predefined time, e.g. 1 second or (c.) some combination like the total length with the int(length)+1 is the number of the loops to be considered (for being able to include multiple rotations into a single logical loop).
  • Externally animated nodes are to be tagged by their "name" or a defined extension like "OPENRAILS_animation_name".
  • The accepted animation tags: should we keep the MSTS ones or define new names.
  • LODs are to be internal, external or either. (See some relevant comments here.)

If anyone has any thoughts or guidances about the topics above, please comment here. Because once these things are settled, they will not be possible to be changed, we will stuck with whatever set up.

#277 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,341
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 22 February 2023 - 03:39 PM

Am I correct in understanding that .gltf models must use either .jpg or .png textures?

#278 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 22 February 2023 - 08:40 PM

Jpg, png or dds is allowed. The trendy new basisu-ktx cannot be supportex due to MonoGame limitations.

#279 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,341
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 22 February 2023 - 09:58 PM

View Postgpz, on 22 February 2023 - 08:40 PM, said:

Jpg, png or dds is allowed. The trendy new basisu-ktx cannot be supportex due to MonoGame limitations.


Thank you Peter. I obtained a Sketchup to .gltf export plug in... I need to fiddle with a copy of a model to use .png textures (I want to see what it looks like in .gltf). You want a copy? Very large (13k polys), many texture files, a few incomplete spots. Different than your average locomotive or freight car.

#280 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 22 February 2023 - 11:30 PM

Dave, yes, sure, just give a copy to me, and I will take a look on that, and also if the loader faces any bugs, I will correct them (the loader part). The larger the test suit, more reliable will be the result! If after the gltf export you can view it in the Windows built-in 3D Viewer, that's a good start. It should look quite similar in the game too.

  • 37 Pages +
  • « First
  • 26
  • 27
  • 28
  • 29
  • 30
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users