WIP Map making help: BlenderGIS to heightmap, importing heightmap into BeamNG's new editor

Discussion in 'Content Creation' started by sonicfelipemt, Feb 11, 2022.

  1. sonicfelipemt

    sonicfelipemt
    Expand Collapse

    Joined:
    Sep 17, 2018
    Messages:
    22
    This all can be used as a guide of some sort, we just need more info/data/help.

    -I tried map making some years ago (I had some amazing unreleased WIPs, but most of them stopped working with new updates) and gave up due to outdated and not working documentation / bugs / crashes, etc. Now I have even MORE free time on my hands, and I could be mapping non-stop for the amazing game/simulator we all love. I'll make more realistic maps like the updated ones we got this year, but focused on real locations.
    I tried following these tutorials:

    https://www.beamng.com/threads/tutorial-map-in-a-month.49287/
    (this old tutorial has no video guide along with it, it seems, but the step-by-step is really helpful)


    (this is the best guide so far for the new BNG.D editor?)


    (this locking method works for getting stupdly high quality satellite textures)

    -I was previously trying to import the "Mad Max" real life desert location but it was too big (48x48km) for the editor to handle (kept crashing due to low ram space for satellite ground texture). But I did managed to get the scale 1:1 inside of BeamNG.

    -Then I tried an US national reserve (Lion Mountain? Lost the research files... the place was amazing for rally :c ) with 2 off-road downhills (16x16km) but it was also too much for the editor after adding ground textures, roads, grass and trees.

    -Now I'm trying with a smaller island from Japan (Toshima Island, 2.4x2.7km). It has a few cool light uphills and curved + straight land and coast roads, low to medium height differences, few buildings, those cement wave breakers on shores and a dock. Seems like a cool place for a first try at a smaller map, as it'll be less resource hungry, more stable and realistic.

    Much has changed in the editor... And I need a little help with those steps:

    1 - terrain.party and other sites (2013~2019) 100% stopped working. Now I'm using BlenderGIS which gets an EXTREMELLY high resolution satellite texture (up to Google Earth's max zoom level) and 3D elevation data (has global SRTM 30m, which is fine enough for most maps [you CAN also extract GEarth's detailed 3D land models using some other tools like RenderDoc]). It also supports a lot of advanced options, and now you need to create a login and get an API key @ the SRTM site to get the height data using BlenderGIS, but you can do this in minutes.
    I NEED HELP IMPORTING THE TERRAIN, as when using the new Beamng editor, NOTHING that worked before is working now (the generated heightmap, importing it and texturing it, etc, every old method broke).

    2 - The new heightmaps (rendered from Blender and imported to BNG) almost never work. It pops a big red/orange "NO TEXTURE" square on a far corner. I pinned down this problem to the .PNG image Blender spits out. It is a .PNG image, grey-to-black, (something is wrong with Blender's MIST or render settings...it should be a black to white [vice-versa] gradient, but it starts at gray instead of white and goes to black). Something is wrong with the color space? Mist settings? IDK... I had to import it into L3DT and export again as 2048x2048 (this also breaks the total height of the map). It works for importing into BeamNG but then it gets a LOT of noise from L3DT, even as PNG. The new smooth tool inside BNG works for removing the noise. What I need: how to export a grayscale heightmap (gradient, black to white) from Blender using the MIST settings without needing a middlestep to L3DT.

    3 - I know how to make 3D models using Sketchup and CAD, and I'm familiar with exporting custom objects as .STL .OBJ and later other formats, using Blender as a mid-step to make them compatible with BNG. I don't know how texturing for BNG works now tho. I'll have to make some custom houses, buildings, objects, and making them is fine, I just don't know how to organize the files, use BNG included textures, make repetitions of the same objects following a curved line to fill up road and road-side components inside BNG (or sould I use splines in Blender and make the repeated objects and curved long components?), etc.

    4 - When you create/modify a terrain or texture or something else inside BNG's editor, it seems the data gets saved in another folder, not your level's one. Do tell me what goes where and what needs copying to where after stuff is created or eddited. Loosing progress is NOT cool. (on that old Lion Mountain map I once had to remake 100% of the road coverings :c It was terrible)

    The working steps I learned to take so far are:

    -BlenderGIS outputs (inside of Blender's layout) a plane square/rectangle (I still didn't figured out how to exactly change the selected map size) of selected terrain with the base at ZERO, then later you can get the height data, and it is then applied to the plane (water seems to level at 0). I also go to UV and save the real terrain satellite texture to the map folder I'm working on and convert it into PNG and put into my level folder for later use.
    -In order to get the scale 1:1, I also cross-check measurements with Google Earth Pro (the max altitude of my map inside Blender was 274 and I scaled it up to 478, the same value Google Earth measured at the top of the island, and after that, the lenght also matched). (note: the end result in BNG was not even close to 1:1 but that must be because of the gray-to-white problem and L3DT)
    -I adjust the rendering resolution to 12000x12000 (for creating a smooth heightmap, that later can be scaled down).
    -I change my camera to ORTHOGRAPHIC and move it to be centered and on top of the map, looking down, and changed it's orthographic scale fo fit the map.

    Now, according to THIS guide:
    https://blender.stackexchange.com/a/172492

    -I turn on MIST, then regulate it (MIST is a world property, applied referenced to the CAMERA, not the world, so you must calculate the camera-to-map distance and adjust the MIST lenghts to apply to the BlenderGIS terrain's ZERO[Blender's Z=0]-to-TOP [to get max map height, select map object and press N, read "Dimensions" {note: this is the same as bounding-box size}, but remember to check if your map is 1:1]).
    -I go to compositing, check "Use Nodes" and join the MIST to the output instead of the normal image.
    -When I render an image, I get a gray-to-black (low-to-high) image that needs to be inverted.
    -I invert it in Photoshop, and import into L3DT, and export as a black-to-white heightmap.
    -I import into BNG as a new terrain and set up the pixel size and size data. It is NOT 1:1, and height is messed, probably because of the Blender output... Need help fixing it.
    That should be the last step tp get the terrain in BNG to match the real terrain.
    Next should come texturing: I need directions for what should I do for texturing/terrain painting.

    What I get in BNG is also NOT textured, of course. After I create a NEW MATERIAL using the sat texture, I adjust what I could find, and paint the terrain with it. What I want, is for terrain that is far away to display this satellite image. And... it's misaligned. Don't know how to fix this:

    beamngeditorhellonearth.png

    This is as far as I got on this recent comeback.
    Forgive my language errors, as I'm not native from the US or UK and it's 3am. LOL
    I probably also got some technical stuff wrong here, it's been a long time I haven't used all that software.

    After I finish this one little island (or if you guys know of some other better little japanese island, DO TELL ME), I'll keep making more maps (making pools and letting users choose/vote for map locations will be NICE). I want to master this kind of map making, and attract more players to our beloved game/simulator. So help me if you can.
     
    • Like Like x 2
  2. sonicfelipemt

    sonicfelipemt
    Expand Collapse

    Joined:
    Sep 17, 2018
    Messages:
    22
    Just an update: if anyone wants the files for the project, just ask. I got all the satellite textures + heightmap + material masks. This might be 5~25% of the total work to be done.

    I managed to fit the texture to the terrain correctly now, and fixed the stupid z-fighting. I managed to import some objects but roads are just a mess to merge with "the damn terrain" as it looks really crappy, and terrain height resolution is not enough in my opinion (there should be a native in-editor way to go + or - X2 on the terrain resolution (up to maybe 16k x 16k) or enabling the use of more than 1 terrain and sew them together (adding more than 1 still crashes the editor, but why?) for making it smoother but it seems there STILL is a 4096x4096 limit, and for some road bumps and elevations, we do need 10~25cm resolution or custom models).

    Yet: Most tutorials are too old or broken and it seems almost no one cares to fix the editor problems or the official wiki+guides.
    Hence: I give up again, see you guys in another 2 years.

    BTW: devs, DO ADD SOLID VR SUPPORT and fix the damn incoherent force feedback on wheels and add official DualSense support (including adaptive triggers). Bye bye.
     
  3. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    I can't answer all the q's here, but maybe some.

    For heightmaps, you can definitely use 8192x8192 maps. Make sure they are uncompressed and in 16-bit format (can't recall if you have to have alpha or not), but GIMP will output those, and it removes the random z spiking.

    Otherwise, check out this tutorial I did, in case it helps:



    Thanks
     
    • Agree Agree x 1
  4. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    492
    That’s true. I exported my heightmap 4096x4096 and I had a stair effect in BeamNG. Instead of trying it with a higher resolution I just used a slight gaussian blur on the png which worked for my map. But higher resolution is more precise of course.
    good luck!


     
  5. RicardoTM

    RicardoTM
    Expand Collapse

    Joined:
    Sep 29, 2019
    Messages:
    44
    I know this is old, but I want to add a website for heightmaps that is working: https://heightmap.skydark.pl/ I used to use it for cities skylines, it seems to work fine with beamng, but the min size of the map is about 17km and the satelital map export is not high res, also the heightmap exports in raw but 1081x1081. I scaled it to 4096x4096 and it worked just fine.
    Kinna tricky to get the 1:1 scale tho, I asked chatgpt ai for mine lol
     
  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