Hello there,
I'm trying to figure out how to read the image encoding used for Star Ocean Anamnesis graphic assets. I found out that it's a variant of ETC2 RGBA but I can't seem to display it properly with PVRTexTool.
Could I get some input on how to improve the rendering or how to determine the exact compression used? Thanks in advance!
A small sample is included in this post.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
SOA graphic assets
-
- VIP member
- Posts: 1330
- Joined: Wed Nov 05, 2008 12:16 pm
- Has thanked: 2710 times
- Been thanked: 884 times
Re: SOA graphic assets
it is difficult to get accurate results from only one sample. what did your results look like?
i am not familiar with the graphics of this game, does this look correct to you? i entered 512 wide by 1024 tall with ETC2 rgba and header size 768 bytes in PVRTextool to get that.
i scaled it down by 50 percent so it will fit in the attachment,
it looks like some shuffling or something is needed to me to remove the scanlines.
i am not familiar with the graphics of this game, does this look correct to you? i entered 512 wide by 1024 tall with ETC2 rgba and header size 768 bytes in PVRTextool to get that.
i scaled it down by 50 percent so it will fit in the attachment,
it looks like some shuffling or something is needed to me to remove the scanlines.
You do not have the required permissions to view the files attached to this post.
Re: SOA graphic assets
Hello Ace,
Thanks for offering your help again
And yes, it does look good. That's the result I was able to get but I'm unable to remove the scanlines. I'm able to get all images after figuring out their size, but the scanlines are present in all of them.
How would one go about removing them?
I've included one more samples in case it can be of help to you.
Thanks for offering your help again
And yes, it does look good. That's the result I was able to get but I'm unable to remove the scanlines. I'm able to get all images after figuring out their size, but the scanlines are present in all of them.
How would one go about removing them?
I've included one more samples in case it can be of help to you.
You do not have the required permissions to view the files attached to this post.
-
- double-veteran
- Posts: 640
- Joined: Fri Jul 08, 2011 10:36 am
- Has thanked: 65 times
- Been thanked: 898 times
Re: SOA graphic assets
Those scanline artifacts seem to be because of the decryption. I think the bms script for the slz files isn't perfect yet.
You need to xor every 5th byte of 8 byte iterations, with 0x20. I mean like read 4 bytes, xor the 5th with 0x20, and read 3 bytes. It seems to produce the correct result.
Edit :
@Sorans Can you post or pm me the unpacked version of the first image too? I mean the file before running the bms script on it.
You need to xor every 5th byte of 8 byte iterations, with 0x20. I mean like read 4 bytes, xor the 5th with 0x20, and read 3 bytes. It seems to produce the correct result.
Edit :
@Sorans Can you post or pm me the unpacked version of the first image too? I mean the file before running the bms script on it.
You do not have the required permissions to view the files attached to this post.
Re: SOA graphic assets
Hello akderebur, thanks for your help!
Here's the original file you requested (for the image above)
You're also right about the SLZ script, it's not 100% finished and also cannot read some ADLD types according to what aluigi told me. I will replace the sample in my first post with the unreadable type.
EDIT: Would it be viable to edit the SLZ script to do what you said above, instead of XORing the file afterwards? (I'm not very familiar with the syntax yet)
Here's the original file you requested (for the image above)
You're also right about the SLZ script, it's not 100% finished and also cannot read some ADLD types according to what aluigi told me. I will replace the sample in my first post with the unreadable type.
EDIT: Would it be viable to edit the SLZ script to do what you said above, instead of XORing the file afterwards? (I'm not very familiar with the syntax yet)
You do not have the required permissions to view the files attached to this post.
-
- double-veteran
- Posts: 640
- Joined: Fri Jul 08, 2011 10:36 am
- Has thanked: 65 times
- Been thanked: 898 times
Re: SOA graphic assets
I am not very familiar with bms myself, but the attached script should do the trick. It xors the file before saving.Sorans wrote: EDIT: Would it be viable to edit the SLZ script to do what you said above, instead of XORing the file afterwards? (I'm not very familiar with the syntax yet)
You do not have the required permissions to view the files attached to this post.
-
- double-veteran
- Posts: 640
- Joined: Fri Jul 08, 2011 10:36 am
- Has thanked: 65 times
- Been thanked: 898 times
Re: SOA graphic assets
I am not sure if it will help at all with unpacking. The part I added xors the file after unpacking, so you still need to figure out the compression first.Sorans wrote: Now that the old SLZ format can be decrypted correctly, I'll try looking into how to unpack the unknown type I mentioned above.
Also I have noticed that Tri-Ace is changing more of the slz archives to type 7. Some model files that weren't type 7 before are now type 7. Mostly the character models. I hope someone can figure this out.
-
- double-veteran
- Posts: 640
- Joined: Fri Jul 08, 2011 10:36 am
- Has thanked: 65 times
- Been thanked: 898 times
Re: SOA graphic assets
Btw type 7 can be unpacked now. I have mostly used it for models, but might be useful for some texture files too. Check out this thread : http://zenhax.com/viewtopic.php?f=9&t=7149
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: SOA graphic assets
Image Type 0x2F - ETC2-RGB
Image Type 0x31 - ETC2-RGBA
Image Type 0x32 - EAC-RG11
Image Type 0x31 - ETC2-RGBA
Image Type 0x32 - EAC-RG11
Re: SOA graphic assets
That's in line with what I've found.
The only remaining thorn is that some of the encrypted files use different keys (different than even the one you helped me with on the other forum)
I've been trying to tweak the xor script to support those types too, without much success. (I've updated my post on the other forum)
The only remaining thorn is that some of the encrypted files use different keys (different than even the one you helped me with on the other forum)
I've been trying to tweak the xor script to support those types too, without much success. (I've updated my post on the other forum)