Jump to content
Jasoncw

BAT - Getting Started Guide / FAQ / Resources / Help

682 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    7 hours ago, AP said:

    Yeah, I had issues with GMAX before where something just stopped working from one second to the other. I copied GMAX from my backup drive and it had the same error, just now the right click menu shows up for a half second or so... I rebooted again, deleted GMAX and copied it again from my backup drive and that fixed it...

    computers - I will never get them.

    idk exactly what you mean by copy, but that might be where the problem is coming from. You'll want to properly uninstall and reinstall the program, using the installation .exe.

    • Like 2
    • Thanks 1

    02Sxlbs.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I made something in the BAT and exported it, however when I try to put the BAT into Lot editor it is a completely different object. Matter of fact it in something I made previously using BAT. First image is what I just made,second image contains two props the one towards the center is what showing up. The prop in the corner is one of the props I made previously. What is going on?

    Screenshot (368).png

    Screenshot (371).png

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi everyone,

    I've been having a persistent and unsolvable issue when importing some 3ds files that I've converted from sketchup. The models contain only jpegs//no png

    Does anyone know what causes this issue? Thanks

    image.png.e8957b9eb7d086f07ae5a63610f8d624.png

     

    • Confused 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 hours ago, EffTheGrid said:

    Hi everyone,

    I've been having a persistent and unsolvable issue when importing some 3ds files that I've converted from sketchup. The models contain only jpegs//no png

    Does anyone know what causes this issue? Thanks

    image.png.e8957b9eb7d086f07ae5a63610f8d624.png

     

    I've never seen this issue before and I couldn't find any good result on Google. As I understand you have converted .skp files to .3ds and now you're trying to import  it into Gmax, right? Did you try to import the .skp file directly?


    Imagem

    "If you fall I'll be there"
                         -The Floor

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 11/18/2021 at 2:45 AM, rsc204 said:

    So GoFSH works with BMPs or PNG files, you must convert those to FSH files (a full manual exists), make sure Reader Inlist is selected when converting the textures. Go into the FSHxDAT feature and point it to the load list and it will make a DAT including them.

    Ok, trying to get back to this, I saw the manual but there's more than 60 pages, if I'm only trying to make a single overlay texture would it require reading all of it?

    I've managed to make the FSH file but when I bring up the FSHxDAT menu I'm not sure how to load it in, when I press the 'Create dat from Loadlist' it doesn't want to load a FSH file, did I miss a step?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    You have to select the applicable option to create the load list file when encoding your textures to FSH files. It’s a little tick box something like ‘Reader InList’ if memory serves. 


    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 12/29/2021 at 1:26 PM, JP Schriefer said:

    I've never seen this issue before and I couldn't find any good result on Google. As I understand you have converted .skp files to .3ds and now you're trying to import  it into Gmax, right? Did you try to import the .skp file directly?

    It's a 3ds file. It's not skp. I made the model in and exported from Sketchup to 3ds (as I always do)

    The weird thing is that one of the files I was able to upload was having the issue as well, but I hit undo within Sketchup on "check validity" (when it fixes your model for you) and then re-exported. Then bam... new model imported just fine. So it makes me think it has more to do with the geometry of the model. But I am baffled as well. Just avoiding the "check validity" for now.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi Everyone and a happy new year!

    I just realized that I discovered a function that I have been looking for for a while in GMAX:

    LINKED OBJECTS

    Usually I copy an object by holding the SHIFT key down and dragging the pivot away from the original (or by using arrays). The new object then is its own entity and I can start forming it.

    Now however, I must have activated some setting that linkes these objects together, meaning when I apply a change to one of them, the otherone changes with it. This can be SUPER helpful and super annoying at the same time, depending on what I need :D

    Does anyone know where and what this setting is and how to trigger it? SEE BELOW

    For the linked object my tool panel is changed:

    image.png.cbd6ce326f45089f28f93d3e4f92cce3.png

    This is what the tool panel normally looks like for me:

    image.png.4da3c107c5f6282b18e6aaf6520b5ce4.png

     

    EDIT: Apologies, bloody silly of me... and crazy I never paid attention to it:

    image.png.b3b37d12a8b058b1a1c65a0acfb08865.png

    Obviously in the clone options I can set "copy" or Reference".

     

    • Like 1
    • Yes 1
    • Haha 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Flipped Normals and 2-sided textures

    Hya, I think I posted a similar question again but there never was a real solution to it if I remember correctly.

    I am working on a model right now that has been imported form another 3D program and the Normals of each object seem to be turned a random direction. (It is impossible for me to correct all normal orientations)

    With the applied textures this seems not to be a problem since they seem to be applied on both sides of a face. (these textures are however just applied colors) If I now want to apply my own textures this feature seems to get lost and all the objects are now messed up if the faces are flipped with the normal facing inward.

    Example:

    image.png.e61dcf29eec48203d3ea6a8a4b2bdd14.png

    The applied "texture" to the bridge structures is a 2 material with a clear material for the windows and a simle grey. If I change the grey tone of mateial 1 that works fine.

    image.png.9f7c717c708cb0e776da68c4aabfa8cf.png

    Notice the tick for "2-sided". If I remove this tick lot's of faces that are oriented inward of an object become invisible:

    image.png.5c3c18c2abc5fb4f5d0714839291126d.png

    If I apply a texture instead of the diffuse color the following happens:
    (no face seems to be textured with this texture)

    image.png.9f2e0155088b0f41730a360669e9178f.png

    If I remove the "2-sided" option at least the correctly oriented faces show the texture:

    image.png.77785078eedbced7279138847b2ba90d.png

    So my question is how I apply the texture to the other side as well.

    Does anyone know about this?

    Maybe @Raymond7cn , @mattb325 , @Jasoncw or @Barroco Hispano ?

    Thanks a lot!






    EDIT: Also I just realized that even if the 2-sided material shows in gmax, it is not considered in the render:

    image.png.0c09736a93587e74582524d999aa097b.png

    Is there a way to fix that?

    • Like 3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Flipped normals are a nightmare and I don't know how to fix them. My advice would be to go back to sketchup, exporting from sketchup, and importing into gmax, and fix things there so that the normals aren't flipped in the first place. It could be as easy as checking a checkbox in one of the export/import windows, or it might require remodeling things in sketchup.

    And yeah I think the 2-sided material thing might be broken. Some of the things in gmax are broken even though the buttons for them still exist.

    Something you could try would be to clone the object, and then flip all of the normals. So that if in one version of the object, one face has the normal pointing inward, the other version would have it facing outward, and between the two, there would be an inward and outward facing normal. If all of the inward facing normals don't render because their backs are facing the camera, then maybe you would get a correct looking model. But it's also possible that the overlapping models would interfere with each other and cast shadows on themselves. It's worth a try.

    • Like 3

    02Sxlbs.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Anti-Aliasing Script lost

    Hey, I recently had to reinstall all my tools and the anti Aliasing script seems to be lost. I did a bad job backing it up and the original download link does not work anymore:

    https://www.sc4devotion.com/forums/index.php?topic=12322.msg360276#msg360276

    Does anyone have acces to it and could share it?

     

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    One possible work-around would be to load your model after creating the LODs (when exporting in SC4 BAT), into SC4 Model Tweaker. There is an option to add anti-aliasing (just adapting the mat settings of the S3Ds in practise), for one or more models in just a few clicks.   

    Note that subsequent renders in SC4BAT will reset this, but if you are rendering in 3DS Max, they will be preserved. 

    • Like 1

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Thanks for the alternative solution! I also managed to salvage data from the broken HD and restored the script. I attached it to my tutorial here until the original download at sc4 devotion is restored. (BuildingMill_recovered_AP.ms)

     

     

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi all, what are all the possibilities to receive this error message?

    Upon import of 3ds file.

    image.png.68b02b60993ee249991a674582494625.png

    I absolutely 110% do not have any textures other than jpeg. And I imported 3ds file not skp. Nothing wonky I promise---just an error still. Why?

    What s line 546?

    Thanks

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Here's another. How do I get around Error # 6? I can't change the center of the model too much because its an overhanging prop, but it's pretty big. Any hope?

    image.png.4c6d9d0d24e1b2f72134d1ac4c23648b.pngimage.png.ae42003d6d5e5088a0c566918ef14c21.png

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Here are most error codes listed.

    code6 can be a file sharing violation, that happens to me (as described in the post) when LE is running. 

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 7/30/2021 at 11:55 AM, Barroco Hispano said:

    That happens because of fsh compression. The fsh compression was useful in its time (save disk and ram space) but now, in 2021, it has no use other than damaging the quality of the BATs.

    After looking at the code, it appears that fshwrite should already have the ability to save uncompressed 24-bit or 32-bit FSH images. It will write uncompressed 24-bit or 32-bit FSH images when the color bitmap file name starts with 'hd'. I am not sure if that feature is used by the BAT4MAX scripts.

    Sorry for the late reply.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     
    On 19/3/2022 at 2:39 AM, Null 45 said:

    After looking at the code, it appears that fshwrite should already have the ability to save uncompressed 24-bit or 32-bit FSH images. It will write uncompressed 24-bit or 32-bit FSH images when the color bitmap file name starts with 'hd'. I am not sure if that feature is used by the BAT4MAX scripts.

    Sorry for the late reply.

    I tried to generate a 32 bit fsh manually with fshwrite but it doesn't work, it generates a black image :(

    No, BAT4MAX doesn't use that function, all fsh's are called 0000.bmp and 0000-a.bmp :/ 

     


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 hours ago, Barroco Hispano said:

    I tried to generate a 32 bit fsh manually with fshwrite but it doesn't work, it generates a black image :(

    The fshwrite command line should be something like: fshwrite.exe /b:hd-0000.bmp /a:hd-000-a.bmp. You will need to rename 0000.bmp and 0000-a.bmp to start with "hd-".

    The /a: command is optional, if there is no alpha image a 24-bit FSH will be written.

    12 hours ago, Barroco Hispano said:

    No, BAT4MAX doesn't use that function, all fsh's are called 0000.bmp and 0000-a.bmp :/ 

    I was just looking at the BAT4MAX script that generates the fshwrite command, it hard-codes those file names.

    I could add a command line switch to force the use of uncompressed images, but that would require users to replace the fshwrite executable and edit the CPBuildingMill script to use the new command.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     

    @Null 45 That would be quite helpful!

    I currently use your photoshop script to open the docs, insert the uncompressed bmp and then save it as 32-bit. I automated the process a bit with PS Actions but it's still pretty boring. *:thumb:

    Don't worry, I have no problem with replacing a file. By the way, is it possible to save only the FSH's of zoom 5 as 32-bit? *:ohyes:

    • Like 2

    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 hours ago, Barroco Hispano said:

    By the way, is it possible to save only the FSH's of zoom 5 as 32-bit?

    It should be possible. IIRC a zoom 5 texture must be at least 128x128 pixels, with mipmaps always being 64x64 or smaller. A zoom 5 HD command line switch could check the image size and use DXT compression for the mipmap images.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     
    1 hour ago, Null 45 said:

    It should be possible. IIRC a zoom 5 texture must be at least 128x128 pixels, with mipmaps always being 64x64 or smaller. A zoom 5 HD command line switch could check the image size and use DXT compression for the mipmap images.

    I don't quite understand what you mean but FSH's that start with 30400, 30410 or 3041b, can have an image size of 256x256 and don't use mipmaps as far as I know. *:???:


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    17 hours ago, Barroco Hispano said:

    I don't quite understand what you mean but FSH's that start with 30400, 30410 or 3041b, can have an image size of 256x256 and don't use mipmaps as far as I know. *:???:

    SC4 stores the mipmaps in separate files. Based on the SC4D Wiki Instance Formats page, the 4 in each of those texture IDs represents the zoom level (for BAT buildings at least, other objects can use a different Instance ID format).

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @Barroco Hispano

    What are the file names of the FSH files that Bat4Max generates? Looking at the Bat4Max scripts it appears to be using 'Type_group_instance.fsh', but I am not sure of that.

    If that format is correct, it should be possible to get the zoom level from the instance id portion of the file name.

    Also, I uploaded the fshwrite source code to GitHub and released a version 1.2.1 update. https://github.com/0xC0000054/fshwrite/releases

    Changes in version 1.2.1:

    • Added support for writing files with 1-bit alpha as DXT1.
    • Added a /hd command line switch to save images in an uncompressed format.
    • Fixed a bug when writing the 32-bit image alpha channel.
    • Fixed the HD image file name detection.
    • Reduced memory usage when saving images with an opaque alpha channel.
    • Removed  the 32-bit PNG alpha support, Bat4Max uses a separate image for the alpha channel.
    • Various other bug fixes and improvements.
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     

    @Null 45 Does that new version still need the "hd" prefix?

    This is what the output folder of a large BAT looks like:

    https://mega.nz/file/7YFmyDIL#tzb4C3BMVIxp6RsVF4QLGqWAPVEcBL--NKHPXdb0YmA

    I can send you the .sc4model file in case you want to insert the FSH's *:thumb:


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Barroco Hispano said:

    Does that new version still need the "hd" prefix?

    No, it does not. You can use either the "hd" prefix or the /hd command line switch to generate uncompressed output.

    Thanks for the files, that confirmed my guess about the file name was correct. I am in the process of adding a /zoom5hd command line switch, which will save only the zoom 5 files as uncompressed.

    To make Bat4Max use the new commands you will have to update BuildingMill.ms. The fshwrite command starts with fshwrite /b:, changing that to fshwrite /hd /b: will make Bat4Max write all files as uncompressed.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Released fshwrite version 1.3.0. https://github.com/0xC0000054/fshwrite/releases

    Changes:

    • Fixed an error in version 1.2.1 due to a change in the Squish DLLs.
    • Added a /zoom5hd command line switch to save only the zoom 5 images in an uncompressed format.

    To make Bat4Max use the /zoom5hd command you will have to update BuildingMill.ms. The fshwrite command starts with fshwrite /b:, changing that to fshwrite /zoom5hd /b: will make Bat4Max write the zoom 5 files as uncompressed.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     

    @Null 45 Thank you very much, it works perfectly. *:thumb:

    The only strange thing that I noticed is that the size of this BAT went from 96kb (32-Bit, PS script) to 148kb (fshwrite 1.3.0) considering that I saved the FSH's with your PS script (maybe it's because I use the compressed alpha channel and all I do is change the "color" bitmap). I guess it must be almost impossible to get fshwrite to keep compressing the alpha channel and just use the uncompressed "color" bitmap.

    32-bit Color bitmap + compressed alpha channel (PS Script)

    unknown.png

    Uncompressed Color bitmap + uncompressed alpha channel (fshwrite 1.3.0):

    unknown.png

     


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 hours ago, Barroco Hispano said:

    The only strange thing that I noticed is that the size of this BAT went from 96kb (32-Bit, PS script) to 148kb (fshwrite 1.3.0)

    Fixed, this was due to a difference in how transparent pixels are handled between the PS plugin and fshwrite.

    Release version 1.3.1. https://github.com/0xC0000054/fshwrite/releases

    Changes:

    • Save uncompressed images with an opaque alpha channel as 24-bit.
    • Set the color of transparent pixels to black, this improves compression efficiency within the SC4Model file.
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Smf_16 BAT thread
     
    On 18/7/2021 at 10:38 AM, Barroco Hispano said:

    @Jasoncw I noticed that the problem also happens when I save a preview as .tga in 3dsmax so I can confirm that the problem is in the .tga format.

    3DSMax preview (If I save it in .png format it looks the same as it does in the 3dsmax preview).

    PNG_SC4.png

    .TGA after saving it in 3ds max (TGA hate dark colors *:D).

    TGA_SC4.png

    I think the only solution is to make the temp files that BAT4MAX generates to be .png and not .tga (I have no idea how to do it but I know that code is in CPBuildingMill.ms)

    dgtrhtrht.png

    Portable_Network_Graphics interfaces

    Maybe @Jasoncw or @Raymond7cn can help us.

    @Null 45 It worked perfectly, thanks!

    By the way, can you give us a hand with this?


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections