Hello, I am trying to put together my first map by following all tutorials and sources I could find. I created this thread in order to not spam the forum by making a new one for every single question that arises... So far.... created my own heightmap and textures and put it into BeamNG. The map is based off a copy of Johnson Valley. --- Post updated --- First set of questions I hope someone can help me with: - If I clean the cache of BeamNG, which I occasionally have to do in order to make my ground textures work, all progress of the map is erased and it is put back to its original state. Heightmap is gone, all objects gone, etc. Just the blank map I started with. Is that normal? - If I paint a surface on the map, the ground changes only its visual appearance, not its physics. e.g a car behaves on asphalt as if it was driving on sand (which was on this location in the original johnson valley). The screenshot should make it obvious... car sinks in asphalt, slides about, leaves no skidmarks but creates a lot of sandy dust.... - These textures won´t work. All textures show up correctly except the reflection of some metal roofs. I don´t understand because if I made some mistake by relinking the paths within the material.json file ALL textures of the house would not be working, but apparently the relinking was fine but only the roof is wrong.. how can that be? I get the same problem even on vanilla maps, however there the issue can be fixed by deep cleaning the cache. This does not work on my own map... I hope someone can help here
Hi! I think that's normal and expected. It sounds like the cache clean also resets level edits. When you edit a vanilla map and save changes, any files that are changed are written to <user folder>/levels/<level_name>/<file>. If you unzip the vanilla map, you'll see that it has the exact same file structure. The game overlays any files in your user dir over the files in the steam install dir (with some exceptions). When you cache clean, the game should move your files to a backup directory in the user folder. It pays to be paranoid about backing up your work for beam maps. But the game also has some protection against losing work. I don't generally use cache clean as part of my workflow, so if textures/materials aren't behaving right, there may be another way to address the issue. It sounds like the GroundModel for your TerrainMaterial is set to sand, but the textures are set to asphalt. Hard to say without more information. I'm not sure I understand the issue...sorry... (I would double check on some of this, but I'm away for the holidays and don't have the game with me.)
Thank you for your reply! It is helping me a lot! Ok makes sense. So I will have to move my custom map folder somewhere else while cleaning the cache in the future. The only reason I have to do it is because the game does not read my replaced ground texture that I put into ->levelname/art/terrains unless I do a deep cache clean. I am following the steps from this tutorial (starting from 1:00:00) , the guy apparently has the same problem with the game not reading his ground texture and he then fixes it by cleaning the cache. The weird thing is that deep cleaning the cache did in his case not erase all map progress. The heightmap is still there (see 1:12:50). I did the exact same folder structure/steps etc as shown in the video but my game removes all game progress by cache cleaning and his apparantley doesn´t.. edit: this seems to be a game bug and has nothing to do with my custom map see https://www.beamng.com/threads/text...even-after-cache-clearing.95880/#post-1666407 --- Post updated --- It gets even weirder.. I checked the groundmodels and they are all fine. As a test I set the whole map to asphalt. Now the ground properties partially work. Car leaves skidmarks, BUT in some spots on the map it still sinks into the ground... seriously wtf
my feelings exactly. It sounds like you are making edits to Johnson Valley. Instead I would recommend making two copies of johnson_valley.zip from the Steam folder. Unzip one of them in a non-beam related folder, to use as a reference. Unzip the other one in your user folder levels/ dir. Rename this copy to your map. There are guides for this, but it’s basically doing a find and replace across all files. I would use VS Code instead of notepad++ like most people recommend. After you rename, you should be able to load it up in-game and it should be identical to Johnson valley. At that point, make a copy of it again as your clean map. All this will take more hard drive space of course. Now you can change things in your map without affecting the vanilla map, and you can reference the working map if needed. You can branch your map by making another copy at any point so you don’t break something you already got working. If there are issues with duplicate materials, then you can rename materials without affecting JV.
This is actually what I have been doing so far. I made a copy of Johnson Valley and renamed it to my own. Then did the find and replace with all files inside the folder so it is not interfering with vanilla johnson valley and removed all the objects and decals etc on the map. So now I am left with a "empty" Johnson Valley copy as a base to build my map upon. This issue with the ground model is really weird and I have no idea why that could be. Maybe I should start all over again and use the empty template map as a base instead... or what do you use as a starting point? I just want to have all the ground materials, objects etc from Johnson Valley in may map since it is also going to be desert themed. But if I cant find a workaround for this ground issue I can´t continue with it :/ Thanks for you patience so far
Hard to say what's wrong with your new terrain. Is it the same size as the Johnson Valley? And you can otherwise paint and sculpt it normally? I tested removing the depth map from a JV copy and it fixed the sinking. Then I swapped the terrain from Italy to JV and it also worked on that.
Happy to help! We'll get it figured out. I'm not a map making expert, but I've gotten pretty far with my maps and it did require a lot of patience. OK cool, good to know. I don't think the starting map matters, as long as it is in a working state that you can reference. JV should be fine, and will be less work as it already has the PBR textures you want. Last I looked, the template map was pretty old and didn't use pbr, so I just based my last project on copying Jungle Rock Island. That's a good idea. Make sure the "theTerrain" Scene Tree item matches your setup. If you're working with a custom heightmap png file, then you must be using the terrain importer, right? If you start with a clean copy of JV, do the physics work as expected when you paint some terrain?
Thanks for you replies! I did some testing.. The problem also exists on the "empty" Johnson Valley with its original heightmap. This is the Vanilla Johnson Valley with just all objects and decals etc removed, just the heightmap that I painted some asphalt over manually.. So it has nothing to do with the new heightmap or the map size apparently. The "theTerrain.ter.depth.png" is already removed here. edit: as a side note: I don´t know how to make it the exact size as the Vanilla JV. I am using a 4096x4096 heightmap but the meters per pixel option, which determines the size of the terrain generated by the heightmap, does not allow for any more decimal places than 1. so I can only type "0.7" for example, "0.75" is not possible, so it is never the same size as the Vanilla JV, either too small (screenshot) or too large. Don´t know if that matters in any way since the ground problem is apparently not related to it but I wanted to point it out anyway... Thanks for you help so far
Do the importing with meters per pixel: 1, and then set the terrain square size to 0.75 in the scenetree/level_object/terrain/theTerrain. I tried the terrain importing to JV from a few height maps but couldn't replicate the sinking. Did you perhaps mess with the groundmodels like in the tutorial video around 40 min?
I tried it with the setting as you said and the sinking is still happening. It only happens on a few spots on the map, not everywhere, so maybe thats why you couldn´t replicate or rather find it. No I didnt do anything with the groundmodels, that was my first thought of course but I didn´t do it so that can be ruled out. edit: on a side note out of curiosity: does the new heightmap always have to be the same size as the vanilla one? and if so, why? then how to make a map bigger? I´d actually like my terrain to be slightly larger than JV
You can enlarge the map size by increasing the square size value, but you'll lose smoothness the higher you go.
You might want to consider an alternate approach. Head to your BeamNG folder and rename it. Then, launch the game and allow it to recreate the folder. Afterward, you can retest the same procedure. If you haven't made any changes in the game files, this is the most thorough type of cache cleaning you could potentially perform. You can also verify game files via Steam. If none of these steps work, there might be an issue with your ground texture settings altogether. I encountered the same problem after updating my map to PBR materials. Alternatively, you could upload your project so one of us could test it. This way, we can eliminate errors stemming from your machine and settings. Edit: And always set the PixelPerMeter parameter to whole numbers, like 1 or 2, but never 0.7 or something similar. Also, the Heightmap must be a Power of Two. The import doesn't always work flawlessly. You can usually set the Height higher than in your Terrain Editor.
For copying a level and give it a new name/folderstructure you can use my tool: https://www.beamng.com/threads/beamng-tool-for-map-creators-updated-2023-12-01.89058/ I usually have an unpacked version in the userfolder/levels folder and do my work there. Backup regularly! I have my project in git source control.
217MB .exe is kinda gigantic for a "Tool". I tried this tool. For me it doesn't work correctly? My maps are shown.. but if i try to load it, i get send back to the main menu. --- Post updated --- I've created a duplicate of Johnson Valley for you, named 'murokmatos-first-map,' to prevent any issues with the original maps. This duplicate is an exact 1-to-1 copy of the original, but with everything renamed, allowing you to work entirely within this folder and save your progress. Always perform unpacking and packing directly through the game itself. The game is already optimized for the ideal compression level and format, so using other methods may cause issues. If these steps don't resolve the problem, there might be a specific issue with your settings in general. In that case, it would be easier to contact one of us via Discord so we can offer direct assistance. Link: https://drive.google.com/file/d/1E1GH1hICFHf_RPsJSfOTA5_thuLzvCgo/view?usp=sharing
Thank you very much for doing this work to help me! I tested the map immediately and found something out... apart from the fact that yours apparently does not have the sinking error.. So... after I tested the map file you kindly provided for the sinking error, I put the faulty one I created earlier into a Zip file just to test it aswell. Suddenly the sinking was also gone on this map aswell... After that I unpacked it again and put it back into the >mods>unpacked>name>levels>mapname folder, sinking still gone. So zipping it has apparently fixed the sinking issue. Do I have to understand that or just take it as it is? Do you mean that I should always put my map into a Zip file after doing any changes to the folders within? Because so far I have been putting it into: >mods>unpacked>name>levels>mapname but not as a zip file.
I'm pleased to hear that the issues seem to be resolved. You don't need to zip your map every time you make changes. When creating your mod, place it in the '/0.31/mods/unpacked/yourmod/' folder. Within the 'yourmod' folder, maintain the same structure as the original game, followed by '/levels/yourmap'. If you save your changes now, they will be stored in '/0.31/levels/yourmap'. The game loads both entities: first, your mod is loaded, and then your saved changes overwrite the initially loaded files, ensuring a smooth operation. To retain your modifications, copy '/levels/yourmap/' into '/mods/unpacked/levels/yourmap' and overwrite existing files. Always remember to create backups. If you've copied the save into the mod, ensure to delete the '/levels/yourmap' folder to avoid any issues. Should you wish to zip the mod, run the game, navigate to the repository, and select your mod. You should find a 'pack' button there. Always use the game engine itself to pack and unpack mods. Various methods exist to 'ZIP' a file, such as compression and unicode types. However, the game is optimized for a specific zip format to guarantee performance. Following this method will prevent any unusual issues, like the ones you experienced.
Sorry to hear that it doesn’t work for you. Which map did you try? The size of the tool is because it’s written in C# and contains the framework runtime. But the download is only about 80 mb.