gltf + PBR models are not responding to light: My Fault?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TrainGuy6550
    Active Member
    • May 2026
    • 105
    • Mars
    • only english
    • General

    #1

    gltf + PBR models are not responding to light: My Fault?

    Open Rails 2026-06-29 08-29-52.pngModel used in the picture: https://www.cgtrader.com/free-3d-mod...e-8224a065ceea

    #NOTE
    The license for the model says " Remixing: Cannot modify, adapt, or combine with other assets." I have no idea if exporting the model as gltf for use in ORTS counts as "modification", as I am not modifying the mesh OR the associated textures. To be safe, I won't be uploading the files here...
    Coming to the main issue. This model completely uses PBR materials. I opened the model in blender, adjusted some parts, separated the wheels and bogies, named them according to standard MSTS conventions, and exported to glb. I then created a wag file and tried to load it in ORTS. It loaded, however, it does not respond to light sources. It looks bright during the day though. I can also see *some* PBR effects during the night. But barely anything during the day.
    Also, one more quirk is that the wheels don't revolve.
    Am I doing something wrong? Or it is the current development stage rn?

    P.S. Model used in the picture is only for testing the territory of gltf and PBR. Neither I would be using it nor any plans of distribution.
    Last edited by TrainGuy6550; 06-28-2026, 21:35.
    E
  • superheatedsteam
    Senior Member


    • Jun 2004
    • 764
    • Perth, WA, Australia.

    #2
    For the MSTS reserved name animations to work in glTF/glb you have to add 'OPENRAILS_animation_name extra' to the custom properties for the object and ensure the custom properties are checked for export in the glTF/glb export tool in Blender.

    More info on this is in the “ORTS new shape format???” thread at Elvas Tower. If you are going to use glTF/ glb in Open Rails then you should follow and contribute your findings to that thread to help others.

    I don't know what is causing your texture issue. Mine work OK indicating textures should display, though I appreciate that does not help you. Have you tried applying your textures instead of the ones supplied?

    Comment

    • TrainGuy6550
      Active Member
      • May 2026
      • 105
      • Mars
      • only english
      • General

      #3
      Originally posted by superheatedsteam
      I don't know what is causing your texture issue. Mine work OK indicating textures should display, though I appreciate that does not help you. Have you tried applying your textures instead of the ones supplied?
      The textures do display. It's just that they're very dark at night (probably because they're not catching the lights? I'm aware that the "light cones" at the stations are just cones with alpha channels but the headlight should be dynamic???). During the day they look fine, although I barely notice the PBR effects...

      Originally posted by superheatedsteam
      For the MSTS reserved name animations to work in glTF/glb you have to add 'OPENRAILS_animation_name extra' to the custom properties for the object and ensure the custom properties are checked for export in the glTF/glb export tool in Blender.
      Okay, I'll try this...

      Originally posted by superheatedsteam
      More info on this is in the “ORTS new shape format???” thread at Elvas Tower. If you are going to use glTF/ glb in Open Rails then you should follow and contribute your findings to that thread to help others.
      I haven't had good memories with ET... but I'll try to give it a 2nd chance I guess.
      E

      Comment

      • TrainGuy6550
        Active Member
        • May 2026
        • 105
        • Mars
        • only english
        • General

        #4
        image.pngAs expected, I'm not even surprised...
        There is also no option to contact the administrators.
        Last edited by TrainGuy6550; 07-12-2026, 02:01.
        E

        Comment

        • TrainGuy6550
          Active Member
          • May 2026
          • 105
          • Mars
          • only english
          • General

          #5
          Originally posted by superheatedsteam
          For the MSTS reserved name animations to work in glTF/glb you have to add 'OPENRAILS_animation_name extra' to the custom properties for the object and ensure the custom properties are checked for export in the glTF/glb export tool in Blender.
          I tried doing this. (Also checked that Custom Properties export is enabled for the gltf exporter) Still doesn't work...
          image.png
          Do I also change the Min / Max values???
          Last edited by TrainGuy6550; 07-12-2026, 02:02.
          E

          Comment

          • superheatedsteam
            Senior Member


            • Jun 2004
            • 764
            • Perth, WA, Australia.

            #6
            These settings work for me, hopefully work for you as well.

            gltf1.jpg

            gltf2.jpg

            Comment

            • TrainGuy6550
              Active Member
              • May 2026
              • 105
              • Mars
              • only english
              • General

              #7


              Above is a gif showing my settings.
              Issue still exists with the same settings. Probably something changed in the gltf spec or exporter? I have an installation of blender on my other PC, but that is on fedora 43. And blender on fedora 43 is currently broken. It doesn't open.. If I can get it running, I'll try exporting with blender 5.1 and hopefully it works.
              E

              Comment

              • superheatedsteam
                Senior Member


                • Jun 2004
                • 764
                • Perth, WA, Australia.

                #8
                Are you on the latest unstable version of Open Rails?

                Also as I understand it, animations are disabled by default as the specifications have not yet been finalised by the Open Rails Management Team. They don't want it enabled to prevent models being released that may fail later once glTF is finally released out of unstable.

                Comment

                • TrainGuy6550
                  Active Member
                  • May 2026
                  • 105
                  • Mars
                  • only english
                  • General

                  #9
                  Yes, and I regularly update it whenever it demands to.

                  Originally posted by superheatedsteam
                  Also as I understand it, animations are disabled by default as the specifications have not yet been finalised by the Open Rails Management Team. They don't want it enabled to prevent models being released that may fail later once glTF is finally released out of unstable.
                  But that doesn't explain why they're so dark, especially since I see posts at ET where people have made it to work...

                  I've attached a log file if that helps...
                  Attached Files
                  Last edited by TrainGuy6550; 07-03-2026, 05:53.
                  E

                  Comment

                  • superheatedsteam
                    Senior Member


                    • Jun 2004
                    • 764
                    • Perth, WA, Australia.

                    #10
                    Your textures may be dark because of your material settings.

                    The screen shot shows the nodes I use for glTF export.

                    gltf3.jpg

                    Currently I bake my AO separately and merge it into the diffuse / base colour. Test your model with just the Base colour to see if that makes a difference.

                    I found the following series on Blender / glTF highly informative and keep going back to them when I encounter issues.



                    This was helpful when it came to animations:


                    Comment

                    • TrainGuy6550
                      Active Member
                      • May 2026
                      • 105
                      • Mars
                      • only english
                      • General

                      #11
                      Hello, I figured I should l leave my token of appreciation here for you. I don't know how longer I'd stay here, but thank you for your time in helping with my issues.
                      E

                      Comment

                      • superheatedsteam
                        Senior Member


                        • Jun 2004
                        • 764
                        • Perth, WA, Australia.

                        #12
                        Thank you for the kind words.

                        I'm sorry to hear you may be leaving. It would be unfortunate for someone with your capability and level of interest to leave this community.

                        If you are not already at ET, I would suggest getting access to the forum. That is where the developers congregate and the bulk of the evolving information on glTF for Open Rails is located. As you are actively working with glTF, you are in a unique position where you can help with it's implementation if you choose to do so.

                        Comment

                        Working...