Sim City 4 Devotion Forums

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Tutorials on Custom Content Creation => Topic started by: swat-medic on August 02, 2009, 01:02:35 AM

Title: Custom BAT Preview Background
Post by: swat-medic on August 02, 2009, 01:02:35 AM
I am not sure if this is in the right forum, hopefully it is!  :'(

Here's a small guide on a custom Sc4 BAT Preview background.  I along with a couple others discovered this in my BAT thread at Simtropolis. (http://www.simtropolis.com/forum/messageview.cfm?catid=37&threadid=108428&enterthread=y&STARTPAGE=2#1586822)
 
Ok step one.  Open up your scene or a fresh new one.  Select an inactive viewport such as top, user, right etc. and activate that viewport.    Strike Alt+B on your keyboard or go to view --> Viewport Background.

(http://i444.photobucket.com/albums/qq161/swat-medic/Simtropolis/customsc4previewbg/htcsc4batpb001.jpg)

The viewport background dialogue box appears.  Here you can edit a number of settings, but we're only intersted in one.  The colored box.

Modify it just slightly.


Now, set up your preview.  Draft works fine, south view.

(http://i444.photobucket.com/albums/qq161/swat-medic/Simtropolis/customsc4previewbg/htcsc4batpb004.jpg)

You will notice that it is the same color as the viewport background in the perspective view!   I don't know why, but the BAT does this on its own, you just have to trick it.

Now go back into your viewport background window (Have the top view selcted, or the viewport you used) And change the color a little bit.

(Note, if you need to reset back to the BAT Blue color, use R,G,B 147,156,174.  This will revert the viewport backgrounds to BAT Blue and make it easier on your eyes when you continue modeling.  The only downside to all of this is you will have to manually set the viewport background color to black if you want a black preview background.)


Here I changed the background to white. 

(http://i444.photobucket.com/albums/qq161/swat-medic/Simtropolis/customsc4previewbg/htcsc4batpb006.jpg)


This is useful for ST-posts for a sort of "nno-background" type picture. 

Anywya, you can also set it to a Max-y gray.

(http://i444.photobucket.com/albums/qq161/swat-medic/Simtropolis/customsc4previewbg/htcsc4batpb008.jpg)

Remember.  If you want to change this back to normal, you must manually do so in the viewport background menu.  If you start a new scene/model, and want it back to normal, I advise you to close Gmax (BAT) and restart it.  This will reset gmax and your scene, but not your modified scene.  Unless you didn't save.

Good luck!  Questions/comments/concers are welcome.
Title: Re: Custom BAT Preview Background
Post by: cogeo on August 02, 2009, 03:25:25 AM
Very interesting!

Have you tested if this affects renders/exports too? The reason I'm asking is because one of the big problems in BAT is the aliasing effect at the objects' edges. The texture interacts with the (black) background and causes an awful aliasing effect. This is of course lessened in HD, but not all models could be exported in HD, plus many BATters don't want it.

Autovino on ST suggested turning antialiasing on (3dsmax-only) and then applying the "transparency" settings (which actually activates use of the alphas ingame). But the problem of intermixing with the black background still persists. And black is in no case a "neutral" colour, it has all colour components set to 0! My suggestion was to use a background coloured in about the same (average) colour of the prop, this (combined with the progressive/antialiased alpha) could solve the aliasing problem.

If the object has different textures/colours, using an "average" colour makes no sense, plus antialiasing as far as I know isn't available in gmax. In these cases you could try setting the background to a neutral gray (128,128,128) which would tone down the aliasing a lot, as this blends much easier with almost all lot textures and model materials/maps - the background in the exported .SC4Model file's FSH textures would be gray, not black.

Could you make some test-renders and show us the results? It would be interesting to know.
Title: Re: Custom BAT Preview Background
Post by: swat-medic on August 02, 2009, 10:51:56 AM
Here's a couple of tests.

It doesn't seem to change the results, at any zoom level.

(http://i444.photobucket.com/albums/qq161/swat-medic/Simcity/antialiasiantesting.jpg)
Title: Re: Custom BAT Preview Background
Post by: SimFox on August 15, 2009, 02:32:48 PM
I strongly believe that background should be set to some shade of neutral grey rather than Black, simply because Black doesn't give any realistic estimate of brightness/darkness of the actual render.
Add to this the issue pointed by Cogeo and everyone should see why it is a very good idea to get rid of it.

But the procedure itself and it's let poke it and see what happens approach are a bit off the target imho.

To keep the whole thing constructive here is a simple line of MaxScript code aht could be used in GMAX to change color of render background to any value totally independent of the viewport settings:

backgroundColor = (color 90 90 90)

type it/paste it into MaxListener window - the pink field in the lower left corner of GMAX window and press enter.
This particular settings of RGB -90, 90, 90 will set render background to neutral grey somewhat darker that 50% brightness (that would be 128, 128, 128)