Textures. How it work?

Discussion in 'Content Creation' started by ✖BETONOMESHALKA✖, Jun 20, 2016.

  1. ✖BETONOMESHALKA✖

    ✖BETONOMESHALKA✖
    Expand Collapse

    Joined:
    Jan 4, 2016
    Messages:
    53
    HI. I have a model of vehicle with textures. Im importing model in game, but i have problems with texturing.. I dont understand how it works. For example, glass. What i need to write in materials.cs? Guide on wiki (http://wiki.beamng.com/Vehicle_Materials) is dark for me..
    When im use color for material (rgba) its WHITE (roof of the car). But my RGBA code is yellow. Wat? Its dont work correctly..
    2016-06-20_23-40-04.jpg

    2016-06-20_23-38-02.jpg

    Can you help me? Thanks!
     
  2. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    • Like Like x 2
  3. ✖BETONOMESHALKA✖

    ✖BETONOMESHALKA✖
    Expand Collapse

    Joined:
    Jan 4, 2016
    Messages:
    53
  4. NaxNir

    NaxNir
    Expand Collapse

    Joined:
    Jan 28, 2014
    Messages:
    618
    I can tell you that for the color, T3D uses decimal for some reason. Just divide it by 255, and round it to 6 decimal places.

    for your yellow:
    Code:
    diffuseColor[0] = "1 0.815686 0.349020 1";
     
  5. MRcrash

    MRcrash
    Expand Collapse
    BeamNG Team

    Joined:
    Dec 12, 2014
    Messages:
    1,231
    Do you have right material name?
    material.JPG
     
  6. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    I haven't made translucent objects before, but I'd assume glass requires the material to have "translucent = 1;".
     
  7. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
  8. ✖BETONOMESHALKA✖

    ✖BETONOMESHALKA✖
    Expand Collapse

    Joined:
    Jan 4, 2016
    Messages:
    53
    Yep. But it dont work!
     
  9. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,400
    Just tested it myself. Make the alpha less than 1. :)
     
  10. NaxNir

    NaxNir
    Expand Collapse

    Joined:
    Jan 28, 2014
    Messages:
    618
    Not sure if this is perfect, (probably terrible :)) but try this:
    Code:
    singleton Material(material)
    {
        mapTo = "material";
        reflectivityMap[0] = "vehicles/common/null.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.dds";
        diffuseMap[1] = "vehicles/common/null.dds";
        specularMap[1] = "vehicles/common/null.dds";
        specularPower[0] = "128";
        pixelSpecular[0] = "1";
        specularPower[1] = "128";
        pixelSpecular[1] = "1";
        diffuseColor[0] = "1 1 1 1";
        diffuseColor[1] = "1 1 1 0.75";
        useAnisotropic[0] = "1";
        useAnisotropic[1] = "1";
        castShadows = "0";
        translucent = "1";
        alphaTest = "1";
        alphaRef = "0";
        dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap";
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    How it looks in-game:
     
  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