I am having problems making a map.

Discussion in 'Content Creation' started by adam wiese, Sep 17, 2018.

  1. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    I am currently working on a map and am having problems with texturing. every single time I load up the map something is missing a texture (mostly windows on ecusa buildings)and I fix it by going to the material editor and reasinging the texture that is missing. I am getting very tired of this, now its my oak trees bark texture if anybody can help fix this pleas let me know here are some examples
    this one I have had to fix 4 times textureproblembuildings.png this one I have had to fix 2 times textureproblemdealership.png

    this is the first time this has happened and i dont know how to fix this one textureproblemtree.png

    the map is also having some other problems the vehicle spawner wont save on land no matter how many times bring it up to land and save. this is not really a problem but if anybody can tell me how to put buildings that I make in blender or sketchup on the map WITH texture would be very pleased. and a sorta not problem is it would be very helpful on how to put your map in the mods folder instead of the game files.

    many thanks

    also here is the map put this in c:/ programfilesx86/steam/steamapps/common/beamng/content/levels
    the map is called TiltedRoads but the file is called USA can you also change that to the name of the map the last time I tried renaming the filing all the maps progress was gone so I had to change it back.
     

    Attached Files:

    • USA.zip

      File size:
      311.9 MB
      Views:
      213
    • Like Like x 1
  2. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Material editor does not really work too well, better edit materials.cs files manually.

    It is very likely that editor did add something odd to materials.cs that contains definition of window textures, same did happen recently to Highdef.

    Your best option is to copy each material from materials.cs one by one to new file called materials.cs which you save on some temporary location. After you have done that, you can then copy your old materials.cs to safe place and put your new materials.cs in.

    Path probably is shapes\art\buildings or something like that inside your map folder, where that materials.cs is currently, but you might need to do same to other materials.cs files on your map.

    Materials editor breaks things, never ever click that button which opens it!

    Change textures etc. in materials.cs instead. You can open .dae files in notepad and see what material name they use or open dae in Blender and see what is the name of material to put into mapTo line in materials.cs then just have diffuseMap path set to texture you want to use and diffuseColor to 1 1 1 1, should work much more reliably.
     
    • Like Like x 1
  3. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    I do not understand the whole material.cs and .dae thing. sorry I am really bad at coding. everything looks fine in the code
    upload_2018-9-18_11-47-37.png
     
    #3 adam wiese, Sep 18, 2018
    Last edited: Sep 18, 2018
  4. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Have you tested with window material being set to exactly as east coast? That should work as it is not needed to copy textures etc.
    "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_a.dds";

    Another member had such issue and there was some invisible character in file I believe. Copying material and moving it to top of the file made it to work.
     
  5. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    i deleted all the files in buidings 2 eca and recopyed them from east coast, still not texture. i deleted the .dds file and recopyed, still not texture
     
  6. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Yeah, because it is materials.cs that defines where to look those textures and if you write different path in it than what is in eca, but you have same material names, game can get confused. Also material editor makes some invisible character to materials.cs at times and that prevents anything below that character to be read so essentially you might end up with broken materials.cs which then prevents anything from loading.

    So what I think you should do is to take window texture definition from East coast art/shapes/buildings/eca/materials.cs and use it without changing paths or without using material editor.

    Materials are not defined in your 3d models, only name of material, materials are defined in materials.cs and material editor is broken so that it just makes everything broken.
    --- Post updated ---
    Short course of materials.cs

    Your 3d model (eca house) has name of material set in 3d editor (Blender, max, maya) in this example 3d model has name of material called eca_bld_windows_bare


    So here you can see line mapTo = "eca_bld_windows_bare"; which causes all lines below to be relevant to that material name in your 3d model:
    singleton Material(eca_bld_windows_bare)
    {
    mapTo = "eca_bld_windows_bare";
    diffuseMap[0] = "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_a.dds";
    doubleSided = "0";
    translucentBlendOp = "None";
    normalMap[0] = "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_n.dds";
    specularPower[0] = "1";
    useAnisotropic[0] = "0";
    materialTag0 = "beamng";
    materialTag1 = "building";
    materialTag2 = "east_coast_usa";
    diffuseMap[1] = "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_bare_d.dds";
    cubemap = "BNG_Sky_02_cubemap";
    specularMap[1] = "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_s.dds";
    specularMap[0] = "levels/east_coast_usa/art/shapes/buildings/eca/eca_bld_windows_s.dds";
    specularPower[1] = "1";
    annotation = "BUILDINGS";
    };

    Note that singleton Material(eca_bld_windows_bare) is something game uses internally, if that is same as on some other map, there will be a conflict, afaik.

    You can rename that to singleton Material(eca_bld_windows_bare_yournewname) for example, then you can use different paths to textures.

    However if you use whole that block as it is, it should work, as long as there is no invisible character bug in your map's materials.cs file.
    --- Post updated ---
    Also if mapTo is same as other object that will cause both to have same material definitions applied to them. However in your case, I would not worry about that as you are using objects from east coast, but that singleton material name can cause issues for you in addition to invisible characters in materials.cs file that material editor makes happen.
     
  7. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    ok, is the problem the fact that I named it buildings2 instead of buildlings ? but if i rename that it will delete everything in that was in the file in the game. another question is if i rename singleton material(eca_bld_windows_bare_yournewname) is that the only thing i have to rename or do i have to rename all the files with that name. and the texture is in game but is just not mapped to the window. and i was able to fix the trees(that was just the fact i forget to change names on the manageitemdata.cs . sorry for asking all the questions.
     
  8. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    If you rename singleton material and if you use unedited ECA buildings, it should work with everything in buildings2 directory.

    Material editor might delete something, but you should not even open that, it makes more problems that anything, changing lines in materials.cs is not going to delete anything, but if your stuff is in buildings2 folder and you rename buildings2 to buildings in materials.cs game is is going to find only those textures that are at east coast usa buildings directory.

    However problem can be very well that materials editor has broken materials.cs file, so that nothing gets loaded from the file after some line number.

    To test things out, change only singleton material and make sure to restart game as changes to materials.cs are not loaded automatically.

    It should work then, if not, then that materials.cs is probably broken.
     
  9. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    If you want to use the default textures and you have buildings appearing with the "no texture" thing than most likely you are missing the materials.cs file. If you are using textures from a non-developer map than things get a bit more complicated. Then you have make sure that you have both the .dds files and that the pathnames in the materials.cs file is correct. Many times the materials.cs file will have the pathnames structured differently so you have to make sure the pathnames are correct. If you are using the textures from a developer map then the pathname will be structured as such

    singleton Material(eca_bld_ornate_01_lod1)
    {
    mapTo = "eca_bld_ornate_01_lod1";
    doubleSided = "0";
    translucentBlendOp = "None";
    detailScale[0] = "2 2";
    materialTag0 = "beamng";
    useAnisotropic[0] = "0";
    vertColor[0] = "1";
    materialTag2 = "east_coast_usa";
    materialTag1 = "building";
    diffuseMap[0] = "levels/east_coast_usa/art/shapes/low.png";

    You can see the line at the very bottom has a path to east_coast_usa. So it will automatically go to the ECA folder to get the textures. But custom textures will not do this, so you have to change the pathnames so that it lines up with the folder containing the custom .dds files.
     
  10. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    It also seems that your theTerrain.terrain.json points to hirochi raceway terrain file, also for some reason there is no main folder or items.level.json that usually is inside of main folder.

    So be very careful when moving or removing anything from BeamNG folders, your map files might actually be some other folder than USA folder.
     
  11. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    Alright so i downloaded your map and i just got the template map minus the dirt textures. As @fufsgfen said you have an incorrect pathname for you terrain.json file and you are missing you main folder which contains all of the files to tell the game where to place buildings, vegetation etc. In order to put this map into one .zip file you have to go into "documents/BeamNG.drive/levels" and you will see a folder with your maps name. If you open that it will contain all of folders and the terrain.ter. What you want to do is delete all of the files and folders with the same name in the .zip file thats in the mods folder, and replace them with the folders and files in the "documents/BeamNG.drive/levels". Otherwise it will only work for you and will not work if you were to upload it to the website as a mod. You have to be very careful and go into all of the .json files and make sure that the pathnames line up.

    The main one you need to worry about is the terrain .json. You will see a line that says "datafile". The game will usually change this to something different, so make sure it reads right. I had the hardest time figuring this out the first time i made a map.
     
  12. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    this is a copied file from template map since i couldn't find the files that i needed in ecusa. and the ecusa buildings are a import into the file. the terrain.json is copied with the textures from hirochiraceway and not ecusa because i couldnt the terrain.json in ecusa file. i will try your methods once i get back on my computer.
     
  13. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    Okay so what i always do is start with the template map. I take and create a copy of the template map and place it in the mods folder. Then i rename everything as needed. Once that is done i will copy and paste the folders from the art folder from various maps, usually the ECA map. Again you have to make sure you get everything, if you have an object with a missing texture then you missed something. Then i launch the game and i usually import a custom heightmap. Then i edit things as needed and save them level. Now once you save it, all of the different things that you changed will be copied with the edits you made into "documents/BeamNG.drive/levels". Also while you are in the map editor you can go up to file and click "export heightmap" and it will create several heightmaps and place them into "documents/BeamNG.drive/levels". You can copy these into your .zip file as well.

    Now it gets a bit tricky. As i said earlier you have to replace all of folders and files in the .zip file with the edited folders and files from "documents/BeamNG.drive/levels". The next step would be to go into the various .json files and make sure the pathnames match. I think the problem that you're having is that copied the files from 3 different levels. You don't want to copy the terrain file or the terrain.json from any of those maps because that will overwrite your own files.

    Something else i do is i will always test test test. You want to make sure that everything works before you upload it to the website. What i do is i will go to "documents/BeamNG.drive/levels" and copy everything onto my desktop or somewhere else, i also copy the original .zip file. This will ensure that you have a backup. Next i go to "documents/BeamNG.drive/levels" and delete everything, then i start the launcher and clear the cache. After that i launch the game and if everything is as i left it then i know i'm good. If it spawns my car and there is something missing, like say the terrain then i know i messed up.
     
    #13 rexregum93, Sep 20, 2018
    Last edited: Sep 20, 2018
    • Like Like x 1
  14. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    does this zip file work if you put it in your mods file. and I made sure to try to follow your instructions very carefully. there is still no texture in the windows and i tried renaming the singleton material. note that when load up the level you will spawn under water and will have to look at the sun and go up for some reason every time i move the spawn and save then reload it doesnt save.
     

    Attached Files:

  15. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    In \levels\USA\main\MissionGroup\items.level.json you have this line "terrainFile":"levels/theTerrain2.ter" it is 2nd place where terrain is defined, it currently points to levels/terrain2.ter which probably is your real terrain file. Terrain file in USA folder is fake terrain.

    Spawn points seems not to work unless you edit files manually, I think you needed to copy spawn points from other maps and then move them, but not sure, I have only managed to make maps not to load when attempting to add spawn points, so you might need more experiented one's advice on those.

    I try to see what I find from texture issue later after a nap.
     
  16. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    Ah i was trying to figure out where he went wrong. Thanks i believe @fufsgfen is correct. You will want to change it from levels/theTerrain.ter to levels/USA/theTerrain.ter .I think we need to sort that out first and then we'll talk about the textures.

    Also the spawn point is set way below the ocean. What i usually do i set the terrain to the coordinate 0 0 0 and then adjust the ocean plane accordingly. Then you can adjust the spawn point.
    --- Post updated ---
    I got it to work by changing the pathname in \levels\USA\main\MissionGroup\items.level.json. But i'm still noticing some strange things. You're missing the sand texture and some items seem to be floating over the ocean.
     

    Attached Files:

    • screenshot_00002.png
    • screenshot_00003.png
    • screenshot_00004.png
    #16 rexregum93, Sep 21, 2018
    Last edited: Sep 21, 2018
  17. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    what am i supposed to do without ruining my terrain because if i change the terrain2.ter to terrain.ter in the items.level.json it will mess up my textures and terrain
     
  18. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    So you have two different terrain blocks? That might be the issue. Usually if you create a second terrain block it will be un-drivable. Changing the name of the .ter file should have no effect on your textures.
     
  19. adam wiese

    adam wiese
    Expand Collapse

    Joined:
    Nov 2, 2017
    Messages:
    92
    this is what it is supposed to look like upload_2018-9-21_15-24-2.png upload_2018-9-21_15-25-24.png upload_2018-9-21_15-26-13.png , and this is what it looks like when i change the .ter upload_2018-9-21_15-28-40.png upload_2018-9-21_15-29-35.png upload_2018-9-21_15-30-23.png
     
    • Like Like x 1
  20. rexregum93

    rexregum93
    Expand Collapse

    Joined:
    Mar 7, 2018
    Messages:
    58
    I really honestly don't know what happened or what could be done about it. The only thing i could recommend is to start fresh with a totally new map and just follow the steps i gave you earlier. You can try to contact one of the developers or even one of the more experienced map makers if you want to salvage your existing map. I know its a pain to start over but i did it several times early on. Its all a part of the learning process.
     
  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