Vehicle Colour

Discussion in 'Content Creation' started by aljowen, Jun 27, 2016.

  1. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    How do I make Chrominess work?



    Code:
    singleton Material(Raven_R60_Body)
    {
        mapTo = "body";
        diffuseMap[2] = "vehicles/common/null.dds";
        specularMap[2] = "vehicles/common/null_s.dds";
        normalMap[2] = "vehicles/common/null_n.dds";
        diffuseMap[1] = "vehicles/common/null_d.dds";
        specularMap[1] = "vehicles/common/null_s.dds";
        normalMap[1] = "vehicles/common/null_n.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null_n.dds";
        normalMap[0] = "vehicles/common/null_n.dds";
        specular[0] = "0.5 0.5 0.5 0.1";
        specular[1] = "0.5 0.5 0.5 0.1";
        specular[2] = "0.5 0.5 0.5 0.1";
        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;
        beamngDiffuseColorSlot = 2;
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
     
  2. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Try removing the following lines, I'm pretty sure they're not needed.
    Code:
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
    "vehicles/common/null_s.dds" doesn't exist, but that's not causing the problem.
     
  3. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Removing them makes no difference.
     
  4. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    "vehicles/common/null_d.dds" doesn't exist either.

    Changing the normalMaps to "vehicles/common/null.dds" seems to fix it.
     
  5. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    That fixes the colours being incorrect. But still no chrominess.

    Is there anything I need to do to the model inside blender in order to allow for glossy paint in game?
     
  6. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Nothing needs doing to the model.
    What if you change diffuseMap[1] to "vehicles/common/null.dds"?
    I'm not sure why it's not working for you.
     
    • Like Like x 1
  7. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Even with setting them all to null.dds there is no change.

    The material is the exact same as used on the sunbust just without the sunburst specific maps. So im not sure it is to do with the materials.cs file.
     
  8. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Maybe someone else knows what's going on. Anyone?
     
  9. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    try to use this

    Code:
       useAnisotropic[3] = "1";
       alphaRef = "255";
       alphaTest = "0";
       dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap";
       doubleSided = "1";
     
    • Like Like x 1
  10. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    That has created a sort of fake metallic effect.
     
  11. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,054
    Have you turned on dynamic reflections ?
     
  12. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Yes, dynamic reflections are enabled and work on all of the default vehicles correctly.
     
  13. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    For a simple body color thats shiny cut a 256x256 square out of the default vehicles C map. I attached one to this post. Put it in your the same folder as your jbeam files
    then make your materials cs like this
    Code:
    singleton Material(insert material name)
    {
        mapTo = "insert material name";
        diffuseMap[2] = "vehicles/insert bodycolor.png location here/bodycolor.png";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.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";
        //diffuseColor[3] = "1.5 1.5 1.5 1";
        castShadows = "1";
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        dynamicCubemap = true;
        instanceDiffuse[2] = true;
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    
     

    Attached Files:

    • bodycolor.png
    • Like Like x 1
  14. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    That didn't work sadly.
     
  15. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Ok, I have pasted the following directly into the materials.cs for my vehicle.
    The Sunburst bodywork materials and R60 bodywork materials are now identical except the mapto.
    Code:
    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";
    Things still aren't working quite right...
     
  16. VeyronEB

    VeyronEB
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,537
    If you're using hte _c file Narwal sent, try making it solid white instead of semi transparent.
     
    • Like Like x 1
  17. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    That last video was 100% using the exact files from the sunburst.
     
  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