Author Topic: Ultimate Pigg Viewer  (Read 2456 times)

bearpounder

  • Minion
  • **
  • Posts: 22
Ultimate Pigg Viewer
« on: March 14, 2017, 05:13:51 PM »
I am currently working on this. At the moment I am targeting exporting the GEO files.

The Geo exporter is working fine, so we can get OBJ files. Now I am knee deep in the "tricks.bin" stuff.
I have gotten as far as getting the data back out of the bin into human readable form so I could theoretically
create the MTL files to go with those OBJ files. There is just one major snag:

for the life of me I cannot figure out how to locate the image files used in the materials/textures. I mean
the file NAME is there but not sure where in the piggs said file is supposed to be found. If anyone has
any ideas at all please let me know. I would really like to get all the information directly from the piggs, however
in a worst case scenario I could build an index to query against but I would rather try and find stuff the way
the client finds stuff.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Ultimate Pigg Viewer
« Reply #1 on: March 15, 2017, 03:46:40 AM »
You're looking for a file under texture_library/ with the name portion that matches the texture name.

The client doesn't care about individual pigg files; it sees everything as one big VFS.

If you want to closely reproduce the way the client locates textures; indexing all of the names (regardless of subdirectory) in a big hash table is exactly what you need to do.

bearpounder

  • Minion
  • **
  • Posts: 22
Re: Ultimate Pigg Viewer
« Reply #2 on: March 15, 2017, 12:59:41 PM »
It is indeed what I did and it improved the performance substantially. Search feature rocks!

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Ultimate Pigg Viewer
« Reply #3 on: March 17, 2017, 06:41:35 PM »
Just some food for thought: If you want it to truly be a swiss-army knife tool, you're much better off ignoring individual piggs and loading the directory info from all of them at once to build a global VFS tree in memory. That's what the client does, and what Paragon Chat does for that matter. While opening individual piggs can sometimes make sense in one-off cases, I find the "big picture" view of all the data to be much more generally useful.