gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
762 stars 175 forks source link

Dumping non-POT textures #2688

Open JensRestemeier opened 2 years ago

JensRestemeier commented 2 years ago

I am trying to dump the textures from Jet Force Gemini, which uses many non-power-of-two textures. When they are dumped you get them expanded to the next higher power-of-two. I am not sure if that is a bug or a config option I can't find. I tried to detect and filter that in a post-process, but there are many textures that have intentional padding that gets lost that way.

Is there a way to dump the original texture as it is used by the N64, or get a log file which resolution a texture needs to be cropped to?

Xii-Nyth commented 2 years ago

Can you give an example of what you get and what the expected result is. Also, are you using accurate or inaccurate texture coodinates?

JensRestemeier commented 2 years ago

Unfortunately I don't have access to the previous PC, and I don't want to reproduce copyrighted graphics.

Clumsily simulated textures: This is how a texture is written to disk: written This is what I would expect. expected

Xii-Nyth commented 2 years ago

This could be due to the texture coordinate setting, but its not something ive ever run into, or seen other people mention on the various n64 game/texture editing discord servers I'm on. Assuming the name of the dumped files is correct (if you are using them for a texture pack), and it always expands from the top left, there is definetaly a plugin for gimp to batch resize the images.

I don't think its a "bug" exactly but and artifact caused by the games' method of doing things which hasnt been accounted for

JensRestemeier commented 2 years ago

The interesting bit is that if you run the game after that it expects the clamped size for exported textures, not the exported textures. I'll try to set it up tonight with the latest version to give you the exact plugin settings.