A tutorial for more refined render results for filigree models
A_1P_GMAX_Anti-aliasing render and post processing_v1.1.pdf
A_1P_GMAX_Anti-aliasing render and post processing_v1.2.pdf
This tutorial gives a detailed and clear overview how to utilize the anti-aliazing script for GMAX to render models with very delicate details and receive a better looking result in SC4. It is written for advanced modellers who know how to use GMAX and are able to produce sc4models.
The Problem:
I realized that when modelling ships with very fine rigging, the thin lines that are rendered against the environment look very fat when zooming out in the game. After speaking with some of the graphics/gmax/modelling experts from our community this effect appears to be caused by the fact that the game is not really capable of displaying a high level of detail when zooming out because it is unclear how to colour the limited number of pixels to display such detail.
The picture below gives a great example for the effect described above: [1]
The model on the top is rendered with the standard GMAX HD script and when zooming out the rigging and antenna cables turn into a big smudge.
The bottom model has been rendered utilizing an anti-aliasing script and applying some post processing steps afterwards.
[1] All screenshots in this tutorial come from a historic sc4 project and any ship flags have solely historic purpose and do not reflect political opinions. They are showcasing the episode of the 1890s-1920s in Europe and do not contain any prohibited symbols.
The Process:
To get the full benefit of this step it is necessary to apply “transparency” to the sc4model file using tweaker. This step of the process does however create an invisible box around the model that blocks effects in the game. Therefore, a setting of the FSH files in the sc4model-file needs adjustment. The step of applying the changes to the FSH files can be quite time consuming, since larger models can have hundreds of these files that need manual amendment. Through a collaboration in the simtropolis community this last step could be automated and the tutorial has been updated including this method.
The following picture showcases the different stages of this process:

0. upper left: standard GMAX HD render
1. right: render with anti-aliasing script
2. lower left: render with anti-aliasing script and applying model tweaker transparency
Invisible boxes that appear in the game blocking effects like dust (from plopping and demolishing) or waves and ripple effects. These boxes need to be fixed.
The implementation:
-
To run the anti-aliasing script in GMAX you have to replace the BuildingMill script in your gmax/gamepacks/BAT/scripts/ folder. The script can be downloaded here: BuildingMill.ms (EDIT: if the download is not available under this link, find the alternative download at the end of this post)
It is advisable to keep a copy of the original script and follow the instructions on the forum post where you can download the file.
Before rendering it is suggested to turn the render background into a medium grey. To do so you can enter the following in the command line (lower left) in GMAX and confirm with enter: backgroundColor = (color 90 90 90)
-
To apply transparency to the sc4model that has been created this way you have to open the sc4model-file that should have been created in your plugins folder with cogeo’s model tweaker.
1. Open sc4-model file
2. Select opened model
3. Select Transparency (ALT+T)
4. Select option Set for all zoom levels
5. Confirm with OK (a confirmation box should pop up)
6. Save the adjusted model file
3. To solve the issue of the invisible boxes the sc4model-file has to be opened in ilive’s reader next.
Here you see a large list of entries on the left.
We care about the S3D files which hold the information about the FSH files. There is an S3D file for each direction and zoom level.
1. Select the S3D file on the left (You will need to go through EVERY S3D file in this list)
2. Select the Mats tab on the upper right
3. Select the first entry in the Mats tab
4. Set the Alpha Func value to greater (You need to repeat 3. and 4. for every entry in the
Mats list)
5. Klick apply on the top after you adjusted each entry in the Mats tab (continue with the
next S3D file in the list on the left) The Mats tabs of different S3D files may contain a
different number of entries, depending on the size of the model, the further out the
zoom level, the less entries.
6. Save the sc4model file (not in this screenshot)
3.2. Automated Process
Cyclone Boom and CorinaMarie kindly invested time to create a LUA script that automates step 3.1. More info about the development of this script can be found here.
To use the script the sc4model has to be opened in Reader 1.5.4. The script can be found here: Lua S3D Script for AP and Barroco Hispano - v0.08.lua. (There is an alternative method of leaving zoom 1&2 unchanged, for this please follow the instructions given in the linked forum post, do not apply transparency to Z1 and Z2 (as per step 2) and use Lua S3D Script for AP and Barroco Hispano - v0.09.lua.)
- Once the model file is opened klick the New Script button
- Insert the code in the textbox
- run the script
- Save the sc4 model file
Now the model is finished and you should have very refined looking details in SC4!
Dedication:
This tutorial could be created after a lot of discussions with community members, personal messages and forum posts. The knowledge has not been acquired by me alone but through collaboration with others. I simply took some time to document these results and explain the process to enable more modellers to use this technique.
I would like to specifically mention and thank @Barroco Hispano and @mattb325 for their expertise and support.
I may not be aware of all people who were involved developing these scripts and methods, so I apologize to anyone I forgot to mention here.
Barroco has used this technique or a similar one with 3dsMAX scripts for a while, that’s why I personally call it The Barroco Method.
Finally, I would like to thank @Dreadnought who is in a continuous collaboration with me and supports me with advice and encouragement!
Finally, a big thank you to @Cyclone Boom and @CorinaMarie who took on the task of automating the tedious process step of amending the FSH files in the post processing.
EDIT: 2022/02/11
After having had a horrendous hard drive crash and realizing the anti-aliasing script was not included in my backup (shame on me) I discovered that sc4 devotion does no longer host the file. I manage to salvage the script from my crashed HD and attached for download directly to this post!
I have not created this script myself, all credit goes to the original poster here!



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 NowCreate an Account
Sign up to join our friendly community. It's easy!
Register a New Account