Jump to content
Korean Random
SkepticalFox

Разбор road_map.bin

Recommended Posts

В WoT 1.0 CT добавили road_map.bin

В enCore тесте производительности (также в WoT sandbox 1.0) он имел расширение xml

дополню описание темы позже, а пока можете делиться соображениями по распаковке

Edited by SkepticalFox
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites
from struct import unpack
import zlib

with open('road_map.bin', 'rb') as f:
	count = unpack('<I', f.read(4))[0]
	for i in range(count):
		size = unpack('<I', f.read(4))[0]
		data = f.read(size)
		assert data[:8] == b'\x00piz!\x90\xafB', data[:12]
		data = data[12:]
		unc_data = zlib.decompress(data)
		with open('road_map_unc_%d.bin' % i, 'wb') as fw:
			fw.write(unc_data)

Первая попытка подойти к road_map.bin

Edited by SkepticalFox
  • Upvote 3

Share this post


Link to post

Short link
Share on other sites

bin-файлы, которые были получены скриптом выше имеют примерно такой формат(kaitai):

meta:
  id: bin
  file-extension: bin
  endian: le
seq:
  - id: decal_settings
    type: decal_settings
  - id: cnt
    type: u4
  - id: testing
    type: test
    repeat: expr
    repeat-expr: cnt
types:
  decal_settings:
    seq:
      - id: texture_am
        type: str
        encoding: ascii
        size: 256
      - id: texture_nm
        type: str
        encoding: ascii
        size: 256
      - id: texture_gmm
        type: str
        encoding: ascii
        size: 256
      - id: skip
        size: 20
      - id: unknown
        type: f4
      - id: priority
        type: u1
      - id: parallax_amplitude
        type: f4
      - id: parallax_offset
        type: f4
  test:
    seq:
      - id: wtf
        type: f4
        repeat: expr
        repeat-expr: 29

 

Edited by SkepticalFox
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

https://bitbucket.org/SkepticalFox/bigworld-blender-tools-wot-wowp-wows/src/9ea7ef9c19104f7cd626d64f070a4d6f32791b6c/road_map_bin/road_map_bin_utils.py?at=master&fileviewer=file-view-default

Паковщик-распаковщик на питоне

Пока не особо понятно, где это можно использовать =)

  • Upvote 4

Share this post


Link to post

Short link
Share on other sites
17 часов назад, SkepticalFox сказал:

Пока не особо понятно, где это можно использовать =)

а с самого начала не понятно, что это и зачем ты это реверсишь

объясни в двух словах хоть, что за файлик

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
5 hours ago, Pavel3333 said:

объясни в двух словах хоть, что за файлик

https://ru.wikipedia.org/wiki/Parallax_mapping

я пока точно не уверен, но думаю, что благодаря нему на макс. настройках графики отображается реалистичная поверхность дорог (грязь, следы траков и прочее)

в этом файле ссылки на текстуры и координаты дороги( и еще какие-то параметры )

image.thumb.png.998c47539309c34bf4e21dde0987e761.png

Mud - грязь (англ.)

Edited by SkepticalFox
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...