GithubHelp home page GithubHelp logo

burnieliang / pubg-maps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cgcostume/pubg-maps

0.0 2.0 0.0 838.14 MB

PlayerUnknown's Battlegrounds | Terrain Maps - Heights and Normals

Python 100.00%

pubg-maps's Introduction

PlayerUnknown's Battlegrounds | Terrain Maps

PlayerUnknown's Battlegrounds currently features two maps: Erangel and Miramar. This repository provides information and scripts for extracting elevation and normal maps from the game's sources. In addition, the extracted maps are available as well in full, losless detail.

Please note that all preview images are downscaled to 8bit 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
Download Height Maps Download Normal Maps
:godmode: 8192px × 8192px, 16bit, grayscale, png :godmode: 8192px × 8192px, 8bit, rgb, png
:suspect: 4096px × 4096px, 16bit, grayscale, png :suspect: 4096px × 4096px, 8bit, rgb, png
:hurtrealbad: 2048px × 2048px, 16bit, grayscale, png :hurtrealbad: 2048px × 2048px, 8bit, rgb, png
Miramar Height Map Miramar Normal Map
pubg_miramar_elevation_preview pubg_erangel_normal_preview
Download Height Maps Download Normal Maps
:godmode: 8192px × 8192px, 16bit, grayscale, png :godmode: 8192px × 8192px, 8bit, rgb, png
:suspect: 4096px × 4096px, 16bit, grayscale, png :suspect: 4096px × 4096px, 8bit, rgb, png
:hurtrealbad: 2048px × 2048px, 16bit, grayscale, png :hurtrealbad: 2048px × 2048px, 8bit, rgb, png

How-To/DIY

Please not 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 is (A00A579504D0594BE15377DB5DE07D916AD5E1047D15AD555B5A109E71219B5E) 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

Watchers

 avatar  avatar

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.