Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Eutechnyx textures (Nascar, ACR)

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Eutechnyx textures (Nascar, ACR)

Post by Chipicao »

Using aluigi's nascar_2013_arcc_files.bms script, I modified it a bit to extract only textures, and to add the missing DDS header.
UPDATE: The first 2 isses were solved thanks to deepshit.
1. Some textures are fine, some have interleaved black lines, others have black lines in mipmaps
2. Most files are bigger than what you would expect considering texture resolution, compression, and mipmap count - I'm thinking this could be related to the first issue

Image

Below are links to a few samples and the modified script.

Original_textures.zip
Rebuilt_header.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Chipicao on Thu Mar 27, 2014 4:43 pm, edited 6 times in total.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: Nascar '13 '14 textures

Post by deepshit »

They seem like xbox360 swizzled dds.
This might be a help :
viewtopic.php?f=18&t=8102
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: Nascar '13 '14 textures

Post by Chipicao »

I'm not very familiar with swizzling (just have a basic idea) but could that really be the case considering that
a. these are from a PC game
b. only maps and mipmaps smaller than 64px are affected

Image
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: Nascar '13 '14 textures

Post by deepshit »

Xbox swizzle algorithm aligns textures on 4KB and because of that any texture smaller than 128px becomes like what you see.
In your case I guess the textures are just aligned for swizzling but not swizzled.
that makes it easy to rebuild the textures.

Here is how : (for size < 128)
1.Remove the header (first 24 bytes)
2.Each mipmap takes : ((Width + 3)/4)*((Height + 3)/4) * blockSize Bytes (DXT1 blocksize = 8 and DXT3|5 blockSize = 16)
3.All parts are aligned to 256bytes.you should calculate mipmap pitch (Width /4 * blocksize) and copy that amount until the end of mipmap.
4.Now the mipmap is constructed. Repeat for other mipmaps.

There might be some program to do it but I'm not aware of it.
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: Nascar '13 '14 textures

Post by Chipicao »

Thanks, #3 really helped.
It turns out DXT1 lines are aligned by 256 bytes and DXT5 by 512 bytes, so it's related to the block size.
I also found that there's a block*1024 byte alignment for each mipmap (8192 for DXT1 and 16384 for DXT5).

I've updated the script to extract DXT1, DXT3 and DXT5 maps properly.
Next I'll add support for uncompressed textures.


P.S. I've seen that formula before on msdn but I've never undestood the logic behind it.
I mean, for a mipmap of 128x64 compressed with DXT1 the formula becomes (128+3)/4 * (64 + 3)/4 * 8 = 4388.5, which is clearly not true because the mipmap size is 4096 bytes. So what gives?
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
deepshit
advanced
Posts: 76
Joined: Tue Jan 31, 2012 9:43 pm
Has thanked: 41 times
Been thanked: 30 times

Re: Nascar '13 '14 textures

Post by deepshit »

Chipicao wrote: I also found that there's a block*1024 byte alignment for each mipmap (8192 for DXT1 and 16384 for DXT5).
That's exactly according to formula on #1.
Chipicao wrote: P.S. I've seen that formula before on msdn but I've never undestood the logic behind it.
I mean, for a mipmap of 128x64 compressed with DXT1 the formula becomes (128+3)/4 * (64 + 3)/4 * 8 = 4388.5, which is clearly not true because the mipmap size is 4096 bytes. So what gives?
(128+3) / 4 =32
(64 +3) /4 =16
32 * 16 = 512
512 * 8 = 4096

The division doesn't calculate floating points :)
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: Nascar '13 '14 textures

Post by Chipicao »

deepshit wrote:That's exactly according to formula on #1.
No, it's blockSize*1024 regardless of mipmap size.
deepshit wrote:The division doesn't calculate floating points :)
Thanks, that explains it.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: Nascar '13 '14 textures

Post by Chipicao »

I have updated the script once more:
- support for A8R8G8B8 DDS textures
- extension is always replaced with .dds
- textures are extracted in a folder with the same name as the ARC file

That should do it. If anyone finds other issues please let me know.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: Eutechnyx textures (Nascar, ACR)

Post by Chipicao »

I have started researching textures from Auto Club Revolution.

As opposed to Nascar, they are already extracted in .tex files, but the format is similar. There are no more alignments and each mip-map is individually compressed with zlib. :eek:
Here's a script I made to convert them to normal DDS. It supports DXT1-5, A8R8G8B8 and an additional G16B16 type.
You do not have the required permissions to view the files attached to this post.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
Post Reply