Increase Terrain Resolution?

Discussion in 'Content Creation' started by unyxium, Apr 5, 2020.

  1. unyxium

    unyxium
    Expand Collapse

    Joined:
    Mar 30, 2019
    Messages:
    80
    My map, which is 8184x8184m in size has geometry spaced at 2 metre resolution (squares of 2x2m, although there are triangles dividing it). The problem with this is that it is a bit too low for shaping everything, especially sloping roads which I have found to be very difficult to make smooth enough to drive comfortably at highway speed.

    The best case scenario is that I can somehow set the terrain to be higher resolution, say 1 metre resolution, without any issues. The problem is that I don't know how, and if possible, I don't know if it would affect anything that I have already done to the map.

    Wireframe view to show issue:
    wireframe.png
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    That's a pretty odd number.

    In the Terrain object, there is a scale value.

    By default it's one (1 pixel = 1 meter).
    Lower the scale to increase the density (ie. scale of 0.5 means 1 pixel = 0.5 meter)


    Note that heightmaps above 4096x4096 pixels are not supported, it may lead to issues.
     
  3. unyxium

    unyxium
    Expand Collapse

    Joined:
    Mar 30, 2019
    Messages:
    80
    I went and measured it this time, and it looks like it wasn't that size at all. I just checked with objects I know the size to and it turns out each square should be 4 metres instead.

    I really don't understand how any of this works, all I want is to increase the mesh resolution (subdivide) it once to get a higher resolution terrain. I know it is possible because other maps do have a higher resolution terrain at that size, but I don't know how, or if it is possible to take my already edited mesh and convert it to a larger scale.

    I also cannot find the values you are referring to. Changing the square size just stretches the terrain and the other values don't do anything I want. The values stored withing the json of the terrain don't appear to change anything either.

    Could it be possible to export the map terrain, scale it to a higher resolution image file (4096 in my case), and re-import it to create a new terrain with a smaller square size (half of the original terrain)? I haven't tested it yet, and am not sure if that would cause any issues with things like decal roads, trees, etc.
     
  4. unyxium

    unyxium
    Expand Collapse

    Joined:
    Mar 30, 2019
    Messages:
    80
    I think I have figured it out.
    I exported the heightmap of the terrain, scaled it to 4096x4096 externally (200% scale), saved it and imported it back into the game as a new terrain object. It appears to have worked, although I need to get textures working and I am not sure if I can entirely replace it without affecting all the decals and things placed on top of it.

    Additionally, I do not have any image editor that supports 16 bit greyscale png. Do you know of any editor that can do it, preferably free? I have only managed to create 8 bit (per channel) RGB png files, causing a lack of height detail.
     
  5. AbdullahBemath27

    AbdullahBemath27
    Expand Collapse

    Joined:
    Oct 4, 2018
    Messages:
    138
    GIMP has 16-bit PNG support and it's free.
     
  6. unyxium

    unyxium
    Expand Collapse

    Joined:
    Mar 30, 2019
    Messages:
    80
  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