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

Jump to content

  • 37 Pages +
  • « First
  • 33
  • 34
  • 35
  • 36
  • 37
  • You cannot start a new topic
  • You cannot reply to this topic

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

#341 User is offline   Rj Zondervan 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 40
  • Joined: 09-March 11
  • Gender:Male
  • Simulator:MSTS/ORTS
  • Country:

Posted 18 November 2023 - 10:06 AM

If I recall correctly, putting the textures in the same folder as the gltf file is also valid, the name of the subfolder should not matter, as long as the name of the folder is exported correctly.

Exporting as PNG is correct, the glTF support will read png files.

Extra question: do you have Color/Alpha map textures, Metalness/Roughness map textures and normal maps for all of your texture files? I seem to remember that if one of the three is missing, this might render wonky results.

#342 User is offline   gpz 

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

Posted 18 November 2023 - 11:35 AM

About the dds problem I can say, it is not enough to replace the png texture by a dds. See here how to define that according to the standard: https://github.com/K...e_dds/README.md

I can investigate the material issue if you send me your model. It is hard to guess what the problem could be without seeing the model itself. :)

#343 User is online   superheatedsteam 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 506
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 28 November 2023 - 05:56 AM

I was making manual edits to the gltf file and found if I removed the "COLOR_0":0, attribute then the texture would display correctly. I've made a boo boo in Blender with that material to cause the exporter to add the color attribute to material 0.

It's a step in the right direction and investigation continues as time permits.


"meshes":[
{
"name":"BODY_HIGH_DETAIL",
"primitives":[
{
"attributes":{
"COLOR_0":0,
"POSITION":1,
"NORMAL":2,
"TEXCOORD_0":3
},
"indices":4,
"material":0
}
]
},
{
"name":"WHEELS11",
"primitives":[
{
"attributes":{
"POSITION":5,
"NORMAL":6,
"TEXCOORD_0":7
},
"indices":8,
"material":1
}
]
},

#344 User is offline   gpz 

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

Posted 28 November 2023 - 06:09 AM

Ah, glad you found the solution. I'm sorry for not looking into the issue yet. :( Yes, normally one applies either a color or a texture to a face, but not both. :)

#345 User is online   superheatedsteam 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 506
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 28 November 2023 - 07:27 AM

Please don't be sorry. I haven't looked at the model until today and a fresh more careful look at the glTF made more sense this time. Again thanks for your contribution to this area of OR.

#346 User is online   superheatedsteam 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 506
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 09 December 2023 - 08:18 AM

The cause of the material not displaying correctly was due to me having applied some vertex painting to the geometry at some time during construction. Removing the vertex painting from the 'problem' objects resolved the issue.

For Blender users who may be interested, I found the following series of tutorials on glTF very informative.

Part 1: Intro to using Blender to create glTF files
https://www.youtube....d_S3oSmdRcEiKCp

Exporting Blender animations to glTF and STK
https://www.youtube....h?v=pNA8ujgtogM

I'm currently trying to get the animations working on the external model and after that will delve deeper in the PBR side of things. Theory is one thing, practice is another.

#347 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 807
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

Posted 19 December 2023 - 05:31 AM

I think we are going to need some OR specific doumentation on how to properly do glTF handling with Blender before long.

#348 User is online   superheatedsteam 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 506
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 19 December 2023 - 08:34 AM

The glTF or glb export from Blender is straight forward. The model has to be rotated 180 degrees in the Z axis if you want your loco facing 'forward'.

It's great that the textures are created and exported at the same time as the geometry and glb packs it all into a single file format.

Animations are not working yet.

Being able to import a glTF/glb file and be able to edit the geometry and texture mapping is going to open many more possibilities for modders.

#349 User is offline   gpz 

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

Posted 19 December 2023 - 10:43 PM

Animations are working, just had been disabled by a setting until we decide if we want different names for them or not.

#350 User is offline   Eldorado.Railroad 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 983
  • Joined: 31-May 10
  • Gender:Male
  • Country:

Posted 22 December 2023 - 07:40 AM

I hope that at some near future time there will be some clear/concise documentation regarding the export of glTF or glb to OpenRails.

Steve

  • 37 Pages +
  • « First
  • 33
  • 34
  • 35
  • 36
  • 37
  • 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