Daytona USA 2 Texture ripping help

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Daytona USA 2 Texture ripping help

Postby BrokenGamerX » Tue Feb 01, 2022 10:52 am

I have seen people say they have ripped textures from the games, but I cant seem to find a way to do it myself.
BrokenGamerX
 
Posts: 3
Joined: Tue Feb 01, 2022 9:56 am

Re: Daytona USA 2 Texture ripping help

Postby Bart » Tue Feb 01, 2022 4:17 pm

Wait for Revision 878 to be posted on the official Supermodel download page (probably sometime this evening when the build bot kicks in). I added a -dump-textures option, which will dump the texture RAM in each of the known formats to a corresponding BMP file. For example:

Code: Select all
supermodel roms\dayto2pe.zip -dump-textures


Play until you are at the scene you would like to dump textures for and then just quit Supermodel. Textures will be written out to the directory Supermodel was executed in.

Ian: if you get a chance, you might want to have a look at BMPFile.h. I have a bunch of structs (T1RGB5, A4L4Low, etc.) based on UploadTextureMip() in your engine's Texture.cpp. I think it's all correct but hopefully I didn't make a typo anywhere. I should have templatized the A4L4 and L8 variants the way I did L4...
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Daytona USA 2 Texture ripping help

Postby BrokenGamerX » Tue Feb 01, 2022 5:20 pm

I didn't know that is a planned feature :lol:
Thank you for the info
BrokenGamerX
 
Posts: 3
Joined: Tue Feb 01, 2022 9:56 am

Re: Daytona USA 2 Texture ripping help

Postby Bart » Tue Feb 01, 2022 6:44 pm

BrokenGamerX wrote:I didn't know that is a planned feature :lol:
Thank you for the info


It wasn't. I was about to tell you to just compile Supermodel and uncomment a line that dumps the textures but because I've heard this question before, I figured it was time to just add an option to let people do that. :)
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Daytona USA 2 Texture ripping help

Postby rokfpoewrkcpoqwkcp » Thu Feb 03, 2022 1:16 pm

Glad to see you back in the commit logs Bart. It's been a long (almost) 4 years. It's not the same without you. :D

PS.
I noticed the texture dumps show some artefacts and missing parts. I tried switching back to compression_method(0) and it seems to fix it?
Here's an example from Daytona 2, cropped and converted to jpg due to limitations but you get the idea.

t1rgb5 compression_method(3)
t1rgb5.jpg
t1rgb5.jpg (31.17 KiB) Viewed 236 times

t1rgb5 compression_method(0)
0_comp.jpg
0_comp.jpg (23.64 KiB) Viewed 236 times
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Daytona USA 2 Texture ripping help

Postby Bart » Fri Feb 04, 2022 5:54 pm

Thanks for pointing this out!

The big change I made is that I now write out the alpha channel, which requires using the BITMAPV4HEADER. The documentation is correct: the compression method must be set to BI_BITFIELDS in order to specify the alpha channel otherwise if 32 bits-per-pixel are specified with a compression value of 0 (BI_RGB), alpha is ignored. I only tested with IrfanView and everything looked fine but you are correct that things look wrong in MS Paint as well as Gimp. Hmm.

Well, what's happening is that some textures have the contour bit (the T bit) enabled in various pixels but when the textures are used in the game, contour processing is disabled on those polygons. The way the T-bit works is that when set, the pixel is transparent (so I write alpha = 0 when T = 1), but this capability can be controlled on a per-polygon basis by the mesh data. So even though there is one T1RGB5 format, there are in fact two ways of interpreting it. I've fixed the problem by writing out two T1RGB5 files.

If you open up the file in Gimp and look carefully, you will notice that the AM2 logo background in Daytona 2 is cut out (transparent) as it should be with contour processing enabled. But by changing the compression method back to 0, this is no longer the case. Also, if you open up e.g. the RGBA4 textures, you'll see the alpha channel is gone entirely.

Revision 879 should be built sometime tonight.

Glad to see you back in the commit logs Bart. It's been a long (almost) 4 years. It's not the same without you. :D


It's nice to be back. I wish I had more time to contribute :) I was really irritated that Apple never granted me permission to work on Supermodel. Reviewing open source project requests was not a priority for the company. I got a call more than a year and a half after I submitted my request from an apologetic lawyer claiming they were moving through their backlog of hundreds of OSS requests but then I quit 6 months later.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Daytona USA 2 Texture ripping help

Postby rokfpoewrkcpoqwkcp » Sat Feb 05, 2022 5:06 am

Ah, I see. I could see from the initial commit comments you were doing some alpha calculations, but I would never of worked all this out. I wasn't convinced compression 0 was a true fix per se.

I guess working for the big companies is both a dream and a crusher of dreams all at once. Must be plenty of tech guys and girls sat frustrated and suffocated at their corporate desks. :(
rokfpoewrkcpoqwkcp
 
Posts: 119
Joined: Mon Nov 18, 2019 3:40 pm

Re: Daytona USA 2 Texture ripping help

Postby Joaquim Gonçalves » Tue Feb 08, 2022 3:42 am

We need a tool to rip the textures and made it different for certain of games. :)
User avatar
Joaquim Gonçalves
 
Posts: 680
Joined: Wed Dec 10, 2014 5:12 pm
Location: Portugal


Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 1 guest