Page 3 of 5

Re: Hitman 2016 textures

Posted: Thu Jan 12, 2017 6:54 pm
by volfin
trexjones wrote:Not sure if I've missed something here or elsewhere, but have skeletons been figured into the picture yet? I'm super familiar with volfin's Alien tools and am just getting around to this one and the Deus Ex one, so I figured I'd check...
Generally I don't do skeletons, it adds an order of magnitude of time and complexity. especially when like with DeusEx and Hitman, the skeleton is in a separate file from the model. I'll often import original weights if I figure out the format, but so far, I've been unable to decipher how they are stored for Hitman/DeusEx:MD

Re: Hitman 2016 textures

Posted: Thu Jan 12, 2017 7:05 pm
by trexjones
Ah! Thanks for the heads up! Hopefully someone with the know-how and time feels compelled to look into it!

Re: Hitman 2016 textures

Posted: Fri Jan 27, 2017 3:39 am
by volfin
Minor Update:
- Ensure Object mode is active before attempting import
- Validated functionality back to Blender version 2.70 (oldest supported)

Edit: newer version below.

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 4:19 am
by hhchunter
volfin wrote:Minor Update:
- Ensure Object mode is active before attempting import
- Validated functionality back to Blender version 2.70 (oldest supported)
Hey Volfin, would you be able to update this to include support for these models.

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 5:11 am
by volfin
Can you tell me more about this model? Which chunk file did it come from, and what was the original directory/filename? It's format is completely different than every other model in the game I've seen. Is it even from Hitman?

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 5:45 am
by hhchunter
volfin wrote:Can you tell me more about this model? Which chunk file did it come from, and what was the original directory/filename? It's format is completely different than every other model in the game I've seen. Is it even from Hitman?
It came from an Alpha Build of the game which came with hashes, thus the filename. Interesting to hear that's completely different.

It might help to include options on the original script to import file extensions .prim & .pc_prim, because I guess that's what the real file format is for .dat files extracted in the PRIM folder is?

I've included another example

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 6:03 am
by volfin
Ah that explains it then. Yeah it's not that far off, but several key blocks are missing data and have different sizes. They also stored vertices as integers instead of floats which isn't how any of the models were stored in the release. I think I can make something that will load them, but it may not be that stable, I'd have to basically research the whole format again hehe.

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 6:42 am
by volfin
Ok this version adds support for Alpha version models (at least based on the two I saw.)

Enjoy.

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 8:24 am
by hhchunter
volfin wrote:Ok this version adds support for Alpha version models (at least based on the two I saw.)

Enjoy.
That was way faster than expected.
Adding extension support for .pc_prim would be helpful, saves mass renaming through command line.

EDIT: I have more work for you Volfin, seems like some sort of linked mesh file? Not sure what it contains :P

Re: Hitman 2016 textures

Posted: Mon Jan 30, 2017 8:01 pm
by volfin
hhchunter wrote: That was way faster than expected.
Adding extension support for .pc_prim would be helpful, saves mass renaming through command line.
I did:
Image
it will show those 3 extensions. And anyway if you just click the "Funnel" icon (filter), Blender will show all files. no need to rename anything.

hhchunter wrote: EDIT: I have more work for you Volfin, seems like some sort of linked mesh file? Not sure what it contains :P
i'll take a look, if it's simple i'll add it, if it's off the wall, I probably don't have time. I mean most of this stuff should be in the release game anyway right?

EDIT: yeah this one is a strange mix of the old and the new, and there's simply no way to tell from the file what version of what to use. I'd have to write a standalone importer just for this 'alpha' and since I doubt many have it, it's a lot of work for one or two people's benefit. Sorry, but I just don't have the time to spend on this.

Re: Hitman 2016 textures

Posted: Tue Jan 31, 2017 1:37 pm
by redcomet
is the 2016 agent 47 model out yet?
because i can't find it on any 3d model site.

Re: Hitman 2016 textures

Posted: Sun Nov 11, 2018 2:07 pm
by hhchunter
In lieu of HITMAN 2 being released and using the same texture format, but with a possibly slightly different header.

Quick analysis looks like it's dropped or moved around two bits?
- Height & width looks to be @ 0xC & 0xE.


Some examples of the new texture format can be downloaded from here

I've started rewriting cippyboy's simple texture conversion tool, however I need help / still need to remove it's dependencies on his RE libraries and somehow replicate them using std or something simple. I believe Volfin had done this previously but there wasn't any source I could continue/update or investigate from :( Makes it a bit of a hard task for someone who barely understands how to code.

https://github.com/HHCHunter/HITMAN/tre ... /G2TexConv

Re: Hitman 2016 textures

Posted: Sun Nov 11, 2018 6:24 pm
by volfin
hhchunter wrote:In lieu of HITMAN 2 being released and using the same texture format, but with a possibly slightly different header.

Quick analysis looks like it's dropped or moved around two bits?
- Height & width looks to be @ 0xC & 0xE.


Some examples of the new texture format can be downloaded from here

I've started rewriting cippyboy's simple texture conversion tool, however I need help / still need to remove it's dependencies on his RE libraries and somehow replicate them using std or something simple. I believe Volfin had done this previously but there wasn't any source I could continue/update or investigate from :( Makes it a bit of a hard task for someone who barely understands how to code.

https://github.com/HHCHunter/HITMAN/tre ... /G2TexConv
if you want the source code, all you have to do is ask. I mostly didn't give it out because it's an embarrassingly quick and dirty hack job, code is messy.

But you're welcome to the code if you want. Here's my version of Cippy's converter. The project is for Visual Studio 2017 but the code should work with older compilers.

Note that it's still dependent on the Eigen Math Library: http://eigen.tuxfamily.org/index.php?title=Main_Page (my version was from 2016 so hopefully newer versions still work fine)

https://drive.google.com/file/d/1gjODb4 ... sp=sharing

And yeah, looking at the files, I think the data offsets are all changed.

Re: Hitman 2016 textures

Posted: Sun Nov 11, 2018 6:41 pm
by hhchunter
if you want the source code, all you have to do is ask. I mostly didn't give it out because it's an embarrassingly quick and dirty hack job, code is messy.

But you're welcome to the code if you want. Here's my version of Cippy's converter. The project is for Visual Studio 2017 but the code should work with older compilers.

Note that it's still dependent on the Eigen Math Library: http://eigen.tuxfamily.org/index.php?title=Main_Page (my version was from 2016 so hopefully newer versions still work fine)

https://drive.google.com/file/d/1gjODb4 ... sp=sharing
Honestly was not expecting a reply that quick! Amazed you still have the files on hand.

Gonna have a read over this code and see if I can adapt it to detect HITMAN & HITMAN 2 textures.

Re: Hitman 2016 textures

Posted: Sun Nov 11, 2018 6:51 pm
by volfin
I can tell you two differences I already see. The top header used to have 16 bytes before the width/height, now it only has 12 bytes.

And the header overall used to be 92 bytes, the header_size could be found at byte 88 (stating header was 92 bytes)

But now the header is 144 bytes, with the header_size being found at byte 140 (stating header is 144 bytes)

If you make those two changes it may work. (or not, who knows what else has changed)