XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Jan 22, 2019 3:16 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Star Ocean Anamnesis Tools
PostPosted: Fri Aug 17, 2018 12:55 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times

I have managed to make a working tool for loading the character/monster models. So I have decided to release it with some other tools I have been using.

Decompress ASF (possibly other files too)

Most of the character files use compression type 7 (zstd). You can use this to decompress them : https://www.mediafire.com/file/2spl5lxx ... Dec_U2.rar Drag and drop a folder on to the exe file and it will try to decompress all the files inside.

If your file has a different compression type, you can use this script : http://aluigi.org/bms/slz.bms . Note that both of these methods guess the decryption key, so you might need to decrypt it manually if the program/script fails.

3D Models

Use this tool for loading the models from ".asf" files. You need to decompress them before, as described above.

Overview
Image

How to use
- Select the file you want to use with Browse.
- Load : Loads the model :D
- Load Offset : If the meshes are misaligned with the skeleton try this option instead. For some models the offset is required, for others it is fine with just Load. I will try to figure this out automatically in a future update.
- Export IQE : Exports the model in IQE format. How to open/convert IQE: viewtopic.php?p=138153#p138153 New script with secondary uv support : viewtopic.php?p=143565#p143565

Download : http://www.mediafire.com/file/xdvou5263 ... r_U4_2.rar

Textures

This tool will extract textures as ktx, from the asf/aif files (as always decompress before) : http://www.mediafire.com/file/6126nmb4w ... SOATex.rar Drag and drop the asf/aif file on to the exe. You can open the extracted ktx with Mali Texture Compression Tool or PVRTextool.

Bonus - Bullet Girls Phantasia (PS Vita)

This game seems to use the same format as SOA. I have made some slight changes to support those files too, but I haven't tried it on lot of files yet. I will try to improve it in the future.

Image

There is room for improvement, and I am planning to work further on this as I have time. Still I wanted to release this version, as it seems to load good amount of character/monster models without a problem.

You can make the ads go away by registering



Last edited by akderebur on Mon Oct 22, 2018 4:05 pm, edited 6 times in total.

Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Fri Aug 17, 2018 9:16 pm 
Offline
ultra-n00b

Joined: Fri Aug 17, 2018 9:12 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
SOADec.exe not working for me. I drag cp0101_b01a.asf but nothing happen. Help please.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 2:21 am 
Offline
n00b
User avatar

Joined: Sat Dec 23, 2017 7:56 am
Posts: 17
Has thanked: 3 times
Have thanks: 1 time
warpawn wrote:
SOADec.exe not working for me. I drag cp0101_b01a.asf but nothing happen. Help please.

not work single file. you need drag folder.

akderebur wrote:
I have managed to make a somewhat working tool for loading the character models. So I have decided to release it with some other tools I have been using.

Decompress ASF (possibly other files too)

Most of the character files use compression type 7 (zstd). You can use this to decompress them : http://www.mediafire.com/file/x5jw5wydd ... SOADec.rar Drag and drop a folder on to the exe file and it will try to decompress all the files inside.

If your file has a different compression type, you can use this script : http://aluigi.org/bms/slz.bms . Note that both of these methods guess the decryption key, so you might need to decrypt it manually if the program/script fails.

3D Models

Use this tool for loading the models from ".asf" files. You need to decompress them before, as described above.

Overview
Image

How to use
- Select the file you want to use with Browse.
- Load : Loads the model :D
- Load Offset : If the meshes are misaligned with the skeleton try this option instead. For some models the offset is required, for others it is fine with just Load. I will try to figure this out automatically in a future update.
- Export IQE : Exports the model in IQE format. How to open/convert IQE: viewtopic.php?p=138153#p138153

Download : http://www.mediafire.com/file/oay3u5rkq ... porter.rar

Textures

This tool will extract textures as ktx, from the asf/aif files (as always decompress before) : http://www.mediafire.com/file/6126nmb4w ... SOATex.rar Drag and drop the asf/aif file on to the exe. You can open the extracted ktx with Mali Texture Compression Tool or PVRTextool.

Bonus - Bullet Girls Phantasia (PS Vita)

This game seems to use the same format as SOA. I have made some slight changes to support those files too, but I haven't tried it on lot of files yet. I will try to improve it in the future.

Image

There is room for improvement, and I am planning to work further on this as I have time. Still I wanted to release this version, as it seems to load good amount of character models without a problem.

really great work akderebur.
Some models have UV damage(ex, cc0001_b02a lenath shield and hands), Nevertheless you job really really excellent.
I have one request, you can support manually xor key input?
There are many files that can not be decrypted, cause the keys are different.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 3:44 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times
einherjar007 wrote:
Some models have UV damage(ex, cc0001_b02a lenath shield and hands),

There seems to be bunch of different vertex block types, so the uv offset/type was wrong for some meshes. You can download the updated tool from the link in the first post. It should fix the uv of that char.

Also I have improved the handling of vertex blocks and how skinned/non-skinned meshes are loaded. So more model support overall. Tried it on some monsters and seems fine.

Image

einherjar007 wrote:
I have one request, you can support manually xor key input?

Yes, I can do that. I will do it some time tomorrow.

warpawn wrote:
I drag cp0101_b01a.asf but nothing happen.

Like einherjar said, drag and drop the folder that has the asf files, on to the exe.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 9:29 am 
Offline
n00b
User avatar

Joined: Sat Dec 23, 2017 7:56 am
Posts: 17
Has thanked: 3 times
Have thanks: 1 time
akderebur wrote:
Yes, I can do that. I will do it some time tomorrow.


great! can't wait your update.

akderebur wrote:
There seems to be bunch of different vertex block types, so the uv offset/type was wrong for some meshes. You can download the updated tool from the link in the first post. It should fix the uv of that char.


I could confirm that Lenath shields are repaired, excellent work!
but, I tried [cc0001_b02a.asf, cc0002_b01a.asf] export, they're corrupted UV and Weight of the eye.
cc0001_b02a.asf does incorrect the weight of eyes.
cc0002_b01a.asf had incorrect UV coordinates of the eyes.
I've not tried other files yet, but I think they're have probably the same problems.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 10:58 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times
einherjar007 wrote:
cc0001_b02a.asf does incorrect the weight of eyes.

Incorrect or no weight? Both eye meshes seem to have no weight data, so they are exported as non-skinned.

einherjar007 wrote:
cc0002_b01a.asf had incorrect UV coordinates of the eyes.

Eyes seem fine to me. Is it not like this with you?
Image

If you encounter another problem send me a pm with a sample file. I didn't get all the files from the game, so I might be missing some.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 1:17 pm 
Offline
n00b
User avatar

Joined: Sat Dec 23, 2017 7:56 am
Posts: 17
Has thanked: 3 times
Have thanks: 1 time
akderebur wrote:
Incorrect or no weight? Both eye meshes seem to have no weight data, so they are exported as non-skinned.

very sorry, akderebur.
You're right, I'm wrong I used converter is old, wrong output result.

akderebur wrote:
If you encounter another problem send me a pm with a sample file. I didn't get all the files from the game, so I might be missing some.

You're definitely a hard worker. If find other problems, will send you a file, Thanks!


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sat Aug 18, 2018 11:44 pm 
Offline
n00b

Joined: Sun Mar 11, 2018 10:56 am
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
thx man ur tools work perfectly , just didnt realize that the model textures of this game is so small and bad compare to the in-game appearance


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 12:55 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times
I have updated the model tool again, make sure to download the latest version. It should be able to load great deal of monsters or any other skinned mesh now. Also has mesh names too. There might be slight problems with some models still, I will attempt a fix later. I will be busy for a couple of days. Non-skinned stuff like maps/weapons won't load at all probably, but support for those are not high priority.

Image

einherjar007 wrote:
great! can't wait your update.

I have updated the decompression tool too. Pass the custom xor key as the second parameter and as hex string. Example usage : "SOADec foldername 6361313266633931".

wansf wrote:
just didnt realize that the model textures of this game is so small and bad compare to the in-game appearance

Yes, there isn't much going on in terms of textures. There aren't even hair textures for characters. It seems like most of the magic is done via shaders in-game.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 3:21 am 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2511
Has thanked: 57 times
Have thanks: 1249 times
Can you add an option to output the decompressed buffers to load models not supported b the tool.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 6:12 am 
Offline
n00b
User avatar

Joined: Sat Dec 23, 2017 7:56 am
Posts: 17
Has thanked: 3 times
Have thanks: 1 time
http://www.mediafire.com/file/dtgmbl6h2 ... e.rar/file

I created a program to move only the decompressed files to "decrypt" folder.
It may be a slow, but I think a it will work until akderebur tool updates.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 9:20 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times
chrrox wrote:
Can you add an option to output the decompressed buffers to load models not supported b the tool.

I can do that, but I think it will be better/easier if I post the decompression code. I believe you can already get the index buffers using "addr" tags. After you get the buffer the first integer (2 bytes) is not part of the index list. It is the max step that you should use to decode the high watermark. So you read the first integer as max step, and use the methods below on rest of the buffer.

Code:
List<int> inverse_watermark_transform(List<int> in_inds, int max_step)
{
    List<int> out_inds = new List<int>();

    int hi = max_step - 1;
    foreach (int v in in_inds)
    {
        int decV = hi - v;
        out_inds.Add(decV);
        hi = Mathf.Max(hi, decV + max_step);
    }

    return out_inds;
}

Code:
List<int> unpack_inds(List<int> inds)
{
    List<int> out_inds = new List<int>();

    for (int i = 0; i < inds.Count;)
    {
        int a = inds[i++];
        int b = inds[i++];
        int c = inds[i++];
        out_inds.Add(a); out_inds.Add(b); out_inds.Add(c);

        if (a < b)
        {
            int d = inds[i++];
            out_inds.Add(a); out_inds.Add(d); out_inds.Add(b);
        }
    }

    return out_inds;
}


You pass the max step and the indices to the "inverse_watermark_transform" and get the decoded indices. Then you pass that result to "unpack_inds" and get the decompressed index list.

Source : https://fgiesen.wordpress.com/2013/12/1 ... mpression/


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 1:55 pm 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2511
Has thanked: 57 times
Have thanks: 1249 times
can you print the result of the inverse_watermark_transform decompression on this example
03 00 01 00 02 00 05 00 02 00 01 00 02 00 05 00 02 00
I just want to make sure I am reading it correctly.
3 should be the max_step?


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 2:15 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jul 08, 2011 10:36 am
Posts: 301
Has thanked: 43 times
Have thanks: 259 times
chrrox wrote:
can you print the result of the inverse_watermark_transform decompression on this example

I won't have access to my computer whole day. I can do it tomorrow.

chrrox wrote:
3 should be the max_step?

If it is the first integer in the buffer then yes, it should be the max step.


Top
 Profile  
 
 Post subject: Re: [WIP] Star Ocean Anamnesis Tools
PostPosted: Sun Aug 19, 2018 5:27 pm 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2511
Has thanked: 57 times
Have thanks: 1249 times
Never mind lol I feel stupid I got it now.

1st decomppression
[1, 2, 0, 3, 5, 6, 4, 7]
then back to triangles
1 2 0
1 3 2
5 6 4
5 7 6



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Crageo and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group