Skin Trouble

Discussion in 'Content Creation' started by Occam's Razer, Sep 8, 2016.

  1. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,267
    Hello,

    I'm having some trouble creating a selectable skin for a custom vehicle. Every attempt has resulted in the correct options to be selected via the parts selector, but the materials keep showing up as either pitch black (if the variable texture is put on layer 0) or completely white (if the texture is on layer 1).

    Code:
    singleton Material(Flag.skins.flag_1)
    {
      mapTo = "Flag.skins.flag_1";
      diffuseMap[1] = "vehicles/myVehicle/flag_1.dds";
       diffuseColor[1] = "1 1 1 1";
       diffuseMap[0] = "vehicles/common/null.dds";
      specularMap[0] = "vehicles/common/null.dds";
      instanceDiffuse[1] = true;
       materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    The above is setup on layer 1. All versions of the skin show up as white, including the default. The material is demo-ed as working inside the material editor. Material references and UV's (only one layer) show up as correct in Blender.
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,697
    It's not skins but skin
     
    • Like Like x 1
  3. SergentFido

    SergentFido
    Expand Collapse

    Joined:
    May 30, 2015
    Messages:
    1,607
    And also the first line must have comas : singleton Material("Flag.skin.flag_1") This is one difference with the regular material the skin takes the place of.
    I spent hours to find why the skins didn't work on my car and it was just those comas i didn't noticed in the tutorials.
     
    • Like Like x 1
  4. Occam's Razer

    Occam's Razer
    Expand Collapse

    Joined:
    Aug 7, 2013
    Messages:
    1,267
    Thank you, thank you both! It's working properly now. Knowing me, I probably wouldn't have noticed those details.
     
    • Like Like x 1
  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