Modding Help Can you lighten the shading on background tiles?

Discussion in 'Starbound Modding' started by AmazonValkyrie, Apr 29, 2016.

  1. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    While testing a new tileset, I noticed that they appeared drastically darker in the background and wondered if it were possible to lighten them? An example of one of my tiles is below:

    Code:
    {
      "materialId" : 13559,
      "materialName" : "mkthronewindowupperleftcorner1",
      "particleColor" : [154, 133, 90, 255],
      "itemDrop" : "mkthronewindowupperleftcorner1",
      "description" : "A super star adorns this massive window.",
      "shortdescription" : "Throne Room Window",
      "footstepSound" : "/sfx/blocks/footstep_stone.ogg",
      "health" : 8,
      "category": "materials",
    
      "renderTemplate" : "/tiles/classicmaterialtemplate.config",
      "renderParameters" : {
        "texture" : "mkthronewindowupperleftcorner1.png",
        "variants" : 1,
        "lightTransparent" : false,
        "occludesBelow" : true,
        "multiColored" : false,
        "zLevel" : 2920
      }
    }
    
    The code references the "classicmaterialtemplate.config" file as it's renderTemplate. Upon examination of that file (below), it references shadows, but I wasn't sure what I'd have to manipulate in the .config file to lighten the shading, and was hoping someone might know. Any advice/help is greatly appreciated! ^_^
    Code:
    {
      "pieces" : {
        "topShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [0, 0]
        },
        "leftShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [8, 0]
        },
        "bottomShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [16, 0]
        },
        "rightShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [24, 0]
        },
        "topLeftShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [32, 0]
        },
        "topRightShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [40, 0]
        },
        "bottomLeftShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [48, 0]
        },
        "bottomRightShadow" : {
          "texture" : "/tiles/shadows.png",
          "textureSize" : [8, 8],
          "texturePosition" : [56, 0]
        },
        "base" : {
          "textureSize" : [8, 8],
          "texturePosition" : [4, 12],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "chunk" : {
          "textureSize" : [16, 16],
          "texturePosition" : [0, 8],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "leftTopEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 12],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "leftBottomEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 16],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "rightTopEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [12, 12],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "rightBottomEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [12, 16],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "topLeftEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [4, 8],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "topRightEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [8, 8],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "bottomLeftEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [4, 20],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "bottomRightEdge" : {
          "textureSize" : [4, 4],
          "texturePosition" : [8, 20],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "cornerUL" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 8],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "cornerUR" : {
          "textureSize" : [4, 4],
          "texturePosition" : [12, 8],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "cornerLL" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 20],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "cornerLR" : {
          "textureSize" : [4, 4],
          "texturePosition" : [12, 20],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "innerUL" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 0],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "innerUR" : {
          "textureSize" : [4, 4],
          "texturePosition" : [4, 0],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "innerLL" : {
          "textureSize" : [4, 4],
          "texturePosition" : [0, 4],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        },
        "innerLR" : {
          "textureSize" : [4, 4],
          "texturePosition" : [4, 4],
          "colorStride" : [0, 24],
          "variantStride" : [16, 0]
        }
      },
    
      "representativePiece": "base",
    
      "rules" : {
        "EqualsSelf" : {
          "entries" : [
            {
              "type" : "EqualsSelf"
            }
          ]
        },
        "NotEqualsSelf" : {
          "entries" : [
            {
              "type" : "EqualsSelf",
              "inverse" : true
            }
          ]
        },
        "Shadows" : {
          "entries" : [
            {
              "type" : "Shadows"
            }
          ]
        },
        "NotShadows" : {
          "entries" : [
            {
              "type" : "Shadows",
              "inverse" : true
            }
          ]
        }
      },
    
      "matches" : [
        ["main", [
          {
            "pieces" : [["base", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[1, 0], "NotEqualsSelf"]],
            "subMatches" : [
              {
                "matchAllPoints" : [[[1, 1], "NotEqualsSelf"]],
                "pieces" : [["rightTopEdge", [8, 4]]],
                "subMatches" : [
                  {
                    "matchAllPoints" : [[[0, 1], "NotEqualsSelf"]],
                    "pieces" : [["cornerUR", [8, 8]]]
                  }
                ]
              },
              {
                "matchAllPoints" : [[[1, 1], "EqualsSelf"]],
                "pieces" : [["innerUL", [8, 4]]]
              },
              {
                "matchAllPoints" : [[[1, -1], "NotEqualsSelf"]],
                "pieces" : [["rightBottomEdge", [8, 0]]],
                "subMatches" : [
                  {
                    "matchAllPoints" : [[[0, -1], "NotEqualsSelf"]],
                    "pieces" : [["cornerLR", [8, -4]]]
                  }
                ]
              },
              {
                "matchAllPoints" : [[[1, -1], "EqualsSelf"]],
                "pieces" : [["innerLL", [8, 0]]]
              }
            ]
          },
          {
            "matchAllPoints" : [[[-1, 0], "NotEqualsSelf"]],
            "subMatches" : [
              {
                "matchAllPoints" : [[[-1, 1], "NotEqualsSelf"]],
                "pieces" : [["leftTopEdge", [-4, 4]]],
                "subMatches" : [
                  {
                    "matchAllPoints" : [[[0, 1], "NotEqualsSelf"]],
                    "pieces" : [["cornerUL", [-4, 8]]]
                  }
                ]
              },
              {
                "matchAllPoints" : [[[-1, 1], "EqualsSelf"]],
                "pieces" : [["innerUR", [-4, 4]]]
              },
              {
                "matchAllPoints" : [[[-1, -1], "NotEqualsSelf"]],
                "pieces" : [["leftBottomEdge", [-4, 0]]],
                "subMatches" : [
                  {
                    "matchAllPoints" : [[[0, -1], "NotEqualsSelf"]],
                    "pieces" : [["cornerLL", [-4, -4]]]
                  }
                ]
              },
              {
                "matchAllPoints" : [[[-1, -1], "EqualsSelf"]],
                "pieces" : [["innerLR", [-4, 0]]]
              }
            ]
          },
          {
            "matchAllPoints" : [[[0, 1], "NotEqualsSelf"]],
            "subMatches" : [
              {
                "matchAllPoints" : [[[1, 1], "NotEqualsSelf"]],
                "pieces" : [["topRightEdge", [4, 8]]]
              },
              {
                "matchAllPoints" : [[[-1, 1], "NotEqualsSelf"]],
                "pieces" : [["topLeftEdge", [0, 8]]]
              }
            ]
          },
          {
            "matchAllPoints" : [[[0, -1], "NotEqualsSelf"]],
            "subMatches" : [
              {
                "matchAllPoints" : [[[1, -1], "NotEqualsSelf"]],
                "pieces" : [["bottomRightEdge", [4, -4]]]
              },
              {
                "matchAllPoints" : [[[-1, -1], "NotEqualsSelf"]],
                "pieces" : [["bottomLeftEdge", [0, -4]]]
              }
            ]
          },
          {
            "matchAllPoints" : [[[0, 1], "Shadows"]],
            "pieces" : [["topShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[-1, 0], "Shadows"]],
            "pieces" : [["leftShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[0, -1], "Shadows"]],
            "pieces" : [["bottomShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[1, 0], "Shadows"]],
            "pieces" : [["rightShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[-1, 1], "Shadows"], [[0, 1], "NotShadows"], [[-1, 0], "NotShadows"]],
            "pieces" : [["topLeftShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[1, 1], "Shadows"], [[0, 1], "NotShadows"], [[1, 0], "NotShadows"]],
            "pieces" : [["topRightShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[-1, -1], "Shadows"], [[0, -1], "NotShadows"], [[-1, 0], "NotShadows"]],
            "pieces" : [["bottomLeftShadow", [0, 0]]]
          },
          {
            "matchAllPoints" : [[[1, -1], "Shadows"], [[0, -1], "NotShadows"], [[1, 0], "NotShadows"]],
            "pieces" : [["bottomRightShadow", [0, 0]]]
          }
        ]]
      ]
    }
    
     
  2. sayter

    sayter The Waste of Time

    Those shadows are the shadows blocks cast when hit with light, not their hue/saturation/brightness unfortunately. Some tiles are dark, but as far as I know you can't adjust it. I typically just rework the tile until I'm happy by adjusting its brightness when saving it out.
     
    AmazonValkyrie likes this.
  3. lazarus78

    lazarus78 The Waste of Time

    You can lighten the background blocks, but only all of them, not individual block types.

    In the rendering.config, there is this line:
    Code:
    "backgroundLayerColor" : [128, 128, 128],
    
    You can use that to change the overall color applied over the background blocks, not counting light level.
     
    AmazonValkyrie likes this.
  4. AmazonValkyrie

    AmazonValkyrie Spaceman Spiff

    Thanks for the information, guys! It's greatly appreciated!
     
  5. C0bra5

    C0bra5 Oxygen Tank

    What I did was to create an invisible light that would snap to the foreground though the image will need to have something like 1% opacity
     

Share This Page