Textures help

Discussion in 'Content Creation' started by crashmaster, Oct 23, 2015.

  1. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,820
    A long time ago i started working on a dodge charger and recently, i got a hold of it.
    The model is a dodge charger from grid 2.
    I can get the textures to work in blender but not in beamng.
    I tried creating a mats.cs from scratch but its not doing anything.
    I cant make the textures work in beamng. just nothing.
    I keep looking through the vanilla cars and the wiki to see what i could be doing wrong but i have no idea.
     
  2. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
    Hi Crashmaster.
    I think the more simple is to copy and paste an existing material.cs and replace the names by the ones that you need.
    For exemple you can use the following lines, they're taken from the moonhawk sedan that i actually use as a base for a mod. So i know it works.

    The most important thing is that your blender model needs a material name that matches the "mapTo" instruction. In the exemple the material is called "my_car_body".
    Then the textures files are associated to this mapTo section.
    I've intentionnaly disabled almost all the lines using "//" marks,
    except the diffuseMap[1], so that you can try to create a "my_car_body_d.dds" and see immediatly if it works (you can use a png at the beginning if you don't know how to create a DDS file)
    Then you can add textures files and have a normal map (_n) , a specular (_s) and even a chrome and a paint color change one (my_car_body_c.dds), and remove the "//" in the beginning of the each corresponding line.

    I hope it's enough clear for you.
    To do a quick step by step :
    - create a "my_car_body" material in Blender (use your own name of course) and assign it to your object
    - make sure that the faces are correctly unwrapped and check it by loading your "my_car_body_d.dds" in the UV map editor
    - then edit the material.cs with the good names and pathes.

    You should see your textures quicly appearing.

    Of course you have to create as many singleton Material sections like this one as you need for the number of textures to be called by the game (engine, wheels, interior, etc...)

    content of the material.cs :

    singleton Material(my_car_body)
    {
    mapTo = "my_car_body";
    //black out the chrome
    /*
    // diffuseMap[2] = "vehicles/my_car/my_car_body_chrome.dds";
    //specularMap[2] = "vehicles/my_car/my_car_body_s.dds";
    //normalMap[2] = "vehicles/my_car/my_car_body_n.png";
    //specularColor[2] = "0.2 0.2 0.2 0.2";
    //diffuseColor[2] = "0.1 0.1 0.1 1.2";
    */
    //diffuseMap[2] = "vehicles/my_car/my_car_body_c.dds";
    //specularMap[2] = "vehicles/my_car/my_car_body_s.dds";
    //normalMap[2] = "vehicles/my_car/my_car_body_n.dds";
    diffuseMap[1] = "vehicles/my_car/my_car_body__d.dds";
    //specularMap[1] = "vehicles/my_car/my_car_body_s.dds";
    //normalMap[1] = "vehicles/my_car/my_car_body_n.dds";
    diffuseMap[0] = "vehicles/common/null.dds";
    specularMap[0] = "vehicles/common/null.dds";
    //normalMap[0] = "vehicles/my_car/my_car_body_n.dds";
    specularPower[0] = "16";
    pixelSpecular[0] = "1";
    specularPower[1] = "16";
    pixelSpecular[1] = "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 = "1";
    alphaRef = "0";
    dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap";
    instanceDiffuse[2] = true;
    materialTag0 = "beamng"; materialTag1 = "vehicle";

    };
     
    • Like Like x 1
  3. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,820
    OMG thank you so freaking much. i didnt assign the model with a material in blender. now its working great.
    screenshot_00090.png
     
    • Like Like x 1
  4. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
    Glad i could help you a bit.
    Interesting project this Charger 500 Daytona.
     
  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