• Moose
  • Announcements

    • Dirktator

      Please help us for June & July   06/20/2017

      This month we're hoping for a little bit of a boost this month or next, in addition to covering the regular bills, we'd love to be able to do some hardware upgrades. STEX Collector's Set gifts can now be sent to you via digital download as well as regular mail if you wish! Every donation dollar goes toward keeping Simtropolis online and humming along. Your contribution is so meaningful, every dollar counts! Hardware Upgrades We've received a recommendation to consider some hardware upgrades to our ageing server. As our website community software improves with more and more features, and as we bolt on additional features such as chat, the increased load to handle all these new toys is taking the server a bit to task. You may have noticed that we'd been forced to temporarily disable the chat as we worked out allocating resources for more optimal performance. Following this, we've applied a number of 'soft' changes such as caching options and experimented with server configurations (nginx as proxy, for example), so the hardware aspect is also an area we'd like to focus on. The last time we upgraded hardware was back in 2012, prior to the release of SC13. Your contribution means a lot! Your donation will go toward helping us to 1.) migrate to a newer server or 2.) at least get some ram/cpu/storage updates and any other infrastructure hardware or services. Donate and Get a Gift or Donate Any Amount Thanks so much! - Dirktator & The Admins
    • Dirktator

      Chat is back...   06/22/2017

      In order to conserve resources, we've disabled the global chatbar at the bottom of the site. Instead, the Chat can be accessed by clicking the top navigation tab. It will launch a new window. If you're not seeing this behavior, try clearing your browser's cache.
sccolin

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.

IlumMapProblem.jpg

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.

Cool_Z and Avanya 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

Judazzz 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:

58b491e51b521_H54x3Highrise04_i.png.e6f72c9995bdba11297c9d4e9b8eeb43.png

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

 

AmiPolizeiFunk 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.
      -Ami
    • By AmiPolizeiFunk
      It was mentioned that this can be done with modtools. How exactly?
       
      If you make a custom Match Day stadium, how do you tell the fans where to sit? 
    • 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.

    • By TransitAuthority
      Welcome! This topic is meant to be a sort of database for my upcoming and future projects, and a place to discuss them. 
      RULES:
      No Profanity Be Respectful to All Keep Posts Relevant to the Topic  
       
  • Recently Browsing   0 members

    No registered users viewing this page.