Issue - PBR skins not showing up when doing a skinpack

Discussion in 'Bug Reports' started by Daniele Vidimari, Mar 22, 2019.

  1. Daniele Vidimari

    Daniele Vidimari Registered

    Joined:
    Apr 20, 2016
    Messages:
    659
    Likes Received:
    593
    I'm building a skinpack (for the Porsche 911 GT3) for my league following the same steps as always, re-naming the dds files, editing all the VEH files etc.
    So far, i received 8 skins from my drivers, and all of them have only one region, for example:

    6 have a full white region.dds that give them a full opaque look thorugh the json file.
    2 have a full black region.dds that give them a full car paint look through the json file.

    I packed these 8 skins to see if everything is working and this is the result
    Desktop Screenshot 2019.03.22 - 17.21.59.41.png


    Only windows are showing up.

    I knew i had to edit all the json files to put there the right dds names, in the entries "Texture":"xxxxx", and "Texture":"xxxxx_region",
    but, as i tried then, when i create a livery with a single region map these entries are not generated, so rF2 can't load the proper texture, even if they are specified in the veh file.

    The strange thing is that i can see only the skin of my car only if i load it first in the showroom
    Desktop Screenshot 2019.03.22 - 17.31.02.87.png

    So, what i tried then is to add a car with 5 region maps in the skin pack, with the entries "Texture":"xxxxx", and "Texture":"xxxxx_region", in the json file, and it works (an AI is using this car):
    Desktop Screenshot 2019.03.22 - 18.09.20.63.png

    So the step to reproduce the issue is just to add to a skinpack a car with a single region map, so without the entries "Texture":"xxxxx", and "Texture":"xxxxx_region", in the json file.
    I don't know if the issue is the not generated entries or the dds not loaded though.
     
    Last edited: Mar 22, 2019
  2. Daniele Vidimari

    Daniele Vidimari Registered

    Joined:
    Apr 20, 2016
    Messages:
    659
    Likes Received:
    593
    Update

    Today i received 3 other skins from a team, all of them have proper made region.dds, some parts are blue, some red, then green and stickers are white, but still no "Texture":"xxxxx", and "Texture":"xxxxx_region", in the json file...
    I'd like to know what is going on here o_O
    I've taken into account that someone could have submitted something wrong, but but 13 wrong skins so far is a bit too much, i think.

    This is the json file of these 3 skins

    Code:
    "dstBlend":"CUBEAB_ZERO",
      "flags":[
        "CUBEMAT_SPECULAR",
        "CUBEMAT_FRESNELREFLECT",
        "CUBEMAT_FRESNELSPECULAR",
        "CUBEMAT_AMBIENTMAT",
        "CUBEMAT_DIFFUSEMAT",
        "CUBEMAT_SPECLARDIR",
        "CUBEMAT_EMISSIVMAT",
        "CUBEMAT_EMISSIVDIR"
      ],
      "meta":{
        "selectedMaterial":{
          "Blue":"mattePaint",
          "Green":"mattePaint",
          "Red":"mattePaint",
          "White":"vinylShiny"
        }
      },
      "name":"WCCARBODY",
      "parameters":{
        "StandardInfo":{
          "ambientColour":[
            1,
            1,
            1,
            1
          ],
          "blendPercent":1,
          "bumpScale":1,
          "cubeMapFresnel":{
            "Exp":4,
            "Max":1,
            "Min":0
          },
          "diffuseColour":[
            1,
            1,
            1,
            1
          ],
          "emissiveColour":[
            0,
            0,
            0,
            1
          ],
          "refEnhance":0,
          "specFresnel":{
            "Exp":4,
            "Max":1,
            "Min":0
          },
          "specPower":1,
          "specularColour":[
            1,
            1,
            1,
            1
          ]
        },
        "cbMaterialExt":{
          "Alpha":{
            "baseCoatRefractiveIndex":1.66,
            "baseCoatRoughness":0.5,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1.34,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Black":{
            "baseCoatRefractiveIndex":1.73838,
            "baseCoatRoughness":0.7,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1.51079,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Blue":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Green":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Red":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "White":{
            "baseCoatRefractiveIndex":1.45857,
            "baseCoatRoughness":0,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "clearCoatStrength":1,
          "lacquerThickness":0.510709
        }
      },
      "refName":"REFMAP0",
      "shader":"L2IBLCARBODY",
      "sortOffset":0,
      "srcBlend":"CUBEAB_ONE",
      "textures":{ }
    }
    note the code
    Code:
    "meta":{
        "selectedMaterial":{
          "Blue":"mattePaint",
          "Green":"mattePaint",
          "Red":"mattePaint",
          "White":"vinylShiny"
        }
    i don't see any matte pait in these skins, all of them have a standard car paint look.

    EDIT
    never mind this post, all these 3 skins have a lot of errors...
    like, the car dds has been saved in dxt1 - no alpha, region colors are all messed up, blu is not blu, but a strange shade of it, same with red.
    But still, no entries in the json file.
     
    Last edited: Mar 30, 2019
  3. Daniele Vidimari

    Daniele Vidimari Registered

    Joined:
    Apr 20, 2016
    Messages:
    659
    Likes Received:
    593
    UPDATE 2

    I've edited the title because:

    it doesn't matter how many region maps you do, there is still a part of code missing in the json file compared to the old or the official json files.
    This after one of the latest builds.

    The good news is that i managed to solve it, manually, as a workaround.

    This is an example of a json generated with current build:
    Code:
    "dstBlend":"CUBEAB_ZERO",
      "flags":[
        "CUBEMAT_SPECULAR",
        "CUBEMAT_FRESNELREFLECT",
        "CUBEMAT_FRESNELSPECULAR",
        "CUBEMAT_AMBIENTMAT",
        "CUBEMAT_DIFFUSEMAT",
        "CUBEMAT_SPECLARDIR",
        "CUBEMAT_EMISSIVMAT",
        "CUBEMAT_EMISSIVDIR"
      ],
      "meta":{
        "selectedMaterial":{
          "Blue":"mattePaint",
          "Green":"mattePaint",
          "Red":"mattePaint",
          "White":"vinylShiny"
        }
      },
      "name":"WCCARBODY",
      "parameters":{
        "StandardInfo":{
          "ambientColour":[
            1,
            1,
            1,
            1
          ],
          "blendPercent":1,
          "bumpScale":1,
          "cubeMapFresnel":{
            "Exp":4,
            "Max":1,
            "Min":0
          },
          "diffuseColour":[
            1,
            1,
            1,
            1
          ],
          "emissiveColour":[
            0,
            0,
            0,
            1
          ],
          "refEnhance":0,
          "specFresnel":{
            "Exp":4,
            "Max":1,
            "Min":0
          },
          "specPower":1,
          "specularColour":[
            1,
            1,
            1,
            1
          ]
        },
        "cbMaterialExt":{
          "Alpha":{
            "baseCoatRefractiveIndex":1.66,
            "baseCoatRoughness":0.5,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1.34,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Black":{
            "baseCoatRefractiveIndex":1.73838,
            "baseCoatRoughness":0.7,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1.51079,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Blue":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Green":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "Red":{
            "baseCoatRefractiveIndex":1.2136,
            "baseCoatRoughness":0.628113,
            "baseCoatSpecStrength":0.179777,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "White":{
            "baseCoatRefractiveIndex":1.45857,
            "baseCoatRoughness":0,
            "baseCoatSpecStrength":1,
            "clearCoatRefractiveIndex":1,
            "clearCoatRoughness":0,
            "clearCoatSpecStrength":1,
            "lacquerColour":[
              1,
              1,
              1,
              1
            ],
            "metallicFlakeColour":[
              1,
              1,
              1,
              0
            ],
            "metallicFlakeStrength":0,
            "metallicPaintStrength":0
          },
          "clearCoatStrength":1,
          "lacquerThickness":0.510709
        }
      },
      "refName":"REFMAP0",
      "shader":"L2IBLCARBODY",
      "sortOffset":0,
      "srcBlend":"CUBEAB_ONE",
      "textures":{ }
    }
    The code end with this line "textures":{ }

    I un-packed the car-upgrade.mas of the Porsche and looking at one of the json files, i saw that "textures":{ } is replaced by:

    Code:
    "textures":[
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL"
          ],
          "FrameCount":1,
          "MipBias":-1.2,
          "MipLevels":-1,
          "Name":"albedoSpec",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_DIFFUSEMAP",
          "TexChannel":0,
          "Texture":"Fana2alt",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":1,
          "MipBias":0,
          "MipLevels":-1,
          "Name":"damage",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_DIFFUSEMAP",
          "TexChannel":1,
          "Texture":"Porsche_911_GT3R_Damage",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":1,
          "MipBias":-1.2,
          "MipLevels":-1,
          "Name":"region",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_SPECULARMAP",
          "TexChannel":2,
          "Texture":"Fana2alt_Region",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":1,
          "MipBias":-1.2,
          "MipLevels":-1,
          "Name":"aoSpecMask",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_SPECULARMAP",
          "TexChannel":3,
          "Texture":"Porsche_911_GT3R_Body_AOmap",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_RENDERTARGET",
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_REFLECTIONMAPPER",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":1,
          "MipBias":0,
          "MipLevels":-1,
          "Name":"refMapper",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_CUBICMAPPER",
          "TexChannel":4,
          "Texture":"CAR_CUBE_DX9",
          "hasDefault":false,
          "runtime":true
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":1,
          "MipBias":0,
          "MipLevels":-1,
          "Name":"damageNormalMap",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_BUMPMAP",
          "TexChannel":5,
          "Texture":"Porsche_911_GT3R_Damage_Bump",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":0,
          "MipBias":0,
          "MipLevels":-1,
          "Name":"raindropTexture",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_RAINDROPMAP",
          "TexChannel":6,
          "Texture":"32X32FLATN.DDS",
          "hasDefault":false,
          "runtime":true
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_OWNEDBYMATERIAL"
          ],
          "FrameCount":1,
          "MipBias":0,
          "MipLevels":1,
          "Name":"metalFlakes",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_BUMPMAP",
          "TexChannel":0,
          "Texture":"metallicNoise",
          "hasDefault":false,
          "runtime":false
        },
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_OWNEDBYMATERIAL"
          ],
          "FrameCount":1,
          "MipBias":0,
          "MipLevels":1,
          "Name":"irradSpecular",
          "ShaderPass":0,
          "ShadowMipBias":0,
          "StageType":"CUBETST_DEFAULT",
          "TexChannel":0,
          "Texture":"",
          "hasDefault":false,
          "runtime":true
        }
      ]
    
    This is the code which is missing in the json files generated with the current build.

    What i did is simply to copy that, and paste in every json files of my skinpack, of course i had to replace the lines "Texture":"Fana2alt", and "Texture":"Fana2alt_Region", with the proper names of each dds of the skinpack.

    The skinpack is now working
    Cattura.PNG

    The missing code is in the official json files as in the old custom generated ones, if you have made a skin some weeks ago you probably have it, if you have made a skin in these recent days, you don't have it.

    I hope this will help who, as me, is trying to build a skinpack with PBR cars, but i don't understand why this portion of code is missing now.
     

Share This Page