your command line is fine. But it would seem it's not finding any valid *.vap files in the 'input' folder. And just in case you think it will parse down subdirectories inside the 'input' folder, be assured it will not. It will only process *.vap files in 'input' folder itself. If your *.vap files are in input\someother directory, then you need to specify that directly.

Hi Volfin,

Tried to convert all txet (assuming those are the texture files) but I got an error, "unknown format -1" for each one. I renamed every file to vap.I extracted the files with Sir Kanes' extractor, could be that problem? Should I try quickbms?

your command line is fine. But it would seem it's not finding any valid *.vap files in the 'input' folder. And just in case you think it will parse down subdirectories inside the 'input' folder, be assured it will not. It will only process *.vap files in 'input' folder itself. If your *.vap files are in input\someother directory, then you need to specify that directly.

Hi Volfin,

Tried to convert all txet (assuming those are the texture files) but I got an error, "unknown format -1" for each one. I renamed every file to vap.I extracted the files with Sir Kanes' extractor, could be that problem? Should I try quickbms?

Thank you for your help!

yes everything was written for the quickbms files. I don't know the differences involved with the other extractor.

your command line is fine. But it would seem it's not finding any valid *.vap files in the 'input' folder. And just in case you think it will parse down subdirectories inside the 'input' folder, be assured it will not. It will only process *.vap files in 'input' folder itself. If your *.vap files are in input\someother directory, then you need to specify that directly.

Hi Volfin,

Tried to convert all txet (assuming those are the texture files) but I got an error, "unknown format -1" for each one. I renamed every file to vap.I extracted the files with Sir Kanes' extractor, could be that problem? Should I try quickbms?

Thank you for your help!

yes everything was written for the quickbms files. I don't know the differences involved with the other extractor.

Is there any chance, that you share the file structure of the texture files, so I can write a program to work with Sir Kanes' extractor? Maybe there's not much difference...

Is there any chance, that you share the file structure of the texture files, so I can write a program to work with Sir Kanes' extractor? Maybe there's not much difference...

The header is as follows:

Code:

struct HeaderVAP{ long Unknown0; short Unknown1; short Unknown2; short Unknown7; short Unknown8; short Width; short Height; short Format1; // MIP count maybe? short Format; long Unknown3; long Unknown4; long Unknown5; long Unknown6;};

Directly after the header comes the compressed texture data. How that data is formatted is dependent on the "Format" variable. The known "Format" codes are:

I made a texture tool for Sir Kanes extractor (fortunately, the data is already there, uncompressed ).It have basic functionality, and convert dxt1,5, bc4,5,7 textures. All you have to do is rename texture bin files to ".tex"Just put the files into the same folder as the exe, and it converts all tex to DDS. (you can figure out what is texture from names list)

PS: Can't found files for these types, so it's not converting these tho, and you need intel's photoshop plugin to work with BCx dds.

may I ask you a big favor?If you have time, could you please write down the file format of the model files?I've tried to figure out, and write a template in 010 Editor, but it drives me nuts. Sometimes it works,sometimes the values are offset by an unknown value (the tables for example, it points to an address, there's no vertex number).

I don't know nothing about python scripting, so your importer is not a good starting point for me

may I ask you a big favor?If you have time, could you please write down the file format of the model files?I've tried to figure out, and write a template in 010 Editor, but it drives me nuts. Sometimes it works,sometimes the values are offset by an unknown value (the tables for example, it points to an address, there's no vertex number).

I don't know nothing about python scripting, so your importer is not a good starting point for me

I would really appreciate your help!

This is because there is no one format. There's 10 to 15 distinct vertex buffer formats. And they can have various sub blocks per format. so it's a very messy thing to decode. I have no real documentation, I figure a block format out in 010, then add it to the python script. then when I or someone else encounters another format, I add it to the script as well. The only real documentation is the python script. It's not hard to read really.

if you see BB(3) in the code, I read in 3 bytes, but didn't assign them to a variable, so I just skipped themif you see new_var = BB(3), then 'new_var' is now an array of 3 bytes read in. new_var[0] would be the first new_var[1] would be the second etc.if you see new_var = BB(1)[0], then I immediately assigned the value read in to 'new_var' instead of assigning it as an array.

filehandle.seek(next_offset,0) # SEEK_SETfilehandle.seek(hdr_size,1) #SEEK_CURfilehandle.seek(0,2) # SEEK_END These all do exactly what they do in C, seek on the file stream either from the start (SET), the current position (CUR), or from the end (END).

may I ask you a big favor?If you have time, could you please write down the file format of the model files?I've tried to figure out, and write a template in 010 Editor, but it drives me nuts. Sometimes it works,sometimes the values are offset by an unknown value (the tables for example, it points to an address, there's no vertex number).

I don't know nothing about python scripting, so your importer is not a good starting point for me

I would really appreciate your help!

This is because there is no one format. There's 10 to 15 distinct vertex buffer formats. And they can have various sub blocks per format. so it's a very messy thing to decode. I have no real documentation, I figure a block format out in 010, then add it to the python script. then when I or someone else encounters another format, I add it to the script as well. The only real documentation is the python script. It's not hard to read really.

if you see BB(3) in the code, I read in 3 bytes, but didn't assign them to a variable, so I just skipped themif you see new_var = BB(3), then 'new_var' is now an array of 3 bytes read in. new_var[0] would be the first new_var[1] would be the second etc.if you see new_var = BB(1)[0], then I immediately assigned the value read in to 'new_var' instead of assigning it as an array.

filehandle.seek(next_offset,0) # SEEK_SETfilehandle.seek(hdr_size,1) #SEEK_CURfilehandle.seek(0,2) # SEEK_END These all do exactly what they do in C, seek on the file stream either from the start (SET), the current position (CUR), or from the end (END).

The rest should be self explanatory.

Oooh!

The binary reading part avoided my attention. Now it's really not that hard

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum