July 20Jul 20 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/uploadThe uploaded package contains example .ascii files, matching .skel files and the Blender import scripts I tested.Blender versions testedI tested multiple Blender versions:Blender 2.8Blender 3.4Blender 3.6 LTS(also tried newer Blender versions)The result is always the same.Importers testedsecascii_tlou2_1.pysecascii_tlou2_2.pyNeither importer is able to import the generated ASCII files correctly.ErrorsInitially the importer failed because it assumes mesh names always contain:meshName.split("_shader_")[1]My exported meshes are simply named:submesh_0After 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'orValueError: 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 foundBy inspecting the exported ASCII manually, each vertex appears to contain something like:Position Normal RGBA Color UV0 UV1 UV2 Bone IDs Bone Weightswhich is different from what the importer expects.Another strange thing is that the ASCII header reports:boneCount = 0but every vertex still contains bone IDs and bone weights.The matching .skel file exists separately.QuestionsIs this ASCII format newer than the one supported by secascii_tlou2_1.py and secascii_tlou2_2.py?Is there an updated Blender importer for the current PC version?Has the ASCII layout changed compared to previous versions?Should the importer always load the external .skel file even if boneCount is zero?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 July 20Jul 20 by Randalf2theReturn
July 20Jul 20 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 July 20Jul 20 by id-daemon
July 20Jul 20 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.asciiand 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.asciiAlso, 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 July 20Jul 20 by Randalf2theReturn
July 22Jul 22 Localization secasciiBlender importer is not outdated, but i dont recommend using it with skeletal meshes, because some weights will be broken. It was made for quick load of large map levels. For skeletals, use john zero plugin or one of its forks.tlou2 tool was optimized for noesis plugin, so any mesh can be viewed even without merging it with a skeleton.But if you want to load into blender, you can do it in any way, one by one (concatenate each mesh ASCII with its corresponding skeleton ASCII separately), or all at once (concatenate all mesh ASCII files together, then append the skeleton ASCII).To do that, you need to first edit a few first lines of each ascii file: first line "0" is bone count. You need to replace it with a full skeleton. Second line is mesh count. For one single file its ok, but if you want to merge multiple files, you need to replace this number with total count for all files, and remove it from all files except the very first one.As for static meshes, they must be loaded without any changes. The skeleton section with only a "0" number of bones will be loaded fine. But the door is probably NOT a static mesh, more likely its a skeletal mesh with one bone to make it rotated. I can't tell without seeing the actual file though. Edited July 22Jul 22 by id-daemon
Create an account or sign in to comment