Jump to content
Jasoncw

BAT - Getting Started Guide / FAQ / Resources / Help

682 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
4 hours ago, Jasoncw said:

The lighting rig is a separate scene which is referenced externally when you're BATing, but it's possible to edit or replace this file. So with gmax anything where you need to change the lights means changing the lighting rig scene.

Hiya Steve, @thecitiescenter i could only find out this one in LEX, dimly remember that have heard of some light/shadow fix of gmax from MAS71 many years ago, but i couldn't find out it right now, maybe Japanese website, i will go to search it.

BSC Caliban - Huge Light Rig

-----

Jason, I'm not sure if i understand your words well, however as you said, it's a scene file which could be edited, then can we fix it (make a backup) by tweaking the parameters of it? 

  • Thanks 3

What is impossible with men is possible with God…!

5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

I've contributed some to Simtropolis

My Emotion

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 

Hi @Jasoncw

I've run a database query, and might either of these two files be what you're looking for?
 

 

 

  • Thanks 3

Quick Links

“SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

Buy me a coffee

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 minutes ago, thecitiescenter said:

@Jasoncw @Raymond7cn @Cyclone Boom Thanks for the info and the links! Theyre all very helpful!  *:yes: 

Hiya Steve, about my link, i found in this thread:

 

@T Wrecks has suggested it to @Ng_pillow, i haven't finished reading and not pretty sure if it's your case, but i thought you could understand it very well, Good Luck! My friend.:}

  • Like 1
  • Thanks 2

What is impossible with men is possible with God…!

5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

I've contributed some to Simtropolis

My Emotion

Share this post


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

Hiya Steve, about my link, i found in this thread:

 

@T Wrecks has suggested it to @Ng_pillow, i haven't finished reading and not pretty sure if it's your case, but i thought you could understand it very well, Good Luck! My friend.:}

Sweet!  Thanks Raymond!  Downloading it now, and will give it a try.

 

  • Like 3

FOLLOW ME ON:
INSTAGRAM

 

Share this post


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

@Jasoncw You mean this?

Spatial_valure.png

Ah, silly me! I thought what @Girafe made was an automata (True3d model), it turns out a Prop. What a mess of my head recently.*:D

Raymond Tractor v4 - Preview 01.jpg

Raymond Tractor v4 - Preview 02.jpg

John Deere tractor i made recently, captured by CB @Cyclone Boom*:blush:

@Jasoncw i ran into issue when using Mental Ray for a render to texture, but no problem with standard texture, here is what i found from web:

Mental Ray (discontinued): For users that aren't quite up to the latest version of Max, Mental Ray can be a decent alternative to Scanline. Mental ray has one big catch - a long-standing issue where any small or long and thin UV islands that render smaller than a pixel Mental Ray will assume to be unimportant and fail to render, unlike other renderers which will just put padding around those sections. This is especially and issue on spheres and chamfered edges. The problem can be partially addressed by supersampling, but this also greatly increases render time.

Anyway, i thought standard texture is enough for automata vehicle, they are so small.:}

Sincerely,

-- Raymond

  • Like 4

What is impossible with men is possible with God…!

5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

I've contributed some to Simtropolis

My Emotion

Share this post


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

    @Raymond7cn You can always manually fix any problems with the texture in photoshop. If I were doing it, I would probably still use mental ray because it's much much better at lighting, and one of the main reasons to use render to texture is to bake in lighting and ambient occlusion and things like that.

    • Thanks 3

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

    Share this post


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

    Hi,

    Does anyone know the changes to be made with Hue, Saturation and Brightness to match an IG texture with a texture in BAT4MAX (for example road)?

    Thanks :)

    • Like 2

    The Floraler

    This is the end, hold your breath and count to ten, feel the earth move, and then...

    * * * * * * * * * * * * * * * * * * * * * * * *

    Share this post


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

    Dear Experts, i have run into two issues with my Lot,

    OCCr76o.jpg

    In zoom level 5 and 6 north view, i got a red spot, it's normal with other views, Then i opened this model with reader:

    fmW1sCO.jpg

    i found out it in group 38, but it seemed doesn't exist in Mats tab and i don't have FSH 000304bb, i can fix it by deleting this group or adding a FSH, however i'm curious about how does it happen?

    -- Edit -- Have fixed it by set another blank fsh in Mats tab.

    Another issue is that when zoom out to level 1(the fartest):

    bVl6SSy.jpg

    In the east and west view (others are normal), the props i put together seemed offset, i have no clue about it, after thought it a while, i wondered is it possible relevant to the manner how i divide the Lod?

    U5zboE9.jpg

    If so, why does it only happen on zoom 1(east, west)? and how to fix it.

    -- Edit -- Just checked zoom 1's s3d with Reader, seems abnormal there:

    FuzDFIs.jpg

    Besides, Concerning the Samples quality, i used SD to render this big model, however some details of light were lost after rendering, Can i improve it by the method Alejo @Barroco Hispano mentioned? Or Enable GI?

    Here is my setting:

    h4p2oIG.jpg

    This is the first time i make such a big model with SD rendering, i'm really lack of experience, Thank you and appreciate any tips.*:blush:

    Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    @Raymond7cn Maybe there is a lot of free space between the geometry and the LOD? The bigger a model, the more problems (it always happens to me when I export my boats).

    That is why I always before exporting a large scene such as a building or a ship, I turn off all the rendering options so as not to waste time rendering and to be able to make sure that all the FSHs are in the correct place (You must be very careful to don't save the scene when you turn off rendering options).

    By the way, you can use "my method" only on fshs that lost quality after export. *:thumb:

    beforeexport.png

    btest1.png

    @Jasoncw Do you know why there is such a big difference in rendering times?

    Antialiasing: 64x64

    80millionpoly.png

    Antialiasing: 1x16

    6CORETEST2.png

    I also rendered it with a standard material (no opacity) but it takes the same time.

    • Like 1
    • Thanks 3

    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


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

    @Barroco Hispano Polygon counts don't matter very much for rendering times, the complexity of the materials and lighting and the amount of sampling that needs to be done is what makes things take a long time. So trees always take a long time.

    • Sad 1
    • Thanks 3

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

    Share this post


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

    I cannot recall exactly all the issues I faced with 3dsmax 2017 but yes there are some small differences between the export of 3dsmax 2012 and 2017 regarding sharpness and color.

    3dsmax 2012 is better but in my case 3dsmax 2017 is more handy so I had to sacrifice a little bit :/

    • Like 2
    • Sad 1

    The Floraler

    This is the end, hold your breath and count to ten, feel the earth move, and then...

    * * * * * * * * * * * * * * * * * * * * * * * *

    Share this post


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

    So the "if maxversion" part is what allows BAT4Max to do different things for different versions of max. I can't find a list of numbers for each version of max, except that 3ds Max 4 is 5000. So I think 11000 is 3ds Max 2008. So it would seem, at least looking at that screenshot, that the issue isn't that BAT4Max treats the different versions of max differently, but that the different versions of max come with different versions of Mental Ray.

    But the important part is the area below where it says "the following pushes the alpha towards white". I would try removing that section to see what happens when the alpha is completely natural.

    If you want to edit it, it seems like it does this math equation to the alpha pixel "local colidx = (newpixels[iw+1].v/256)^0.3 * 256" and if the result (which is colidx) is under 255 but higher than 0, then it gets 1 added to it "[colidx+1]" and if it's not then it's set to 256 (if this part wasn't there, then when it was pure white, 255, if you added 1 to that it become 256 which is out of range). Adding 1 to the alpha value seems like a really tiny change so idk what's really happening there. But you could change it to zero and see what happens ("[colidx+0]").

    To be honest I can't tell what the point of the ^0.3 is in the equation because it seems like the only thing that matters is whether or not the result is more than 0, and ^0.3 wouldn't change that as far as I know. But that equation shows up throughout the file so it seems like it's important and not related to brightening the alpha.

    • Like 1
    • Thanks 3

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

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing STEX Restoration Tracker
     
    6 hours ago, Jasoncw said:

    Adding 1 to the alpha value seems like a really tiny change so idk what's really happening there. But you could change it to zero and see what happens ("[colidx+0]").

    Wait!

    While I haven't the foggiest notion how the script does its magic, I do know in programming that particular [colidx+1] is not adding to the alpha value, but is the location in the data array called gLumPixels. This is where the information of something is stored.

    As an example in Lua we could define a table (which is the equivalent of an array in other languages) like this:

    InfoTable = {}

    That creates an empty array (table) ready to store info. Then we could stuff some values inside of it like this:

    InfoTable[1] = FirstValue
    InfoTable[2] = SecondValue
    InfoTable[3] = ThirdValue

    And so on for however many elements of information we need to store.

    Then in pseudo code:

    LoopIndex = 0
    Loop thru InfoTable, LoopIndex += 1
        print InfoTable[LoopIndex]
    End

    So the first time thru the loop the LoopIndex = 1 and so it would print the value stored in the first element. Second time thru it's the value in the 2nd element and so on. Let's change the code to:

    LoopIndex = 0
    Loop thru InfoTable, LoopIndex += 1
        print InfoTable[LoopIndex+1]
    End

    Now the first time thru the loop it'll take the counting variable LoopIndex's value and add 1 to it. So, first time thru the loop it would print the value of the info in the second element. Second time thru and it would be the value in the 3rd element. And the third time thru we'd have a problem cause at that point LoopIndex + 1 = 4 and there is no 4th element.

    So, again, while I don't know what that script does, changing the [colidx+1] to [colidx+0] is very likely not going to yield what you want. *;)

    Without being able to see all of the code in that script it's difficult to guess what might be needed. However, depending on if there are any else or elseif statements in that structure it'd prolly be better to attempt changing the if (colidx < 255) to if (colidx < 254), but don't even do that because there is likely more code that handles the out of bounds part. I really suspect it'll be the in an else or elseif part that is causing the trouble.

    If that code could be attached I could take a peek at it.

    • Like 2
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    15 minutes ago, CorinaMarie said:

    If that code could be attached I could take a peek at it.

    Hiya Cori, i thought what @Jasoncw and @Barroco Hispano were referring to is this script: CPBuildingMill.ms. you could open it with any text Editor, Hope it helps.*:blush:

    • Like 1
    • Sad 1
    • Thanks 2

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing STEX Restoration Tracker
     

    Thanks, @Raymond7cn *:)

    So, even tho it's in a way later line number, there is a functional called FnExportAllZoomsAndRotations which I suspected is called at some point prior to the part in question. In that function it opens a file called System.bmp and as part of a loop it does gLumPixels = getpixels systembmp (point2 0 0) 256. I suspect that is building the gLumPixels data array with 256 elements.

    Now, not having said System.bmp, I can only guess what it contains, but the part being read is maybe something like a grayscale with values from 0 to 255 or it might be full a RGB range as it progresses for each pixel along the point2 vector. It might even be extracting specific bits of the values. For this, I have no clue what the data being read actually is.

    So, back to those lines in 930 to 971 and it'll be this part in lines 942 to 945:

    else
    (
      newpixels[iw+1] = gLumPixels[256]
    )

    That's the part where because it has already checked if the result of the local colidx = (newpixels[iw+1].v/256)^0.3 * 256 is greater than zero and not less than 255 it then puts the value stored in data element 256 of gLumPixels into the newpixels array.

    That formula is taking whatever value for the pixel in the newpixels array (at location + 1) and dividing it by 256. Then it takes it to the power of 0.3 which makes for a much smaller number. For example, if the answer to that part is 2 then we get 1.23114441334 and if it was 255 we'd get 5.27183797467. Once that is calculated, it then multiplies by 256. It's only after all that is figured out that we move on to the first test (if statement) to check if the answer is more than zero (line 936) and if so then next check to see if it is less than 255 (line 938).

    With that in mind it would be line 944 where it'd be safe to try newpixels[iw+1] = gLumPixels[255]. (Changing the 256 subscript for the location to one prior.)

    If testing the above tweak, the lines 1144, 1179, 1216, 1253, 1283, and 1316 should also be changed to 255 for the subscript.

    Ofc, I have no idea whatsoever if this will give the expected result, but it will at least make it consistent throughout the code. *;)

    • Like 2
    • Thanks 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 minutes ago, CorinaMarie said:

    Now, not having said System.bmp, I can only guess what it contains, but the part being read is maybe something like a grayscale with values from 0 to 255 or it might be full a RGB range as it progresses for each pixel along the point2 vector. It might even be extracting specific bits of the values. For this, I have no clue what the data being read actually is.

    Hiya @CorinaMarie, Sorry that i don't have comp around right now, but i have seen this system.bmp in BAT4MAX directory, it's something like a grey gradual changed line.*:blush:

    • Like 2
    • Thanks 1

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing STEX Restoration Tracker
     
    29 minutes ago, Raymond7cn said:

    Hiya @CorinaMarie, Sorry that i don't have comp around right now, but i have seen this system.bmp in BAT4MAX directory, it's something like a grey gradual changed line.*:blush:

    Sweet. So, I surmised correctly. *:)

    I also just realized that depending on the direction that grayscale goes light to dark or dark to light it might actually be the other else that might need tweaking. Ergo, line 949 which is newpixels[iw+1] = gLumPixels[1] to have a gLumPixels subscript of 2. (And, ofc, all the corresponding lines in the other sections.)

    • Like 3
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    I just realized that "BAT4MAXV5 3ds Max 2014 Gamma Fix" is what causes the gray pixels in the alpha channel to turn whiter *:D

    asdadadasdas.png

    ADXASDASSDFFDGDF.png

     

    Now the question is how to fix the gamma problem without damaging the alpha channel?

     

    • Like 3

    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


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

    I think I fixed the problem I will post pictures tonight. *:thumb:

    All I did was remove the gamma correction from the alpha chanel (I don't know why he applies the gamma correction to the alpha channel xD).

    halodisaper.png

    I think it is now totally safe to use 3ds max 2017 because there are no more problems with BAT4MAX and it renders 50% faster.

    Modified script:

    CPBuildingMill.ms

    • Like 6

    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Scoty's small tinkering
     

    Hello everyone!

    I've made 4 versions of my BAT that I plan to have on the STEX soon. Maxis Night and Dark Night, with a billboard and without one.

    Unfortunately, PIM-X likes to only show the last file in queue. When I create lots and open the lot editor, all 4 files have their original names but all have the

    same building (example: a lot with the name "With Billboard/DarkNight"  ends up with the "No Billboard/MaxisNight" building.

    I read somewhere that it's the IID name that needs to be changed and can be done in reader. Although I do have reader, I don't know how to use it.

    The first image I have attached shows that all four SC4Models are under the folder name (200 W. 40th Street) but only the last one (NoBillboard_MN) version shows up.

    The second image shows you how far I've got in reader, and I don't know where to go from there.Filenamesfiasco.jpg.5b1d6879f6d0a34a076f0f4c601c7973.jpg

    AsfarasIvegot_reader.jpg.fc39e8d6972000ffe8f7ae4a208d5aeb.jpg

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     

    Hi @Urban Abstraction

    This will involve changing the IID format indeed. It does get a bit more complicated than adding random ones for each of the S3D and FSH entries though, because they need to be in incremental order so the game knows which to display for each zoom and rotation.

    If you could zip up and attach the files in a PM, I'll fix this up for you so both the Billboard and No Billboard versions have their own IIDs allocated. Then to keep the MN and DN variants the same, since that will allow people to swap in which one they'd prefer for the night lighting style.

    I can then write up the steps for how to go about this, so it can help you or anyone else looking to re-IID models in future.

    (The reason I suggest via PM is since you may not wish the files to be publicly released yet until they're ready for the STEX. *;) )

    • Like 1
    • Thanks 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


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

    The script doesn't work well with mental ray 2017 because I still get a horrible halo (With the script modified by me it improves a little but you can still see it) that wasn't happening with Mental ray 2012.

    Maybe I'll try to figure out what is going on and if it can be fixed or just give up and leave SimCity 4.

     


    Discord: JLeCoultre#9124

    My Simtropolis BAT Thread

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     

    @Barroco Hispano

    I really hope there can be a solution.

    You do create such impressive BAT models which I'm sure the community would love to see in their cities someday.

     

    23 hours ago, Cyclone Boom said:

    I can then write up the steps for how to go about this, so it can help you or anyone else looking to re-IID models in future.

    And specially written for @Urban Abstraction and anyone else interested, here it now is:
     


    Officially my first new topic ever in the BAT forum! *:party:
    (Yes, I did query the database.)

    • Like 2
    • Thanks 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


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

    Hello, I got a bit of an issue with my latest exported BAT:

     

    it3kaLv.jpg

     

    I remade the LODs completely and re rendered it. Still the issue as above.

    I checked inside the model file the "missing piece" (FSH I guess?) are indeed present....?

    Do I have to redo the LODs again and re render or can it be saved?


    I'll take a quiet life... A handshake of carbon monoxide.

    Share this post


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

    Dear Experts, 

    I have run into this similar issue again.

    WMrNblD.jpg

    As you know i had this issue (post above) when rendering the vertiport, since that abnormal uv map happens on zoom 1, so i could solve it by replacing the problem LOD with zoom 2's LOD, but this time, The abnormal LOD is zoom 5.

    By searching the solution a bit, i found this post in SC4D: 3dsmax7 rendering or LOD-problem

    It seems we have the same issue, 

    1, Small model

    2, From zoom 4 to 1 it seems that the model is okay, a bit unsharp. Only zoom 5 's "S" and "N" Perspective are broken.

    3, I didn't have this issue on my prior models(almost 1 year), It just happened recently after Vertiport, and i couldn't figure out the pattern hidden in there, I just have this issue randomly on my models.

    Then i observed that the black background square seems to be scaled to half size in width when rendering, same as zoom 1 of my vertiport. I have tried many ways to solve it, such as merge the model into a new scene, or rescale world units of Utilities, Or export the whole model to obj or fbx then import it into a new file, But they were all failed. Besides i couldn't find out the extra script of gmax which @SimFox posted in that thread.

    @Jasoncw Hiya Jason, This is the issue i was referring to, I couldn't solve it and my project was stuck on this for couple of days. Really looking forward your tips now, Thank you very much!!

    Sincerely,

    -- Raymond

    • Like 1

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    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