Forza Motorsport 1 ".XPR" Texture

Textures, recreate headers, conversions, algorithms and parsing of image files
AMG
Posts: 71
Joined: Sun Aug 10, 2014 1:13 pm

Forza Motorsport 1 ".XPR" Texture

Post by AMG »

Hi!
I'm attaching some textures from Forza Motorsport 1, ".XPR" format, which should be liveries for a car in 3 different quality (I assume).
Just for info, Forza Studio can only import ".XDS" and ".BIX" textures.
Teancum
Posts: 94
Joined: Mon Sep 22, 2014 5:13 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by Teancum »

AMG
Posts: 71
Joined: Sun Aug 10, 2014 1:13 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by AMG »

Thank you for the reply. I've tried the ".XPR" script and the file which comes out is a .dat.
Is it normal? And if yes, how should I handle it? I've tried to open it as an image and doesn't work.
NullRd
Posts: 19
Joined: Sat Jun 06, 2015 6:50 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by NullRd »

Texture compression seems to be DXT1, but one block contains two different textures with separated alpha channels. I've made bmscript to separate them, but alpha channel is decoded incorrectly. Dont know how it should be processed.

livery0nc.xpr - contains something weird (RGBA8888 ?), image data looks like junk.

https://www.sendspace.com/file/vn17ga
AMG
Posts: 71
Joined: Sun Aug 10, 2014 1:13 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by AMG »

Many thanks for your help. I've tried the script and it creates 4 .bmp images (which are not images though, not viewable) with a filesize around 1mb for each. And it does the same for every .XPR file, no matter the size. So I assume the script is not yet in a working state?
NullRd
Posts: 19
Joined: Sat Jun 06, 2015 6:50 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by NullRd »

I use BMP V2 unofficial structure for output, some programs may not support it.
You may try IrfanView - it can open this files and save them in different format.

Script is working, but it may require some tweaking.
First - I didn't make full XPR reader, it just begins read data from offset 2048. On XPR files with more than one entry you should use XPR unpacking script, and then - my script from offset 0.
Second - can't find where real width/height of the texture is stored. On your samples I just used 512x512.

Both tweaks can be done at line

Code: Select all

callfunction ExtractImage 1 2048 512 512

2048 - starting offset of image data
512 512 - width and height
Heavyshell
Posts: 2
Joined: Sun May 29, 2016 9:08 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by Heavyshell »

Hey! I've been trying to find out how to get textures from Forza 1 for a while and stumbled across this topic... I've got the .dat extracted from the .xpr file, but the link to NullRD's script is dead. Does anyone here have a backup copy of it?

Additionally, does anyone have info on extracting the actual models? There are a few cars I would love to get from this game that you don't see all that often, for example the Camry Solara and Nissan Altima. Thanks in advance!
NullRd
Posts: 19
Joined: Sat Jun 06, 2015 6:50 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by NullRd »

Heavyshell
Heavyshell
Posts: 2
Joined: Sun May 29, 2016 9:08 pm

Re: Forza Motorsport 1 ".XPR" Texture

Post by Heavyshell »

Thanks a ton!