Turns out BeamNG doesn't like 16k size terrain files ;)

Discussion in 'Content Creation' started by krallopian, Dec 30, 2018.

  1. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    786
    When Italy was released and it was 4k, I thought "OMG CAN I REALLY GET HIGHER DETAIL LEVELS!?" and built a 4k map at 1meter per pixel, IT WORKED! Get ready for a grave misuse of quotes and trailing thoughts:

    So naturally. . . 8k time!!

    IT WORKED TOO! I shrink it's size to 0.5 meters per pixel and it looks GORGEOUS.

    So . . . overnight I ran a 16k map size render in World Machine (only learned about it's existence a couple days ago, and holy moly I'm in love) and it made a 100-150mb terrain heightmap. BeamNG says, ".... nerrrrp, not happenin.'

    So there we have it.

    BUT WAIT, 16k TEXTURE size must work at 900+ mb right?

    .. yup! And it looks so incredibly amazing.

    So I tried it at jpeg, png, bmp. Nothing, it just refuses to make the 16k size. I tried 8-bit, 16-bit, etc, nothing would import the 16k. Same with 10k setups, I guess the max is 8192 <-- not bad though hah! What I did find though is it won't import 10,000x10,000 or 9000x9000 or 8100x8100, but 8192 DOES work, so I'm not sure if that's a checksum it does or if there's more to it than the usual 256, 512, 1024, 2048, 4096, 8192, etc.. Any combination of 8192 + 256/512/1024/etc didn't work either.

    I tried resizing the 16k to 8k in photoshop to save time re-rendering and nope, the gradients get destroyed regardless of what resampling technique you use (bicubic, bilinear, etc..) regarless of JPEG or PNG formats.

    Especially since the engine seems to block up the terrain detail size, so at 8k sizes shrunk to a 4k map size, there is a lot of terrain pop in as the tesselation does it's thing. There is a node, "screenError" and default is 8, when changed to 4 the terrain detail persists further into the distance, but there is still a noticeable pop-in unless you crank the fog up. AND IF YOU crank the fog up, you can put the screenError to somethign like 32 and get 10x the FPS as a result!! =D Funny though, the, "in-editor" info tab says, "screenError (TypeS32) Not Yet Implemented" but it does affect the terrain.

    However, 8k terrain size, 16k terrain diffuse map. . . not a bad thing by any stretch! If I got 16k to work, you'd be sure I'd try for 32k so if anything, I'm glad 16k didn't work haha! (took 10 hours at 5.2ghz 12cores to render 16k)

    On a side note, rescaling a 16k to 8k really makes for a cool minecraft level (not sure my SBR would like it very much):
    --- Post updated ---
    Sorry to say folks, but it seems the 16k texture is just resized in-game, and I'm thinking the 8k one is too! I tried putting an easter egg few words on the map, and they came out blurred. So I shrunk it to 8k, and it looked the same. So . . well at least the file sizes will be smaller! There is an option on the terrain to change texture sizes, and 4096 is the highest, if you type anything higher it ignores it and reverts to 4096.

    Also I said 8 was the default screenError not 8. For me 6 works perfectly at my drawdistance/fog level - the terrain always looks as good as possible.

    NEAT STUFF HUH!
    --- Post updated ---
    ALSO for some more info:

    If you shrink your terrain sizes down (or have high 4k - 8k sizes) the roads no longer reach as far.

    If I make say a 10km road on a 2k map, it takes one decal.

    If I make a 10km road on an 8 map it only reaches about 4km before the decal just. . . stops placing on the terrain, so I need to make shorter roads and it's all good.

    Here's a couple images of the 8k map sized to 4k, and the 8k textures sized to 4k:
    --- Post updated ---
    Annnd finally I've come to the conclusion:

    RENDERING out in 8k from World Machine, creates a far-more detailed heightmap and diffuse map. The 8k map can be loaded into BeamNG and set to 0.5 meters per pixel for a 4x4km (16km²) map that has double the surface detail of a usual map. The 8k image that is rendered out, although only shown at 4096 in-game, starts off with a higher fidelity which enabled it to capture finer details that the 4k render didn't even pick up in the first place. It's why when I put my 16k image on the first time I thought, "WOW IT"S BEAUTIFUL" but it had simply downsized all of the details to 4k and kept some that the original 4k never had in the first place, all at a blurry loss none-the-less.

    So, yes putting an 8k image will result in more details being shown, but at the same 4k resolution. This isn't very logical, and really only works for terrain further than closer, however it DOES make sense to use a larger 8k image that is shrunken down to the game's 4k max rather than simply rendering out at 4k and missing otherwise important details on the map.

    Result: Render as high as possible, and shrink that image down to get every possible detail in there at 4k <-- well NO DUH.

    Been another exciting night with the BeamNG editor haha!
     

    Attached Files:

    • MineCraft.jpg
    • forum_002.jpg
    • forum_003.jpg
    • Like Like x 4
    • Informative Informative x 3
  2. Kueso

    Kueso
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    4,461
    I hope something comes of this xd
    unless its too big to upload
    it looks really cool
     
  3. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    786
    Thanks BlueGinge! I'm making it to host a bunch of youtube videos I hope to get around to making. AI cars racing to their death sort of thing. I know there are a ton of youtubers already doing it, but I just want to get in on it since I'm always thinking, "Damn why didn't they move the camera THIS way" etc hah!
     
    • Like Like x 1
    • Agree Agree x 1
  4. Kueso

    Kueso
    Expand Collapse

    Joined:
    Oct 14, 2016
    Messages:
    4,461
    same
    im glad im not the only one who feels that pain XD
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    One of pics looks like minecraft or something, maybe such has uses too :D

    There are lot of crashing etc. stuff done and in works, but what is missing is racing related stuff for simracing type of crowd, hopefully someday someone makes some realworld racetracks that has better textures, many have less than 0.5k blurryness.
     
    • Like Like x 2
  6. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    I didn't read it all because I'd just get overly confused, but it's awesome having someone trying to push the engine to more of it's limits.
     
    • Like Like x 1
    • Agree Agree x 1
  7. Miura

    Miura
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    311
    I think you can use a higher resolution diffuse map if you put it as Macro texture, scaled to the size of your map in meters. Of course, then you can't use the macro textures for mid-size detail, which would be important in a desert map like that.
     
    • Like Like x 1
    • Agree Agree x 1
    • Informative Informative x 1
  8. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Looks really nice and some good info here, thanks for sharing!
     
    • Like Like x 2
  9. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    786
    I'm excited to try that macro texture idea!

    And thanks guys, its really nice to get positive feedback from things you enjoy, helps with those, "euuugh why am I doing this" moments of laying down textures haha
    --- Post updated ---
    Well I tried using as MACRO and I believe it looks better, but the interface between other textures and it no longer work because of specular highlights or something - there is a very VERY hard edge. I can't tell which looks better now haha!

    I need to find a SWITCH in the engine somewhere that says "yeeeaaah lets just allow larger than 4096 diffuse" on the terrain =D

    I tried changing it in the json files, but no such 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