Users browsing this thread: 1 Guest(s)
Vanillaware Ripping Project
#46
Greetings dear Rufas,

my quest at making GIFs has been smooth sailing (almost) so far due to your help, I'm making good progress but hampered with some characters due to their sprite sheet order/organization. my source is not the original game TM2 files but instead, sheet, that have been ripped by someone else online and they might have been from the Japanese's game? IDK..

Can you please teach me how to convert .tm2 files to png sensei? of course I tried the conventional way of just adding .ng extension to the file name but of course it didn't work out.
Reply
Thanked by:
#47
Hey! Never expect you edit/update the post. I didn't receive any notification from the site, so I thought everything were fine.

(09-15-2021, 08:42 AM)3zizuz Wrote: 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:
Code:
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.

Well, if you run this directly after step 3, your command should be

Code:
php.exe  psxtools/psp_grand_FTEX.php  DISC_CVM/odet.ftp
php.exe  psxtools/psp_grand_FTEX.php  DISC_CVM/gwendlyn.ftp

That's because the files are in "DISC_CVM" folder. You'll need take that into account.

But windows cmd.exe has character limit, so the next few steps to batch convert everything is

Code:
php.exe  psxtools/tsr_cmdloop.php  ftp  "php.exe  psxtools/ps2_odin_FTEX.php"
php.exe  psxtools/tsr_cmdloop.php  mbp  "php.exe  psxtools/quad_ps2_odin_mbp.php  -odin"
php.exe  psxtools/tsr_cmdloop.php  tm2  "php.exe  psxtools/img_clut2png.php"

So for odet.ftp and odet.mbp pair, you'll get the "odet" set, which includes:

Code:
odet.0.tm2
odet.1.tm2
odet.0.tm2.png
odet.1.tm2.png
odet.quad

Do not confused with "odet_event01" set and "odet_icon" set. They are separate sets.

Anything that isn't in ftp and mbp pair are for mix-and-match (refer the update at https://www.vg-resource.com/thread-38430...#pid667163).

Keep the 2 .tm2 if you intend to want to run Step 6. For Quad Player, it needs the both .png and .quad (you already know this).

Do note that Step 6 is causing duplicate pixel problem on another game (https://www.vg-resource.com/thread-38568...#pid669578). The current solution is to use Quad Player and save each sprites one-by-one, at least for now.

Hope it helps,
- Rufas
Reply
Thanked by: tombmonkey
#48
Should this topic also list non-Vanillaware games that use the same .quad format as Vanillaware? For example, many Inti Creates titles use the format, namely the Azure Striker Gunvolt series in their PC releases (not sure about the 3DS originals), the Blaster Master Zero games, and Dragon Marked For Death. It might be able to add more interest to the project, and consolidate the Gunvolt project together with this one.
Reply
Thanked by:
#49
Hi @miru ! The quad format is still WIP right now. I just discovered looping point on animation, so the whole section needs to be redo.

Also, I was debugging Princess Crown with @tombmonkey on the other day, we discovered both Quad Player and quad_render.php completely broken with working with irregular quads, like the arrow/dart shaped (> or <), and twisted quad like this (at 1:17):



Currently looking for a solution to this problem. More data will be added to quad format if required.

Until the project is finished, where the quad format specification is finalized, frozen and publicly released, the focus of quad format is to be used for Vanillaware games only. (and Gunvolt uses a simplified subset of Vanillaware games anyway).

More work is still needs to be done.
- Rufas
Reply
Thanked by:
#50
Happy Thanksgiving!

Thanks to @tombmonkey for helping me to get the files from PS3 and PS4 ISO. I can add 2 PS3 Vanillaware games and 3 PS4 Vanillaware games to the list. The project is now has 14 games!

- updated the game list on the first post
- updated the step-by-step tutorial

[Image: c7gLNBt.png]

Let's do a bit comparison for titles on multiple consoles:

Odin Sphere
PS2 : textures uses 256 color palette
VITA : added more parts. uses DXT 1/3/5 codec. size is the same as PS2.
PS3 : uses DXT 3/5 codec. size is 2x VITA
PS4 : uses DXT 5 and DirectX11 BC7 codec. size is same as PS3

Muramasa
Wii : textures uses 256 color palette, some background uses DXT1 codec
VITA : uses DXT 5 codec. size is same as Wii.

Dragon's Crown
VITA : textures uses DXT 3/5 codec.
PS3 : same as VITA
PS4 : uses DirectX11 BC7 codec. size is 2x VITA.

So, nearly everything needed to be upload...

Also, PS4 textures are 4K HD resolution, and it is amazingly HUGE. Remember I said the project is 3.5 GB? Well a folder on PS4 Dragon Crown Pro is already 10 GB...  3.5 GB is nothing Nervous

Until next update, take care!
- Rufas
Reply
Thanked by:
#51
(11-25-2021, 05:39 PM)rufaswan Wrote: Happy Thanksgiving!

Thanks to @tombmonkey for helping me to get the files from PS3 and PS4 ISO. I can add 2 PS3 Vanillaware games and 3 PS4 Vanillaware games to the list. The project is now has 14 games!

- updated the game list on the first post
- updated the step-by-step tutorial

[Image: c7gLNBt.png]

Let's do a bit comparison for titles on multiple consoles:

Odin Sphere
PS2 : textures uses 256 color palette
VITA : added more parts. uses DXT 1/3/5 codec. size is the same as PS2.
PS3 : uses DXT 3/5 codec. size is 2x VITA
PS4 : uses DXT 5 and DirectX11 BC7 codec. size is same as PS3

Muramasa
Wii : textures uses 256 color palette, some background uses DXT1 codec
VITA : uses DXT 5 codec. size is same as Wii.

Dragon's Crown
VITA : textures uses DXT 3/5 codec.
PS3 : same as VITA
PS4 : uses DirectX11 BC7 codec. size is 2x VITA.

So, nearly everything needed to be upload...

Also, PS4 textures are 4K HD resolution, and it is amazingly HUGE. Remember I said the project is 3.5 GB? Well a folder on PS4 Dragon Crown Pro is already 10 GB...  3.5 GB is nothing Nervous

Until next update, take care!
- Rufas

Any chance I can get a dump of the ripped in game character files?
Reply
Thanked by:
#52
(12-17-2021, 01:34 PM)messusatsu Wrote: Any chance I can get a dump of the ripped in game character files?

You mean 13 Sentinels? You can use the tutorial to get the texture for now. The quad files will have to be wait after the quad file specifications is done.
- Rufas

P.S. 13 Sentinels is coming to Nintendo Switch on 12th April 2022. I wonder if it is also 4K HD like PS4?
Reply
Thanked by:
#53
(12-19-2021, 10:37 PM)rufaswan Wrote:
(12-17-2021, 01:34 PM)messusatsu Wrote: Any chance I can get a dump of the ripped in game character files?

You mean 13 Sentinels? You can use the tutorial to get the texture for now. The quad files will have to be wait after the quad file specifications is done.
- Rufas

P.S. 13 Sentinels is coming to Nintendo Switch on 12th April 2022. I wonder if it is also 4K HD like PS4?

Which tutorial has the info for 13 Sentinels? Also any idea on where to get the pak files?

Also before I forget, THANK YOU! I have been a vanillaware fan for many many years, and have dreamt of being able to see their original files and you allowed me that honor to see that and work on my own craft.
Reply
Thanked by:
#54
(12-19-2021, 10:37 PM)rufaswan Wrote:
(12-17-2021, 01:34 PM)messusatsu Wrote: Any chance I can get a dump of the ripped in game character files?

You mean 13 Sentinels? You can use the tutorial to get the texture for now. The quad files will have to be wait after the quad file specifications is done.
- Rufas

P.S. 13 Sentinels is coming to Nintendo Switch on 12th April 2022. I wonder if it is also 4K HD like PS4?

I was able to get as far as using the ps4 13senti PHP file but they are generating .GNF files and I have no idea what to do.
Reply
Thanked by:
#55
(12-21-2021, 06:37 PM)messusatsu Wrote: I was able to get as far as using the ps4 13senti PHP file but they are generating .GNF files and I have no idea what to do.

Oops, I forgot to update Step 7 on the tutorial. It is also updated with PS3 .GTF files now.
- Rufas
Reply
Thanked by:
#56
I'm so excited to see 13 sentinel characters Sweatdrop I love what you're doing. I've tried ripping on my own, but I think it's too hard for me to understand since I'm just a beginner still.
Reply
Thanked by: rufaswan
#57
Finally understand how to do the distortion from that Sega Saturn video (https://www.vg-resource.com/thread-38430...#pid670315).

The video title said it is using Tessellation, which is completely misleading. Tessellation is about sub-divide. It is to generate more points between vertex to make the polygon more detail. It is actually like Mipmap, and has more to do with LOD (Level of Detail) than handling degenerated polygon.

And I was wondering why the tutorials doesn't make any sense, for months.

Randomly browse around, I found PixiJS, a Javascript library/engine for 2D images, and I discover this:
https://pixijs.io/examples/#/plugin-proj...quad-bi.js

Now this is more like what I want! Google "2D Quad bilinear" and I finally got a actual work code:
http://www.fmwconcepts.com/imagemagick/b.../index.php

A comparing of multiple texture mapping algorithm:
[Image: affine-perspective-bilinear.png]

Live code to play around:
http://rufaswan.github.io/Web2D_Games/qu...e.tpl.html
http://rufaswan.github.io/Web2D_Games/qu...y.tpl.html
http://rufaswan.github.io/Web2D_Games/qu...y.tpl.html

Now I have a new problem - while Bilinear can handle all the irregular/degenerated quads, the image is no longer in perspective anymore. And the worst part - even the lines are not straight anymore, they can be curved.

But that's not how the sprites looks like in-game.
So in the end, the whole thing is useless.

Moving forward, I would be using perspective as the default, and for any weird shaped quads, I'll just draw an outline for it.

I'll be taking a long break, and won't want to look at those ugly math formulas anytime soon. ;P

At the mean time, take care!
- Rufas
Reply
Thanked by:
#58
Hi all! It has been 7 months since my last update, how are you guys doing?

The project is getting more technical now, as all the easy stuff are identified and ripped. Now it is about referring console development documentations for actual formula, reverse-engineering the executable for interpolation algorithm, and debugging those unknown bit-flags.

So today, I'm going to talk about alpha blending for consoles.

Recalling on my Legend of Mana thread when I'm researching how GIMP do alpha blending and found this: https://docs.gimp.org/en/gimp-concepts-layer-modes.html

Console is different in that it uses one standard formula for alpha blending, but disable/zero any register not needed at run time.

For Playstation 2, the formula for alpha blending is:
https://psi-rockin.github.io/ps2tek/#gsalphablending

Code:
Output = ((A - B) * C) + D

Using the above formula and look around the main executable ASM code, I manage to discover the 6 blending formula used in PS2 Odin Sphere:

Code:
Blend 0: Pixel = ((FG.rgb - BG.rgb) * FG.a) + BG.rgb
Blend 1: Pixel = ((FG.rgb - 0) * FG.a) + BG.rgb
Blend 2: Pixel = ((0 - FG.rgb) * FG.a) + BG.rgb
Blend 3: Pixel = ((FG.rgb - BG.rgb) * BG.a) + BG.rgb
Blend 4: Pixel = ((FG.rgb - 0) * BG.a) + BG.rgb
Blend 5: Pixel = ((0 - FG.rgb) * BG.a) + BG.rgb

Interestingly, PS2 Odin Sphere sprites uses Blend 0, 1 and 2. Blend 3, 4 and 5 are unused.

The annoying part about the whole formula is it reads BG.rgb twice, it isn't possible to do with WebGL builtin blendFunc(). I'll have to roll my own and ping-pong around.

Since I'll be doing custom blending from now on, WebGL builtin blendFunc() will be disabled.

Similar formula is also discovered on Wii. It is called TEV (Texture Environment Unit) Computation Expression.

Code:
D + ( ((1-C) * A) + (C*B)

The 6 different blending modes on Wii are:

https://rufaswan.github.io/Web2D_Games/i...%20p45.png
https://rufaswan.github.io/Web2D_Games/i...%20p47.png
https://rufaswan.github.io/Web2D_Games/i...%20p49.png
https://rufaswan.github.io/Web2D_Games/i...%20p51.png
https://rufaswan.github.io/Web2D_Games/i...%20p53.png
https://rufaswan.github.io/Web2D_Games/i...%20p57.png

Code:
D + ( ((1-0) * A) + (0*0) = D + A or Addition
D - ( ((1-0) * A) + (0*0) = D - A or Subtraction
0 + ( ((1-C) * 0) + (C*B) = C * B or Multiplication
D + ( ((1-C) * 0) + (C*B) = D + (C * B) or Addition + Multiplication
0 + ( ((1-C) * A) + (C*B) = (1-C) * A + (C * B) or Decal
D + ( ((1-C) * A) + (C*0) = D + ((1-C) * A) or Proportional

I haven't debug Wii code yet, but I would presume Blend 0 is Decal, Blend 1 is Addition, and Blend 2 is Subtraction.

For completion sake, the alpha blending formula for Playstation One:

Code:
FG.rgb * A + BG.rgb * B

The 4 different blending modes on PS1 are:

https://rufaswan.github.io/Web2D_Games/i...6-p345.png
https://rufaswan.github.io/Web2D_Games/i...6-p109.png

Code:
FG.rgb *  0.5 + BG.rgb * 0.5 or Average
FG.rgb *  1.0 + BG.rgb * 1.0 or Addition
FG.rgb * -1.0 + BG.rgb * 1.0 or Subtraction
FG.rgb * 0.25 + BG.rgb * 1.0 or Quarter Addition

Will need help to find the alpha blending formula for these consoles:
- Playstation Portable
- Playstation Vita
- Playstation 3
- Playstation 4
- Nintendo DS (although Kumatanchi never used any)
- Nintendo Switch
- Sega Saturn

Still learning, and keep getting closer and closer to finish line.

Wish you an early Merry Christmas + Happy New Year 2023!
- Rufas
Reply
Thanked by:
#59
Since the backward incompatible "Skeleton" update on 2021-6-10, not only I am researching behind-the-scene what and how to rewrite QUAD file, I am also planning on making the quad player work on mobile browser.

And here it is - after 2 years of silence, Quad Player is now on mobile! It is the "Mobile" update!

[Image: quad%20viewer%20v0.2.png]

In this 2 years, I discovered new data type - Hitboxes. So Quad Player is also evolved to Object Viewer, a debugging tool normally removed in the final game.

Some major changes:
- All textbox are removed. It is to prevent onscreen keyboard from blocking the screen (the thing annoyingly takes up almost the whole screen!).
- Quad Player is now default to only "view" the sprite, not "play" them. To "play", use fast-forward ">>" button and rewind "<<" button.
- Added 2nd page menu due to limited screen size.
- Some mobile browser allows multiple files per upload, but most don't. Changed to allow if only *.quad is uploaded, display it in wireframe lines mode.
- Mobile browser doesn't have "inspect" tool. Added a read-only textarea for console.log().
- As most people uses dark theme on mobile to save battery, the background also changed from 50% gray to 25% gray.
- Sprites are moved downward a bit, since 0,0 is at the center of the feet on most sprites. It is changed from 50%,50% to 50%,75%.

You can see it in action here:


As usual, here are some files for you guys to play around:
https://www.mediafire.com/file/rv0h0w6w8...32.7z/file

Here is the draft for QUAD specification my Quad Player is currently based on:
https://github.com/rufaswan/Web2D_Games/.../spec.adoc

I know I over-design some things and under-design some others. Anyway, I'm burning out and need a break. Put your questions or suggestions, I'll answer them later.

Anyway, have fun!
- Rufas
Reply
Thanked by: Sophignon, Raccoon Sam
#60
This is some incredible work. Can't thank you enough for all you've done.

I have some questions with this new version. I know it's a beta, but the animations play very slowly, is that how it's supposed to be? Also, with the ZIP option, the output pictures are all just the bottom half of the sprites, with the upper half cut off at the top edge. There's also a lot of empty black pictures at the end of the list.

I'm not sure what the PNG option is, but when I use it my browser and even PC starts freezing up... maybe because it's meant to be a mobile thing?

Anyway, if the zipped file images saved properly then I couldn't ask for more. Makes me happy that someone is putting so much effort into making these amazing sprites accessible.
Reply
Thanked by: rufaswan


Forum Jump: