Solved Can't seem to make groundmodels work on my asset

Discussion in 'Mod Support' started by krallopian, Feb 12, 2019.

  1. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    793
    Using the tutorial here: https://wiki.beamng.com/Groundmodel_on_static_objects

    Isn't yielding any results. My asset has two textures, one is called "ind_planks1_mat2" and this code doesn't work for me, no matter what I do - reload, delete undelete, assign again, ctrl+L etc..


    Code:
    singleton Material(ind_planks1_mat2)
    {
       mapTo = "ind_planks1_mat2";
       colorMap[0] = "levels/KrallSpace/art/shapes/Imported/ind_planks_01_d.dds";
       normalMap[0] = "levels/KrallSpace/art/shapes/Imported/ind_planks_01_n.dds";
       specularMap[0] = "levels/KrallSpace/art/shapes/Imported/ind_planks_01_s.dds";
       specularPower[0] = "1";
       useAnisotropic[0] = "1";
       groundType = "cobblestone";
       annotation = "BUILDINGS";
       materialTag2 = "east_coast_usa";
       materialTag0 = "beamng";
    };

    As you can see there is cobblestone there but I tried grass, rock, etc.. nothing worked. I'm trying FOR cobblestone though.
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    are you using visual collision mesh or static collision mesh?
    in the last case you need to apply the material the the corresponding faces
     
    • Informative Informative x 1
  3. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    793
    Thanks man, I figured the only thing left to do was attach the material to the collision mesh - but I didn't remember to try that today. When I put the thing to "visible mesh" I just fell right through, so I think my transforms were off. Only tried it on one model, happened to be the first one I made before I understood the work flow.

    That's good to know though, I'll be able to make my wooden bridge sound like a wooden bridge! Thanks man =)
    --- Post updated ---
    Ahhh it's not working still :(

    This is myCustomGroundModel.json file:

    Code:
      "SAND":{
        "staticFrictionCoefficient"  : 0.6,
        "slidingFrictionCoefficient" : 0.6,
        "hydrodynamicFriction"       : 0.02,
        "stribeckVelocity"           : 6,
        "strength"                   : 1,
        "roughnessCoefficient"       : 0.5,
    
        "fluidDensity"               : 12000,
        "flowConsistencyIndex"       : 5000,
        "flowBehaviorIndex"          : 0.25,
        "dragAnisotropy"             : 0.5,
        "shearStrength"              : 12000,
        "defaultDepth"               : 0.15
        "collisiontype"              : "SAND",
        "skidMarks"                  : false,
        "aliases"                    : ["beachsand", "sandtrap", "dirt_road", "RockyDirt", "ind_planks1"]
      },
    The "ind_planks1" is what the material in maya is called, and in the game I call it "ind_planks_01"

    Then there's the materials file in my objects directory:

    Code:
    singleton Material(ind_planks_01)
    {
       mapTo = "ind_planks1";
           groundType = "SAND";
       colorMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_d.dds";
       normalMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_n.dds";
       specularMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_s.dds";
       specularPower[0] = "1";
       useAnisotropic[0] = "1";
       alphaTest = "1";
       alphaRef = "121";
       specularStrength0 = "0.294118";
       materialTag2 = "Industrial";
       materialTag0 = "beamng";
       materialTag1 = "beamng";
       annotation = "BUILDINGS";
    };

    You can see there that I have the material named "ind_planks_01" and it is calling for ground type of SAND. SAND isn't working though for it. So I tried putting "ind_planks_01" in the myCustomGroundModel.json and no luck, so I put "ind_planks1" and still, no luck.

    As far as I'm concerned this SHOULD be working. It doesn't work regardless of whether or not I use the collision model or visible mesh as collision model (both of which are ind_planks1 material in Maya calling for ind_planks_01 in game.)

    Something's . . UP!

    Hep me! :D @thomatoes50
    --- Post updated ---
    I plan on making the bridge "cobbleStone" so that it'll have that nice rumble as you drive across it - that's all I want, sheesh.
    --- Post updated ---
    I changed the materials to include "internalName"

    Code:
    singleton Material(ind_planks_01)
    {
          internalName = "ind_planks_01";
       mapTo = "ind_planks1";
       colorMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_d.dds";
       normalMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_n.dds";
       specularMap[0] = "levels/KrallSpace/art/shapes/ECA/buildings/ind_planks_01_s.dds";
       specularPower[0] = "1";
       useAnisotropic[0] = "1";
       alphaTest = "1";
       alphaRef = "121";
       groundType = "SAND";
       specularStrength0 = "0.294118";
       materialTag0 = "beamng";
       annotation = "BUILDINGS";
    };
    
    
    Trouble is, every time I hit CTRL+L to test it nothing happens, and when I apply the material in the game again it resets the material to no ground type AND adds those stupid extra materialTags.
    --- Post updated ---
    TURNS OUT.

    I needed to restart the game.

    Fixed. I was doing it right, it just needed to be reloaded to take affect!! HOORAY.
    --- Post updated ---
     
  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