Announcement

Collapse
No announcement yet.

Huge win for me in Blender

Collapse
This topic has been answered.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSXT Q-317
    replied
    Managed to get another test shape in. Albeit not done and rough around the edges. This is what I am using to figure out how to add to additional shapes and assign an LOD.

    I figured I would attempt what I consider a must-have structure or a route project of mine loses some credibility. Obviously, texture work needs work.


    But the fact I am getting a bit more used to the export function is promising.

    Click image for larger version

Name:	Screenshot 2024-08-24 013655.png
Views:	460
Size:	984.5 KB
ID:	2310987

    Leave a comment:


  • eric
    replied
    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

    Leave a comment:


  • pwillard
    replied
    please note: I have NEVER needed to "select all objects" before exporting.

    Leave a comment:


  • CSXT Q-317
    replied
    Originally posted by eric View Post
    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.

    Leave a comment:


  • eric
    replied
    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

    Leave a comment:


  • CSXT Q-317
    replied
    I was able to score a second rough object after everything—a rough rendition of a call box.


    . Click image for larger version

Name:	Screenshot 2024-08-23 232715.png
Views:	761
Size:	913.8 KB
ID:	2310849

    Leave a comment:


  • CSXT Q-317
    replied
    Originally posted by eric View Post
    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.

    Leave a comment:


  • eric
    replied
    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()
    ​

    Leave a comment:


  • CSXT Q-317
    replied
    Originally posted by eric View Post
    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.

    Leave a comment:


  • eric
    replied
    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....

    Leave a comment:


  • CSXT Q-317
    replied
    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?

    Click image for larger version

Name:	Screenshot 2024-08-23 203829.png
Views:	620
Size:	912.0 KB
ID:	2310838

    Leave a comment:


  • wacampbell
    replied
    Originally posted by CSXT Q-317 View Post
    Here is what the system window says at export.
    Click image for larger version  Name:	Screenshot 2024-08-23 190548.png Views:	0 Size:	19.5 KB ID:	2310825


    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, 19:22.

    Leave a comment:


  • CSXT Q-317
    replied
    Here is what the system window says at export.
    Click image for larger version

Name:	Screenshot 2024-08-23 190548.png
Views:	273
Size:	19.5 KB
ID:	2310825

    Leave a comment:


  • pwillard
    replied
    If you can't figure it out, share the file and we can have a look at it

    Leave a comment:


  • CSXT Q-317
    replied
    Originally posted by eric View Post
    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?
    Click image for larger version

Name:	Screenshot 2024-08-23 190155.png
Views:	229
Size:	9.9 KB
ID:	2310820

    Leave a comment:

Working...
X