New Shape View Program Coming ..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eric
    9500 Post Veteran and Administrator



    • Dec 2002
    • 9583
    • NS MP245.4 CNO&TP South District
    • English, SQL
    • General

    #16
    Glad to see this is rolling along. Curious as to the tech stack -- moving TSRE off of QT / C++ and into C# is a long term goal, but you've cracked some of the rendering with your new tool, so maybe your codebase could be a jumping off point to move TSRE functionality into... or maybe some of the missing functionality.
    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment

    • Snowman
      Senior Member


      • Apr 2001
      • 214

      #17
      Originally posted by StormerDSR
      Editing data on the fly on compressed shapes like texture names, lod distance and more will be a huge and desired improvement. Long time ago these operations were possible with archibald, but now this tool does not work correctly with lot of compressed shapes.
      I'm keeping my fingers crossed for you!
      That's the idea here is to make adjusting easier than jumping from one program to another. Your ideas are noted and will be implemented no problem.

      Originally posted by paulytechnic
      This is exciting news! I'm not sure if this is feasible or not, but would it be possible to have it show lights as defined by the ENG file, or is this purely for shape files only? It might be nice to have something to quickly confirm light position when tweaking values, rather than needing to load up in OR every time. Just a thought.
      Nice idea! Added to the list of to-do's!

      Originally posted by EldoradoRailroad
      This is interesting news

      I always thought it was too bad that the previous Shapeviewer was locked up tighter than a Diebold safe. Its author not active anymore, and no source code to update and/or improve.

      For the love of Pete, I hope this has been created with open source in mind. You never know when the universe is going to take you away and some kind soul will pick up where you left off in your memory.

      Steve
      I will release source code no problem. If someone want's to take a crack at it they can.

      Steve[/QUOTE]

      Originally posted by eric
      Glad to see this is rolling along. Curious as to the tech stack -- moving TSRE off of QT / C++ and into C# is a long term goal, but you've cracked some of the rendering with your new tool, so maybe your codebase could be a jumping off point to move TSRE functionality into... or maybe some of the missing functionality.
      The program is coded in C# I'm simply using WPF to render at the moment. I hope that doesn't come back to bite me but with the new lighting it's looking good. Not quiet as snappy as Shape Viewer as I like but I have a lot of debugging going on. dds and tga haven't been an issue at all, but .ace files have been the worse to implement mostly due to wider support for dds and tga of course.

      I still have some z fighting issues and weird anomalies, but overall this thing don't look that bad. I'll fight with it for a week or two more (or longer if needed) to nail down the bugs and start implementing bigger features. I'm planning on a "edit" mode (simple drop down) with Sketchup-like usability mostly due to how easy it is to use. This wont be no full blown editor, but All that's been mentioned so far will be in there. Keep the ideas comin'. Edit mode will keep you from messing something up while in normal view mode. Any ideas for that let me know as well.

      Comment

      • Snowman
        Senior Member


        • Apr 2001
        • 214

        #18
        Forgot to add some new pics with the lighting adjustments! I never really paid attention to this because I was busy with core functionality.

        Image5.jpg Image6.jpg Image7.jpg Image10.jpg
        Attached Files

        Comment

        • StormerDSR
          Member
          • Feb 2024
          • 33
          • Poland

          #19
          I have an another idea Possibility to read whole Shapes directory and navigate through list of shapes by down/up arrow keys with refreshing preview in realtime.

          Comment

          • Snowman
            Senior Member


            • Apr 2001
            • 214

            #20
            Originally posted by StormerDSR
            I have an another idea Possibility to read whole Shapes directory and navigate through list of shapes by down/up arrow keys with refreshing preview in realtime.
            Sounds like a good idea. I'll update on these as I work on them.

            Buttoning up some z fighting issues and testing as many models as I can to make sure for compatibility before moving on. Loading of models is working near perfect at this point. Freight animations loading with model is first on list to to-dos after texture issues are cleared. That is easy enough to implement. Saving as compressed shape file or decompressed UTF-16 LE works like a charm. Ok, enough rambling. 😀

            Comment

            • muskokaandtahoe
              3000 Post Veteran

              • Apr 2003
              • 3003
              • Silicon Valley, CA, USA.
              • ORTS

              #21
              PLEASE do not assume that all models are the size of locomotives (routes would be rather empty then) and so build an app where the camera cannot move more than 40m in any direction. An example of why:
              Model.jpg

              I have almost 200 models of this size in 1 route (and I'm not done) and many more somewhat smaller. In another rte I have almost 700 models, most about 1/3 the size of this one.

              I need a shapeviewer that shows me the effect of activating LOD's so I can check if I've missed any or applied the wrong distance.

              The display of night, snow, rain, and seasonal textures is important too.

              Also, in one of the shapeviewer displays is named Hierarchy. For some models there are small brown and/or yellow boxes. I don't recall the meaning of the colors but I do know if you count them you have found the number of draw calls your model will produce. This is very important information as OR performance is often reduced by too many draw calls.

              Dave Nelson
              Dave Nelson
              sigpic
              Seldom visiting, posting less often that that.

              Comment

              • amtrak115
                Senior Member

                • Oct 2005
                • 289
                • Parker, TX
                • General

                #22
                understand your coding in C# and using WPF. Which version of Visual Studio are you using??

                Comment

                • Snowman
                  Senior Member


                  • Apr 2001
                  • 214

                  #23
                  Originally posted by muskokaandtahoe
                  PLEASE do not assume that all models are the size of locomotives (routes would be rather empty then) and so build an app where the camera cannot move more than 40m in any direction....
                  One of the main reasons I started this project was for model compatibility and maneuverability. Maybe a free fly camera like Open Rails number 8 key would help? Either way I understand and this is something I look forward to as well.

                  I need a shapeviewer that shows me the effect of activating LOD's so I can check if I've missed any or applied the wrong distance.
                  What do you mean exactly? I know in theory what you mean, but what would this look like? Basic FPS, memory usage etc.?

                  The display of night, snow, rain, and seasonal textures is important too.
                  No issue and on the to-do list. Simple to implement.

                  Also, in one of the shapeviewer displays is named Hierarchy
                  I'm going to try and implement as many features that Shape Viewer had including Hierarchy which is important for signals etc. These type of features are most important to me as someone who spends a lot of time in Shape Viewer.


                  Originally posted by amtrak115
                  understand your coding in C# and using WPF. Which version of Visual Studio are you using??
                  I'm using newest 2026 and I don't know if I mentioned .net 8 as well. Helix toolkit for 3d view. So far so good.

                  Comment

                  • amtrak115
                    Senior Member

                    • Oct 2005
                    • 289
                    • Parker, TX
                    • General

                    #24
                    thanks for the info

                    Comment

                    • muskokaandtahoe
                      3000 Post Veteran

                      • Apr 2003
                      • 3003
                      • Silicon Valley, CA, USA.
                      • ORTS

                      #25
                      (about LODs)
                      Originally posted by Snowman
                      What do you mean exactly? I know in theory what you mean, but what would this look like? Basic FPS, memory usage etc.?
                      Shape viewer has features that count the faces for each used LOD and the sum adjusts when you pick a particular LOD value (the faces w/ shorter LOD values disappear). At least that.

                      The IDEAL would add a feature to visually show only those faces that have a specific, selected LOD value. Think about it for a sec... how do you know you didn't mis-assign a LOD value? Or forgot one? In shape viewer the things I mention here, that you'd look for, have disappeared. Not at all helpful. I don't know if you can do this but if you can it would be a wonderful feature.



                      (about alternative textures)
                      Originally posted by Snowman
                      No issue and on the to-do list. Simple to implement.
                      The monogame version is supposed to provide for a new texture folder named \Rain. I do not know the correct value for the ESD_Alternative_Texture() parameter but Carlo should have it.
                      Dave Nelson
                      sigpic
                      Seldom visiting, posting less often that that.

                      Comment

                      • StormerDSR
                        Member
                        • Feb 2024
                        • 33
                        • Poland

                        #26
                        I have next proposition. Ability to display gitf/glb shapes with PBR textures. This format is supported in testing OR versions and is the future of modern shapes.

                        Comment

                        • Snowman
                          Senior Member


                          • Apr 2001
                          • 214

                          #27
                          Originally posted by StormerDSR
                          I have next proposition. Ability to display gitf/glb shapes with PBR textures. This format is supported in testing OR versions and is the future of modern shapes.
                          I would need some way to test this to make sure it works. Is there some place in the manual for this feature and how to use it in OR? I didn't see any reference to it in the testing manual.
                          Last edited by Snowman; 03-01-2026, 07:27.

                          Comment

                          • StormerDSR
                            Member
                            • Feb 2024
                            • 33
                            • Poland

                            #28
                            Please refer to topic from below:
                            ORTS new shape format??? - Elvas Tower - Page 28
                            There are some useful links and also you can consult this topic with OR developers.​

                            Comment

                            • Snowman
                              Senior Member


                              • Apr 2001
                              • 214

                              #29
                              I wanted to provide an update of the goings on since my last update. Work was focused around UI look and feel. It's important to me that the UI feels familiar and is intuitive as well. Loading (possibly saving) has been taken away from FFEDIT which is too slow for todays large poly models. This was a rework of that pipeline. LOD selection and display of poly and LOD's are implemented. Screenshot and background colors can be changed and a free floating camera with number 8 key which toggles on/off. Pressing "1" will refocus camera (see where I'm going with this).

                              I also implemented hierarchy which to me works better than the original shape viewers hierarchy because it displays sub object id's of authors intent. Shape Viewer would re-order these which could lead to confusion to put it simply. Sub object id's support 1 -31 numbering and my program displays whatever the author gave which ever node. No more reordering, which I think is good for debugging, or learning how a model was authored. It also supports clicking on nodes to highlight parts of model they correspond to like Shape Viewer. See image:

                              1.jpg

                              Support for textures is now underway much more deeper than the older Shape Viewer program. Besides basic information which displays whether a texture was missing or not, dimensions etc. The user can now view full analysis of each part of that texture. Below are some of these features.

                              At the top of the window you’ll see metadata about the texture:

                              Texture name – the exact filename referenced by the model

                              Status – whether the texture is loaded or missing

                              Resolution – texture size (for example 512×512)

                              Format / compression – such as DXT1, DXT5, etc.

                              Mipmaps – number of mip levels stored in the texture

                              Usage – number of primitives using the texture

                              Alpha type – detected transparency type

                              File path – abbreviated path to the texture on disk

                              If a texture is missing or invalid, the status and warnings appear in red.

                              The inspector includes preview tabs so users can examine different aspects of the texture.

                              Color
                              Shows the normal texture image exactly as used on the model.

                              Alpha
                              Displays the alpha channel as grayscale to diagnose transparency issues.

                              RGBA
                              Shows the texture on a checkerboard background so transparent areas are easy to see.

                              Mip Levels
                              Each mipmap level can be viewed individually (Mip 0, Mip 1, etc.).

                              These previews help detect issues like bad transparency, incorrect mipmaps, or texture compression artifacts.

                              Replace with file
                              Temporarily replace the texture with another image file for testing.

                              Replace with checker
                              Apply a checkerboard debug texture to inspect UV alignment and stretching.

                              Replace with UV grid
                              Apply a UV grid pattern to detect distortion or mapping problems.

                              Export texture
                              Export the texture to a file format such as PNG, DDS, ACE, TGA, BMP, etc.

                              Reload texture
                              Reload the texture from disk without reopening the model.

                              These actions are temporary viewer operations and do not modify the original model files.

                              UV range detection

                              UV coordinates outside 0–1

                              alpha blending warnings

                              missing mipmaps

                              This helps identify common texture issues that may cause rendering problems.

                              This along with support for glTF is currently underway. I want my pipeline for loading to be complete and tidy up all formats to be supported before adding more features. I will update on my success or failure of that. This of course means support for PNG and jpg, so that list grows to:

                              PNG (*.png)
                              DDS (*.dds)
                              ACE (*.ace)
                              TGA (*.tga)
                              BMP (*.bmp)
                              JPEG (*.jpg)

                              That's not to allow those two systems to intermingle. I'm not sure about glTF in terms of community implementation, so I wasn't to keep it to itself but not put it in a corner. glTF is it's own thing and it's important these two systems don't mix.

                              ​This system will evolve and it's looking to grow into much more than the intended scope of the project when I started it as they usually do.

                              glTF and glb models are loading so that's a start!
                              loco.jpg

                              2.jpg 4.jpg 3.jpg 1.jpg
                              Attached Files
                              Last edited by Snowman; 03-06-2026, 03:02.

                              Comment

                              • Snowman
                                Senior Member


                                • Apr 2001
                                • 214

                                #30
                                I had something I wanted to bring up and that's the ability to save models loaded in my program to another format such as 3ds, dae, or obj. I know shape convertor does this, but I have issues with it and think I can expand on this effort, but I know some people look at this as an piracy issue. To me what you do in private and not sharing with someone else isn't piracy. I think there's utility in it for obvious reasons like having access to models and improving them. If its going to raise a big stink I wont implement it. I've had issues with shape convertor in the past no preserving UV's and flipping axis. I would need to preserve animations as well, but let me know what you guys think. Modifying for personal use shouldn't be an issue and modifying freeware and uploading with permission shouldn't be a big deal. That's my two cents.

                                Comment

                                Working...