Posts: 164
Threads: 4
Joined: Jul 2017
Testing different blending modes:
Normal blending seems right for the sprite, but it is wrong for the arrow. The arrow should look closer to Additive blending.
But that isn't right either. The sprite now is over-exposed.
So far, I couldn't find anything about how to blend blend shadows. Most online tutorials is about stencil buffer, which is for real-time shadowing.
https://en.wikipedia.org/wiki/Shadow_volume
In a way, I'm stumped. Oh crap...
I'll be taking a break to research more on this topic. I might rip something else at the mean time. If anyone can help, or have experience on blending, let me know. Thanks!
- Rufas
Posts: 1
Threads: 0
Joined: May 2021
Posts: 164
Threads: 4
Joined: Jul 2017
Messing around the quad files, I noticed Kuma (from Kumatanchi) have different animation tracks for her head and her body, but unlike Odin Sphere, her head isn't aligned with her body. That makes me suspect there is yet another assembly involved.
And indeed, there are yet another x,y data to position each animation tracks! That also means the sprites is assembled 2x times - from texture parts to frames, and then from frames to animation frames.
With the discovery of this new data, the quad file/player is revised. Do note this newer version isn't backward compatible with older quad file/player
In this "Skeleton" update, I bring you the new quad player and the following characters to play around.
DOWNLOAD
https://www.mediafire.com/file/11r22y2rr...13.7z/file
Until next time, take care!
- Rufas
Posts: 1
Threads: 0
Joined: Jul 2021
(01-16-2021, 03:42 PM)rufaswan Wrote: Got it solved! 4-bpp texture is multi-level swizzling. It also didn't help most of these images are in grayscale.
Instead of using a math formula to do everything, I decided to waste some memory and CPU power to unswizzle them by logic. Now, not only I can get 4-bpp at any size to unswizzle correctly, I also figured out how to handle landscape and portrait textures as well!
In short, for landscape texture 512x256 , you pad it to become a square 512x512 , and then unswizzle normally:
For portrait texture 256x512 , you split them into two square 256x256 and unswizzle them independently. You join them back after that.
I have everything on both GrimGrimoire and Odin Sphere on PS2 now. I can work on those too.
Until next update, take care!
- Rufas
I don't understand "In short"
"pad it" mean add 0x10000 bytes(0x200 * 0x100)? Or adding 8 null bytes to each 8 bytes?
Posts: 164
Threads: 4
Joined: Jul 2017
07-30-2021, 03:07 PM
(This post was last modified: 07-03-2023, 10:45 AM by rufaswan.
Edit Reason: updated for Quad Player v0.2
)
(07-13-2021, 08:54 AM)leafthelast Wrote: I don't understand "In short"
"pad it" mean add 0x10000 bytes(0x200 * 0x100)? Or adding 8 null bytes to each 8 bytes?
Hi! Sorry for late reply. "Pad it" means add zeroes to the end of pixel buffer, so a 512x256 image can become 512x512. It is line 305 on the source code : https://github.com/rufaswan/Web2D_Games/...n_FTEX.php
Just like Gunvolt, let's just put up a step-by-step tutorial on how to use my scripts:
Step 1) Get PHP 7.0+ from https://windows.php.net/download/ . You'll only need 3 files from the archive, "php.exe", "php7ts.dll", and "php.ini" (renamed from "php.ini-development"). My scripts doesn't need any PHP extensions.
Step 2) Download my GitHub repo https://github.com/rufaswan/Web2D_Games/ . You'll only need "psxtools" folder under "tools/psxtools".
PS2 GrimGrimoire + Odin Sphere
Step 3) Extract "DISC.CVM" from the game ISO. Use a CVM tool to extract its content.
UPDATE : to decrypt and extract the content of DISC.CVM, run
Code: php.exe psxtools/ps2_odin_CVMH_decrypt.php DISC.CVM
php.exe psxtools/php_isolist.php DISC.CVM
Step 4) Open cmd.exe , convert all .FTP to standard .RGBA/.CLUT file with
Code: php.exe psxtools/ps2_odin_FTEX.php *.ftp
NDS Kumatanchi
Step 3) Extract all files from the game ISO.
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/nds_kuma_FTEX.php *.ftx
Wii Muramasa
Step 3) Extract all files from the game ISO. Run this to decompress them.
Code: php.exe psxtools/wii_mura_FCMP_decode.php *
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/wii_mura_FTEX.php *.ftx
PSP Grand Knights History
Step 3) Extract all files from the game ISO.
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/psp_grand_FTEX.php *.ftx
VITA Muramasa Rebirth + Odin Sphere Leifthrasir + Dragon Crown
Step 3) Extract all files from the game ISO.
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/vita_mura_FTEX.php *.ftx
PS3 Dragon Crown + Odin Sphere Leifthrasir
Step 3) Extract all files from the game ISO.
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/ps3_odin_FTEX.php *.ftx
PS4 Dragon Crown Pro + Odin Sphere Leifthrasir + 13 Sentinels: Aegis Rim
Step 3) Extract all files from the game ISO with LibOrbisPkg
https://github.com/maxton/LibOrbisPkg
Step 4) Open cmd.exe , convert all .FTX to standard .RGBA/.CLUT file with
Code: php.exe psxtools/ps4_13sent_FTEX.php *.ftx
Step 5) As I do not use any image library, those CLUT and RGBA files are actually raw pixel data. You can convert them into PNG by running:
Code: php.exe psxtools/img_clut2png.php FILE.clut
php.exe psxtools/img_clut2png.php FILE.rgba
NOTE : the .tm2/.tpl/.gim/.gxt/.gtf/.gnf from Step 4 are actually decoded CLUT/RGBA , and can also be convert to PNG
Code: php.exe psxtools/img_clut2png.php FILE.tm2
php.exe psxtools/img_clut2png.php FILE.tpl
php.exe psxtools/img_clut2png.php FILE.gim
php.exe psxtools/img_clut2png.php FILE.gxt
php.exe psxtools/img_clut2png.php FILE.gtf
php.exe psxtools/img_clut2png.php FILE.gnf
Step 6) Since all .MBP/.MBS files are just revisions with added features, they are now merged into one script to make it easier to understand them. It is now convert to .V55 file instead.
.V55 is version 55 used on PS2 Odin Sphere.
Code: php.exe psxtools/quad_vanillaware_FMBP_FMBS.php [game] *.mbp/*.mbs
game =
ps2_grim 2007 PS2 GrimGrimoire
ps2_odin 2007 PS2 Odin Sphere
nds_kuma 2008 NDS Kumatanchi
wii_mura 2009 Wii Muramasa - The Demon Blade
ps3_drag 2013 PS3 Dragon's Crown
ps3_odin 2016 PS3 Odin Sphere Leifthsar
ps4_odin 2016 PS4 Odin Sphere Leifthsar
ps4_drag 2018 PS4 Dragon's Crown Pro
ps4_sent 2019 PS4 13 Sentinels: Aegis Rim
psp_gran 2011 PSP Gran Knights History
vit_mura 2013 Vita Muramasa Rebirth + DLC
vit_drag 2013 Vita Dragon's Crown
vit_odin 2016 Vita Odin Sphere Leifthsar
Step 7) .V55 file can then be convert to .QUAD for Quad Player v0.2.
Code: php.exe psxtools/quad_vanillaware_v55.php FILE.v55
Just like Gunvolt before https://www.vg-resource.com/thread-38568...#pid667970 , you can use tsr_cmdloop.php to loop through all of them. This is the usage command:
Code: php.exe psxtools/tsr_cmdloop.php EXTENSION "COMMAND"
On estimate, the total file size for this project, in QUAD+PNG pair for Quad Player, is around 3.5 GB. Converting them into PNG spritesheet is expected to be 20x-50x larger, so you'll have about 70 GB - 165.5 GB of stuff to upload.
Hope it helps. Enjoy!
- Rufas
Posts: 7
Threads: 0
Joined: Sep 2021
Thank you dear rufaswan for your great work and dedication to Vanillaware master pieces! I am a huge fan whose eyes are going blind searching for Odin Sphere gif sprites, I am working with android Nova launcher and KLWP and wanted to create an Odin Sphere theme that reflect the world of Erion and the beautiful cast of this game. If you would be so kind, can you share with us assembled sprites of the characters of the game? I do have a simple website that cuts assembled sprite sheets and animates them into gifs:
https://ezgif.com/sprite-cutter
this is a gif I made using this website from a ready sprite sheet I took from the games official website:
all I need are assembled sprites that are stacked after each other to show the motion of the gif!
if your interested, I have done previous themes for NEO The World Ends with You and Persona 5 Royal:
NEO TWEWY KLWP
P5R KLWP
It is my wish to do one for this game as well and I need all the help I can get since I'm lacking the gifs needed
can you please help a brother in need?? all I want are the characters idle animation assembled sprite sheets
Posts: 7
Threads: 0
Joined: Sep 2021
This is thanks to tweaking with your awesome quad player:
Now I need to follow your instructions regarding php download and looking for those quad files
I hope my spirit doesn't break before my brain
Posts: 164
Threads: 4
Joined: Jul 2017
09-07-2021, 03:50 PM
(This post was last modified: 06-01-2023, 11:30 PM by rufaswan.)
Hi! I think you're getting it on how to use quad player to get the assembled sprites. That's great!
As for convert the game files to quad files, it shouldn't not be too difficult for you. Basically you just make a new folder, copy "php.exe", "php7ts.dll", and "php.ini" from Step 1, and then copy "psxtools" from Step 2. Finally put the files you want to decode to the same folder and run the command accordingly. The working folder look like this:
Let me know if you have any problem. Good luck!
- Rufas
P.S. Are you exporting the sprites as animated GIF? I think you should use APNG instead. Vanillaware sprites have half-transparency parts that GIF does not support.
Posts: 7
Threads: 0
Joined: Sep 2021
09-09-2021, 11:36 AM
(This post was last modified: 09-09-2021, 11:37 AM by 3zizuz.)
(09-07-2021, 03:50 PM)rufaswan Wrote: Hi! I think you're getting it on how to use quad player to get the assembled sprites. That's great!
As for convert the game files to quad files, it shouldn't not be too difficult for you. Basically you just make a new folder, copy "php.exe", "php7ts.dll", and "php.ini" from Step 1, and then copy "psxtools" from Step 2. Finally put the files you want to decode to the same folder and run the command accordingly. The working folder look like this:
Let me know if you have any problem. Good luck!
- Rufas
P.S. Are you exporting the sprites as animated GIF? I think you should use APNG instead. Vanillaware sprites have half-transparency parts that GIF does not support.
Greetings dear,
I have started and done steps 1, 2 & 3; downloaded php files along with your repo psxtool folder and put them all in the same directory and extracted the CVM file from PS2 ver ISO file.
My problems start when I run CMD! at first I got the message saying that php is not a know batch, I googled it and installed a php environment and now the same command in step 4 tells me that it cannot find input file...
Please bear in mind that I'm not a php savvy but quick on the uptake, is there any prior setup that I need to do before step one? Aka prepare my pc for php environment, put php files in certain directory... etc.
I'm going in circles bro
Posts: 164
Threads: 4
Joined: Jul 2017
09-09-2021, 01:55 PM
(This post was last modified: 09-09-2021, 01:56 PM by rufaswan.)
(09-09-2021, 11:36 AM)3zizuz Wrote: I have started and done steps 1, 2 & 3; downloaded php files along with your repo psxtool folder and put them all in the same directory and extracted the CVM file from PS2 ver ISO file.
You are almost there! To open CMD, go to that directory and then type "cmd" on the location bar. You can continue Step 4 from there.
[attachment=12703]
There are no need to install anything, because it is meant to work like a portable app.
Hope it helps!
- Rufas
Posts: 7
Threads: 0
Joined: Sep 2021
(09-09-2021, 01:55 PM)rufaswan Wrote: (09-09-2021, 11:36 AM)3zizuz Wrote: I have started and done steps 1, 2 & 3; downloaded php files along with your repo psxtool folder and put them all in the same directory and extracted the CVM file from PS2 ver ISO file.
You are almost there! To open CMD, go to that directory and then type "cmd" on the location bar. You can continue Step 4 from there.
There are no need to install anything, because it is meant to work like a portable app.
Hope it helps!
- Rufas
I just noticed this part: "Use a CVM tool to extract its content"
where can I get the CVM tool to unpack the CVM file? I looked all over the web and could hardly find any clues
I skipped this cause I thought having the CVM file from ISO is enough. do I need to extract anything from it? furthermore, *.ftp ---> the * refer to the ftp image file I'm trying to get? and do I get it after unpacking the CVM?
I'm sorry for all the silly questions and thank you for being so helpful
Posts: 164
Threads: 4
Joined: Jul 2017
(09-09-2021, 04:52 PM)3zizuz Wrote: I just noticed this part: "Use a CVM tool to extract its content"
where can I get the CVM tool to unpack the CVM file? I looked all over the web and could hardly find any clues
I skipped this cause I thought having the CVM file from ISO is enough. do I need to extract anything from it? furthermore, *.ftp ---> the * refer to the ftp image file I'm trying to get? and do I get it after unpacking the CVM?
I'm sorry for all the silly questions and thank you for being so helpful
CVM tool is the tool by roxfan, available here
https://amicitia.miraheze.org/wiki/CVM
After you unpacked the .cvm file, you will have a a bunch of files. You'll be interested in .ftp and .mbp file pairs, and continue from there.
(*.ftp means files with "ftp" file extension)
... On second thought, considering CVM tool is also command line tool, so it can be equally difficult for you. So I ported the CVM tool (the extract part) to psxtools as PHP script. It should standardized the whole process and make it easier for you. I also updated step 3 on the tutorial on how to use it.
Let me know if you have any more problems. I'll fix the tutorial so other people can also use it.
Thanks,
- Rufas
Posts: 7
Threads: 0
Joined: Sep 2021
(09-10-2021, 03:07 PM)rufaswan Wrote: CVM tool is the tool by roxfan, available here
https://amicitia.miraheze.org/wiki/CVM
After you unpacked the .cvm file, you will have a a bunch of files. You'll be interested in .ftp and .mbp file pairs, and continue from there.
(*.ftp means files with "ftp" file extension)
... On second thought, considering CVM tool is also command line tool, so it can be equally difficult for you. So I ported the CVM tool (the extract part) to psxtools as PHP script. It should standardized the whole process and make it easier for you. I also updated step 3 on the tutorial on how to use it.
Let me know if you have any more problems. I'll fix the tutorial so other people can also use it.
Thanks,
- Rufas
I ran the CLIs but got the following loop messages:
Warning: Uninitialized string offset 342693888 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
PHP Warning: Uninitialized string offset 342695936 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
and at the end I get this:
PHP Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
please note that I have 326 GB free space in my laptop!!
I'm losing hope here..
Bro, I have the disassembled sheets for all chars, if I use your quad frame player, can you just share with me the .quad + .mbp files pairs for the main and supporting cast? Won't I be able to reanimate them in your player to get their frame by frame to build the gifs?
Posts: 164
Threads: 4
Joined: Jul 2017
(09-10-2021, 04:10 PM)3zizuz Wrote: I ran the CLIs but got the following loop messages:
Warning: Uninitialized string offset 342693888 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
PHP Warning: Uninitialized string offset 342695936 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
and at the end I get this:
PHP Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
please note that I have 326 GB free space in my laptop!!
I'm losing hope here..
The error is now fixed. Please redownload "psxtools" from my repo and try again.
(09-10-2021, 04:10 PM)3zizuz Wrote: Bro, I have the disassembled sheets for all chars, if I use your quad frame player, can you just share with me the .quad + .mbp files pairs for the main and supporting cast? Won't I be able to reanimate them in your player to get their frame by frame to build the gifs?
The problem is this project is still WIP, and assembled sprites is still broken. I only posted the "nice looking" ones here. If I figured something out, I'll update the script, and you can rerip them again.
Good luck!
- Rufas
Posts: 7
Threads: 0
Joined: Sep 2021
09-11-2021, 01:48 PM
(This post was last modified: 09-11-2021, 02:54 PM by 3zizuz.
Edit Reason: Update
)
(09-11-2021, 12:43 PM)rufaswan Wrote: (09-10-2021, 04:10 PM)3zizuz Wrote: I ran the CLIs but got the following loop messages:
Warning: Uninitialized string offset 342693888 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
PHP Warning: Uninitialized string offset 342695936 in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\ps2_odin_CVMH_decrypt.php on line 332
and at the end I get this:
PHP Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
Notice: fwrite(): Write of 1 bytes failed with errno=28 No space left on device in C:\Users\beelz\Pictures\Odin Sphere\ISO\psxtools\common.inc on line 379
please note that I have 326 GB free space in my laptop!!
I'm losing hope here..
The error is now fixed. Please redownload "psxtools" from my repo and try again.
(09-10-2021, 04:10 PM)3zizuz Wrote: Bro, I have the disassembled sheets for all chars, if I use your quad frame player, can you just share with me the .quad + .mbp files pairs for the main and supporting cast? Won't I be able to reanimate them in your player to get their frame by frame to build the gifs?
The problem is this project is still WIP, and assembled sprites is still broken. I only posted the "nice looking" ones here. If I figured something out, I'll update the script, and you can rerip them again.
Good luck!
- Rufas
The new codes worked like charm, please don't forget to mention to people that they need to increase php.ini file memory_limit to more than standard value of 128Mb, otherwise they will hit the limit before extracting the full CVM file.
this is done by opening the php.ini, looking up the word "memory_limit" than deleting 128Mb and writing something like 2048mb
this way, full CVM will be extracted and will be of 3.22 GB size
Please note that I'm unable to user the *.ftp command (is it supposed to convert all files with .ftp extension to .tm2 files in one go? if yes, than it's not working with the following error:
PHP Warning: file_get_contents(*.ftp): Failed to open stream: No such file or directory in C:\directory_path\DISC_CVM\psxtools\ps2_odin_FTEX.php on line 461
so I only used default names or one by one like odet.ftp or gwendlyn.ftp and got meta files along with two .tm2 files for each character, is this supposed to be the right way? cause I feel that this is missing the full radius of characters motion since I see other .ftp files for attacking, hurting, eating...etc.
Another question dear, after I receive the .tm2 files from converting their respective .ftps for each character, how do I convert them into sprite sheets or PNGs? simply renaming their extension isn't cutting it and the result file is a dud png...
I got the quad files alright! Also, will your quad player be able to assemble and play all characters even those that weren't included in the demo provided I give it the PNGs and their respective quads or is it coded for your provided demo files only?
|