Jump to content

253 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
On 27/09/2025 at 5:01 PM, ACEfanatic02 said:

If you're still seeing issues, I think we need more information to be able to help.  Specifically:  show us an example output of the render, and show what your setup is in the outliner.

Ok, so the last few days I have been trying to not annoy anyone and work this out. I believe everything is set up correctly and as mentioned before, I can get my model to render without the lighting rig, but I'm still having the same issue with it. One thing that I skimmed over, I think near my first post was that I'm using downloaded models. I started looking into that side of things and as I've imported .fbx files have found some posts saying that Blender can have texture issues with them...there were work-a-rounds I checked with. Also .fbx can have issues with Cycles rendering or certain lighting. But all in all, me searching for possible issues that's all I'll find, If I search is water bad for you I'll find a thousand post telling me not to drink it lol. To make sure it wasn't just the file I downloaded I've tried about 4 so far, some super simple two texture ones. Has anyone using the rig tried it with .fbx imports? 

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
16 minutes ago, Dono said:

Ok, so the last few days I have been trying to not annoy anyone and work this out. I believe everything is set up correctly and as mentioned before, I can get my model to render without the lighting rig, but I'm still having the same issue with it. One thing that I skimmed over, I think near my first post was that I'm using downloaded models. I started looking into that side of things and as I've imported .fbx files have found some posts saying that Blender can have texture issues with them...there were work-a-rounds I checked with. Also .fbx can have issues with Cycles rendering or certain lighting. But all in all, me searching for possible issues that's all I'll find, If I search is water bad for you I'll find a thousand post telling me not to drink it lol. To make sure it wasn't just the file I downloaded I've tried about 4 so far, some super simple two texture ones. Has anyone using the rig tried it with .fbx imports? 

The biggest issue you'll find with importing FBXs in Blender is scaling errors.  (Various Autodesk tools export FBX with inconsistent unit scales, which means you can never be exactly sure how big a thing is.)  That's easy enough to check.  If you select a mesh in object mode, it's dimensions will shown in the side panel.  Ensure these values are reasonable, as BAT4Blender assumes a scaling of 1 unit = 1 meter.  (A SC4 tile is 16x16 meters.)

image.png.8fd1cc4154fda03598c706b80eabbe7e.png

Materials may also be an issue, but if things look okay in the viewport then that will not be the problem.

Beyond that, again:  I will be able to help more with more information, and the most useful information you can provide is a screenshot of the actual results you're seeing.


I make the pixels go brrrrrrrrrr...

she/her

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
56 minutes ago, ACEfanatic02 said:

Beyond that, again:  I will be able to help more with more information, and the most useful information you can provide is a screenshot of the actual results you're seeing.

I've got a few days off so hope to get on top of it. Have you tried a fbx since using the lighting? In all my searches have got on top of materials, textures and sizing stuff. Are there any file types you'd recommend. 

Share this post


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

I've got a few days off so hope to get on top of it. Have you tried a fbx since using the lighting? In all my searches have got on top of materials, textures and sizing stuff. Are there any file types you'd recommend. 

I model everything myself, so no, I have not tried rendering anything imported from an FBX recently.  However, after the import process, the result is just meshes and materials in Blender.  They are not somehow "tainted" by the source format.  If it looks okay in the viewport, the import process worked and the fact it came from an FBX originally is no longer relevant.

Without seeing the output, I can't really know what the problem is, but some things you can try as general "problem fixers":
- replace the material with a dummy material.  You can do this easily and non-destructively by setting the override material under View Layer -> Overrides (it's down at the bottom of that pane, you'll have to scroll.)  If you set it to the albedo50 material included in my rig and render, you should get a completely grey version of your model.  If that works, the issue is with the material; if it's still broken, the issue is likely with the model being rendered.
- in edit mode (select the model and press tab), select everything and press Ctrl-N to bring up the normals tools, and select "Recalculate Outside".  This will recompute the normal vectors for all of the geometry so that they are consistent with each other.  This can fix shading issues where adjacent faces have opposing normals, causing dark, splotchy artifacts.
- select your model and add a Weld modifier, leaving the default settings alone.  This will merge co-located vertices into one.  Because of the limited precision of the raytracer, two faces that exactly overlap cause false shadowing artifacts; welding fixes this.

EDIT:  you can also test if the rig itself is the problem by rendering a built-in primitive instead.  Throw down a torus or a monkey, render that, and see if it causes the same visual problems.  If so, then something is likely wrong with the lighting rig.


  Edited by ACEfanatic02  
  • Thanks 1

I make the pixels go brrrrrrrrrr...

she/her

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 hours ago, ACEfanatic02 said:

EDIT:  you can also test if the rig itself is the problem by rendering a built-in primitive instead.  Throw down a torus or a monkey, render that, and see if it causes the same visual problems.  If so, then something is likely wrong with the lighting rig.

Ok so I tried all your suggestions and all failed as well as the monkey one, I just end up with a white box. Only time it didn't fail was when I didn't use the rig and I tried the 'no' rig B4B render on both my model and the monkey. I believe if it's working on yours it has to be something you've compensated for or had natively in your setup that I haven't. It would be good if a third party could try it.

Share this post


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

Okay, I've done some additional testing and I have a theory.

If I open my lighting rig in an older version of Blender (tried both 3.6 and 4.0), the render is _fine_, but the compositing pass breaks.  Even stripping it down to just the day/night lighting application outputs a completely grey image.  (Which makes absolutely no sense, it's _just a multiply_.  This seems like a bug in the compositor.)

@Dono:  Try using Blender 4.5.3 LTS.  That is the version I used to create the rig, and it seems whatever compositor bug is happening was solved at some point between 4.0 and now.  _Hopefully_ that will resolve the issue.

  • Like 2

I make the pixels go brrrrrrrrrr...

she/her

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 29/09/2025 at 6:04 PM, ACEfanatic02 said:

Okay, I've done some additional testing and I have a theory.

If I open my lighting rig in an older version of Blender (tried both 3.6 and 4.0), the render is _fine_, but the compositing pass breaks.  Even stripping it down to just the day/night lighting application outputs a completely grey image.  (Which makes absolutely no sense, it's _just a multiply_.  This seems like a bug in the compositor.)

@Dono:  Try using Blender 4.5.3 LTS.  That is the version I used to create the rig, and it seems whatever compositor bug is happening was solved at some point between 4.0 and now.  _Hopefully_ that will resolve the issue.

Cool, I actually started with 4.5...way back...but went back to 3.6 and also 4.2 as they were suggested. I'll have a crack later and just update this post with the outcome.

EDIT: YAY!!

lol, yes, the use of 4.5.3 worked without a drama. I can confirm I was using 4.2.14 and it didn't work so if anyone wants to use your rig, anything below 4.2 wont work it seems. My textures/materials were 100x better than before but still a little off, I'll go through them tomorrow with your prior suggestions to see if any of those factors are playing a part this time as I didn't implement them this test render. I know I asked before in a different situation, do I change the B4B camera window size if the Model/Object isn't completely in it or as mentioned before (I think), the B4B LODs are at work here and the camera is just setting the angles?

Thank you for all the effort, knowing the time involved it's very much appreciated. 

  • Like 2

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
14 hours ago, Dono said:

Cool, I actually started with 4.5...way back...but went back to 3.6 and also 4.2 as they were suggested. I'll have a crack later and just update this post with the outcome.

EDIT: YAY!!

lol, yes, the use of 4.5.3 worked without a drama. I can confirm I was using 4.2.14 and it didn't work so if anyone wants to use your rig, anything below 4.2 wont work it seems. My textures/materials were 100x better than before but still a little off, I'll go through them tomorrow with your prior suggestions to see if any of those factors are playing a part this time as I didn't implement them this test render. If you get a second could you do a screen shot of your scene collection list as if you were about to do a render. There's a few things I wasn't totally sure about and If I copy a pics layout (within reason) I wont doubt my setup.

Thank you for all the effort, knowing the time involved it's very much appreciated. 

Thanks for the confirmation.  I have edited the original post to warn about using the correct version.

  • Like 1

I make the pixels go brrrrrrrrrr...

she/her

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 9/27/2025 at 6:47 AM, ACEfanatic02 said:

    Note that the light rig (both the World and Compositor graphs) is heavily dependent on drivers, which do not survive copy-and-paste.  So if you want to add this rig to an existing model, it's better to import that model into the light rig scene instead of trying to copy the node graphs.  (Now that I think about it, it might work better to make these Assets.  Will have to try that next.)

    ace_light_rig_004.blend

    Excellent. Looks very good. Personally, I'm stuck with Blender 3.6 for hardware reasons, so eventually I might try to recreate the rig in 3.6. It seems the only problem is that the file was saved in Blender 4.5, so some nodes are broken when opening the file with 3.6 (such as the Color Mix and Color Multiply nodes). In contrast, I assume opening a 3.6 file with a newer Blender version should usually not be a problem, as it would usually be backward-compatible.

    Do I understand correctly that all the relevant settings are in the World graph and in the Compositor graph? Also, do you have examples showing that the Anti-Fringe section is needed with the current pipeline?

    Additionally, do you have recommendations about how to best integrate the rig into BAT4Blender? Just keep it as a separate .blend file?

    • Like 2

    Share this post


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

    Excellent. Looks very good. Personally, I'm stuck with Blender 3.6 for hardware reasons, so eventually I might try to recreate the rig in 3.6. It seems the only problem is that the file was saved in Blender 4.5, so some nodes are broken when opening the file with 3.6 (such as the Color Mix and Color Multiply nodes). In contrast, I assume opening a 3.6 file with a newer Blender version should usually not be a problem, as it would usually be backward-compatible.

    Do I understand correctly that all the relevant settings are in the World graph and in the Compositor graph? Also, do you have examples showing that the Anti-Fringe section is needed with the current pipeline?

    Additionally, do you have recommendations about how to best integrate the rig into BAT4Blender? Just keep it as a separate .blend file?

    Yes, World and Compositor hold all the useful bits.

    I'm not terribly convinced that Anti-Fringe is needed.  It's actually disabled in the file.  It was more of an experiment to see how it _could_ be done, even if it's unneeded.  I still haven't figured out the full pipeline to get things in game (Maxis LE crashes on startup and PIM-X is _incredibly_ confusing.)  Once I get that worked out and have stuff in-game it will be easier to decide if this is actually something needed.

    I did discover a bug with the light rig while writing this post:  the second Nishita sky texture (used to isolate the sun disk) does not have the correct rotation driver applied.  This shouldn't make a significant impact on the result, but I will upload a fixed version anyway.  (To fix in-place, just copy the driver from the first texture to the second one.)

    For integration:  I'm not entirely sure.  My best guess is that we could mark these graphs (or at least node groups within them) as Assets, and inject them into a user's file that way.  Then, in theory, the asset could be updated and changes would propagate to files when users update B4B.  I'm not 100% certain that does the right thing, and I'm also very unsure how that would interact with drivers.  (Do the drivers stay in place when the node graphs get moved around?  They don't under copy-paste.)  TBH, I've never actually done any of this sort of tech art pipeline in Blender before (Maya has a very strong grip on gamedev), so I'm kinda making things up as I go.

    On the topic of pipelines, however:  I think it'd be nice if script allowed specifying a destination path for the output (relative to the current folder.)  Currently it gets dumped directly into the same folder as the blend file.  I'd prefer it didn't; especially when I have multiple different variants of a building in a given folder, it makes a bit of a mess to have all of the generated output together.

    Bugfix for rig attached.  Same caveat as before, it won't work on versions of Blender prior to 4.5.3.

    ace_light_rig_005.blend

    • Like 2

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


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

    I am on a journey now...

    image.png.fa4f76a4b79f43af509083c06b8570c7.png

    I am having trouble with the fshgen... maybe I set it up wrong?

    What is the file that needs to be referenced under post-processing? (I have selected: \fshgen-0.2.1\src\scripts\fshgen) 

    image.png.0703cedbaee96e3eb4567cceaedb49b8.png

     

     

    ...
    Using ImageMagick filter "MagicKernelSharp2021" to downsample rendering: C:\Users\XXX\Documents\Blender\Sailing Cutter\7ab50e44_cc09a227_00030430_Day.tmp.png
    Saved: 'C:\Users\XXX\Documents\Blender\Sailing Cutter\7ab50e44_cc09a227_00030430_Day.png'
    ------------------------------------------------------------
    Exporting XML file: C:\Users\XXX\Documents\Blender\Sailing Cutter\88777601_cc09a227_00030000.xml
    Using fshgen to create SC4Model: C:\Users\XXX\Documents\Blender\Sailing Cutter\Cutter_16-0x5ad0e817_0xcc09a227_0x00030000.SC4Model
    CANCELLED
    Traceback (most recent call last):
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\GUI_ops.py", line 177, in modal
        raise self._exception
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\GUI_ops.py", line 209, in execute_queue_loop
        f()
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\GUI_ops.py", line 111, in f
        Renderer.create_sc4model(fshgen_script,
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\Renderer.py", line 289, in create_sc4model
        result = subprocess.run([
                 ^^^^^^^^^^^^^^^^
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 548, in run
        with Popen(*popenargs, **kwargs) as process:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 1026, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 1538, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    OSError: [WinError 193] %1 is not a valid Win32 application
    Error: Python: Traceback (most recent call last):
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\GUI_ops.py", line 209, in execute_queue_loop
        f()
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\GUI_ops.py", line 111, in f
        Renderer.create_sc4model(fshgen_script,
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\4.5\scripts\addons\BAT4Blender\Renderer.py", line 289, in create_sc4model
        result = subprocess.run([
                 ^^^^^^^^^^^^^^^^
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 548, in run
        with Popen(*popenargs, **kwargs) as process:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 1026, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\python\Lib\subprocess.py", line 1538, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    OSError: [WinError 193] %1 is not a valid Win32 application

     

    • Like 1

    Share this post


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

    I am on a journey now...

    image.png.fa4f76a4b79f43af509083c06b8570c7.png

    I am having trouble with the fshgen... maybe I set it up wrong?

    What is the file that needs to be referenced under post-processing? (I have selected: \fshgen-0.2.1\src\scripts\fshgen) 

    image.png.0703cedbaee96e3eb4567cceaedb49b8.png

     

    It's not infront of me but I think it was the fshgen.bat file within the folder.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    7 hours ago, Dono said:

    It's not infront of me but I think it was the fshgen.bat file within the folder.

    I tried the *.bat file:

    Exporting XML file: C:\Users\XXX\Documents\Blender\Sailing Cutter\88777601_cc09a227_00030000.xml
    Using fshgen to create SC4Model: C:\Users\XXX\Documents\Blender\Sailing Cutter\Cutter_16-0x5ad0e817_0xcc09a227_0x00030000.SC4Model
    Error: Unable to access jarfile C:\Users\XXX\Documents\SimCity 4\Tools\fshgen-0.2.1\src\scripts\.\fshgen.jar
    Failed to create SC4Model using "fshgen". Check console output for error messages, or disable Post-Processing.
    CANCELLED

    The folder mentioned does not include the folder "." nor the .jar file mentioned:

    C:\Users\XXX> dir "C:\Users\XXX\Documents\SimCity 4\Tools\fshgen-0.2.1\src\scripts"
     Volume in drive C is Windows
     Volume Serial Number is 7EBA-36C2
    
     Directory of C:\Users\XXX\Documents\SimCity 4\Tools\fshgen-0.2.1\src\scripts
    
    01/10/2025  21:02    <DIR>          .
    01/10/2025  21:02    <DIR>          ..
    01/10/2025  21:02               208 fshgen
    01/10/2025  21:02               277 fshgen.bat
                   2 File(s)            485 bytes

    Any ideas? (I assume I need that missing jar file - I did not see it in the release on github however)

    Apologies for the many questions, sadly this is not my strong suit.

     

    EDIT: my Java installation should be ok

    C:\Users\XXX>java -version
    java version "1.8.0_461"
    Java(TM) SE Runtime Environment (build 1.8.0_461-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.461-b11, mixed mode)

     

     

    Share this post


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

    @API'm not the greatest at this stuff either. So these are only suggestions (and probably very obvious at that).

    Did you download the correct file, it's the 8.74mb one, if there's no .jar file present, it sounds like you downloaded a source file..  Releases · memo33/fshgen

    In the folder the .bat file is for windows systems, the other fshgen file is for macOS/Linux. You need to point to one of these.
    Below are the only files within the fshgen-0.2.1 folder. 

    68de369b2d3c5_Screenshot2025-10-02182156.png.14e8e349c29e36813d0262144f7bd6f6.png

     

    My Java has all the same build number, mines older but is '21.0.6' for the 3 parts you have (my java is a different source so might be irrelevant)

    And a long shot, are you using OneDrive? I had unrelated issues with SC4 on OneDrive when creating or removing files.

    Ultimately, one of the guru's will look at your error code and will know the answer :)

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, Dono said:

    @API'm not the greatest at this stuff either. So these are only suggestions (and probably very obvious at that).

    Did you download the correct file, it's the 8.74mb one, if there's no .jar file present, it sounds like you downloaded a source file..  Releases · memo33/fshgen

    In the folder the .bat file is for windows systems, the other fshgen file is for macOS/Linux. You need to point to one of these.
    Below are the only files within the fshgen-0.2.1 folder. 

    68de369b2d3c5_Screenshot2025-10-02182156.png.14e8e349c29e36813d0262144f7bd6f6.png

     

    My Java has all the same build number, mines older but is '21.0.6' for the 3 parts you have (my java is a different source so might be irrelevant)

    And a long shot, are you using OneDrive? I had unrelated issues with SC4 on OneDrive when creating or removing files.

    Ultimately, one of the guru's will look at your error code and will know the answer :)

    Yup, downloaded the source code rather than the release... bloody amateur :D

    It has actually exported a full SC4Model from blender - I AM AMAZED!*:party:

    SD Render:
    image.png.ed1c61c23370555228d30a15875bb6bc.png

    HD Render:

    image.png.9a30a3870aa46c228c3ca93f3244fa8c.png

    Is there a way I can increase the resolution even further? (I did use the Super-Sampling)

    • Like 6

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, AP said:

    Is there a way I can increase the resolution even further? (I did use the Super-Sampling)

    I'm new to BATing so unsure with BAT4Blender, I know those working on it have talked about incorporating  ways to improve the resolution even more but for me it's great as is. They are still working on the lighting and B4Bs built in lighting is functional but not right yet. A few posts back ACEfantastic2 has uploaded a lighting rig that can be used and at some point one will be incorporated into B4B.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    8 hours ago, AP said:

    Is there a way I can increase the resolution even further? (I did use the Super-Sampling)

    This kind of depends on what you actually want to improve.  Increasing the actual in-game resolution beyond what an HD render gives you (i.e., zoom 6) isn't possible.

    If your concern is the sharpness of details, you can try applying a post-process sharpening filter in the compositor.  My light rig has this, however it is disabled by default (you need to unmute the node by selecting it and pressing M.)  If don't want to use my rig, I'd still recommend using the Diamond Sharpen node with a very low value, somewhere around 0.1-0.15.  (Box sharpen tends to introduce severe ringing even at very low values, which is undesirable.)

    If your concern is the jagged edge aliasing, I _think_ it's possible to use DXT3 or DXT5 in the day view to allow for soft edges.  You'd need to build the SC4Model yourself in that case.  I'm not sure if that Just Works, or if there are additional tweaks needed to enable blending on the draw.  I'm also not sure how exactly SC4 manages its draw order, which becomes quite important with blending.  IMHO this is a "only when absolutely necessary" type of thing, only needed when you have subpixel silhouette details like thin wires.  (Also note that my light rig automatically thresholds alpha, so if you want a soft alpha output you'd need to bypass the block labeled "Alpha Clip" in the compositor.)

    • Like 5

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


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

    Did a test render with glass to compare/contrast with BAT4Max glass.

    As a (more or less) texturing novice... how best to replicate 3DSMax results? I'm aware that the distortion bumpmap is overscaled relative to other BATs, but that's very easy to fix—am thinking more about IOR, reflection tint/distance, anisotropy, transparency and whatever other settings are necessary.

    68dff109733c2_ScreenShot2025-10-03at11_03_47AM.jpg.dc0ef152f39b387207fc319e3d5de777.jpg


      Edited by kaimai  
    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, kaimai said:

    Did a test render with glass to compare/contrast with BAT4Max glass.

    As a (more or less) texturing novice... how best to replicate 3DSMax results? I'm aware that the distortion bumpmap is overscaled relative to other BATs, but that's very easy to fix—am thinking more about IOR, reflection tint/distance, anisotropy, transparency and whatever other settings are necessary.

    68dff109733c2_ScreenShot2025-10-03at11_03_47AM.jpg.dc0ef152f39b387207fc319e3d5de777.jpg

    I actually have a full 2-3 tutorials I'm in the process of writing talking about how to do various glass things well in Blender.  It is... nontrivial, unfortunately.

    Here's the highlights:
    - Make sure to use Transmission to make glass transparent, not Alpha.  (Alpha represents 'cutout', i.e., where the material doesn't exist, which is different from the material being present but transparent.)
    - Use Light Path to switch to a Transparent BSDF for shadow rays; otherwise, all glass will cast opaque shadows and the interior of buildings will be very dark (https://docs.blender.org/manual/en/latest/render/cycles/optimizations/reducing_noise.html#render-cycles-reducing-noise-glass-and-transp-shadows)
    - You need geometry for both sides of the window, not just the front face.  Otherwise, it will render as if the entire interior of the building is solid glass, instead of a thin pane.  To do this easily, make sure all glass is part of its own separate object, and use the Solidify modifier to add about 0.05-0.1m of thickness.  (Disable rim fill to avoid z-fighting issues with the window frames.)
    - The most accurate way to do tinted glass is to have the Base Color set to white (with Value somewhere between 0.8-1.0, depending on how dark you want the interior to be), and apply the tint in the Coat layer.  This models the real-world approach of a thin layer of tinted plastic laid over the underlying glass.  The only time you should have the color applied to the base color for glass is to simulate something like stained glass.
    - Almost all modern architectural glass is soda-lime glass, with an IOR of 1.52.  The most common exterior coating is PET, with an IOR of 1.575.  (So tinted glass will have a base IOR of 1.52 and a coat IOR of 1.575.)

    Example of the kind of results I'm getting by doing these things:
    clamped.png.6c899c8ecb62eff4e4fd2233ea96bc44.png

    I plan to post at least the first round of tutorials in a new thread this weekend, I'll go over things in more detail then.  Fortunately this is something you only have to figure out once, and you can reuse the node group from then on.

    • Like 7

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


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

    Hi, just looking for some advice/tips from those who have probably been down the same road many moons ago.
    Using BAT4Blender it's my first BAT/Prop, I started a little too detailed and have been making numerous modifications along the way to retain detail (my security fence was transparent at one stage, just like wire lol).
    The first pic is my max zoom detail and pretty much all my zooms from 1 to 4 look like the other pic at zoom 3. I've added one of PEGs fences for comparison, and I can see they over exaggerated some aspects to retain definition, and their lot still looks like a fence when fully zoomed out. Do I need to simplify things a little bit more? Also, what's the FitZ5 button for, is it to assist here.

    (My fence is the one with the sign on it, rhs fence of each picture.)

     

     

    Zoom6.jpg

    Zoom3.jpg

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, Dono said:

    Hi, just looking for some advice/tips from those who have probably been down the same road many moons ago.
    Using BAT4Blender it's my first BAT/Prop, I started a little too detailed and have been making numerous modifications along the way to retain detail (my security fence was transparent at one stage, just like wire lol).
    The first pic is my max zoom detail and pretty much all my zooms from 1 to 4 look like the other pic at zoom 3. I've added one of PEGs fences for comparison, and I can see they over exaggerated some aspects to retain definition, and their lot still looks like a fence when fully zoomed out. Do I need to simplify things a little bit more? Also, what's the FitZ5 button for, is it to assist here.

    (My fence is the one with the sign on it, rhs fence of each picture.)

     

     

    Zoom6.jpg

    Zoom3.jpg

    The "Fit Z*" button for each LOD level just rescales that particular LOD box to fit the currently visible meshes.

    Mesh fences are hard to render correctly in general, _especially_ at a distance.  Looking at this, I'd say you probably want slightly wider spacing between the wires of the fence mesh, which will keep it from going completely opaque so early.  The wire across the top is too thin to show up at lower LOD; with binary alpha you can't really have a silhouette feature smaller than a pixel that shows up.  You'll need to exaggerate the thickness if you want it to show up.  (Or this may be a case that merits using actual alpha blending instead of DXT1 so you can have subpixel features?  I'm not 100% sure how to set that up though.)

    • Like 1
    • Thanks 1

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


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

    I concur. This might be a case where using DXT3 or DXT5 for FSH compression can be useful, as it allows for semi-transparent pixels. For this, instead of ticking the Post-Processing step, create the final SC4Model by calling fshgen directly with a command such as:

    fshgen import --output model.SC4Model --force --with-BAT-models --semitransparent-materials --format Dxt3 --gid 0xffffffff *.obj *_Day.png

    The important parts are:

    • --format Dxt3 to choose the FSH image compression format which allows for semi-transparency.
    • --semitransparent-materials This alters the S3D material settings to optimize them for semi-transparency (frame buffer blending, alpha threshold, etc.).

    You can also try --format Dxt5 which technically can preserve more of the alpha channel. Though, unless there's really a visible improvement, I'd stick to DXT3 for now, as most tools cannot handle DXT5.

    All of this assumes that the PNGs exported by Blender include all the transparency information, so you may have to disable the alpha-clipping section in Ace's rig. I haven't played with that yet.

    • Like 1

    Share this post


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

    I've been experimenting with improving the sharpening in the compositor and I think I finally have a good result.

    Compare these two Z5 (SD) renders (open both in new tabs and flip back and forth for easy A/B):

    z5_soft.png.4337ac29a3c25f0585024737c14d7979.pngz5_rcas.png.9b524beff5b7b6dc5beacebca2a1670a.png

    Getting sharp results without introducing severe artifacts or aliasing is a bit of a challenge.  I eventually settled on an implementation of AMD's RCAS.  This computes the sharpening amount per-pixel that can be performed without clipping (going below zero or above one), restoring detail in soft areas but avoiding over-sharpening around edges.  There's an additional factor that identifies 'noisy' pixels and reduces the amount of sharpening to keep them from being highlighted.  While that's optional in the original, I have it always turned on because the output from Cycles will usually be a bit noisy, particularly around glass.

    It's about 80 lines in shader code, but unfortunately makes a bit of a mess when expanded to nodes in Blender:
    image.png.8c685f59712a42a15221c5ea3ba6bc82.png

    I'll include this in the next version of my light rig.

    • Like 3

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


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

    I concur. This might be a case where using DXT3 or DXT5 for FSH compression can be useful, as it allows for semi-transparent pixels. For this, instead of ticking the Post-Processing step, create the final SC4Model by calling fshgen directly with a command such as:

    
    fshgen import --output model.SC4Model --force --with-BAT-models --semitransparent-materials --format Dxt3 --gid 0xffffffff *.obj *_Day.png

    You can also try --format Dxt5 which technically can preserve more of the alpha channel. Though, unless there's really a visible improvement, I'd stick to DXT3 for now, as most tools cannot handle DXT5.

    I'd like to try this on the model I made, I did delete it to make adjustments ACEfantastic02 recommended but I just restored it to now keep as a fallback to test any new suggestions/addons/workflow improvements to see effects if any.

    EDIT:

    OK, I just rendered without post processing and have all the separate files, (.obj's and .png's), I'm not sure where to go now (I expected a single .obj file lol)

    @ACEfanatic02Great results, can't wait for the new lighting rig ;) 

    Share this post


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

    Getting sharp results without introducing severe artifacts or aliasing is a bit of a challenge.  I eventually settled on an implementation of AMD's RCAS.

    @ACEfanatic02 How does this compare to the Super-Sampling approach?

    17 hours ago, Dono said:

    OK, I just rendered without post processing and have all the separate files, (.obj's and .png's), I'm not sure where to go now (I expected a single .obj file lol)

    @Dono Each .obj file corresponds to one of the 20 S3D models, i.e. one per zoom and rotation.

    Use fshgen in a command-line terminal, using a command like the one I showed above. I don't know the precise syntax to use on Windows, though. (You may need to replace *.obj *_Day.png by (get-item .\*.obj) (get-item .\*_Day.png) when using PowerShell for example.)

    Share this post


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

    @ACEfanatic02 How does this compare to the Super-Sampling approach?

    Pretty well, actually!  Here's the same building rendered with SSAA and downsampling.  (Caveat:  I used Catmull-Rom because I apparently have an older version of ImageMagick.)  This is without changing the render samples, so it's effectively 4x the samples of the other render:
    z5_ssaa_4xsample.png.42bc5801b946933913d3ecd470f689a7.png
    (I did also try a version where I reduced the sample count accordingly; there's no appreciable difference between the two unless you zoom in a lot.)

    And the RCAS version again for reference:
    z5_rcas.png

    The RCAS version is sharper, and traces only a quarter as many rays (not terribly important here, but potentially a big deal if you have a large building with expensive materials.)  A proper Lanczos downsample might do a bit better, I dunno.  It's also pretty clear that RCAS oversharpens (particularly around the bricks in the front facade), but it does so in low-contrast areas and effectively 'hallucinates' extra detail.

    • Like 1

    I make the pixels go brrrrrrrrrr...

    she/her

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 10/10/2025 at 4:16 AM, memo said:

    @Dono Each .obj file corresponds to one of the 20 S3D models, i.e. one per zoom and rotation.

    Use fshgen in a command-line terminal, using a command like the one I showed above. I don't know the precise syntax to use on Windows, though. (You may need to replace *.obj *_Day.png by (get-item .\*.obj) (get-item .\*_Day.png) when using PowerShell for example.)

    Ok, I did give up trying to get the script to work, but after failing to improve on my model a gazillion times ( nothing to do with BAT4Blender, just my lack of Bating experience) I tried again and finally got it to work. Before I compare results of my B4B post-processing (ticked) and then manual DXT3 and DXT5 compiling I have a Q?
    In the script/command you posted, the "gid 0xffffffff" part, do I need to change that to the actual group ID of the files B4B created or is it just the command saying to look for this setup. The .obj files have the B4B generated gid that's displayed prerender, the .png files have a different one. 

    Thanks.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 10/12/2025 at 1:23 PM, Dono said:

    In the script/command you posted, the "gid 0xffffffff" part, do I need to change that to the actual group ID of the files B4B created

    Yes, adjust the Group ID accordingly. Note that you can run fshgen --help to get a short explanation of all the options.

    The .obj and .png files have different Type IDs, but usually identical Group IDs.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 09/10/2025 at 4:13 AM, memo said:

    I concur. This might be a case where using DXT3 or DXT5 for FSH compression can be useful, as it allows for semi-transparent pixels. For this, instead of ticking the Post-Processing step, create the final SC4Model by calling fshgen directly with a command such as:

    
    fshgen import --output model.SC4Model --force --with-BAT-models --semitransparent-materials --format Dxt3 --gid 0xffffffff *.obj *_Day.png

     

    Below is the comparison of the Post-Processing and DXT3 files all done in BAT4Blender.Post-Proc_Vs_DXT3.jpg.8a51a39bffaf3743a9c0245d6978bea4.jpg

    Yes, I changed my fence lol, the 3 strands of wire at the top of my original fence was way better with DXT3 and could be seen, if just, at level 3, especially with DXT5, but the overall design failed at the longer zooms.
    As for my new fence above, DXT3 was definitely better in game than that showing in my pics (I just used the sc4 camera and resized in GIMP) The DXT3 shadows through the wire were a standout, especially in zoom 3. There was no obvious difference in zoom 2 down so left those pics out.
    The Post-Processing file was 60kB, DXT3 was 117kB and DXT5 was 125kB...I didn't post the DXT5 pics as there was virtually no difference to DXT3 for this model.
    As you suggested the possibility, DXT5 had some issues, In PIM-X it showed up as a white LOD box but was good in game.
    Obviously in DXT3 without post processing there was no .xml file, but without changing the 'gid' I just did a second render with post-processing enabled to generate one. (Although, I'm yet to get iLive Reader not to crash. After I add it to the model as an unknown file, as soon as I click on the entry in reader to add the tgi for the xml, it crashes)
    It would be nice down the track to have DXT3 with the SD and HD BAT4Blender options *:) 

     

    • Like 6

    Share this post


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

    A bit of quality-of-life feedback, after doing a fair amount of actual BATting now.  None of these are that critical, just things that would be nice to fix:
    - I'm not entirely certain how important the model being exactly centered is.  However, assuming it is important:  recentering a model built up of multiple pieces is a massive pain in Blender.  Could we instead translate the camera according the LOD's center during rendering?  Even being careful to block things out centered, it's easy to end up with an uncentered model just because the depth of detail is different on different sides.
    - The automatic LOD generation doesn't seem to work correctly with collections.  Currently, a collection that is hidden (but whose children are not) will contribute to the bounding box.  Additionally, the generation only seems to account for explicit objects; instances of collections do not count, which is a bit of an annoyance with modular techniques.
    - The Day/Night collections for controlling lighting are nice, but it'd actually be quite useful to have multiple collections for each.  (For example, if you build out a lamp with geometry + lights in a second scene, then instance to the first, AFAICT you can't put just the lights in the Night collection.  Ideally you'd have another Night collection in the other scene to hold those lights and hide both.)  I think checking for all collections with a prefix of `Night_` or whatever might work?  (Or maybe `B4BNight_` to avoid naming conflicts.)
    - Minor bug:  Day / MN / DN setting is not persistent in a file; if you render a night preview, save the file, reload, and preview again immediately, you will get a Day render with night lights on.  (This is easy to work around, just toggling to MN and back works.)  I don't know if this affects actual exports, but it's a bit of a footgun if it does.

    To counterbalance the criticism:  95% of the time B4B Just Works and stays out of my way, which is maybe the highest praise a tool can get.  Good work, @memo!

     

    Still iterating on the next version of my light rig.  Found out you can get a significant quality boost by denoising the extracted night lighting separately from the base image before compositing them together again, so need to backport that to the rig.  Also working on cleaning up the compositor graph in general; I want to pull out some tweak values so you can do things like adjust sharpening and disable alpha clip without digging through tons of nodes.  Hoping to make this easier to work with for people who are not me.

    • Like 6

    I make the pixels go brrrrrrrrrr...

    she/her

    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