GithubHelp home page GithubHelp logo

pubg-maps's Introduction

PUBG & Fortnite | Terrain Maps

PlayerUnknown's Battlegrounds currently features seven maps: Erangel, Erangel Classic, Miramar, Sanhok, Vikendi, Karakin, and Camp Jackal. This repository provides information and scripts for extracting elevation and normal maps from the game's sources.

Please note that all preview images are downscaled to 8-bit 512px × 512px and should not be used for rendering (normal data is downsampled using bicubic resampling).

Erangel Height Map Erangel Normal Map
PUBG - Erangel elevation preview PUBG - Erangel normal preview
Erangel Classic Height Map Erangel Classic Normal Map
PUBG - Erangel Classic elevation preview PUBG - Erangel Classic normal preview
Miramar Height Map Miramar Normal Map
PUBG - Miramar elevation preview PUBG - Miramar normal preview
Sanhok Height Map Sanhok Normal Map
PUBG - Sanhok elevation preview PUBG - Sanhok normal preview
Vikendi Height Map Vikendi Normal Map
PUBG - Vikendi elevation preview PUBG - Vikendi normal preview
Karakin Height Map Karakin Normal Map
PUBG - Karakin elevation preview PUBG - Karakin normal preview
Camp Jackal Height Map Camp Jackal Normal Map
PUBG - Camp Jackal elevation preview PUBG - Camp Jackal normal preview

Fortnite

Apollo Height Map Apollo Normal Map
Fortnite - Apollo elevation preview Fortnite - Apollo normal preview
Papaya Height Map Papaya Normal Map
Fortnite - Papaya elevation preview Fortnite - Papaya normal preview

Please note that the Fortnite map should be rotated by 90° counter clockwise (and the normals converted accordingly).

How-To/DIY

Please note that the following steps might change with respect to the PUBG version, asset provisioning, and structure.

  1. Download UE Viewer by Gildor (umodel.exe).
  2. Locate your PUBG directory, e.g., C:\Program Files (x86)\Steam\steamapps\common\PUBG.
  3. Open your PUBG directory in UE Viewer, overriding game detection to 'Unreal engine 4.16'. Please note that the PAK files are AES encrypted (try Googling for the AES key, e.g., on Reddit or Gildor's forums).
  4. Filter for HeightMap or Texture2D_ (optional step)
  5. Export all heightmaps. This should create a UmodelExport\Game\Maps\Baltic\Art\HeightMap (Erangel), UmodelExport\Game\Maps\Erangel\Art\Heightmap (Erangel Classic), UmodelExport\Game\Maps\Desert\Art\Heightmap (Miramar), UmodelExport\Game\Maps\Savage\Art\Heightmap (Sanhok), UmodelExport\Game\Maps\DihorOtok\Art\Heightmap (Vikendi), UmodelExport\Game\Maps\Summerland\Art\HeightMap (Karakin), or UmodelExport\Game\Maps\Range\Art\Heightmap (Camp Jackal) folder in your current working directory.
  6. Run pubg-tga-slice.py for extracting and encoding the relevant tile data into lossless 16-bit and 8-bit pngs:
.\pubg-tga-slice.py -p .\UmodelExport\ -m erangel
.\pubg-tga-slice.py -p .\UmodelExport\ -m erangelclassic
.\pubg-tga-slice.py -p .\UmodelExport\ -m miramar
.\pubg-tga-slice.py -p .\UmodelExport\ -m sanhok
.\pubg-tga-slice.py -p .\UmodelExport\ -m vikendi
.\pubg-tga-slice.py -p .\UmodelExport\ -m jackal

...or for Fortnite extraction:

.\fortnite-tga-slice.py -p .\UmodelExport\ -m apollo
.\fortnite-tga-slice.py -p .\UmodelExport\ -m papaya
.\fortnite-tga-slice-athena.py -p .\UmodelExport\ -m athena

That's it. If the script exits without errors there should be lossless height and normal maps in the current working directory.

How-To/DIY | DEPRECATED (ubulk approach)

Please note that the following steps might change with respect to the PUBG version, asset provisioning and structure.

  1. Download the UE4 pak-file Unpacker by Haoose v0.5 (ue4pakunpacker.exe) - google for it, the sha256 hash of my file (latest) is (925565C55FF849BFAF6D1702BB69958D36325126099B4953384B772601CEB913) and it seems to be legit.
  2. Locate your PUBG directory, e.g., C:\Program Files (x86)\Steam\steamapps\common\PUBG.
  3. Unpack TslGame-WindowsNoEditor_erangel_heightmap.pak or TslGame-WindowsNoEditor_desert_heightmap.pak for Erangel or Miramar respectively. This should create a TslGame folder directly in C:, i.e., C:\TslGame\Content\Maps\Erangel\Art\Heightmap or C:\TslGame\Content\Maps\Desert\Art\Heightmap respectively comprising all resources required.

I tried to run steps 1. to 3. via a script as well but couldn't settle on how to provide and handle ue4pakunpacker yet. Feel free to have a look in pubg-pak-unpack.py. The following script requires the pip packages: numpy, pypng, and Pillow.

  1. Run pubg-ubulk-slice.py for extracting and encoding the relevant tile data into losless 16bit and 8bit pngs:
.\pubg-ubulk-slice.py --map erangel -tsl C:\TslGame --lod 0
.\pubg-ubulk-slice.py --map miramar -tsl C:\TslGame --lod 0

That's it. If the script exits without errors there shoud be 8192px × 8192px losless height and normal maps. The --lod parameter can be used for level of detail of --lod 0 (8k map), --lod 1 (4k map), and --lod 2 (2k map).

Details on the Map Encoding

Elevation and normals are packed into 512px × 512px × 32bit tiles. The first byte and the fourth byte are the 8bit coefficients of the normal. The second and third bytes encode a 16bit elevation/height. Moreover, every .ubulk tile file encodes the 512px × 512px tile as well as additional downscaled variations (mipmaps), probably LOD1 and LOD2. The binary size of each tile file accumulates to: 512px [width] × 512px [height] × 4bytes [1byte per channel] × (1 [lod0] + 0.25 [lod1] + 0.0625 [lod2]) = 1376256bytes = 1.31MiB

The following paragraphs enumerate the relevant tiles: the first two indices identify the Heightmap_x#_y#_sharedAssets group/directory, the following array contains the indices of tiles with normal/elevation data encoded.

pubg-maps's People

Contributors

cgcostume avatar nevecex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pubg-maps's Issues

Fortnite Map

Hey man, is there any sort of way to do this for Fortnites map?, maps can be found in the pak files with umodel at,

Athena/Maps/Landscape/Athena_Terrain_LS_00.umap
Athena/Maps/Landscape/Athena_Terrain_LS_01.umap
Athena/Maps/Landscape/Athena_Terrain_LS_02.umap
Athena/Maps/Landscape/Athena_Terrain_LS_03.umap
Athena/Maps/Landscape/Athena_Terrain_LS_04.umap
Athena/Maps/Landscape/Athena_Terrain_LS_05.umap

each Texture2D makes comes out has 128x128px (and there is alot in one umap alone) , so not sure if it is has easily has you did PUBG Maps.

Thanks..

fortnite chapter 2 map?

Any chance on a update to the current Fortnite Chapter 2 map, still can't get the script to run for the life of me.

map 3 sanhok

Hi,

Thank you for the DIY! Can you help with the new map Sahok aka savage? The heightmap files are exported slightly different for it. When I try to modify the python to allow for it I end up with an image with stitching that is off. I'm not sure how to adjust the script accordingly.

File structure of new map(the old maps are HeightMap_x0_y0_01_sharedAssets):

HeightMap_x0_y0_sharedAssets
HeightMap_x0_y1_sharedAssets
HeightMap_x0_y2_sharedAssets
HeightMap_x0_y3_sharedAssets
HeightMap_x1_y0_sharedAssets
HeightMap_x1_y1_sharedAssets
HeightMap_x1_y2_sharedAssets
HeightMap_x1_y3_sharedAssets
HeightMap_x2_y0_sharedAssets
HeightMap_x2_y1_sharedAssets
HeightMap_x2_y2_sharedAssets
HeightMap_x2_y3_sharedAssets
HeightMap_x3_y0_sharedAssets
HeightMap_x3_y1_sharedAssets
HeightMap_x3_y2_sharedAssets
HeightMap_x3_y3_sharedAssets

my modifications:

tslHeightmapPathsByMap = {
'erangel' : r'Maps\Erangel\Art\Heightmap',
'savage' : r'Maps\Savage\Art\Heightmap',
'miramar' : r'Maps\Desert\Art\Heightmap' }

Added savage to PathsByMap

asset_path = os.path.join(umodel_heightmap_path, 'Heightmap_x%d_y%d_sharedAssets\Texture2D_%d.tga')

removed 0%d from asset_path

tile_path = asset_path % (offsets[0], offsets[1], tile_index)

removed i from tile_path

What happened to Erangel ?

Sometime ago when I found this there used to be the height and normal for Erangel, but only the previews are left? Can you provide me with them please?

assertionerror occured

I executed all steps and executed py file but got assertionerror

File "C:\Users\username\Desktop\Erangel\Art\Heightmap\pubg-tga-slice.py", line 43, in
assert os.path.isdir(args.umodel_export_path)
AssertionError


solved

have to execute file in UmodelExport folder which contains "UmodelExport\Maps\Erangel\Art\Heightmap, UmodelExport\Maps\Desert\Art\Heightmap"

recent version of UEView creates "Game" folder as root not "UmodelExport"

Pubg maps

How can we export the lods(buildings) and arrange them correctly

Normal map tiles?

Can this be used to extract normal map tiles from PUBG? Instead of just height data? I am wanting to extract the map tiles to show the map like you would see it in game.

Regular Color PNGs

I was wondering: do you have regular color PNGs of the same exact dimensions and resolution of each of the height maps? I'd like to correlate the color pngs to the height values in the height maps if possible

Seams in the Apollo heightmap

There appear to be seams on the Apollo heightmap between each grid space, where the geometry is flatter.

image

image

image

This might be because the different terrain chunks aren't being joined together properly.

SRTM Data

Hey,

awesome that you found and extracted the fortnite height map.

Do you think there's a way to to convert that into SRTM data?
I'd like to import it into my osm database for a project of mine.

Julian

No such File or directory

Hello, I was trying to export the Athena Landscape from an older version of Fortnite and it gives me this error:

C:\Users\User\Desktop\map>C:\Users\User\Desktop\map\fortnite-tga-slice_athena.py -p .\UmodelExport\ -m athena extracting 144 tiles (normal and height data) ... Traceback (most recent call last): File "C:\Users\User\Desktop\map\fortnite-tga-slice_athena.py", line 194, in <module> extract_tiles(asset_path, offset_lookup[key], height_composite, normal_composite) File "C:\Users\User\Desktop\map\fortnite-tga-slice_athena.py", line 78, in extract_tiles tile = Image.open(tile_path) File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 2809, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\User\\Desktop\\map\\UmodelExport\\Game\\Athena\\Maps\\Landscape\\Athena_Terrain_LS_00\\Texture2D_123.tga'

I went to Athena_Terrain_LS_00 and there was no Texture2D_123.tga.
Does anyone know what to do in this situation?

Alpha Map

How did you know where the Parts of the Image must be set? Or can you program a Code so that the little Alpha Map pictures are converted to one Alpha Map picture, because in the folders are the Alpha Map Pictures too?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.