[WIP] Planet Lighting

Discussion in 'Work-In-Progress Mods' started by nixtempestas, August 29, 2014.

  1. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    I was wondering if there was a way to change daytime lighting on a planet.

    I know you can change the ambient light values to darken the night but this has no real impact during the day.

    I find the day side of a planet annoyingly bright, is there any values in the terrain jsons to darken it?

    EDIT: Re-purposing this thread for discussion on the mod in the post below this one.

    EDIT2: v1.3 of the mod released, uses hdr/ldr intensity values instead of diffuse values. feedback welcome as usual.
    Last edited: December 16, 2014
    ace63 and Fr33Lancer like this.
  2. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    nvm, I found it. It is the sun diffuse setting.
    before:
    upload_2014-8-29_13-57-0.png

    after
    upload_2014-8-29_13-59-34.png

    for those who are interested i posted a simple mod for it below, though I haven't checked all planet types to see how it effects it.

    EDIT: Now posted on PAMM (AMD Super Brightness Fix), I recommend getting it there instead, as it will be kept up to date

    Attached Files:

    Last edited: October 1, 2014
  3. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    THANK YOU FROM THE BOTTOM OF MY HEART FOR FIXING THIS ISSUE WHICH ANNOYS ME FROM MONTHS.

    You should post this on PAMM for AMD card users. Name it something like "Lighting fix for AMD users" of something like that.
    Last edited: October 1, 2014
    squishypon3 and Fr33Lancer like this.
  4. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Can't believe I missed it :eek:
    Thanks for bumping this thread ;)
    squishypon3 likes this.
  5. optimi

    optimi Well-Known Member

    Messages:
    572
    Likes Received:
    652
  6. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Looks a bit bland, and planet glow seems much noticeable (I played on a lava planet), but no more pesky blinding lights :)
    squishypon3 likes this.
  7. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    Sure, since there is obvious demand I'll post this to PAMM.

    I'll play with the light settings for the planets a bit to hopefully make it a bit better (right now i just have a blanket sweep change across all planets, which can look a little funny)

    EDIT: Now live on PAMM, AMD Super Brightness Fix
    Haven't done too much monkeying with it, so if anyone sees a biome that looks really weird, let me know and I'll mess with the values.
    Last edited: October 1, 2014
    squishypon3 likes this.
  8. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    I'll take a look at your modifications later and also toy with them. The most important thing to fix is the lava planet lighting. The lava has the right lighting but the over-bright ground was making it very ugly.
    squishypon3 and Fr33Lancer like this.
  9. optimi

    optimi Well-Known Member

    Messages:
    572
    Likes Received:
    652
    You deserve a virtual hug.

    [​IMG]
    squishypon3 likes this.
  10. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    The funny thing about this is, I made this mod just for myself really to compensate for my poor eyesight (exasperated by the AMD issue). Had I known there were so many fully sighted people annoyed by the brightness I would have released this to PAMM and spread the word a long time ago lol.
  11. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Let that be a lesson to you! Always post whatever mod you create! ;)
    Case in point: Dinosaur fix mod (Uber has changed the main menu background since then).
  12. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    You made a mistake with the values, you set everything to :

    Code:
    "diffuse":[0.1,0.2,0.1]
    This gives a blue hue to the lighting.

    Also, not all planets have the same lighting, desert have
    Code:
    "diffuse":[0.8,0.7,0.4]
    but lava has
    Code:
    "diffuse":[1.0,0.4,0.2]
    Comparison between the default and my edited lighting.
    PA 2014-10-01 23-44-58-33.jpg PA 2014-10-01 23-48-41-52.jpg

    PA 2014-10-01 23-46-53-84.jpg PA 2014-10-01 23-50-16-22.jpg

    PA 2014-10-01 23-47-02-15.jpg PA 2014-10-01 23-50-37-60.jpg

    PA 2014-10-01 23-45-25-25.jpg PA 2014-10-01 23-48-52-82.jpg

    I made some edits. I took the original values and divided the numbers by 4 so it keeps the same ratio. I zipped them so you can update the mod.

    However, this doesn't fix the washed out colors, they are still pale. Maybe changing something in the same files will fix it. i'll search tomorrow
    PA 2014-10-01 23-59-54-84.jpg (Feat. Air factory bug where the plane is build totally outside)

    Attached Files:

  13. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    woops, may that be a lesson on not getting distracted halfway through editing the JSONShadow config file lol

    thanks for the edits, I've updated the mod.

    I doubt we can do much about the colours via modding, something like that I suspect is buried in the graphics engine.
  14. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
  15. skypheonix20

    skypheonix20 Member

    Messages:
    70
    Likes Received:
    48
    i too recently had a little play about with the lighting effects as i got annoyed with uber not doing anything about it https://forums.uberent.com/threads/...ight-and-ambient-occlusion-not-working.59000/
    and i wanted to have darker nights but instead of changing *diffuse* i had changed

    "lighting": {
    "sun": {
    "hdr_intensity": 3.5,
    "ldr_intensity": 3.0

    thay were originally

    "lighting": {
    "sun": {
    "hdr_intensity": 10.0,
    "ldr_intensity": 4.0

    to get darker nights i changed

    "ambient": {
    "hdr_intensity": 0.6,
    "ldr_intensity": 0.6,

    i also noticed that having the HDR option on will make colors go dull especially when looking at bright areas as it tries to reduce brightness, i have HDR off because of this.
    just a bit of info that may help sort some of the dull color problem.

    l1.jpg l2.jpg
    e1.jpg e2.jpg

    bare in mind that system editor doesnt include *shroud* so planets and gas giants are slightly darker when playing games.
    Last edited: October 2, 2014
  16. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Moving to WIP mods forum :)
  17. skypheonix20

    skypheonix20 Member

    Messages:
    70
    Likes Received:
    48
    another bug that people have mentioned that when disabling HDR it makes the game unplayable super bright, i just tested it using no brightness mods and yup.

    HDR on HDR on.jpg HDR off HDR off.jpg

    a work around for this is to disable HDR and restart game.

    game restart HDR off.jpg

    as you can see its still too overbright unless you using mods but HDR off stops the color from dulling.
    Last edited: October 2, 2014
  18. teddythebear

    teddythebear Member

    Messages:
    50
    Likes Received:
    21
    I think I know what the actual issue is and the correct way to solve it isn't adjusting the lighting.
    It basically has to do with how more realistic looking games today need to understand how our monitors work and PA does this too but part of it is broken on these cards.
    Our monitors run at 8 bits (per subpixel) and that gives you a total of 256 shades of grey. If I wanted to know which shade is half way between black and white I wouldn't be surprised if you said 128 but in reality it isn't. We also have to take into account how our eyes work and our eyes are more sensitive to differences in darker shades then they are to differences in lighter shades so it wouldn't be a very efficient use of the bits if they were represented as a linear brightness increase on our monitors. This image gives a clear example with alternating black and white stripes down the sides to give an average of 50% grey and the two fields of 128 (too dark) and 187 (matches, or should if your monitor is calibrated correctly) bit values of grey.
    [​IMG]

    So what does this have to do with PA? Basically it comes down to how the lighting calculations are done, they assume all the lighting data is in a linear color space (so 128 would actually be 50% grey) and then after everything is calculated it is converted to the colorspace that our monitors can correctly display. This basically means the image has to be brightened (187 becomes 50% grey), either with the proper conversion or an approximation with a power function.
    Virtually every digital picture has this conversion baked into it's bits already. The textures in PA are authored in this color space too so if the rendering engine doesn't first convert it back to the linear colorspace (make it darker) before performing the lighting calculations and converting it back, then the textures are basically getting color corrected twice and that is why everything is so bright. I think.

    Now you could go and re-author all the textures to be in a linear color space for the time being, but a power function is not a lossless operation and it does degrade the image quality whereas the game engine would convert to a higher precision format internally before the lossy conversions.
    Fr33Lancer likes this.
  19. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Teddythebear you are going to go far, son. O_O
  20. MCXplode

    MCXplode Active Member

    Messages:
    196
    Likes Received:
    28
    Is this mod still being supported?

Share This Page