Maps in Game's folder

2

Comments

  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    @nesrak1 -- does this help you at all with your terrain question? Sorry, I forget exactly what you were looking for back then but I thought it might (possibly) be related.
  • nesrak1nesrak1 Places Join Date: 2016-12-04 Member: 224536Members
    No, but I worked it out with suspension. I've known about the lods for a long time, but the batches were what I was trying to get.
  • Morph_GuyMorph_Guy Join Date: 2016-04-21 Member: 216034Members
    Could we get a another updated version of this 3D map now that the full v1.0 version of Subnautica is out and all of the final terrain touches have been made?
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    release verison does not contain lod meshes (...\AssetBundles\lod?worldmeshes) and a third-party renderer from the original octrees was not found yet, so no.
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    I still found these files, they were transferred into Unity-resources. There are a change, but nothing is noticeable. But I use the opportunity to publish 4K maps similar to those early (link to Imgur):
    101440992c8809f53a89e6ac0c8c9c66.jpg



    In addition, I uploaded the same maps to Mega in PNG-format, all the original raw chunks in OBJ and the finished huge model of the world in PLY.
    The model can be opened in MeshLab; AO is assigned to the color of the vertices and the faces are painted in depth.
    db7e46f99060c241606d3a450626d437.png

  • AvimimusAvimimus Join Date: 2016-03-28 Member: 214968Members
    Wow! Really lovely work.

    It shows the quality and complexity of the world - giving a great sense of relative scale too...

    It might also be worth combining with tanzanite's maps into a collection:
    https://forums.unknownworlds.com/discussion/153314/subnautica-heightmap-spoliers
  • AvimimusAvimimus Join Date: 2016-03-28 Member: 214968Members
    I suppose between this excellent work you guys are doing and knowing the terrain format - we're only a couple hundred hours away from programming terrain editing tools?
  • BlackzicBlackzic Canada Join Date: 2018-01-24 Member: 235675Members
    The more its white, the more its near the surface!
  • Tom507Tom507 Join Date: 2017-09-01 Member: 232761Members
    @hhrhhr That Data is awesome, but do you have the original, after merging without modifications as well? Thanks in Advance
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    @Tom507 only source_obj.7z on Mega with 6016 individual objs. but you can merge them yourself layer by layer (floor by floor) with a simple command:
    copy *-XX-*.obj level-XX.obj
    
    where XX=0...24.
  • shironatorshironator Slovakia Join Date: 2019-02-12 Member: 250852Members
    hey, hhrhhr
    I am trying to make map from Subnautica Below Zero. I manage to extract those chunks with bits of map and load it into meshlab.
    Now I have about 9900 files with names like "Chunk_0_0_0-resources.assets-6282.obj", Chunk_0_0_1-resources.assets-6283.obj".
    I have found those files in \steamapps\common\SubnauticaZero\SubnauticaZero_Data\resources.assets and extracted meshes via AssetsBundleExtractor.

    I have merged them using your command "copy *-XX-*.obj level-XX.obj", now I have 24 OBJ files.
    But when I load them into meshlab, it shows me a cube, where all of meshes are inside of it = chaotic mess of meshes one clipping through another.
    This also happening even if I load non-merged OBJ files.
    If I load files separately, one by one, I can see bits of map.

    When I load your OBJ files of Subnautica map fom MEGA, they will nicely fit one beside another, creating a map.
    Can you please advice, what I need to do to achieve such result?
    thx.
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    all the "cubes" of the game world have local coordinates starting from zero. the size of these "cubes" - 32 game units. to combine into one large model, you need to add an offset to the local coordinates (chunk coordinate * 32)

    for example, the dot (10,20,30) in Chunk_1_2_3 will have global coordinates
    x = 10 + 1 * 32
    y = 20 + 2 * 32
    z = 30 + 3 * 32
    

    in order not to do this manually, you can use any script to recalculate the coordinates. I use a slightly fixed Lua script for the original game — https://gist.github.com/hhrhhr/0969a85afce034015b8cd02ac2544477 . This script, besides the offset of coordinates, at the same time fixes the coordinate system, since this system in Meshlab is different from the game one.

    result on Steam — https://steamcommunity.com/sharedfiles/filedetails/?id=1640442808

    ready maps (version Feb-2019 9892) on Imgur:
    PY9ROvi.jpg
  • shironatorshironator Slovakia Join Date: 2019-02-12 Member: 250852Members
    edited February 2019
    Thx very much. As far as I studied those files, I think it does following:
    mass_convert.bat:
    will convert mesh files in *.dat format into OBJ by using mesh2obj.lua script. It will also recalculate coords like you said before.
    Then merge them.

    But that "mass_convert.bat", is expecting DAT files instead of OBJ I have. In AssetBundleExtractor, the only function, which creates DAT file is "Export raw" . However, this creates file with name like "unnamed asset-resources.assets-14252.dat", so I will lost all proper numbering like 0-0-1. Even if I try to modify bat file and change *.dat to *.obj, the "mesh2obj" fails with errors like:
    f:\lua53.exe: F:\\mesh2obj.lua:13: bad argument #2 to 'su' (string expected, got nil)
    stack traceback:
    [C]: in function 'string.unpack'
    F:\\mesh2obj.lua:13: in local 'uint32'
    F:\\mesh2obj.lua:38: in local 'convert'
    F:\\mesh2obj.lua:117: in main chunk
    [C]: in ?

    How I can get those *.dat fles, so I can convert it by your lua script? Or how to do it just with my OBJ files which I already have extracted?
    I have exported OBJ files in AssetBundleExtractor by selecting those files by its type (mesh) then going to Plugins->export to .obj
    thx
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    shironator wrote: »
    In AssetBundleExtractor, the only function, which creates DAT file is "Export raw"
    yes, this is right function.
    However, this creates file with name like "unnamed asset-resources.assets-14252.dat", so I will lost all proper numbering like 0-0-1
    mesh2obj.lua read "real" chunk name from *.dat and save OBJ with this name.
    -- fn = "unnamed asset-resources.assets-9267.dat"
        r = assert(io.open(fn, "rb"))
    --
        local sz = uint32()
        local name = str(sz) -- "Chunk-17-16-19"
    --
    
    --[[ write OBJ ]]--
        fn = name:sub(7) .. ".obj" -- "17-16-19.obj"
        local w = assert(io.open(fn, "w+b"))
    --
    
  • shironatorshironator Slovakia Join Date: 2019-02-12 Member: 250852Members
    I see now. Thx, it works.
    remove unnecessary (bottom at the level of three kilometers, side "walls"), clean (combine vertices, fix a bunch of irregular surfaces).
    Im completely new to meshlab. Worked with 3dsmax in the past, but meshlab is too different for me. How to combine all layers into one mesh, so I can do changes to entire model at once? Tried to goodle it but found nothing. Then I can remove side walls effectively, because now, I must select layer, then select vertices, then delete.

  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    I don't like video guides, but English is absolutely not my native language, so it will be easier for me to record a sequence of actions in the form of a video clip. Give me some time and i will do it...
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    this is link to youtube:
    adaa1521ff68f0360d83259704c08aae.jpg

    I missed a couple of things there, but in general it should be clear.
  • shironatorshironator Slovakia Join Date: 2019-02-12 Member: 250852Members
    Thanks you very much :)
  • Morph_GuyMorph_Guy Join Date: 2016-04-21 Member: 216034Members
    hhrhhr wrote: »
    shironator wrote: »
    In AssetBundleExtractor, the only function, which creates DAT file is "Export raw"
    yes, this is right function.
    However, this creates file with name like "unnamed asset-resources.assets-14252.dat", so I will lost all proper numbering like 0-0-1
    mesh2obj.lua read "real" chunk name from *.dat and save OBJ with this name.
    -- fn = "unnamed asset-resources.assets-9267.dat"
        r = assert(io.open(fn, "rb"))
    --
        local sz = uint32()
        local name = str(sz) -- "Chunk-17-16-19"
    --
    
    --[[ write OBJ ]]--
        fn = name:sub(7) .. ".obj" -- "17-16-19.obj"
        local w = assert(io.open(fn, "w+b"))
    --
    

    I can't seem to get AssetBundleExtractor to work so I've been using Asset Studio instead, which gives them the right name (unless that's an overall change made to the game?). What should I do then? (Sorry for the two years later response I just haven't seen anything else on it)
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    map objects are now in a separate file: ...\steamapps\common\SubnauticaZero\SubnauticaZero_Data\StreamingAssets\aa\StandaloneWindows64\main-discrete_assets_worldmeshes_*.bundle

    5db4e2ff696a21a1cc1dcc6b53952589.png
  • Morph_GuyMorph_Guy Join Date: 2016-04-21 Member: 216034Members
    hhrhhr wrote: »
    map objects are now in a separate file: ...\steamapps\common\SubnauticaZero\SubnauticaZero_Data\StreamingAssets\aa\StandaloneWindows64\main-discrete_assets_worldmeshes_*.bundle

    5db4e2ff696a21a1cc1dcc6b53952589.png

    Thanks for the response! I've been using that new file, but when I extract them as raw they have the correct chunk names as .dat files, which I don't think that .bat is equipped to handle since it isn't working (unless I'm missing a component here and it should be working fine anyway). So I'm wondering what to do now in this case, or if I'm missing something else (maybe the wrong lua installation idk) 8lnmisbpplh1.png
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    .bat and .lua scripts do not care about the name of the input file, it can be absolutely anything.
  • SpellingBee889SpellingBee889 Join Date: 2021-03-12 Member: 268233Members
    As some noticed, the previous map still had an entrance to the dungeon next to the "Aurora", which is not in the current version. Now more relevant game files were used.
  • Morph_GuyMorph_Guy Join Date: 2016-04-21 Member: 216034Members
    hhrhhr wrote: »
    .bat and .lua scripts do not care about the name of the input file, it can be absolutely anything.

    Hm. Must be an issue with something on my end then, probably with the lua scripts

    (This is what I have in the .bat, and when I run it nothing happens aside from the obj folder appearing in the work directory but staying empty)
    dszoloc6yy0q.png
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    Use quotes for filenames with spaces.
  • BumbleweedBumbleweed Join Date: 2021-04-26 Member: 269467Members
    edited April 2021
    Hmm, I've been following along trying to piece together the Below Zero map, but the linked lua script appears to be bugging out on the asset call on line 59:
        assert(points == sz // 24, "\n\n" .. points .. " != " .. sz // 24 .. "\n\n")
    

    e.g. for Chunk-0-0-0.dat I'm getting the following output:
    PS D:\Tools\SubnauticaExtractor> C:\Tools\lua-5.3.6\lua53.exe .\mesh2obj.lua D:\Extraction\SubnauticaZero\worldmesh\RawMesh\Chunk-0-0-0.dat
    Chunk-0-0-0     17910 indices, 3178 points
    43 faces
    C:\Tools\lua-5.3.6\lua53.exe: .\mesh2obj.lua:59:
    
    3178 != 134919509
    
    
    stack traceback:
            [C]: in function 'assert'
            .\mesh2obj.lua:59: in local 'convert'
            .\mesh2obj.lua:117: in main chunk
            [C]: in ?
    

    I'm guessing either the file format has changed slightly - or the files got extracted slightly differently for some reason? :/ I didn't use AssetStudio because it doesn't recognize the new worldmesh.bundle file for me


    This is the first 1000 bytes of the Chunk-0-0-0.dat file I have:
    0B 00 00 00 43 68 75 6E 6B 2D 30 2D 30 2D 30 00
    01 00 00 00 00 00 00 00 F6 45 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 6A 0C 00 00 9E F9 7F 41
    33 F8 7F 41 9E F9 7F 41 31 03 80 41 E7 03 80 41
    31 03 80 41 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 02 01 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 0E 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 3E 25 00 00 E7 03 00 42
    AD AE 79 BB 7C 4A 00 00 FF FF 08 00 FF FB FF FF
    08 00 FF FF FF FB 08 00 FF FF FF F7 08 00 FF FB
    FF F7 08 00 FF FF FF F3 08 00 FF FF FF FF 08 00
    FF F7 00 F0 08 00 FF FF 99 ED 08 00 CC F8 00 EC
    08 00 FF FF 00 E8 08 00 FF FF CD E4 08 00 66 FA
    00 E4 08 00 FF FF 00 E0 08 00 FF FF 00 DC 08 00
    FF FF CC F8 08 00 66 F6 FF FF 08 00 FF F3 FF FF
    08 00 00 F0 CC F8 08 00 99 ED FF FF 08 00 00 EC
    FF FF 08 00 00 E8 FF F9 08 00 00 E4 FF FF 08 00
    00 E4 FF FF 08 00 00 E0 FF FF 08 00 00 DC AA F2
    08 00 AA F2 00 EB 08 00 00 F1 CC F8 08 00 67 DA
    FF FF 08 00 00 D8 FF FF 08 00 01 D4 33 EF 08 00
    99 E9 CC F8 08 00 9A D1 FF FF 08 00 01 D0 FF FF
    08 00 01 CC FF F1 08 00 00 E2 FF F8 08 00 01 CB
    FF FF 08 00 01 C8 FF FF 08 00 01 C4 FF FA 08 00
    01 C1 FF FF 08 00 01 C0 FF FF 08 00 01 BC FF FF
    08 00 01 B8 FF F1 08 00 00 D8 99 ED 08 00 34 D3
    00 E9 08 00 00 DD 00 E8 08 00 00 E2 DC DE 08 00
    00 E4 00 E6 08 00 00 EA CD E0 08 00 FF F3 FF F2
    08 00 01 C9 00 E8 08 00 01 CA 00 E6 08 00 00 D6
    AB DE 08 00 AB DA 00 DE 08 00 00 EE 9A D5 08 00
    00 F0 00 DA 08 00 FF F9 00 D8 08 00 FF FF 01 D4
    08 00 FF FF 67 D2 08 00 CC F8 01 D0 08 00 FF FF
    01 CC 08 00 FF FF 01 CA 08 00 FF F9 01 C8 08 00
    FF FF 01 C4 08 00 FF FF 01 C0 08 00 FF F9 01 C0
    08 00 FF FF 01 BC 08 00 FF FF 01 B8 08 00 FF FF
    02 B6 08 00 FF F9 02 B4 08 00 FF FF 02 B0 08 00
    FF FF 02 AA 08 00 FF FB 02 AC 08 00 FF FF 02 A8
    08 00 FF FF 02 A4 08 00 FF FF 02 A0 08 00 FF FF
    02 9C 08 00 FF F9 02 9C 08 00 FF FF 03 98 08 00
    FF FF 03 94 08 00 FF FF 03 92 08 00 FF F9 03 90
    08 00 FF FF 03 8C 08 00 FF FF AE 8A 08 00 AA FA
    03 88 08 00 FF FF 03 90 08 00 55 ED 69 96 08 00
    CC F0 03 84 08 00 FF FF 9D 81 08 00 CC F8 03 80
    08 00 FF FF 04 7C 08 00 FF FF 03 8A 08 00 FF F3
    AE 7A 08 00 AA FA 04 78 08 00 FF FF 04 74 08 00
    FF FF DF 72 08 00 FF F7 04 70 08 00 FF FF 04 6C
    08 00 FF FF 03 84 08 00 00 F1 04 78 08 00 FF F1
    04 6A 08 00 FF F9 04 68 08 00 FF FF 04 64 08 00
    FF FF 04 62 08 00 FF F9 05 60 08 00 FF FF 05 5C
    08 00 FF FF 04 6A 08 00 FF F1 05 60 08 00 24 F1
    05 5A 08 00 FF F9 05 58 08 00 FF FF 05 54 08 00
    FF FF 6C 4E 08 00 99 F9 05 50 08 00 FF FF 05 4C
    08 00 FF FF 05 48 08 00 FF FF 05 46 08 00 FF F7
    05 44 08 00 FF FF 06 40 08 00 FF FF 06 3C 08 00
    FF F9 06 3C 08 00 FF FF 06 38 08 00 FF FF 06 34
    08 00 FF FF 06 30 08 00 FF F9 06 30 08 00 FF FF
    06 2C 08 00 FF FF 06 28 08 00 FF FF 06 26 08 00
    FF F9 07 24 08 00 FF FF 07 20 08 00 FF FF 07 20
    08 00 FF F7 07 1C 08 00 FF FF 07 18 08 00 FF FF
    07 18 08 00 FF F9 07 14

    What I did notice is that the "faces" lengthalways appears to be "02 01 00 00" (258) in all the files I've tried - I'm wondering if that means the offsets have changed or if that's expected?

    If it's working for others on the latest version of the game files then I assume it's just an issue with corrupted files during the extraction process on my end.
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    Yes, below Zero has slightly changed the mesh format. I rewrote the script with these changes (therefore, it should not work with the original Subnautica).

    https://gist.github.com/hhrhhr/ee63fbcd280f6110cc2f8184da857964

    In the same commentary there is a link to statically compiled Lua 5.4 for those who have difficulties getting Lua for Windows.
  • BumbleweedBumbleweed Join Date: 2021-04-26 Member: 269467Members
    hhrhhr wrote: »
    Yes, below Zero has slightly changed the mesh format. I rewrote the script with these changes (therefore, it should not work with the original Subnautica).

    ...

    In the same commentary there is a link to statically compiled Lua 5.4 for those who have difficulties getting Lua for Windows.

    Amazing!

    Although I think gist missing the mesh_utils_bz file?

    The mesh2obj_bz.lua file is trying to require that module but it doesn't seem to be present
  • hhrhhrhhrhhr Russia Join Date: 2017-12-17 Member: 234462Members
    oh, I forgot about this file ;)
    I updated the gist, try it.
Sign In or Register to comment.