Jump to content

253 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

This sounds amazing! I hope you guys are able to solve the lighting problem, because BAT4Blender seems like a very good alternative to those who can't use 3DSMax and don't really like gmax old interface and mechanics.

I use SketchUp to model my creations, so if Blender becomes a viable option I'll problably start to use it as my main program!

  • Like 1

*;)

Share this post


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

I REALLY WAIT FOR THIS, please make this happen *:party:

GOD, waking up to this news already made my whole day

  • Like 1

Share this post


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

As someone who has been tinkering with making things with GMAX and B.A.T. for a while now, this may finally be the push I need to actually start learning how to use Blender! *:lol:

Excellent work! I look forward to seeing more updates, as these recent developments are truly an amazing feat!

  • Like 1

Once you play with NAM installed, one simply cannot go back!

I'm waiting for the day when someone makes a Faber College lot for SimCity 4  :lol:

IMG_3716.jpg.7fe0b78e164e258bac5afb32dc9f9588.jpg

 

Share this post


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

Such exciting times for SimCity modding and BATing. Awesome work!

  • Like 4

Share this post


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

This would make it way better for creating BAT models since Blender has way better tools than GMAX.

  • Like 1

Share this post


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

Oh my. That is a big deal. I really like the render engine on blender. If this thing come ture. It will be awesome.

  • Like 3
  • Yes 1

Please consider supporting me on Kofihttps://ko-fi.com/cttheowl

Share this post


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

Excellent work!

I installed the plugin and it seems to work fine. I'm not a Blender expert (I mainly use it to import/export certain formats and paint weights) but I'm going to try to find information on forums to learn how to use the "sun and sky" and try to make it look the same as BAT4MAX. Btw, I can also share 3d models in case you need to do some testing. *:thumb:

Day

image.png.8b31831b586f27f38a1f12e9cba93b65.png

image.png.2df872b6f30390d6134d66cfd23fd2e9.png
 

I don't know if it helps, but bat4max uses this sky color for maxisnite and darknite

Maxisnite

image.png.312eb98df7096f42fa9ea7c291edb78e.png

Darknite

image.png.d4b257cf1e61aff393a319f779221d03.png

 

  • Like 6
  • Confused 1
  • Yes 1
  • Thanks 1

Discord: JLeCoultre#9124

My Simtropolis BAT Thread

Share this post


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

    Thanks for the comments, everyone. It's encouraging to see so much interest in this topic.

    I've made some more progress. There's now a LOD for each zoom level, named LOD1 to LOD5 for consistency with the existing tools. This allows to create LODs with varying level of detail. Unlike GMAX, this allows to set custom LODs for zoom levels 1 and 2 as well, for maximum control. For example, this is useful for diagonal buildings where an orthogonal box wouldn't work too well as LOD.

    Additionally, I've added an optional post-processing step to call fshgen after rendering. This automatically creates an SC4Model file from the exported model and image files. Calling the external tool from within Blender has the advantage that this allows to pass the correct list of intermediate files, but it could be done manually or using other tools as well.

    Here's the current UI:

    current BAT4Blender UI

    Regarding night lights: From what I've read, GMAX identifies an object as night light if its name starts with 'nitelite'. With Blender, I wonder if organizing the night view in a separate View Layer, or a Collection maybe, might be the more natural workflow. This would allow not only to add lights to the night view, but also to remove or replace selected other objects.

    On 8/2/2024 at 10:07 PM, Barroco Hispano said:

    I'm not a Blender expert (I mainly use it to import/export certain formats and paint weights) but I'm going to try to find information on forums to learn how to use the "sun and sky" and try to make it look the same as BAT4MAX. Btw, I can also share 3d models in case you need to do some testing. 

    That would be awesome, thanks. From what I've learned so far, there's a Dynamic Sky Add-On that comes with Blender. It might be overkill for our purposes though and seems to add quite a bit to the rendering times.

    Having one or two 3d models suitable for testing, especially with night lights, would definitely come in handy.

    • Like 8
    • Thanks 1

    Share this post


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

    In Gmax they did that stuff with the nitelites because the day and night were exported together, so they needed to be able to automatically change from night to day during the export.

    The BAT4Max workflow is doing the day export, and then manually changing things in the scene for night (so pressing the button to set the night lighting rig, and selecting the different lights and materials in the scene to turn them on), and then doing the night export.

    Manually switching between day and night gives the BATer more control, because the BATer can very straightforwardly make any changes they'd like between night and day. Having a system which does this automatically would just force the BATer to follow the system, when switching between night and day manually only takes a minute or so.

     

    Something that actually would increase convenience for BATers would be automating the MaxisNite and DarkNite versions a little bit. Right now, the .SC4Model file is made in Gmax. Then you export the day version in 3ds Max. Then you copy and paste the .SC4Model file to somewhere outside of the plugins folder (so that there are two copies of the .SC4Model file with the day .FSH, but only one inside the plugins folder). Then you do either the MaxisNite or DarkNite export. Then rename the .SC4Model file in the plugins folder to indicate which version it is, and then swap it out for the other .SC4Model, to do the other version.

    It would be nice if doing the day export automatically made two copies of the .SC4Model file (with the same IDs), one with MN and one with DN in the filename. And then some kind of option within blender to allow you to choose which .SC4Model file to insert the nitelites into when exporting the night versions.

     

    For the lighting rigs, I'll look into that again. I just need a free space of time when I can download everything and reorient myself to it, since it was 5 years ago that I last worked on it.

    • Like 5
    • Thanks 2

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

    Share this post


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

    @memo I can not get this to install in blender-3.6.14-windows-x64  or   blender-4.2.0-windows-x64.

    4.2 does not even see the .zip

    3.6  sees the .zip and says it is installed but it is not there.

    Share this post


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

    I implemented a few more things last week. The main addition is that BAT4Blender now shows the rendering progess in the UI while rendering, not only in the system console, and doesn't freeze the UI anymore. This ended up being a lot more complicated to implement than expected, but it makes the plugin more user-friendly now.

    This means only really lighting and nightlights are missing from the Add-on. Before continuing to implement this, I'd hope to get feedback from Barroco Hispano, Jasoncw or anyone else regarding suitable settings, as the implementation would directly depend on that. However, even without any additional implementation changes, the plugin is usable already in the sense that anyone can fine-tune the lighting settings to their liking and export day and night views separately.

    On 8/15/2024 at 6:50 PM, atsf189 said:

    I can not get this to install in blender-3.6.14-windows-x64  or   blender-4.2.0-windows-x64.

    4.2 does not even see the .zip

    3.6  sees the .zip and says it is installed but it is not there.

    At this point, the Add-on is not compatible with Blender 4+ yet, as there are some breaking API changes. Blender 3.6 should work though.

    There might be a problem with the .zip file you created. I've attached a proper .zip file to this post, which includes all changes up until now. After installing it, make sure to also enable it by ticking the checkbox. If correctly installed, the Add-on will log "Registering addon BAT4Blender" to the system console whenever Blender is started and the Add-on is enabled. Also monitor the system console for potential errors and post them here if you cannot resolve them.

     

    BAT4Blender-0.0.4-9968cf5.zip

     


      Edited by memo  

    updated zip file for Blender 4.2+
    • Like 4
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 hours ago, memo said:

    There might be a problem with the .zip file you created.

    Thank you

    I will give it a try Saturday when I get home.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 8/15/2024 at 1:34 PM, memo said:

    Blender 3.6 should work though.

    I did get the zip installed and managed to render a model.

    Blender needs to be run as administrator or it will throw errors during rendering.

    I know very little about Blender. I have been using it for 2 days and i am very confused. Is there a SC4 tutorial?

    It rendered the files in .png and .obj

    What I really would like to do is make a true 3d model to use in the game but I am not shure how to export that from blender and get in the game.

    I wanted a true 3d file to make 45 degree props with model tweeker

    • Like 1

    Share this post


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

    I wanted a true 3d file to make 45 degree props with model tweeker

    It is possible to export true 3d models from Blender 3.6

    You have to select the .3ds Import/Export option in the preferences tab.

    Then import into reader with the .3ds file.

    Note:  If the model uses Default XYZ orientations, The export orientation should be Z-Forward, Y-Up. The default orientation will result in the model being exported on its side.

    -eggman121

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    27 minutes ago, Eggman121 said:

    Then import into reader with the .3ds file

    I get an error when i import the .3ds

    The entry is invalid (you have to refresh your list)

    Share this post


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

    How complex is your model?, True3D models in SC4 have some very strict limits in terms of Poly counts, something like 500 although it is per group, so can be worked around.

    Also, you might want to consider whether True3D is the right solution for Props. You can just render a 45 degree version of a regular BAT and achieve the same thing. Could be a better approach, but it all depends on what you want these models to do in game. 

    • Like 2

    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
  • Original Poster
  • Posted:
    Last Online:  
     
    On 8/18/2024 at 5:14 PM, atsf189 said:

    Why is batforblender exporting this file type?  What and how do i convert to s3d?

    5ad0e817_aebe8606_00030000.obj

    The models (namely the 20 LODs) are exported as .obj files – a common file format for 3D models. The textures that the game applies to those LODs are exported as .png files.

    The simplest way to convert them for use in the game is to tick the check box "Post-processing", which then creates an .SC4Model file after rendering finishes, as explained earlier in this thread. For this, the tool "fshgen" needs to be present. The .SC4Model file consists of S3D and FSH files, which are just the converted .obj and .png files you saw. This conversion can also be done manually if necessary, as explained in the Readme for example, but it's easier to just tick the checkbox. The BAT4Blender UI also has some hover tooltips that may provide some information.

    • Like 1

    Share this post


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

    I knew I had something wrong in the settings. There are so many settings in blender it makes my brain hurt.

    1 hour ago, memo said:

    fshgen" needs to be present.

    I missed the whole fshgen tool thing.

    I will install this and try the export again and see if my plane looks less pixelized. 

    Do you have a blender example file (maybe of the default cube) that I could just hit export to .3ds to see if I can get it imported into reader as a true3d file.

    Do to many true3d files slow the game down? 

    Thank you @memo for creating all this programing to keep SC4 going and making it simpler for novices like me.

    bat4blender and the sub menus are two of my favorites 

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 8/20/2024 at 11:09 AM, memo said:

    fshgen" needs to be present

    I can get the fshgen tool to work great with the dos command window but

    i am not shure how to install it so blender does it automatically

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    3 hours ago, atsf189 said:

    i am not shure how to install it so blender does it automatically

    Currently, it's mainly explained in the Add-on preferences, which is also visible as a tooltip. More info should be added to the Readme at some point.

    2024-08-22_19_26_02.png.0b18b95a3a78d385cc5f97344ab35e21.png

    As I haven't tested this on your platform, there could be other things going wrong, so let me repeat this point: "Monitor the system console for potential errors and post them here if you cannot resolve them."

    This would also apply to your run-as-administrator problem.

    The more complete information you provide for a problem, the more likely it is to get resolved.

    On 8/20/2024 at 8:55 PM, atsf189 said:

    Do you have a blender example file (maybe of the default cube) that I could just hit export to .3ds to see if I can get it imported into reader as a true3d file.

    The default cube works, but you may want to scale it up a bit – to 16 m or 32 m, for example. You may also need to assign materials in Blender or Reader. You can also export any S3D file as .3ds in Reader and re-import it.

    On 8/20/2024 at 8:55 PM, atsf189 said:

    Do to many true3d files slow the game down? 

    Yes, every asset you load into the game does, to varying extents. A typical simple BAT consists of 6 polygons. A true 3d model is easily 2 orders of magnitude more.

    Regardless of that, choose what's most appropriate for your use case. BATs have much much better rendering quality than true 3d models, but can only be rotated by 90 degree.

    True 3d models are required for Automata (as they rotate by arbitrary angles), for network models (as they conform to the ground), some animations (if not sprite-based) and not much else. So if your plane is supposed to fly around the map, make it true 3d – if it's stationary, render it as a BAT.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 minute ago, memo said:

    may want to scale it up a bit

    This is my main problem.

    I have tried everything to scale the model up and it stays the same size in the render. super tiny in the game perfect for a radio controlled plane

    Share this post


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

    @memo

    Sorry to keep bothering you. I am getting better at blender though thanks to you. I made 3 more plane versions in way less time.

    The DOS commands, I have been using this one

    fshgen import -o output.dat --with-BAT-models --format Dxt1 --gid 0x3E5ED4DD 5*.obj 7*.png

    Is there something that i could add to this line that would change the IId also?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    19 hours ago, memo said:

    I haven't tested this on your platform

    This is working great on win 11

    Is there a way to change where the file is saved.

    How would i change the IId with this method?

    Do I even need to worry about this? Is it better to use 00030000 as a start for all model files?

    Share this post


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

    BATs are made unique via the Group ID, the Instance ID should be left well alone. I assume that BAT for Blender is handling this. Although usually you have to start a new project to generate a unique ID. 

    • Thanks 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
  • Original Poster
  • Posted:
    Last Online:  
     
    On 8/23/2024 at 3:29 PM, atsf189 said:

    This is working great on win 11

    Is there a way to change where the file is saved.

    How would i change the IId with this method?

    Do I even need to worry about this? Is it better to use 00030000 as a start for all model files?

    I've updated the zip file I posted previously. This fixes a bug where the .SC4Model file, generated by the "Post-Processing" step, was saved in the wrong directory. It's now saved in the directory containing the .blend file, just like all the other files. This should solve most permission issues for non-administrators.

    I can only reiterate though, please monitor the system console for any errors.

    The IID can be changed manually in Reader – there's no automated way to do this at this point. While the Maxis buildings all have different IIDs, this is rather uncommon for custom BATs, as each BAT usually uses a unique Group ID. (If there had been a convention of using the same Group ID for all buildings in a set, this would have opened some doors for creating submenus, but unfortunately that's not the case.)

    • Like 2
    • Thanks 1

    Share this post


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

    @memo This is very exciting! I'll have to test it out.


    Life is architecture and architecture is the mirror of life. – I.M. Pei

    Share this post


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

    If you get a file import error in reader when importing a s3d file it could be from naming your LODs.

    I have discovered that you can only use letters and numbers in the names and no spaces or reader will give you

    a file exception error 

    • Like 1

    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