/dark-souls-map-viewer

WebGL viewer for Dark Souls and Dark Souls 2 maps.

Primary LanguageJavaScriptMIT LicenseMIT

Dark Souls Map Viewer

WebGL/three.js implementation of a map viewer for Dark Souls and Dark Souls 2, using the games' collision data.

The program is packaged as a Chrome app, but can be viewed in any browser by opening index.html. On some browsers (Firefox, Safari) this works fine, but on others you may need to open the page through http. The simplest way to do this, if you have python, is to run python -m SimpleHTTPServer in the dark-souls-map-viewer directory, then go to http://localhost:8000.

Details

Inspired by Vlad001's dksmv, from which I took the extracted map files for Dark Souls (rehosted by Kayin Nasaki here). There is also the Dark Souls Map Explorer, created by Kayin Nasaki. The map files for Dark Souls 2 were extracted by Ispohr. The .iv file format was deciphered by looking at Allanlw's eat.py. Wireframe rendering taken from Florian Boesch and Andreas Bærentzen.

The font used in the icons is Optimus Princeps Semi Bold.

.iv File Format

The .iv file format stores a number of triangle meshes together in index array format.

First 4 bytes: uint32 containing number of chunks.
Next 12 bytes: 3 float32s, use unknown.
Next 16 * (number of chunks) bytes: 4 uint32s containing:

  • Byte offset for start of vertex index data.
  • Number of indices.
  • Byte offset for start of vertex position data.
  • Number of vertices.

Vertex index data, 2 * (number of indices) bytes: 1 uint16 per index.
Vertex position data, 12 * (number of vertices) bytes: 3 float32s per vertex.

License

This content is released under the MIT License.