Jump to content

10 posts in this topic Last Reply

Recommended Posts

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.

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
  • Original Poster
  • 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

    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

     

    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!  

    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 peterycristi
        Hi all together,
        some may know me from sc4 as i released some buildings there together with the good old german SFBT. But now i focus the little spare time i got on playing cities skylines, as this game gives you all the possibilities that we always wished to have in sc4. Unfortunatelly modding buildings for skylines is a completely different thing than to do for sc4 . So i started to play around a little bit with blender and some weeks later i had a first model. But now what?  Anyone out there to give me some advices for texturing or at least a good tutorial? Every help is welcome to get this model where it belongs...
         
        The model is a lightly changed version of the main building of oslo university. I've never been to norway, but as this building follows the architecture of karl friedrich schinkel i like it a lot and by the way i thought that a european university building could be needed...
         
        saludos
         
        Peter
         

      • By ReshiramLover
        I am having an issue where BAT will not import any 3ds models that has PNG texture files. Most of the time, converting them to jpg works, but this can cause some problems in the model if the model that I downloaded has transparency in those textures. Sometimes the model does not read the loss of transparency and I am fine, but sometimes I get an ugly white into the model.
        This is all because BAT will not import 3ds models with PNG textures. If I try to import a model with PNG textures, nothing happens. Nothing is imported. No error message or anything, it just does not import.
        I was wondering if there is a fix for this?
        I Googled the problem but nothing about this came up. So there has to be a way to get it to read models with PNG textures.
      • By Dreidman
        Hello. There is a problem. That would be clear, I'm making screenshots. I do not understand, how to put the skeleton on a mesh. I did шт the instructions on YouTube, it was a complete garbage. I chose different positions, but 100% of the match did not work out all the same. How to do it right?




    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Season's Greetings!

    xmas popup.jpg

    Thank You for the Continued Support!

    Simtropolis relies mainly on member donations to continue operating. Without your support, we just would not be able to be entering our 15th year online!  You've really help make this a great community.

    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, so that we can help keep bringing SimCity players together to share our creations.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Echange.
    Make a donation and get one or all three discs today!

    stexcollection-header.png

    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