Jump to content
Sign In to follow this  
Cool_Z

Tutorial : How to use alphas for grilles or balconies

7 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hi Cimtizens!

 

 

If you've tried to use alpha maps for your buildings you might have noticed one or two things that you couldn't do with them, or that didn't work.

 

First : alphas are on or off.

 

You can make an alpha map with different shades of grey (fifty... or even more...) but in the game everything under 50% black is transparent, everything over it is visible.

 

Second one : alphas act weird for making balconies railings or grilles... let me show you.

 

 

 

I've built a simple 2m side cube, each side mapped with a simple grille texture. Let's see how it looks like ingame :

 

769606AlphaBalcons01.jpg

 

Not bad... would look good as a balcony... but what happens when we zoom out?

 

588607AlphaBalcons02.jpg

 

Damnit!! What's going on here ???

 

Well as we know there are no half transparencies in the game. As we zoom out the engine averages pixels in the alpha map and the result? When a pixel goes under 50% white alpha it disappears from view.

 

 

But this and the fact that everything from 50 to 100 is invisible made me think... if we don't use black but dark grey for the transparent parts... the averaging will make the grid visible longer.

 

So here we go, experiment N°2

 

We will have four different cubes

 

We will use 3 different alpha maps : one with 100% black, one with 75% and the last one with 52%

 

696386AlphaBalcons03.png533675AlphaBalcons03b.png536464AlphaBalcons04.png

 

The fourth experiment will use the 52% black alpha, but will use a different diffuse map.

The 3 first have a full white diffuse, but the fourth will use a diffuse with black outside of the visible parts, but the white parts will be bigger because the black color will bleed onto the grille.

 

728253AlphaBalcons05.png

 

And now for the results :

 

 

Close-up :

 

738153AlphaBalcons06.jpg

 

Everything's fine but we already notice the grille looks more defined when the black parts of the alpha are not pure black

 

Zooming out :

 

415935AlphaBalcons07.jpg

 

100% black is already dead... 75% starts to look thinner, 52% starts to become solid... 52% plus black outlines looks good

 

 

Zoooooming out again :

 

615649AlphaBalcons08.jpg

 

100% black still dead, 75% looks like a videogame from the 80's, 52% well... looks better... 52% plus black still holding on.

 

 

The last one :

 

207761AlphaBalcons09.jpg

 

100% and 75% dead. 52% has gone pure solid. 52 plus black outlines is just showing the diffuse too but at that distance it looks pretty ok.

 

 

 

 

 

Conclusion : If you want to make a grille (for an opening or a balcony or a fence maybe) do not use 100% black for the solid color. Use 52 (or maybe 51, I tested with 52 because... because) and put an outline of the grille in the diffuse color.

 

For more opened grilles you might want to use a different amount of black (because if the grille goes invisible it will be less noticable and you actually want to make it happen later but you don't want it to become solid.).

 

 

 

Thanks for reading, have fun building.

Cool_Z - Zed68

  • Like 9

Share this post


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

Interesting, I made railings twice and two different types, yet I didn't ran into the "zoom-out issue". Must be because of the relatively high resolutions I used. Really nice tutourial, hoping for more :)

Share this post


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

    Interesting, I made railings twice and two different types, yet I didn't ran into the "zoom-out issue". Must be because of the relatively high resolutions I used. Really nice tutourial, hoping for more :)

     

    Well here I used a full 1024 map for a 2m wide cube... I don't think you can go higher in resolution :D ... the problem is not the size of the map actually, it's all happening at render in the game. I think it was ok for you because the opened parts were the minority of the pic, so the average was already more than 50% visible. Or o the contrary it was avery light grille and it went unnoticed. ;)

    Share this post


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

    Ooh. I checked my model and it actually has this issue. I just didn't even notice it because I thought it is just the effect of regular antialiasing...

    Share this post


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

    The few times I used alphas when modelling for SC4 I just used pitch black and pure white. Never would have thought to change that. Thanks for sharing!

    Share this post


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

    Ooo, nice find! This little experiment will be very, very helpful.

    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

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    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