DOA2/LE DC - HD TEXTURES Tutorial

Moderators: pcwzrd13, deluxux, VasiliyRS

cbnj
brutal
Posts: 248

DOA2/LE DC - HD TEXTURES Tutorial

Post#1 » Tue Dec 05, 2023 5:24 pm

This is a guide about how to create texture .bin files for doa2/le this allows you to use higher res textures too.

Every character/stage in game is split in two files, a .chr and a .bin.
The chr file contain the 3d model data and the headers for every texture in the bin file.
The bin file is just a concatenate of headerless pvr textures.
Last edited by cbnj on Mon Dec 11, 2023 1:57 am, edited 4 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#2 » Tue Dec 05, 2023 5:32 pm

For this example ill use KAS04 (aka naked kasumi) since this one holds the less textures for a character in game.

Open kas04 .chr in your hex editor and go to the offset the pointer at byte 3 tells you to go (046160 in this case).
Attachments
KAS04tex.zip
(9.61 KiB) Downloaded 34 times
KAS04files.zip
(189.34 KiB) Downloaded 34 times
byte3.jpg
byte3start.jpg
Last edited by cbnj on Tue Dec 05, 2023 11:37 pm, edited 3 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#3 » Tue Dec 05, 2023 5:48 pm

What you have now from this point to the end of the file are shifted left to rigth little endian hex simplified pvr headers for the textures in the bin file sorted out in arrays of 3 bytes each one
Attachments
headersblock.jpg
singleheader.jpg

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#4 » Tue Dec 05, 2023 5:56 pm

This is a normal pvr header structure:
data size-properties-resolution
This is how doa2 pvr header are:
resolution-properties-data size

This first header is telling this pvr image is:
256x256-4444vq-0020 data size (8bytes)
Clrearly this texture wont be 0020 size but we will find later how to read this value, for now that 20 corresponds to 8 bytes of the pvr texture header wich is not present in file but this value will be present for every character texture header.
Last edited by cbnj on Wed Dec 06, 2023 3:15 pm, edited 4 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#5 » Tue Dec 05, 2023 6:49 pm

If you are new whit hex you can sort things a bit copying thewhole headers table to a new file and add 1 padding byte to the end of each texture header (3 bytes) for a better understanding as ill do next, if you are exprienced whit hex you can setup the headers directly in the chr file.
(I added the padding whit zeroes but you better use another padding like 77777777,99999999,FFFFFFFF etc. Something you can quickly identify among all other numbers.)
Attachments
copied.jpg
sorted.jpg
Last edited by cbnj on Wed Dec 06, 2023 8:34 am, edited 6 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#6 » Tue Dec 05, 2023 7:01 pm

Is time to setup our new headers.
First, all my textures will be 256x256 so ill write the value 00010001 in every resolution byte (0100x0100=256x256).
Attachments
changedres.jpg
Last edited by cbnj on Wed Dec 06, 2023 8:35 am, edited 7 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST

Post#7 » Tue Dec 05, 2023 7:06 pm

Second thing is to change all the texture properties bytes to pvr texture 4444+vq compressed format.
(i chose 4444 because its a 4 bits alpha image wich will give soft translucent blending if the polygon support it, also the vq compression will make the texture to be way smaller file size than non vq compressed ones.
Attachments
changedproperties.jpg
Last edited by cbnj on Mon Dec 11, 2023 3:58 am, edited 1 time in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST Tutorial

Post#8 » Tue Dec 05, 2023 7:31 pm

Last thing to do is to setup the data size bytes, we will use only the first 3 pairs of bits leaving alone the last pair 0D.
Attachments
offsetvalues.jpg
discartedvalue.jpg
Last edited by cbnj on Tue Dec 05, 2023 9:25 pm, edited 3 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST Tutorial

Post#9 » Tue Dec 05, 2023 7:49 pm

To make this simpler and skip bunch of explanations fill all the data size bytes whit zeroes after the second header (the one whit value 0048200D) exept for the last value 0D on each one.
Attachments
filledup.jpg
Last edited by cbnj on Wed Dec 06, 2023 2:46 am, edited 10 times in total.

cbnj
brutal
Posts: 248

Re: DOA2/LE HD DREAMCAST Tutorial

Post#10 » Tue Dec 05, 2023 8:01 pm

Since all the textures will be the same size and format, we will sum 4800 to get the datasize value for every header since this is the data size of the first texture as the size byte of header two shows, datazise byte of header 1 will always be 0000200D

4800+4800=9000
9000+4800=D800
D800+4800=12000
12000+4800=16800
16800+4800=1B000, etc

Input each value in their respective place untill you fill all of the data size bytes (remember this should be done little endian).
And lastly add the value 2 to the first bit in the 3rd pair of bits of the byte to finish this headers.
(I did it this way so you can see how this values are inputted on each data size byte, altough is not necessary fill up whit zeroes this values if you know how to work whit hex values).
Note: in case your texture is diferent size/format you will haveto sum the quantity acordingly, at the end of the guide ill explain how to get this values.
Attachments
filledfixed.jpg
filledfixed+20.jpg
Last edited by cbnj on Mon Dec 11, 2023 3:36 am, edited 23 times in total.

  • Similar Topics
    Replies
    Views
    Last post

Return to “Modifications”

Who is online

Users browsing this forum: No registered users