Jump to content
Korean Random
SkepticalFox

space.bin (CompiledSpace) - packer/unpacker

Recommended Posts

@AddNikita тестовые версии не интересны

On 2/1/2022 at 1:54 PM, AddNikita said:

Почему когда я пытаюсь декомпильнуть карту вылезает такая ошибка

пофиксил вроде

 

добавил распаковывалку ресурсов конкретной карты, чтобы все пакеты не распаковывать для WE:

tests/run_get_resources_for_world_editor.cmd

 

не тестировал, распаковывает скорее всего не все

Edited by SkepticalFox
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

@SkepticalFox _

3 hours ago, SkepticalFox said:

not tested, most likely unpacks not all

This works very good with models and textures extraction.

I like this idea to create a map specific unpacker.

I usually just extract the entire game, rename all .visual_processed and .primitive_processed with powershell commands, and use your tool to unpack specific space map, but it take some time.

I create a copy of your get_space_bin_for_tests.py and tried to add some lines to extract specific files like space.settings and {name}.cdata_processed 

 

for pkg_path in packages:
    name = pkg_path.stem
    try:
        with ZipFile(pkg_path, 'r') as zf:
            zf.extract(f'spaces/{name}/space.bin', './1.15.0.0')
            zf .extract(f'spaces/{name}/space.settings', './1.15.0.0')
            zf.extract(f'spaces/{name}/{name}.cdata_processed', './1.15.0.0' )
            print(pkg_path)
    except:
        pass

For some "technical" reason there is no extraction datas for .cdata_processed, but for space.settings it worked.

Edited by olix_vameshu
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
12 hours ago, olix_vameshu said:

For some "technical" reason there is no extraction datas for .cdata_processed, but for space.settings it worked.

pushed updates, now get_resources_for_world_editor.py unpacks cdata_processed / space.settings files

 

but it still does not load map dependencies well (textures/model lods/_hd textures), needs to be improved
Edited by SkepticalFox
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@AddNikita ты кстати разобрался, как сделать так, чтобы текстуры-атласы в WE норм отображались?

image.thumb.png.9c2e5f9e7863904ab7f3ae5a2618c15d.png

Edited by SkepticalFox
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@SkepticalFox сейчас попробую разобраться, если что-то получится. то напишу. Но мне кажется там что-то в файле самом, так как если отдалиться от объекта, то текстуры будут видны нормально.

@SkepticalFox походу проблема в том, что эдитору нужны png текстуры, а не dds

@SkepticalFox во всех lod-моделях, кроме lod4, присутствуют атласы, а вот в lod4 нет никаких атласов, только dds-текстуры, да и шейдер тоже другой используется.

image.png

Share this post


Link to post

Short link
Share on other sites

Текстуры атласов запакованы, можно держать as reference 

 

Может быть, после распаковки подгрузится? 

 

+ в одном из пакетов лежат png-исходники тайлов атласов

Edited by Pavel3333
  • Upvote 1

Share this post


Link to post

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

Может быть, после распаковки подгрузится? 

распаковки во что?)

я не видел непаковынный формат .atlas

я думаю тут один способ - собрать все тайлы в один dds самому ну и подменить .atlas -> .dds в visual файле

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites
8 hours ago, SkepticalFox said:

распаковки во что?)

я не видел непаковынный формат .atlas

я думаю тут один способ - собрать все тайлы в один dds самому ну и подменить .atlas -> .dds в visual файле

The atlas umpacker works ,but the result are at a very low resolution, so you may not have some great results. But you don't need it to see it like in game in editor because after you compile the space and test it it will use the already compiled ones from the game so there will be no problem , they will be displayed correctly.

So it's useless to edit each individual .visual by changing the .atlas into .dds.

Plus, after the space is compiled the destructible objects like fences, trees, cars,etc will not work,you will go through them, only the static objects will keep their solid collision. I've just compiled the "winter" malinovka for test and i had the upper results.

Edited by olix_vameshu
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@SkepticalFox в игре текстуры запакованы в атласы в dds формате, а UE хочет png, ну а скрипт от Пашки только в dds текстуру переводит, а менять все визуалы было бы проблемой...

Share this post


Link to post

Short link
Share on other sites
2 hours ago, AddNikita said:

@SkepticalFox в игре текстуры запакованы в атласы в dds формате, а UE хочет png, ну а скрипт от Пашки только в dds текстуру переводит, а менять все визуалы было бы проблемой...

Search for DDS Converter, export them into .png as is writen in the .visual file, check also that in visual file you will find some lines wich ask for .atlas and not .atlas_processed. I tried to rename the .atlas_processed into atlas but i did not had any great results either.

Share this post


Link to post

Short link
Share on other sites
4 hours ago, AddNikita said:

, а UE хочет png

ну хз, я по тем путям клал png - ничего не поменялось

4 hours ago, AddNikita said:

а менять все визуалы было бы проблемой...

вообще не проблема для питона

тем более что-то такое я уже делал для opengl render'а

https://github.com/mikeoverbay/nuTerra/blob/master/nuTerra/MapLoader/MapLoader.vb

Edited by SkepticalFox
  • Upvote 1

Share this post


Link to post

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

вообще не проблема для питона

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

 

15 часов назад, SkepticalFox сказал:

ну хз, я по тем путям клал png - ничего не поменялось

текстура скорее всего должна находиться и быть запакованой в атлас

Share this post


Link to post

Short link
Share on other sites

hello skepticalfox,

 

i have a error

 

Traceback (most recent call last):
  File "C:\SkepticalFox-wot-space.bin-utils-91456c2a8e44\tests\get_resources_for_world_editor.py", line 174, in <module>
    unpack_packed_xml(path)
  File "C:\SkepticalFox-wot-space.bin-utils-91456c2a8e44\tests\get_resources_for_world_editor.py", line 65, in unpack_packed_xml
    from xml_utils.XmlUnpacker import XmlUnpacker
ModuleNotFoundError: No module named 'xml_utils'

 

Sorry but i can´t find the error.

How can i fix it? 

 

Sincerly freak

Edited by freak527

Share this post


Link to post

Short link
Share on other sites

Здравствуйте, @SkepticalFox, могли бы обновить репозиторий, ибо не могу распаковать сегодняшние карты и ангары.

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...