chunk_pc

I realized the shading being broken probably means I put wrong number to vertex type when patching chunkfile. That was indeed the case. I just pushed a new version which is just a bit less broken.
This is all amazing! I remember trying to forcibly replace that Brotherhood shipment chunk from that one BH mission with a cloned SR2 city block chunk, as a rudimentary attempt to test a "new island" but sadly that didn't work lmao. Can't wait to see what progress is made with this 🙏
 
This is all amazing! I remember trying to forcibly replace that Brotherhood shipment chunk from that one BH mission with a cloned SR2 city block chunk, as a rudimentary attempt to test a "new island" but sadly that didn't work lmao. Can't wait to see what progress is made with this 🙏
If the chunk was able to load, it would have still appeared at it's original location since object positions are global world coords. Did the game still run?
 
If the chunk was able to load, it would have still appeared at it's original location since object positions are global world coords. Did the game still run?
It ran but there was no visible change. It was a while ago so I can't remember the details of how I did it but I think it was just by hex editing the files
 
If you tried to put stuff in before, you may have noticed that half the triangles are missing.
This was because every other tri is flipped. Fixed now. Also UVs are just a bit less broken again.
Screenshot_20220720_143158.png
Screenshot_20220720_162450.png
 
Okay so the obj/mtl import/export is about as good as it can get now. It omits 2 things: unknown extra data that doesn't seem to do anything and extra uv sets.

Models may layer multiple textures on each other (for example, a brick wall texture with stain texture over it), and use different uv coords for them. Obj doesn't support this, so you get the first uv and lose the rest. Result is a brick wall without the stain texture, which looks more repetitive.

At some point I'll see what I want to replace obj with.
 
Last edited:

Attachments

  • Saints_Row_2_Stilwater_beta_map.png
    Saints_Row_2_Stilwater_beta_map.png
    11.7 MB · Views: 493
I was looking for a way to better organize my workflow and ended up writing a Kaitai Struct file that contains my current knowledge of chunk_pc files. Kaitai allows automatically generating parser code to a bunch of different languages, which should be useful for related projects from now on. It should also be much easier to read and extend than my old source code. I'm replacing the buggy parser in the map editor with this.

github.com/skelerang/sr2-ksy
sr2_chunk_pc.ksy

I noticed that someone else here has also tried kaitai:
https://formats.kaitai.io/saints_row_2_vpp_pc/
 
Last edited:
Back
Top