Broken textures on my map because of update 0.9

Discussion in 'Content Creation' started by Standeman, Apr 16, 2017.

  1. Standeman

    Standeman
    Expand Collapse

    Joined:
    Jun 23, 2015
    Messages:
    24
    So after the new update, 0.9, quite a lot of the textures in my map just broke. It worked great before the update, what has changed that could have impacted this? And how can I fix it again?


    upload_2017-4-16_0-52-41.png
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,696
  3. Standeman

    Standeman
    Expand Collapse

    Joined:
    Jun 23, 2015
    Messages:
    24
  4. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    So here's the issue: You had assets (be they textures or models) that were mapped to the Dry Rock Island folder. Since this map has been (stupidly imo) pulled from the game, all the links to the textures are broken.

    First and foremost, you must have the DRI textures copied into your art folder of your map. If you don't have them all or didn't do this, download DRI from the repo. Copy the art folder from DRI into your map's art folder, overwrite as necessary.

    For example, in my art/shapes/buildings/materials.cs file (you may have to do this in multiple files), you need to change the dependencies/file mapping to be referenced locally (from your map folder). So, for example, below is a texture mapped to a default folder; dry rock island:

    Code:
    singleton Material(ind_bld_extras2)
    {
      mapTo = "ind_bld__2__extras2";
       diffuseMap[0] = "ind_bld_buildingextras2_d.dds";
       doubleSided = "1";
       translucentBlendOp = "None";
       detailScale[0] = "2 2";
       specularMap[0] = "ind_bld_buildingextras2_s.dds";
       materialTag0 = "beamng";
        useAnisotropic[0] = "0";
    };
    
    So, the game doesn't know where to pull the texture from. The fix is this:

    Code:
    singleton Material(ind_bld_extras2)
    {
      mapTo = "ind_bld__2__extras2";
     ->  diffuseMap[0] = "levels/YourMapHere/art/shapes/buildings/ind_bld_buildingextras2_d.dds";
       doubleSided = "1";
       translucentBlendOp = "None";
       detailScale[0] = "2 2";
    ->   specularMap[0] = "levels/YourMapHere/art/shapes/buildings/ind_bld_buildingextras2_s.dds";
       materialTag0 = "beamng";
        useAnisotropic[0] = "0";
    };
    
    Omit the arrows, of course :)
    
    That covers one issue. Assuming you just copied over everything from the DRI art folder, you'll need to change all the file mappings to be referenced from your folder. In notepad++ or regular notepad, go into every materials .cs and do a find and replace for "dry_rock_island" (no quotes) and replace it with your map name exactly as it's read on the folder. Notepad++ is best because you can use 'Find in Files' and replace every instance of "dry_rock_island" with "/levels/YourMapHere/art/etc.etc./" in seconds

    Hope this helps!
     
    • Agree Agree x 1
  5. blueshift

    blueshift
    Expand Collapse

    Joined:
    Jun 12, 2015
    Messages:
    455
  6. Standeman

    Standeman
    Expand Collapse

    Joined:
    Jun 23, 2015
    Messages:
    24

    I'll go and try doing that then, thanks :)
     
  7. iheartmods

    iheartmods
    Expand Collapse

    Joined:
    Aug 8, 2012
    Messages:
    1,482
    Anytime. Good luck!
     
  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