Huge win for me in Blender

Collapse
This topic has been answered.
X
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
    If it's telling you a shape is there but nothing renders, that sounds like you may have exported the shape without all of the parts being selected. You need to do a select all prior to running export.
    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

    • CSXT Q-317
      Senior Member


      • Mar 2008
      • 346
      • Ohio USA
      • ORTS

      #17
      Originally posted by eric
      If it's telling you a shape is there but nothing renders, that sounds like you may have exported the shape without all of the parts being selected. You need to do a select all prior to running export.
      I'll double check that as well. Would that explain why the shape file itself is looking like this?
      Screenshot 2024-08-23 190155.png
      M. Payne

      Comment

      • pwillard
        3000 Post Veteran



        • Nov 1999
        • 3070
        • Cumming Ga
        • ORTS

        #18
        If you can't figure it out, share the file and we can have a look at it
        http://www.railsimstuff.com
        Just Blender now, 3DCrafter only when I have to.
        Formerly The Keystone Works (All Permissions Granted)
        Things I work on: https://github.com/pwillard

        Comment

        • CSXT Q-317
          Senior Member


          • Mar 2008
          • 346
          • Ohio USA
          • ORTS

          #19
          Here is what the system window says at export.
          Screenshot 2024-08-23 190548.png
          M. Payne

          Comment

          • wacampbell
            Senior Member
            • Jun 2002
            • 492
            • BC, Canada

            #20
            Originally posted by CSXT Q-317
            Here is what the system window says at export.
            Screenshot 2024-08-23 190548.png
            ​

            This line has me worried ..

            Compacting 0 points to 0

            It tells me your model has no geometry for some reason. Maybe the outline isn't organized right.

            Can you upload your .blend file - we can probably figure it out.

            And also, I recommend some learning by exporting the example models provided with the exporter.
            Last edited by wacampbell; 08-23-2024, 18:22.

            Comment

            • CSXT Q-317
              Senior Member


              • Mar 2008
              • 346
              • Ohio USA
              • ORTS

              #21
              Thanks, guys, I finally scored a success in exporting. It turns out it was more of an operator error than anything else. So I just ate my serving of humble pie so to speak here.

              I still have a long way with the different LODs. But it finally went. This was after running through the crate tutorial.

              Obviously, I need a few more trips around.

              But I do have a burning question for the experts. Can you add additional parts to an existing file and export again like you could in TSM?

              Screenshot 2024-08-23 203829.png
              M. Payne

              Comment

              • eric
                9500 Post Veteran and Administrator



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

                #22
                You can improve and overwrite the file as many times as you wish.

                Based on the file.you shared earlier, it does look like you didn't select all the parts and subparts. Even I forget that too often.

                Selecting everything in the MAIN collection should be part of the basic export script....
                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

                • CSXT Q-317
                  Senior Member


                  • Mar 2008
                  • 346
                  • Ohio USA
                  • ORTS

                  #23
                  Originally posted by eric
                  You can improve and overwrite the file as many times as you wish.

                  Based on the file.you shared earlier, it does look like you didn't select all the parts and subparts. Even I forget that too often.

                  Selecting everything in the MAIN collection should be part of the basic export script....
                  I agree, and thank you for the answer on adding parts to existing objects. A couple of route projects I have are in need of custom structures.
                  M. Payne

                  Comment

                  • eric
                    9500 Post Veteran and Administrator



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

                    #24
                    Unless someone can tell me why this is a bad idea, this is what I did to automatically select all items in the MAIN collection when you export.

                    The script for me is located in the following location: C:\Users\{yourUser}\AppData\Roaming\Blender Foundation\Blender\{myVersion}\scripts\addons\msts exporter.py

                    Open up mstsexporter.py using Notepad, and look for line 229.

                    Add the following lines, being sure to match the indenting EXACTLY as the blocks above and below:

                    Code:
                            # Select all objects in the MAIN and below
                            print( "Selecting all objects and sub-objects in MAIN" )
                            for obj in bpy.data.collections['MAIN'].all_objects: obj.select_set(True);
                            bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
                    It should look like this after inserting:

                    Code:
                            #force out of edit mode
                            if bpy.context.mode != 'OBJECT':
                                bpy.ops.object.mode_set( mode = 'OBJECT' )
                                
                            # Select all objects in the MAIN and below
                            print( "Selecting all objects and sub-objects in MAIN" )
                            for obj in bpy.data.collections['MAIN'].all_objects: obj.select_set(True);
                            bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)            
                            
                            #Export
                            print()
                            print( "EXPORTING "+rootName + " TO " + exportPath )
                            print()
                    ​
                    ​
                    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

                    • CSXT Q-317
                      Senior Member


                      • Mar 2008
                      • 346
                      • Ohio USA
                      • ORTS

                      #25
                      Originally posted by eric
                      Unless someone can tell me why this is a bad idea, this is what I did to automatically select all items in the MAIN collection when you export.

                      The script for me is located in the following location: C:\Users\{yourUser}\AppData\Roaming\Blender Foundation\Blender\{myVersion}\scripts\addons\msts exporter.py

                      Open up mstsexporter.py using Notepad, and look for line 229.

                      Add the following lines, being sure to match the indenting EXACTLY as the blocks above and below:

                      Code:
                      # Select all objects in the MAIN and below
                      print( "Selecting all objects and sub-objects in MAIN" )
                      for obj in bpy.data.collections['MAIN'].all_objects: obj.select_set(True);
                      bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
                      It should look like this after inserting:

                      Code:
                      #force out of edit mode
                      if bpy.context.mode != 'OBJECT':
                      bpy.ops.object.mode_set( mode = 'OBJECT' )
                      
                      # Select all objects in the MAIN and below
                      print( "Selecting all objects and sub-objects in MAIN" )
                      for obj in bpy.data.collections['MAIN'].all_objects: obj.select_set(True);
                      bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
                      
                      #Export
                      print()
                      print( "EXPORTING "+rootName + " TO " + exportPath )
                      print()
                      ​
                      ​
                      Thank you Eric that worked.

                      I did catch an additional error that I had.

                      I thought I had the shape itself under the Main_2000 for example. I also wasn't making sure I had the object set under that item.

                      But that code is an appreciated item. I generally tend to get a bit fast and forget.
                      M. Payne

                      Comment

                      • CSXT Q-317
                        Senior Member


                        • Mar 2008
                        • 346
                        • Ohio USA
                        • ORTS

                        #26
                        I was able to score a second rough object after everything—a rough rendition of a call box.


                        . Screenshot 2024-08-23 232715.png
                        M. Payne

                        Comment

                        • eric
                          9500 Post Veteran and Administrator



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

                          #27
                          And that's how it starts...

                          I stopped counting at 2,000 models in Sketchup. Once you figure the basics out, you may never go looking for a generic fill-in model ever again.

                          Sent from my SM-S911U using Tapatalk

                          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

                          • CSXT Q-317
                            Senior Member


                            • Mar 2008
                            • 346
                            • Ohio USA
                            • ORTS

                            #28
                            Originally posted by eric
                            And that's how it starts...

                            I stopped counting at 2,000 models in Sketchup. Once you figure the basics out, you may never go looking for a generic fill-in model ever again.

                            Sent from my SM-S911U using Tapatalk
                            That is very true. Especially when it comes to the Ohio Division and the Parkersburg Branch I know both will need their own models.

                            The Ohio Division I grew up with before it was abandoned and I have always wanted to do it justice.

                            AS for me, I have dived in, and hopefully, once I get better sharing with the community. But for now, practice practice practice and learn all I can.
                            M. Payne

                            Comment

                            • pwillard
                              3000 Post Veteran



                              • Nov 1999
                              • 3070
                              • Cumming Ga
                              • ORTS

                              #29
                              please note: I have NEVER needed to "select all objects" before exporting.
                              http://www.railsimstuff.com
                              Just Blender now, 3DCrafter only when I have to.
                              Formerly The Keystone Works (All Permissions Granted)
                              Things I work on: https://github.com/pwillard

                              Comment

                              • eric
                                9500 Post Veteran and Administrator



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

                                #30
                                Dunno, Pete. It's happened to me a few times using 3.6, and never did on 2.7

                                Sent from my SM-S911U using Tapatalk

                                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

                                Working...