Ambient Occlusion (OSX+Steam)

Discussion in 'Planetary Annihilation General Discussion' started by Aliessil, July 16, 2014.

  1. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    Hi,

    Possibly a question for the devs, but you never know ..

    @tatsujb recommended I try changing the ambient occlusion settings to get some better screenshots. I dug around and found the relevant files I think, but changing the values makes no difference at all (went as low as 0 with no change). I found the files in:

    ~/Library/Application Support/Steam/SteamApps/common/Planetary Annihilation, then right-click PA and choose Show Package Contents, then go to Contents/Resources/media/pa/terrain/*.json

    I'm just checking - is this the correct (and only) location? Has anyone else tried this and had it work?

    Cheers

    P.S. New thread cos I didn't want to pollute the one that Tatsujb made the suggestion in :)
  2. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    The ambient occlusion is a shader file, there shouldn't be anything in the terrain folder, especially not a .json file.

    You want to look at "pa/shaders/sao_*.fs", specifically the sao_blur.fs and sao_include.fs files.

    In sao_blur change these two numbers:
    Code:
    #define SCALE               (1)
    #define R                   (6)
    In sao_include change these two numbers:
    Code:
    #define NUM_SAMPLES (11)
    #define NUM_SPIRAL_TURNS (9)
    Aliessil and someonewhoisnobody like this.
  3. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    Thanks for that, looks good! :) It didn't do quite what expected though - shadows in sunlight look fantastic, but I was also aiming for dark nightsides .... any suggestions?
  4. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
  5. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Aliessil and thetrophysystem like this.
  6. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    I did the stuff in https://forums.uberent.com/threads/awesome-night-bug.60130/page-3#post-935026 .. my opening post in this thread was wondering if I'd changed the right files, cos it didn't make any difference. Also tried toggling FOV (my settings said it was CTRL+J; even tried binding it to a different key to see if that'd help), but all that does is beep at me.

    The other post looks interesting, I'll have another play tomorrow. Been a long day and my brain's fried!

    Cheers for the pointers :)
    Last edited: July 17, 2014
  7. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
  8. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    I changed all 7(?) of them, including the sandbox one which I never use.
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    hmm what line N° ?
  10. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    Ummm ... that's a bit hard to say .. I've pasted it into jsonlint.com but the code and numbers don't quite line up. It's 75ish (on desert.json, at least)..

    Code:
            "ambient": {
                "hdr_intensity”:0,”ldr_intensity”:0,”day_intensity_hdr": 1,
    
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    you're not using Notepad++ or Sublime? fix that. now ;)

    but yeah you're right.

    the problem is FOW. which makes it grey again.

    you don't need FOW for pretty screenshots.

    I'm remaking the remove FOW mod for you.
    Aliessil likes this.
  12. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Done. try this on.

    Unzip to you mods folder (you can open it in pamm options)

    here's my result (with alot of edited values in the biome json) (this only works if there are units on the planet):
    dark.jpg

    Attached Files:

    Aliessil likes this.
  13. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    Hehe I'm on a Mac - I use GVIM or Xcode mainly these days. I'm not a programmer though, those are for Perl scripts (most of the languages I learned at uni are out of date, and were almost all on some variety of UNIX!!). Wouldn't touch Notepad++, I don't like it (and it's not on Macs!).

    Dunno what they're like on Windows but on OSX those *.json files are a single line with no whitespace at all.

    Thanks very much :) I've given it a try, didn't seem to make much difference. I'm now doing a fresh install of PA - wondering if something's gotten confused. Then I'll give it another go :)
    Last edited: July 17, 2014
  14. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    the zip I gave you removes fog of war once your commander is spawned in. no more vision circles, you "see" the whole planet. as a result you get to see your HDR and ambient occlusion changes if any.

    do make sure you're changing the files of the version of the game you are playing (stable or PTE) (the mod, though, will work for either).

    reinstalling PA does not have any effect, contrary to other games.
  15. Aliessil

    Aliessil Active Member

    Messages:
    182
    Likes Received:
    162
    Hehe, removing and reinstalling the game actually worked a treat! PAMM and the mods I've installed are in a different folder, so I reinstalled and everything was just as I left it, except it's all working now :)

    Thanks a million, I'll see what I can do with screenshots now :-D
  16. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    :) no problem! glad I could help! don't forget alpha pgen and team color mods! (saw your latest screenshot :p)

Share This Page