1. Please be advised of a few specific rules and guidelines for this section.

RELEASED Utility Mod - Fullbright

Discussion in 'Mechanics' started by AlanDavison, Dec 9, 2013.

  1. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    Ahoy there, fellow stargoers, explorers, and beta testers!

    The title of this thread should be fairly self-explanatory, but I'll explain it nonetheless just in case. I made this "mod" (I say "mod" because it only entails changing two values in a configuration file) in order to speed up progression slightly by enabling you to locate ores more quickly for testing purposes. Sure, you could just dupe, but this way will probably never be patched, and keeps more of the core gameplay intact.

    File to change (with Steam in its default location):
    Windows (64-bit): C:\Program Files (x86)\Steam\SteamApps\common\Starbound\assets\lighting.config
    Windows (32-bit): C:\Program Files\Steam\SteamApps\common\Starbound\assets\lighting.config
    Linux: ~/.local/share/Steam/SteamApps/common/Starbound/assets/lighting.config
    Mac: ~/Library/Application Support/Steam/SteamApps/common/Starbound/assets/lighting.config

    Important precursor:
    An update could reset this configuration file. It could even completely change the parameters and values in the engine itself, making your modified version crash the game. Make a backup!


    Code:
    {
      // Used by rendering
      "lighting" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 3,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 32,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 8,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 48,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 9,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 3
      },
    
      // Used for gameplay
      "intensity" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 2,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 16,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 4,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 24,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 4,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 1
      }
    }
    
    The values we're interested in here are "spreadMaxObstacle" in both the "lighting" and "intensity" sections/structs/whatever you want to call them. Handily, the lovely, magical, fantasmical developers have commented the configuration files. Massive props to them!

    Code:
    // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 8,
    
    Note how the values for this parameter differ in both the "lighting" and "intensity" sections. It's set to 8 in lighting, and 4 in intensity by default. Whether this means it's 4 more or double, I don't know. But I'm working on the assumption that it's double.

    By that token, setting the values to 400/200, 800/400, 1600/800 are all acceptable, and work properly. The lower the values, however, the more dark spots you'll notice due to the light flicker from torches. Increasing the distance ambient light can travel through terrain lessens that effect.

    A quick note, however. You may have noticed "pointMaxObstacle", too. From what I've determined, pointMaxObstacle refers to light from your flashlight, i.e. active light that can be moved. This will probably affect glowing particles, or enemies' special attacks that cause a glow, too.

    I've got a video encoding showing me explaining the main parts of this, and demonstrating the effect. I'll edit this post as soon as it's up, but until then, a screenshot:

    [​IMG]

    Video finally here:
     
    Last edited: Dec 11, 2013
    Hokmun, Messiah7 and Affero like this.
  2. Annoctatio

    Annoctatio Pangalactic Porcupine

    Even though I probably won't be using this, it's a really helpful feature. Good job!
     
    Svarr Chanston likes this.
  3. Svarr Chanston

    Svarr Chanston Cosmic Narwhal

    Neat! Thanks for the mod.
     
  4. Kawa

    Kawa Tiy's Beard

    In the first beta release we could just do /fullbright. This is a good replacement.
     
  5. Skippy3

    Skippy3 Pangalactic Porcupine

    'Utility' xD
     
  6. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    Yeah, I've not used it in actual gameplay yet. I'm sure many, many would given the chance, though.

    Why, thank you!

    Ooh, excellent. Hope it comes in handy again. Now I just want someone to mod in a 1x scaling option, though I suspect that won't be covered in all of the plain-text files we have access to.

    Yes, "utility"! Or "incredibly cheaty"... but utility sounds nicer!
     
  7. Med

    Med Phantasmal Quasar

    I agree the way you get ore in the game isn't quite right, but I don't think this is a solution I am interested in checking out.

    The world looks pretty ugly when you take away the nice shadows!
     
  8. Svarr Chanston

    Svarr Chanston Cosmic Narwhal

    I tried this and i have to say, it's really good for serious builders. If you enjoy building then use this mod while you need it! I mean, placing down 500 torches all the time is just inconvenient, moreso if it's underground or massive.
     
  9. Kawa

    Kawa Tiy's Beard

    assets/interface/optionsmenu/optionsmenu.config line 38.
     
    Shadow29live and Svarr Chanston like this.
  10. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    I agree, honestly. I'll only ever be using this for building as someone else said, or if I need to show off something in the rock with absolute clarity.

    If you just want more visibility in the air for building, you could tweak the values for spreadMaxAir instead of spreadMaxObstable. Or do both!

    Well, that's just lovely. Now I want to find the command interpreter (if one exists in the current beta, which I assume one would) and actually re-add a /fullbright command. That would just be the icing on the cake, though.
     
  11. Kawa

    Kawa Tiy's Beard

    If the part where nothing actually calls the spawnItem code is any indication, there isn't.

    By which I mean C++ code.
     
  12. Sorasousha

    Sorasousha Subatomic Cosmonaut

    Is there a way to configure lighting so that it is simplified? I am more interested in getting better FPS than anything else, it seems like anytime I have too many shadows on screen my machine grinds down to 10 FPS which is impossible for fighting against the bone dragon when he spits up lighting sources everyfreakingwhere.
     
  13. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    I've had a quick look around and can't find anything concrete, but I noticed a few perhaps promising options in renderer.config. Problem is the options don't appear to change anything that's noticeable. A second attempt turned up something a little more fruitful, as hideously ugly as it looks.

    READ EDITS! Potentially better config there.

    Code:
    {
      // Used by rendering
      "lighting" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 0.3,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 3.2,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 0.8,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 4.8,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 0.9,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 0.3
      },
    
      // Used for gameplay
      "intensity" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 0.2,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 1.6,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 0.4,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 2.4,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 0.4,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 0.1
      }
    }
    
    A quickly modified lighting.config, simply dividing every default value by 10. It looks horrible, and will make anything indoors or in caves invisible unless directly next to a light source, but at 2560x1440 at 2x scale it seems to drastically improve performance. You could maybe try backing up lighting.config, replacing it with that, seeing if it helps with the lag while fighting it, then go back to your old one.

    I'm really curious to see if I can find anything else to improve performance though, so I'll keep looking!

    Edit: What this does is simply reduce the distance light travels by, well.. 10 times. So if you're in a cave or indoors, you'll be travelling blind. It's workable on the surface, though.

    You could of course try reducing the values by different amounts until you reach a good compromise between performance and hideousness, of course.

    Super edit:
    Ding ding ding! I believe I may have done it.. maybe.

    Code:
    {
      // Used by rendering
      "lighting" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 3,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 32,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 8,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 48,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 0,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 3
      },
    
      // Used for gameplay
      "intensity" : {
        // Number of ambient spread passes.  Needs to be at least spreadMaxAir /
        // spreadMaxObstacle big, but sometimes it can stand to be a bit less and you
        // won't notice.
        "spreadPasses" : 2,
    
        // Maximum distance through empty space that 100% ambient light can pass through
        "spreadMaxAir" : 16,
        // Maximum distance through rock that 100% ambient light can pass through
        "spreadMaxObstacle" : 4,
    
        // Maximum distance through emtpy space that 100% point light can pass through
        "pointMaxAir" : 24,
        // Maximum distance through rock that 100% point light can pass through
        "pointMaxObstacle" : 0,
        // A rock attenuation boost for the first rock that a point light source hits (increases shadow effect)
        // Maximum rock distance will be pointMaxObstacle - pointObstacleBoost
        "pointObstacleBoost" : 1
      }
    }
    
    This config seems to completely disable shadows (at the cost of disabling point lights, such as your flashlight). Let me know if either of these help with your performance. If they do, I might post a mini-guide with these for those suffering from performance problems.
     
    Last edited: Dec 14, 2013
    Svarr Chanston likes this.
  14. Sorasousha

    Sorasousha Subatomic Cosmonaut

    The second lighting option worked brilliantly! I feel like I'm not playing in slow motion anymore! I never really use the flashlight so it being disabled is no biggie.
     
  15. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    Well, that's excellent! I just posted the shadow-disabling as a Steam guide in case it helps anyone else.
     
  16. TommyWelle

    TommyWelle Space Hobo

    Where do i edit this after the last patch where the lightning folder seems to have dissepeared?
     
  17. AlanDavison

    AlanDavison Scruffy Nerf-Herder

    Yeah, it's become a little more involved now. You'll need to extract the assets, edit the file, then re-pack them to do this sort of thing now. You can check out how to do it here, but no guarantees the modifications even work anymore.

    I haven't played Starbound for a little while due to being busy with other things, but once the documentation is out, I'll look into trying to implement this in-game in the form of an item or checkbox, if they've exposed enough internal functions to allow for it.
     
  18. MutantBrides

    MutantBrides Space Hobo

    The mod is still sound, I had it working in FK this week, but after a followup patch my extractor is broken.
     
  19. pezpen

    pezpen Void-Bound Voyager

    what if you dont have a lighting.config file ?????
     
  20. vwert

    vwert Void-Bound Voyager

    you do you go into the win 32 folder and find asset_unpacker run it and after a while there will be a folder in the assets folder named unpacked to pack them again just press asset_packer.
     

Share This Page