Elvas Tower: A Dutch steamengine - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

A Dutch steamengine Let's see what glTF would mean for some models Rate Topic: -----

#11 User is offline   Rj Zondervan 

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

Posted 10 March 2022 - 11:38 AM

View PostLaci1959, on 10 March 2022 - 08:27 AM, said:

Hello.

Thanks for the permission. If I understand correctly, the model is traditionally made in 3ds Max format and the finished model will be converted to glTF 2.0 format instead of shape format?
Sorry, English is not my native language, I use Google Translate. If I sometimes use slang words or Hungarian railway terms, I turn it aside.

Sincerely, Laci 1959


That's correct :). And no worries, I'm aware that English is quite hard for a lot of people, but sometimes Google Translate messes up and produces sentences that are hard to understand.

#12 User is offline   gpz 

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

Posted 11 March 2022 - 02:16 AM

glTF support is already in unstable. I have not yet added means to tag the externally animated elements like individual wheels or bogies, but internal animations already work, the code should recognize the same names as for the stf files.

#13 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 11 March 2022 - 03:30 AM

Excellent news!

Now all we need is a .s to glTF convertor.

Geoff

#14 User is offline   gpz 

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

Posted 11 March 2022 - 05:32 AM

That is not necessary, since .s works as before, and it will so for the infinite future.

#15 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 948
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 11 March 2022 - 08:12 AM

View Postgpz, on 11 March 2022 - 05:32 AM, said:

That is not necessary, since .s works as before, and it will so for the infinite future.

Hello.

According to them, will an old model work with the old shape format and a model created with the new glTF 2.0 editor with its own format?
Can a model created in Max format be converted to shape or glTF 2.0 format? The first, of course, doesn't make much sense after that.

Sincerely, Laci1959

#16 User is offline   gpz 

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

Posted 11 March 2022 - 08:29 AM

The .s format model will continue to work in Openrails indefinitely, so there is no need to convert them to glTF. The Gmax editor may not have a glTF exporter, it is a quite old program. (I'm not sure about this, of course, this is just an assumption.) But all currently actively developed 3D editors should have a glTF exporter available, I believe.

By the way, main differences that may affect the edited models:

1. If I know right, .s uses -Z forward, +X right, +Y up coordinate system. While the glTF, by its specification, uses +Z forward, +X left, +Y up.
2. glTF uses the sRGB color space for its base color textures, while the .s is linear RGB.

Please all you guys keep this in mind when exporting models to various formats.

#17 User is offline   Rj Zondervan 

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

Posted 07 August 2022 - 10:11 AM

Hi all,

Finally I have been able to finish up the machine to a status that I was able to make a first glTF export with 3DS max, with it looking like this:
Attached Image: ExportReady.jpg

However, the shape doesn't show yet in OpenRails, but in the log I find the following error:
Warning: System.IO.FileLoadException: f:\defaultor\trains\trainset\rz ns 3700\3704\ns3704-1935.gltf f:\defaultor\trains\trainset\rz ns 3700\ ---> System.Exception: Unrecognized header "{
  "ac" in f:\defaultor\trains\trainset\rz ns 3700\3704\ns3704-1935.gltf
   bij Orts.Parsers.Msts.SBR.Open(String filename) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Parsers.Msts\SBR.cs:regel 78
   bij Orts.Formats.Msts.ShapeFile..ctor(String filename, Boolean suppressShapeWarnings) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Formats.Msts\ShapeFile.cs:regel 99
   bij Orts.Viewer3D.SharedShape.LoadContent() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Shapes.cs:regel 1969
   bij Orts.Viewer3D.SharedShape..ctor(Viewer viewer, String filePath) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Shapes.cs:regel 1955
   bij Orts.Viewer3D.SharedShapeManager.Get(String path) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Shapes.cs:regel 77
   bij Orts.Viewer3D.StaticShape..ctor(Viewer viewer, String path, WorldPosition position, ShapeFlags flags) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Shapes.cs:regel 146
   bij Orts.Viewer3D.PoseableShape..ctor(Viewer viewer, String path, WorldPosition initialPosition, ShapeFlags flags) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Shapes.cs:regel 272
   bij Orts.Viewer3D.RollingStock.MSTSWagonViewer..ctor(Viewer viewer, MSTSWagon car) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\RollingStock\MSTSWagonViewer.cs:regel 240
   bij Orts.Viewer3D.RollingStock.MSTSLocomotiveViewer..ctor(Viewer viewer, MSTSLocomotive car) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\RollingStock\MSTSLocomotiveViewer.cs:regel 62
   bij Orts.Viewer3D.RollingStock.MSTSSteamLocomotiveViewer..ctor(Viewer viewer, MSTSSteamLocomotive car) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\RollingStock\MSTSSteamLocomotiveViewer.cs:regel 53
   bij Orts.Viewer3D.TrainDrawer.LoadCar(TrainCar car) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Trains.cs:regel 154
   bij Orts.Viewer3D.TrainDrawer.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Trains.cs:regel 74
   bij Orts.Viewer3D.World.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\World.cs:regel 96
   bij Orts.Viewer3D.Viewer.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Viewer.cs:regel 729
   bij Orts.Viewer3D.Viewer.Initialize() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Viewer.cs:regel 538
   bij Orts.Viewer3D.Viewer..ctor(Simulator simulator, Game game) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Viewer.cs:regel 369
   bij Orts.Viewer3D.Processes.GameStateRunActivity.Start(UserSettings settings, String acttype, String[] args) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:regel 352
   bij Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass42_0.<Load>b__3() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:regel 196
   bij Orts.Viewer3D.Processes.GameStateRunActivity.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:regel 237
   bij Orts.Viewer3D.Processes.LoaderProcess.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:regel 161
   bij Orts.Viewer3D.Processes.LoaderProcess.DoLoad() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:regel 140
   bij Orts.Viewer3D.Processes.LoaderProcess.LoaderThread() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:regel 111
   bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bij System.Threading.ThreadHelper.ThreadStart()


I guess the glTF export is not completely correct for OpenRails yet, or I made an error in referring to the shape in my .eng file.
Anyone who has a guess at the error? If needed I can provide the model and eng file to someone who wants to look into it.

Attached File(s)



#18 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 07 August 2022 - 10:51 AM

View PostRj Zondervan, on 07 August 2022 - 10:11 AM, said:

Finally I have been able to finish up the machine to a status that I was able to make a first glTF export with 3DS max, with it looking like this:
Attachment ExportReady.jpg

However, the shape doesn't show yet in OpenRails, but in the log I find the following error:
Anyone who has a guess at the error? If needed I can provide the model and eng file to someone who wants to look into it.

I guess that's because the glTF change is not present in the current Unstable Version as shown here at the end of the log.

It's been blocked automatically because it now conflicts (very slightly) with a change that has been made to the Testing Version.

I am hoping that GPZ will be able to resolve the conflict, so glTF will once more be available.

#19 User is offline   Rj Zondervan 

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

Posted 07 August 2022 - 11:04 AM

Ah, that would explain it. I'll check what unstable version I should have to test run my model.

EDIT: That indeed worked, as shown by the screens below.
There are few things to fix in the export (the normal maps are rendered a little too subtle for my taste, some parts are too reflective), but overall I'm not unhappy. Next up would be getting the animations working I guess.
Attached Image: Open Rails 2022-08-07 09-42-22.jpg
Attached Image: Open Rails 2022-08-07 09-42-26.jpg
Attached Image: Open Rails 2022-08-07 09-42-37.jpg
Attached Image: Open Rails 2022-08-07 09-43-26.jpg

Attached thumbnail(s)

  • Attached Image: Open Rails 2022-08-07 09-43-26.jpg


#20 User is online   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,942
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 07 August 2022 - 12:13 PM

Hello.
My congrats: today is railroad emploee's day (professional holiday)
And Your "child" have performed first excursion out of engine house.
As it goes very usual, check model's origin hight: it's again 5cm lower,
So the wheels are sunk in rails.

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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