Subnautica heightmap (spoliers)

tanzanitetanzanite Join Date: 2016-10-06 Member: 222904Members
Wrote some html/javascript to generate heightmaps out of subnautica *.optoctrees (current stable release). Using multiple color gradients to indicate depth.

Boy is it hard to find a color scheme that does not look like a** nor ambiguous :(

Currently using:
. zmapGradient( 160, 196, 196, 255); // depth, red, green, blue
. zmapGradient( 1, 160, 128, 16);
. zmapGradient( -1, 0, 255, 0);
. zmapGradient( -100, 128, 0, 0);
. zmapGradient( -200, 0, 0, 0);
. zmapGradient( -300, 0, 0, 255);
. zmapGradient( -400, 128, 64, 0);
. zmapGradient( -500, 255, 255, 255); // there essentially is nothing below 500
. zmapGradient(-3040, 0, 0, 0);

Any ideas for better gradients?

Current map (~6MB png, the whole 4096x4096) https://lensdump.com/i/6MedT

Comments

  • JackeJacke Calgary Join Date: 2017-03-20 Member: 229061Members
    It would be helpful to make a depth colour legend beside the map, starting at 0 and going down with the colour at each depth band beside it.
  • nesrak1nesrak1 Places Join Date: 2016-12-04 Member: 224536Members
    I know you probably don't know, not on the off chance that you might, do you know how to create a mesh from the optoctrees? I've been struggling to find a way to do that. Really don't know what to do with the density/signed distance value. But I assume you are just taking the positional value of each voxel and not dealing with sd.
  • tanzanitetanzanite Join Date: 2016-10-06 Member: 222904Members
    Did some tinkering and added cave-mode:

    https://lensdump.com/i/6Dqp9 - contains river depth and below (including the deepest Degasi base that leads to one of the entrances)
    https://lensdump.com/i/6DBF2 - contains castle depth and below
    https://lensdump.com/i/6Dd1o - contains lava area and below

    Tried some algorithms to suppress the distracting ledges at cave ceilings, but finally decided against it (tended to hurt other cave detail).

    Oh, and added a legend to the generator - it adds the full gradient and depths to used gradient points.

    Have not found a better gradient set for the main map, so not making a new one yet.
    nesrak1 wrote: »
    I know you probably don't know, not on the off chance that you might, do you know how to create a mesh from the optoctrees? I've been struggling to find a way to do that. Really don't know what to do with the density/signed distance value. But I assume you are just taking the positional value of each voxel and not dealing with sd.
    Have not looked into it. Last i generated meshes from voxel data i used a homebrew method (smoothed and then voxel vertices offset by signed distance respective to the voxels center) - don't know what method Subnautica uses. Some derivative of metaballs perhaps? Yeah, no idea.

    (Not sure what you mean by "sd". But yes, i just use voxel materials directly to determine where matter is)
  • nesrak1nesrak1 Places Join Date: 2016-12-04 Member: 224536Members
    edited November 2017
    Sd is signed distance. On the post it says there's a material value and a signed distance value. The code refers to it as density. They said they are using dual contouring, but the examples for dual contouring I've found only calculate density at voxels' vertices or edges, not the center (or wherever the signed distance is being calculated from inside the voxel, it was never specified)
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited November 2017
    Shouldn't this be called "depthmap" :trollface:
  • RezcaRezca United States Join Date: 2016-04-28 Member: 216078Members
    Pretty cool seeing those maps, especially the cave ones ^^
Sign In or Register to comment.