1. Stuck, Having problems with creating your mod? Let us help you: Mod Support

Solved Unusual Material Mapping error

Discussion in 'Mod Support' started by atomspeed123, Aug 15, 2018.

  1. atomspeed123

    atomspeed123
    Expand Collapse

    Joined:
    Jan 4, 2016
    Messages:
    322
    Hey again,
    While making progress on the Ibishu Blackfoot, the game's been refusing to map any texture after the body's map in the materials.cs file, and throws this error in the lua console:
    (here's one, there are more)
    upload_2018-8-15_14-40-26.png
    The materials are mapped and UVed correctly onto the meshes, and here's the contents of materials.cs:
    Code:
    singleton Material(blackfoot_body)
    {
        mapTo = "blackfoot_body";
        diffuseMap[2] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_c.png";
        specularMap[2] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_s.png";
        normalMap[2] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_n.dds";
        diffuseMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_d.png";
        specularMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_s.png";
        normalMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_n.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.dds";
        normalMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_n.dds";
        specularPower[0] = "128";
        pixelSpecular[0] = "1";
        specularPower[1] = "32";
        pixelSpecular[1] = "1";
        specularPower[2] = "128";
        pixelSpecular[2] = "1";
        diffuseColor[0] = "1 1 1 1";
        diffuseColor[1] = "1 1 1 1";
        diffuseColor[2] = "1 1 1 1";
        useAnisotropic[0] = "1";
        useAnisotropic[1] = "1";
        useAnisotropic[2] = "1";
        castShadows = "1";
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        dynamicCubemap = true;
        instanceDiffuse[2] = true;
    };
    
    singleton Material(blackfoot_rubber)
    {
       mapTo = "blackfoot_rubber";
       diffuseMap[0] = "bl_rubber.png";
       specularPower[0] = "15";
       useAnisotropic[0] = "1";
       castShadows = "1";
       translucent = "0";
       alphaTest = "0";
       alphaRef = "0";
       doubleSided = "0"
    };
    
    singleton Material(blackfoot_dash)
    {
        mapTo = "blackfoot_dash";
        reflectivityMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_s.dds";
        diffuseMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_d.png";
        specularMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_s.dds";
        normalMap[1] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_n.dds";
        reflectivityMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_s.dds";
        diffuseMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_d.png";
        specularMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_s.dds";
        normalMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_dash_n.dds";
        specularPower[1] = "32";
        useAnisotropic[1] = "1";
        diffuseColor[0] = "1 1 1 1";
        specularPower[0] = "32";
        useAnisotropic[0] = "1";
        castShadows = "1";
        translucent = "0";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        cubemap = "global_cubemap_metalblurred";
    };
    
    singleton Material(blackfoot_taillights)
    {
       mapTo = "blackfoot_taillights";
       diffuseMap[0] = "vehicles/common/blackfoot_xj/blackfoot_materials/blackfoot_taillights_d.jpg";
       specularPower[0] = "15";
       useAnisotropic[0] = "1";
       castShadows = "1";
       translucent = "0";
       alphaTest = "0";
       alphaRef = "0";
       doubleSided = "0"
    };
    Even with the textures and models all in vehicles\common\blackfoot_xj , they still do the same thing.
    I'm really not sure how to fix this, and neither are a few others I've asked.
    Thanks in advance.
     
  2. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,585
    Please do this:
    1. Disable all other mods
    2. Load up the game w/ this mod enabled, load a level, spawn this vehicle, close the game
    3. Upload your beamng.log from Documents\BeamNG.drive\
    4. Upload a screenshot of the vehicle w/ it's unmapped textures
     
  3. atomspeed123

    atomspeed123
    Expand Collapse

    Joined:
    Jan 4, 2016
    Messages:
    322
    Well thanks for suggesting that lol, looking in the log myself found a missing ';' at the end of several lines in materials.cs. Putting them in appropriate places fixed this issue.
    My bad! Thanks anyways as ever :D
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice