Search Unity

Discussion Texture creation workflow for tonemapping

Discussion in 'General Graphics' started by Qriva, Oct 3, 2022.

  1. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Hello, I am curious how people deal with creating textures with ACES tonemapping or some kind of grading.
    The problem is that all textures look differently when in game, sometimes significantly and it might be hard to account these things during creaction.

    Is everyone just using Neutral tonemapping or artists just blindly work on assets? Maybe people use some filters in graphic programs to see what to expect as final result?
    Also does LUT is better to used with Neutral mode?
     
  2. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Tonemapping/ACES is a post process effect. So what i do is create the textures, add them, then test play the scene to see how they look. Now, dont adjust the tonemapping just yet (as it effects the whole scene, overall), but adjust the texture itself to conform to the scene.
     
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    So you just create assets and see how they look as final with all PP and then adjust to fix to scene. Isn't that slow? What if you create some more complex asset with painted things, isn't that a bit problematic if it does not fit the scene?
     
  4. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    Example: you buy an asset off the store or create one, but the textures really dont fit with the other textures in scene, OR when you use PPE, they just dont look right. So you can either change the texture (hue/color, etc.), or adjust shader settings.

    PPE is scene wide, and effects everything, so your only choice is to do the above. I dont understand why this is surprising to you, as its done in all game development teams, you create or tailor your art work (textures) to be conformant to the look of the scene/game. If you were to adjust PPE to just make one object look conformant, the others may look like garbage.
     
    Qriva likes this.
  5. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Well, I don't want to adjust whole scene for assets for sure. It's not like I am surprised, but it still consumes time, so I was wondering if there is some kind of pipeline to reduce this time and make it easier for graphic designer to get it right from beggining.
     
  6. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    In my custom shader I added a light "fudge factor" which multiplies the intensity of the light before lighting is calculated so that I could fix inconsistencies in lightness that I was seeing mixing assets.

    My game is a cartoony style, though. I imagine this sort of thing would work badly in a PBR workflow. You could get everything looking just perfect, but as soon as you wanted to change the lighting conditions in a scene, I'd bet they'd be totally off.

    I understand your frustration, though. I love the way Unity's PBR materials look and I'd love to make a game with them someday. It takes so much longer to author the necessary assets, though.
     
  7. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    The problem is that for example ACES makes huge difference in contrast, it's not possible to just add tint or something as colors are shifted. Most of colors are quite expected, but in some cases, low contrasted differences in color become super obvious.
     
  8. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    You might try enabling ACES in your texture mapping software (Substance or whatever you use).
     
  9. gwyrwasEICC

    gwyrwasEICC

    Joined:
    Mar 1, 2021
    Posts:
    19
    A thing to note with tonemapping is that it's only really designed to be used when HDR rendering is enabled as the tonemappers job is to take the expanded luminance values of an HDR image and fit them into an SDR format while looking better than just clipping anything past 1. Doing this without HDR rendering enabled will make your image washed out due to this conversion. The ACES tonemapper also expects a linear sRGB image so you should change your project's color space to linear in the player settings under other.

    While ACES does perform grading on the individual color channels rather than just based off the pure luminance of the image, there shouldn't be drastic shifts in color as the transfer function was developed to generally avoid that. It can however cause other color grading effects like color adjustments to be exaggerated which can cause some of those drastic shifts in color and as such I tend to get best results from doing color grading with the tonemapper already enabled

    As an example of how an image should look with tonemapping here's a couple of screen shots showing the differences between no tonemapper and ACES with no other post processing. The textures used in this scene are a mix of flat color textures with some normal mapping done in Substance Painter and textures from textures.com

    No Tonemapper
    upload_2022-10-6_15-52-6.png

    ACES
    upload_2022-10-6_15-52-30.png
     
  10. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Linear color space is default in project settings and it was not changed (not 100% sure tho, because can't check right now). However, ACES increases contrast and if something is dark it becomes way darker. By default ACES without any other effects make it look better than neutral, but it feels like it's harder to adjust for some unexpected color shifts.

    I think your image has no drastic changes, because it's quite bright. I downloaded unity's boat attack demo and played a bit with PP and I noticed that changing exposure had huge impact to make both ACES and Neutral look "similar".
    Actually I was really confused what to use as it felt like Neutral is way easier to tweak with other effects.

    I am curious how everyone setups their PP, good practices or order of effects.
     
  11. gwyrwasEICC

    gwyrwasEICC

    Joined:
    Mar 1, 2021
    Posts:
    19
    You would be correct with my scene being rather bright, the lighting setup consists of some spotlights that have intensities ranging from 5 - 10 as well as some bake area lights with an intensity of 350 (so high to compensate for the area lights being on the larger size and perceived brightness decreases as the size of the area light increases)
    Higher light intensities like this are pretty standard when working with HDR rendering because otherwise you're wasting a lot of the headroom that HDR provides and you end up giving the tonemapper a lot less information to work with. I remember watching a GDC talk about lighting in the Frostbite engine and they said their sunlight was somewhere around 15000 nits!

    The reason why Neutral tends to be easier to tweak compared to ACES is because Neutral uses a linear transform function while ACES uses a logarithmic function. So ACES is essentially doing some color grading during the process of converting the HDR image to SDR.

    As for the order of effects, that's defined by Unity so there's not much to change about that unless you want to write your own post process stack, not fun I've tried. An example of this can actually be seen in the Color Lookup override where it tells you that your LUT will be applied after internal color grading and tonemapping if you're in rendering in HDR
     
  12. gwyrwasEICC

    gwyrwasEICC

    Joined:
    Mar 1, 2021
    Posts:
    19
    And I almost forgot to mention, ACES was developed by the film industry so while it's great for getting that cinematic look it's not always the best choice for games! I think this might be only available in HDRP but it is possible to set the tonemapper to use a custom curve like the GT tonemapper described on slide 124 of this presentation from the studio that made Gran Turismo
    http://cdn2.gran-turismo.com/data/www/pdi_publications/PracticalHDRandWCGinGTS_20181222.pdf

    This presentation also goes over a lot of useful info about HDR, WCG, and different tonemappers so I'd highly recommend skimming through it!
     
    Qriva likes this.