Singleton Materials

Discussion in 'Content Creation' started by triumph1200, Nov 8, 2019.

  1. triumph1200

    triumph1200
    Expand Collapse

    Joined:
    Sep 7, 2019
    Messages:
    39
    In the following example from the wiki page;

    singleton Material("sunburst.skin.custom")
    {
    mapTo = "sunburst.skin.custom";
    colorPaletteMap[2] = "vehicles/sunburst/sunburst_skin_custom_palette_uv1.dds";
    overlayMap[2] = "vehicles/sunburst/sunburst_skin_custom.dds";
    diffuseMap[2] = "vehicles/sunburst/sunburst_c.dds";
    specularMap[2] = "vehicles/sunburst/sunburst_s.dds";
    normalMap[2] = "vehicles/sunburst/sunburst_n.dds";
    diffuseMap[1] = "vehicles/sunburst/sunburst_d.dds";
    specularMap[1] = "vehicles/sunburst/sunburst_s.dds";
    normalMap[1] = "vehicles/sunburst/sunburst_n.dds";
    diffuseMap[0] = "vehicles/common/null.dds";
    specularMap[0] = "vehicles/common/null.dds";
    normalMap[0] = "vehicles/sunburst/sunburst_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;
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    };

    The normalMap is repeated multiple times, as are others.
    normalMap[2] = "vehicles/sunburst/sunburst_n.dds";
    normalMap[1] = "vehicles/sunburst/sunburst_n.dds";
    normalMap[0] = "vehicles/sunburst/sunburst_n.dds";

    What is this effect on materials?
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Nothing pretty much.
    The engine only uses the normal map that is in layer [0].
    The rest is useless/not used.
     
    • Informative Informative x 2
  3. triumph1200

    triumph1200
    Expand Collapse

    Joined:
    Sep 7, 2019
    Messages:
    39
    Thanks for the reply. I removed the duplicates and found no difference.
     
  4. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    is it the same for the specular maps?
     
  5. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Nope, specular maps will contribute in all layers.
    Also independently whether the layer is visible or cover from another layer.
     
  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