Jump to content
AP

GMAX render refining and post processing

14 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hello batting community,

I am facing an issue and hope that one or a few of you might know a solution to it.

Description of the problem:

I am trying to give thin lines on models a sharpened and refined appearance in sc4. I know @Barroco Hispano has mastered this trade and a few others have worked on it as well. @mattb325 was so kind to give me a general introduction and enabled me to start with the basics. I am using GMAX to create the models and render them since I have no access to 3dsMax. However, I believe this issue could be solved by ppl using either gmax or 3dsMax since the solution probably lies in the post processing of the sc4model-files.

So far I have accomplished to utilize the gmax anti-aliasing script (1) for my renders and apply the suggested transparency to the sc4model using Model Tweaker (2)

image.png.cc8bb05a1f4d65635360280f3ab429f7.png
(model tweaker settings for transparency (2))

The following shows the result of these steps in Loteditor:

image.png
upper left: standard gmax HD render
right: render with anti-aliasing script (1)
lower left: render with anti-aliasing script and applying model tweaker transparency (2)

The model displayed on the lower left looks great (according to my standards) and is what I wanted to accomplish. However when placing this model in the game the LODs of the model that should be invisivible are blocking wave and ocean animations:
image.png.0b4854bf65440f655afd966003a00117.png

Now this is appearently where the postprocessing of the sc4model file with reader comes into the game. But I am a bit at a loss on how to accomplish to to give the LODs the invisibility they need.
I have tried to tweak the settings of the Mats in the S3D file for the views:

image.png

I have tried removing and adding different flags and applying different levels of the Alpha func, depth func, etc. but none of those settings lead to the desired results. In fact I have the feeling that each setting I can change here affects the model itself and not the clear area of the LODs that need to be affected. (except alpha test)

Actually, I managed to get the model to do what I wish the LODs would do:

image.png.34c82e08a91d11fd1d089f21578ee46c.png
(different vessel, ignore brown box)
I did the following tests

 

Tests for post processing

First I should say, that english is not my first language, so some settings do not necessarily say something to me even when translating the words. Additionally my knowledge in comupter graphics is limited so even common settings are sometimes unknown to me.

  • Removing Flag - Alpha test
    image.png.bb41d5ac5589f59e05780d2418035798.png
    Effect: creates black box around model where LODs are, this might be the most promising setting to adjust since that's where the problems lie
  • Removing Flag - Depth test
    image.png.5fd8b0d94bcf064761599fac6679f750.png
    Effect: creates shadow on model
  • Removing Flag - Backface Culling
    image.png.f34edd6710049679429380151bf9de6c.png
    Effect: no visible effect to me
  • Adding Flag - Framebuffer blending
    image.png.0808503ab03a78d9b78570033be5eac9.png
    Effect: no visible effect to me

I hope that some of our veterans may have an idea to help me with this! ( @Jasoncw, @Diego Del Llano, @korver, @kellydale2003 and of course the gentelemen named above and many others that I might not know!)

If you need further input please let me know!

Kind regards,
AP

  • Like 3

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Topic: Show us What you're Working On
 

After spending a long time researching I realized that there is no solution but that does not mean that we cannot improve the jagged edges a bit.

https://docs.unity3d.com/es/2018.4/Manual/SL-Blend.html

What I do is use the SC4Tweaker to assign the transparency to zoom 5, 4 and 3 then I open the reader and change the parameter "always" to "greater".

unknown.png

That parameter makes SC4 use the alpha channel a little better (That doesn't mean it uses it at 100%). The only problem is that if your BAT is underwater it will just disappear, it will appear transparent. I recommend everyone to use these parameters in all BATs that have antialiasing, even if you think it doesn't do anything.

Maxis parameters:

unknown.png

My parameters:

unknown.png

The improvement may not be spectacular but it is the only thing we can aspire to right now.

myp1.png

 

 

 

 

  • Like 3

Discord: JLeCoultre#9124

My Simtropolis BAT Thread

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Topic: Show us What you're Working On
 

By the way, it seems that that GMAX script generates a very good antialiased alpha channel just like 3DsMax 2012 and that is a problem for Ships that have thin wires (But very good for the rest of BATs)

Normally I export all my BATs with 3dsmax 2012 but I export my boats with Max 2017 with a modified script, that is, I removed the Gamma correction from the alpha channel that @Droric applied in his "BAT4MAXV5 3ds Max 2014 Gamma Fix" but even so, Max 2017 generates a more "whitish" alpha channel which it is good for boats that have thin wires but it is very bad for buildings or trees as it generates a horrible halo (which can be improved using my method).

Unfortunately, I have to recommend that you don't use antialiasing on boats that have thin wires if you don't want them to just disappear.

unknown.png

unknown.png

  • Like 5

Discord: JLeCoultre#9124

My Simtropolis BAT Thread

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, Barroco Hispano said:

    After spending a long time researching I realized that there is no solution but that does not mean that we cannot improve the jagged edges a bit.

    https://docs.unity3d.com/es/2018.4/Manual/SL-Blend.html

    What I do is use the SC4Tweaker to assign the transparency to zoom 5, 4 and 3 then I open the reader and change the parameter "always" to "greater".

    unknown.png

    That parameter makes SC4 use the alpha channel a little better (That doesn't mean it uses it at 100%). The only problem is that if your BAT is underwater it will just disappear, it will appear transparent. I recommend everyone to use these parameters in all BATs that have antialiasing, even if you think it doesn't do anything.

    Maxis parameters:

    unknown.png

    My parameters:

    unknown.png

    The improvement may not be spectacular but it is the only thing we can aspire to right now.

    myp1.png

    Hi Barroco, thanks for the tip! Your models look great indeed, I have always admired them!
    But for your vessels do you not run into the problem of this box around when you place them next to waves?

    image.png.e907e52ab4748abfda0532e553e62bc5.pngimage.png.3a1bfb5b1e6f3d45d6e766f514bf3255.png

    image.png.dfde06fee874d8758a3beb3a0220e428.png

    It seems to just affect "effects" like this ripple effect I have on my ocean, waves on the shore and dust when tearing down a building. @Dreadnought sorry to give the surprise of the bow of this model away ... but I guess it could be for the greater good ;)

    [screenshot removed] you guys will get to see this later in all it's mighty beauty

     

    • Like 3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 minute ago, Barroco Hispano said:

    @AP In my previous answer I tried to explain a bit what I do.

    I thought I reproduced that:

    1. I render with the anti-aliasing script
    2. apply transparency with tweaker to z5, z4, z3
    3. I then set the zooms 5, 4, 3 to greater for the alpha func.

    image.png.0dfb68e0ab3f636796a8249612418caf.png

     

    Did I understand it wrong?

     

    • Like 1

    Share this post


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

    O M G

    I just double checked everything and I think I found the problem is that when I select all FSH files and apply the "greater" it only applies it to the last one!!!

    As you can kind of see in this picture:
    image.png

    one tile DOES actually work (the bow here allows the effect to be seen normally!!!)

     

    • Like 3

    Share this post


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

    @Barroco Hispano ... dude, you are a freaking champion!!!

    THANK YOU SO MUCH!

    I wonder if a script could be written for that? These giant models sometimes have 40 FSH files...

    On the other hand... when I go to equal, the lines cannot be displayed anymore again:

    image.png.4c0350e06f466d00bb1411e187cbda8f.png

    So now I think I understand what you mean with "that's the best we can do"...
     

    • Like 2

    Share this post


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

    haha, crazy...

    Does that mean you would recomment erasing the gamma correction from the GMAX anti-aliasing script as well to get these nice thin lnes for the rigging and railing?

    Or maybe to ask differently, could the script you are using to render ships in 3dsMax also work with GMAX?

    • Like 1

    Share this post


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

    I see, It is quite tricky...
    I tried to apply a trick on the model side: I copied the rigging 3 times and moved it around slightly so the general width is increased, I then gave them different shadings (white/black and grey), ran the render with anti-aliasing and applied the post processing Barroco explained to me.

    The result is displayed below:
    (standard render on the left, my experiment on the right)

    In Z5 and Z4 the lines look more refined which is nice...

    image.png.e4dd72b912bf06963fedadc88c48ead1.png

    image.png.2c3eae1e342a3f8fcee13eb2fe47760a.png

    In Z3, Z2 and Z1 they start to diappear, which I also wanted to achieve rather than the rigging becomming a fat blob like seen on the left model

    image.png.d696b9db46a49be629a622ed073c2c06.png

    image.png.0af17321bc0f8a38c570c2568bc70bdc.png

    image.png.e7d26700d45266cb7e7e08c7cfba9df7.png

    • Like 4

    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