• Moose
  • Announcements

    • Dirktator

      March goal: We're almost there!   03/20/2017

      Hi Community! We're almost there for our March goals!  I just wanted to keep the momentum going so if you are able to help, please donate and get some gifts in exchange! Thanks so much to those who have helped out this month, we really appreciate it.

Illumination map Mod Tools dump problem.

10 posts in this topic

I am new to 3D modelling and not a lot of experience with texture maps.  So it took me a long time to debug a problem with the illumination map output from Mod Tools dump.  I do not think this is necessarily a problem with Mod Tools as it did not happen on the European models I dumped with it.

The problem had first occurred with other models I had modified with Blender.  To isolate the problem, I dumped a couple of asset buildings with Mod Tools and then went straight to the Asset Editor, Import to check out the problem.  No blender processing, I imported the dumped .obj files directly to asset editor.   Below you see the results with the original built-in asset on left side of streets and the Editor imported version of exactly the files that were dumped on the right side of the streets.

At night some of the dumped/imported assets appeared to be randomly ALL lit up at night.  Being a newbie to modeling it took me a while to focus on the illumination map.  In the dumped illumination map almost all the mask value were 225 (= lights ON ALL over).  It should have been 192 for neutral, i.e. no light at night.  Changing the illumination map values from 225 to 192 with my graphics program (Paintshop Pro) fixed it.


Share this post

Link to post
Share on other sites

Do you get that issue for any asset you dump? Or only for vanilla ones? I have a suspicion, that textures are compressed in a different way for vanilla assets. Because when I dumped vanilla traffic lights, I got wrong illumination values but when I dumped my traffic lights from American Traffic Lights I got correct values.

Share this post

Link to post
Share on other sites

When you export from the game using modtools, the textures like illumination, alpha and so on are not as they were imported (I suppose it's because of the way the game imports them in the first place). You have to fix them before reimporting.

Share this post

Link to post
Share on other sites

@Cool_Z I'm not quite agree with you. Latest ModTools version dumps _a, _c, _i, _n, _s maps using the reverse algorithm of how they were imported in the first place. But for some reason dumping _i map leads to different intensities of grey, compared to what they are supposed to be for vanilla assets. At least I only noticed that for vanilla assets. My current guess is that maybe vanilla assets use different texture format compared to custom ones. I'll look more closely into that later.

2 people like this

Share this post

Link to post
Share on other sites

Yeah, the devs certainly used other tools for their buildings... better tools that what we have... (I hope so, or I hope they were paid a lot for their work).

Share this post

Link to post
Share on other sites

They need to be gamma corrected. They have 2.2 gamma applied to them. So you need to do inverse gamma 1/2.2 which is 0.4545 but the game is even dumber than that so you actually need to use 0.44 gamma to get the correct values, no idea why the slight offset. And yeah it's not even for all textures, when I was replacing the vanilla growable buildings, for some reason only the LOD ACI texture needed this gamma correction, nothing else.

Share this post

Link to post
Share on other sites

Thanks for responses guys.  BP’s analysis that it only happens with vanilla assets seems correct.  Did not happen with 2 European blockhouses. 

Am not knowledgeable enough to opine on Ronyx69’s proposed solution.  My workaround of resetting ilum map values for unlit sections is easy enough – once the problem is known! 

BP – I know the feeling of wanting to get it perfect but time may be better spent on all great stuff you do for average users than tweeks for geeks.

BTW – Image below is what I am working on - Trying to re-purpose vanilla L1 2x3 Detached05 to be true attached row houses plopped with Search Box or Move It (copy).  Similar to neighborhoods in NYC outer boroughs.

Rowhouse NYC.jpg

1 person likes this

Share this post

Link to post
Share on other sites

Hi. Thx for modtools and it's dump asset feature, it has been essential in learning how things work! I noticed the same thing as the OP tho... when you dump a CO building, the illumination values are different than they should be. Here is the illumination map for "H5 4x3 Highrise04" as dumped by ModTools:


Where it must be RGB=192, it is instead RGB=225.


Did we ever figure out what's going on here?

Share this post

Link to post
Share on other sites

Incorrect gamma.

I've noticed it's very inconsistent how the game handles gamma for vanilla and/or custom main and lod textures...


To correct that image you need to set the gamma to 0.4545 (which is 1/2.2) but I guess it's still incorrect because the game is weird, if i remember correctly it's 0.44 or something.


The idea behind this is that rendering should be done in linear color space (gamma 1.0). But regular images are gamma 2.2.

So the rendering should take the textures, gamma correct them down to 1.0, render the final image, and then lift the gamma to 2.2. I'm not sure if that's what the game does.

Google "linear workflow" if you want to know more, most modern rendering does this automatically now and users don't have to worry about it.

Besides why would you gamma correct images that contain information like window illumination? That's not even a diffuse texture.


TL;DR: Try gamma 0.4545 or 0.44


1 person likes this

Share this post

Link to post
Share on other sites

0.44 worked perfectly. So glad you figured this out.. I think I will be coming back to this post often. *:thumb:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an Account  

Sign up to join our friendly community. It's easy!  :thumb:

Register a New Account

Sign In  

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By AmiPolizeiFunk
      Hi Simtropolians,
      I'm building my home town, Berlin, with the help of your many mods and assets (I am using 70+ mods and 600+ assets). I started playing Cities:Skylines about 2 months ago and I'm enthused by the activity happening here and in the Steam Workshop. Thank you guys! 
      I'm endeavoring to add some of my own custom assets to the Workshop, but I'm new to the entire process. I'm good at photoshop, but I suck at Blender! I booted blender for the first time last week, so I'm at the rough end of a steep learning curve. You guys have been very helpful to get me over a few stumbling points. Now I'm getting ready to publish a couple of items and I'd like to run them by you first. I'm trying to start simple, but even simple objectives seem to morph into week-long efforts. Please let me know how my work can be improved.
      I've got a Checkpoint Charlie cooking (check my screenshot stream on steam or on twitter, if you're interested), but let's start with the Rosinenbomber from the Deutsches Technikmuseum:

      I found a DC-3 model by Giovanni E and lifted it to the top of the stock library with some prop anarchy:

      I was happy to find a DC-3, but the model has some texture problems (the illumination map is always fully on) because it's an old model and was probably made before After Dark. In wanting to fix the lighting problem, I wound up re-texturing the entire model to specifically be the famous Berlin C-47 "Rosinenbomber," as well as adding some propellers.

      It's starting to look decent in-game, but I still have some shadowing issues that I'm working on around the windows.

      I'd like to improve the body texture so that it looks more silvery and less white in the sun (I'm using PhotoReal3 LUT and Daylight Classic mods).

      Here are my current diffuse and spec maps:

      How would I go about improving the look of the body surface? I'd like it to be more shiny and silvery.
      My next question is, what is a good approach to make the LOD model?
      Thx for looking & thx in advance for your suggestions.
    • By R3V0

      Stadler EC250 ''Giruno''


      Stadler EC250 International Variant
      Bombardier Twindexx - SBB
      Bombardier Twindexx - Chirpy Intercity
      Stadler KISS - BLS 
      Grand Central
      Stadler KISS - SBB
      Stadler KISS - SBB: Props
      Stadler - Glasgow Subway
      Toronto Union Station Complex

      Stadler KISS - GO Transit 
      Stadler KISS - GO Transit: Props
    • By nebuchadnezza
      Finally got the courage and interest to attempt to create some buildings myself. My first building is a 24 story modern art deco (but rather bland) office tower, but when i import it with the asset creator it is totally squeezed together, like all the 24 stories exist but the building is at least only 1/3 of it's height in Blender. 
      Any help :D? 

    • By Exurbanite
      Hey all, this is my first time posting on the C:S forum. Being an architecture student and urban design enthusiast, I have come to love this game and the fruits of its massive modding community. I've decided to dive into asset creation myself a couple weeks ago by learning Blender and model importation into C:S with the ultimate goal of creating a collection of "Main Street"-style American storefront assets.
      After a frustrating week and a half, I successfully uploaded a test model with a diffuse texture a couple days ago into the asset editor. Following tutorials on YouTube and elsewhere, I created a diffuse map via baking, but as you all can see (and I have later found out) this method should only be used for making LODs as the quality in game is pretty bad. Ideally, the model should be textured like this.
      Right now I'm kind of at a loss of what to do next in order to create an acceptable texture map for my first building. My question is how would I make a quality textured UV map in Blender that can be exported directly into the game? Another way to phrase this question is what is the procedure for creating finished UV maps such as these from the author Avanya? Or am I forced to export the UV layouts to gimp/photoshop and texture them there? I know there are many skilled authors with knowledge of Blender modeling and texturing that frequent here, so I ask if at least one could guide me through this rough patch; it would be massively appreciated. 
      Here's a pic of my model's untextured uv map in Blender. What should be my next move?
      Thanks in advance, If I can figure out how to remedy this issue I look forward to contributing to the C:S community.       
    • By Lee Towers
      Hey all! I've been following this forum for a while now and all your amazing creations inspired me to start building assets myself. The first building is almost finished - a 3 track train station, as seen below (props for the person to recognise the station it's based on). I still have a few problems with it though, so bear with me:
      1. The game is creating floors inside the building on its own. There's not even a vertex with the same z-coordinate where it's creating an xy plane inside the building. Is this something that's generated on purpose by the game? The floors are assigned the same textures as the roof of the building. They can be seen through the windows and are positioned about halfway behind the windows.
      2. My sims are not using the third platform. I'm using the single station track with a platform on the left side of the track (relative to the direction it was laid). I thought it had to do with the pedestrian connections that I've laid down, but they are using the second platform which is accessed by the same pedestrian connection.
      3. Speaking of pedestrian connections... I'd much prefer a rendered underground tunnel to the half-assed building I have there now but the game isn't letting me (it pushes the whole model upwards). How do I go about doing that? I know Joak uses them in his train stations, how did he do that?
      Any help regarding one of these questions would me much appreciated! Feedback on the model is also welcome by the way... it's my first time using blender and gimp. The textures aren't final either (mainly the roof and supports need work) but I've yet to learn how to use bump maps.

  • Recently Browsing   0 members

    No registered users viewing this page.