Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

The Last of Us Part II Remastered (PC) - ASCII exported by tlou2_pc_models.exe cannot be imported by secascii_tlou2_1.py or secascii_tlou2_2.py

Featured Replies

Hi everyone,

I'm trying to import models from The Last of Us Part II Remastered (PC).

I extracted the game archives successfully and generated .ascii files using tlou2_pc_models.exe.

To make debugging easier, I uploaded a package containing the extracted files and examples here:

https://github.com/randalfcastro-tech/TheLastOfUs2/upload

The uploaded package contains example .ascii files, matching .skel files and the Blender import scripts I tested.

Blender versions tested

I tested multiple Blender versions:

  • Blender 2.8

  • Blender 3.4

  • Blender 3.6 LTS

  • (also tried newer Blender versions)

The result is always the same.

Importers tested

  • secascii_tlou2_1.py

  • secascii_tlou2_2.py

Neither importer is able to import the generated ASCII files correctly.

Errors

Initially the importer failed because it assumes mesh names always contain:

meshName.split("_shader_")[1]

My exported meshes are simply named:

submesh_0

After fixing that manually, the importer crashes while reading the vertex data.

Example errors:

ValueError:
invalid literal for int() with base 10:
'-0.100126 0.697980 -0.015355'

or

ValueError:
invalid literal for int() with base 10:
'0 0 0 0'

The crash happens here:

linesPerVertex = 3 + uvCount
if boneCount != 0:
    linesPerVertex += 2

triangCount = int(f[vertexLine + vertexCount * linesPerVertex])

The importer is clearly losing synchronization with the ASCII layout.

What I found

By inspecting the exported ASCII manually, each vertex appears to contain something like:

Position
Normal
RGBA Color
UV0
UV1
UV2
Bone IDs
Bone Weights

which is different from what the importer expects.

Another strange thing is that the ASCII header reports:

boneCount = 0

but every vertex still contains bone IDs and bone weights.

The matching .skel file exists separately.

Questions

  1. Is this ASCII format newer than the one supported by secascii_tlou2_1.py and secascii_tlou2_2.py?

  2. Is there an updated Blender importer for the current PC version?

  3. Has the ASCII layout changed compared to previous versions?

  4. Should the importer always load the external .skel file even if boneCount is zero?

  5. Is there any documentation describing the current ASCII format?

Any information about the current exporter/importer or the ASCII specification would be greatly appreciated.

Thanks!

tlou2_pc.7z

Edited by Randalf2theReturn

  • Localization

Since model and skeleton in tlou2 game contained in different files, the tool generates them separated. Then you have to combine .ascii model with .ascii skeleton, by manually copy-pasting them, or concatenating files with copy command.

Edited by id-daemon

  • Author

Thanks for the clarification.

I have one question about the expected workflow.

When you say to concatenate the ASCII files, do you mean:

  • concatenate each mesh ASCII with its corresponding skeleton ASCII separately?

for example:

https://github.com/randalfcastro-tech/TheLastOfUs2/tree/main/baby-pack
baby-pack_5410F4BD_0.ascii
+ baby-pack_skel.baby-pack.ascii

and import that file,

or do you mean concatenate all mesh ASCII files together, then append the skeleton ASCII?

https://github.com/randalfcastro-tech/TheLastOfUs2/tree/main/baby-pack
baby-pack_5410F4BD_0.ascii
+ baby-pack_5410F4BD_1.ascii
+ baby-pack_5410F4BD_2.ascii
+ baby-pack_skel.baby-pack.ascii

Also, I tested another model:

door-far-screen-l_F6490CDA_0.ascii
https://github.com/randalfcastro-tech/TheLastOfUs2/tree/main/door-far-screen-l
This model has no visible skeleton at all, yet the importer still fails.

Does the importer always expect a skeleton section even for static meshes?

Or is the current Blender importer simply outdated for the latest ASCII format generated by asciitlou2_pc_models?

Thanks!

Edited by Randalf2theReturn

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.