Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Lykon

Pages: [1]
so ready to try this out.

Yes, it has been included today in the new mog rework and will also be in the installer version (tomorrow maybe)

NEW 2020-05-23 - MOGURI 8 BETA V5

-Included latest Memoria by ALBEORIS and a new install process
-Included 30fps FMVs by LYKON (using DAIN and other techniques)
-Included MBG (video backgrounds) color matched and fluid
-Included faithful PSX font by TEAITO
-These minor visual problems were fixed:

I've given the same link to zePilot, just waiting for him to package it in one big installer! (zePilot's pretty busy)

Great! Time to start a new game after the installer is ready!

Can you show us one of the video so that we may have a look at it? Thanks!

I've just finished converting all the videos in high bitrate after a waifu2x pass. I just miss the very last one (the credits) but it's going to be done tonight.

In the meantime, this is the link to the folder:
password: phkQlOS8goP72x71v2fM3w

Snouz is working on some redo (from scratch) of the parts of fmv000 and fmv060 where logos are involved. We also managed to extract the map of the first scene of fmv000, so that he can recreate the logo transition from scratch.

After that we just need in-game testing.

Please keep in mind that the game runs videos at 15fps unless you have the last version of Memoria. (regardless of the original framerate)

Also keep in mind that videos are converted to OGV using an outrageous bitrate to avoid quality loss (ogv sucks). Hope they run well on your machines.
Talking about ~3 GB of videos so, despite all, that not so far from the original file size that is around 2.5 GB

So I finished converting all the FMV videos (mounting the last 2 tomorrow).

After that we'll just check for sound sync in game, minor errors and probably try and remove some compression noise by running waifu2x on all the videos.

Hope you all like what you can see so far. Every video except maybe 5 has been a frame by frame reconstruction from multiple interpolation algorithms (depending on where the main one failed).

Fun fact

Scene change always happen at frames that are multiple of 5 in the original videos. This maybe means that their original video editing software couldn't handle precise selections and only worked in chunks of 5 frames. Or it can mean that their original codec only supported 1 keyframe every 5.

So for now (and just for now) I'll stop running DAIN on videos to bring them to 30 fps (except when I've nothing better to do ahah). Until we figure out if it's possible and convenient to use them in game.
Running DAIN on a video takes usually from 3 to 6 hours and there is also a lot of work to do manually to fix broken frames and artifacts.

However, since SVP is NOT a free software and I can't share the license, I'll run SVP on all of them so that there is the backup track (I'm basically using the crappy SVP track to fix the broken frames from DAIN that is usually much better).

I'll share every FMV interpolated using SVP as soon as I'm done so that you're not forced to buy the license. DAIN is free so anyone can take over and split the work with me once we're ready.

SVP interpolated videos will be here:
password: yEP59xdOzzjT7opPpoRS1w

The 60 fps version is truly a dream come true, especially for the zooming Squaresoft logo and Odin attack on Iifa Tree. Wonderful. If you do not put it in the final game, I will keep this file and put it myself in the right folder  :-D

I'm actually redoing that one with the new stuff we've learned. It's "just" 30 fps however (almost impossible to get a good result on 60 fps since the source material is 15 fps).

However the problem now is that the game still reads them as 15fps, skipping frames...

Also a suggestion if you want to use DAIN APP: Never use "perform all steps".


- step 1 (split video source blabla)
- check scene change sensitivity (won't get all scene changes or will get too many), requires step 1
- step 2 (dain)
- manyally check frames (REPLACE !!! the ones that have errors with good frames, DO NOT delete them, replace)
- do step 3 (convert dain to videos)

Hypotetically the order of things would be:

1) we fix the MBGs (color correction, upscaling, blending)
2) we can release the first version in mog rework
3) we work on the 30fps issue for movies (that are currently read at 15fps by the game engine, despite being 30fps)
4) we bring the movies to 30 fps (new release?)
5) we work on 30fps for mbgs6) we bring mbgs to 30 fps
7) new release

there is no need to do 1 big release, we should go in an iterative way (cascade is bad)

So, I've finally managed to have FMV001 fully 30fps mixing DAIN (for the most part) with SMV and MotionFlow where DAIN failed.

You can find it in the folder
this is the password: A5qU-wvZiy3wc2Mm_bGeag

Together with FMV003 (that was way easier, 100% DAIN with 5 frames fixed manually).

FF9 Tweaked menu portraits

This is a simple mod that slightly tweaks the portrait shown in the main menu.

UPDATE 16/05/2020 - Fixed some colors and uploaded on MEGA instead of IMGUR.

Problems addressed:

- Short hair Dagger's chin and (optionally) eyes has been tweaked to look more like the original and less strange. Contrast and resolution have been enhanced using ESRGAN (somehow her render had a lower resolution), eyes have some brown lighting instead of being completely black.
- Amarant's "smirk" has been removed to match the original.
- Added shading on Cinna and Marcus that now look less flat.
- Zidane's mouth has been tweaked to look less odd and me more similar in style to the original.

Dagger comes in two versions, one with wider eyes (similar to the PSX version) and one with narrow eyes (similar to the current Steam version)

Image slider for comparison:

Download from here the one you prefer:

To use one of those images you need AssetBundleExtractor. Download it, open resources.assets with it from your "FF9\x64\FF9_Data" folder (or x86 if you're using a 32 bit pc). Find the file "Face Atlas", with Texture2D Type (NOT Material). Hit Plugins, Edit, Load the image you downloaded and then Ok.

Now DON'T press Ok again or it'll close without saving. Go File instead, press save. You'll be prompted to save "sharedassets2.assets". Save it anywhere but the FF9 folder (cause you can't save it there) then close AssetBundleExtractor and replace the current sharedassets2.assets in the FF9 Folder with the new one.

Credits: Snouz for the frame on the portraits, Caledor for the valuable feedback, patience, the help with Zidane and with this forum post.

Lykon, could you do a simple resampling in 30fps of all MBG so that I can try each of them and make the list of those that'll be able to up-frame and those that'll have to stay 15fps.

Consider it done. Should take some minutes.
I'm going to use 30 fps for mbg instead of 29.94 fps. Even if that's the output of dain, I'll always resample manually to 30 fps for MBG videos (while leaving FMV to 29.94 to avoid quality loss).
Also keep in mind that we can mix true 30 fps with fake 30 fps (when I say fake 30 fps I mean 15 resampled to 30). This could help in scenes when the character is overlapped with the video and needs to move at the same framerate to avoid strange things happening.

In the meantime I've created a folder for finished videos. I've uploaded FMV001.bytes that should be finished and used the previously mentioned technique of mixing true 30 and fake 30. This is because DAIN was unable to interpolate the rain scene (too much noise!!)
this is the password: A5qU-wvZiy3wc2Mm_bGeag
UPDATE: this is now outdated, check posts below

The folder contains FMV001 in 30fps (mostly native using DAIN, but I couldn't use 100% of that).
I'm also trying a 20 and a 24 fps version to avoid obvious framedrops.

I'm also doing DAIN on FMV003 right now and it's turning out great.
21% examined frame by frame manually and it's perfect so far, so the issues may be only related to noise and overlay text, meaning we have to struggle only for FMV001 and FMV002.

I've also completed waifu2x upscaling on every MGB video

Syncing issue with 30 or 60 FPS videos:
Increasing the frame rate of videos makes the field models start moving earlier, as one can easily see for themselves with the Alexandria videos uploaded here.

What prompts the actual field models to start moving is a check within the field script. For example, with the Alexandria video, field is "Alexandria/Main Street"

Function Vivi_Loop, we can see the following:

That GetCinematicFrame is the threshold. Double it for 30 FPS videos or x4 with 60 FPS video.

Nice one. Can't we simply do

Code: [Select]
GetCinematicFrame / 2

Yeah, I'm also in for 30 fps. It fits the game better and it's acceptable if you don't watch it right after you've watched the 60 fps one.
By "crap" I was referring to the zoom in effect in particular. The worst however was the scene change. More on that below.

New test on DAIN scene change detection
Here you have the same video in 4 files:
- upscaled from 320x224 (nearest),
- upscaled from 640x448 (nearest),
- upscaled from 640x448 with DAIN applied without scene change detection,
- upscaled from 640x448 with DAIN applied with scene change detection -> new

The best one is by far the last one (of course, upscaled from 640x448, it's by far the best version).
password is my name lowercase as usual.
EDIT: forgot to convert to ogv, but it doesn't really matter since the purpose of this test is not to check what happens in the game.

I've also devised a strategy for background blending.

for MBG:

- color correction to match the final (or initial) static scene
- downscale nearest to 640x480 (mbg101 is the only one that needs to be 320x224 because of the character models)
- zoom waifu2x and zoom esrgan (2 different video outputs) to 1280x896
- blending of the 2 videos (before or after depending on the scene) -----> this is yet to be tested, should produce fine results in theory
- DAIN x2 (if we manage to fix the script)

For FMV:

- DAIN x2

Did frame interpolation on the main menu video. This one looks very promising and it's easy to test:
(password is "lykon")

NB: this video is 720p instead of 1280x960. This is done to also test something else and it's not final.

A couple of considerations:
1. Scene changes are bad, but there is an option in the algorithm for automated scene change detection that I want to test next (on a shorter video at first)
2. This one is maybe too good. The game later runs at 30 FPS, so starting with a 60 FPS video may "train" the eye to spot the difference. However it's not that obvious and we'd need feedback. It's true that this video is very particular, with many moving parts mounted on one another, so it may be the only one that's fine leaving at 60 fps (if we don't decide to do the same on all of them). 

Watching the 60 FPS version makes the 30 FPS one look like crap an the 15 FPS one look like trash, expecially the very first part with the zoom inside the text.

30 FPS is probably the way to go for 99% of the videos in that folder, with (maybe) the exception of 000 and 060, because they have sliding effects and zoom-in effects, that are usually crap at rates lower than 60.

Tools I'm using:

- Waifu2x-Extension-GUI ( ) for super resolution.
- ffmpeg for video downscaling (our pipeline requires nearest neighbor)
- Free_OGV_Video_Converter_64bit_PORTABLE for mp4 to ogv (bytes) conversion
- DAIN for frame interpolation and fps increase

I'm also keeping an eye on Video2x ( ) because they're planning to add MMSR  to their gui.

from very initial testing:

- As stated by snouz, every single video is 15 fps by default.

- The algorithm used for image upscaling (ESRGAN if I'm not wrong) doesn't work well on videos because of "guesses" that vary from frame to frame. We are using video algorithms for super resolution (waifu2x vulkan for now, MMSR as soon as possible). That doesn't mean that ESRGAN can't be used at all, it's probably perfect for the final part of FMV000 (when the logo appears) since there is not much room for "guesses".

- I'd avoid upscaling FMV videos (except FMV060) because they're already good (and except for the final part of FMV000).
- Character animations on MGB videos are linked to frames, so script editing is required. The duration is fine, but the double or quadruple framerate makes the character move 2 times or 4 times faster to keep the same fps as the new background video.
- 60 fps for MGB videos is too much since the game is locked to 30 fps (and even less in world map and battle). 30 fps blends in a nicer way (but still requires script editing as mentioned above, at least for some of them).
- FMV videos are fine even at higher fps. I'm interpolating the first menu video to 60 fps right now, so more on that later (going from 60 to 30 is trivial).

- Our biggest problem is still the blending of GAN-upscaled static backgrounds with upscaled video backgrounds. The new tests are promising from a pixel perspective. The issue now is more on the colors. E.g. mbg111 ends in totally different colors compared to the static background, even the default one.
This can be probably achieved in a second pass just using color correction.

- I'd personally avoid overlapping video and images to avoid a "powerpoint"-like transition.

Reposting here some of the videos we used for testing:
The password for the archives is "lykon"
EDIT: a 30 fps file was instead 60 fps, I've fixed it

Uploading some test videos after a long chat with snouz yesterday.

The videos are meant for test purpose at this stage. The password for the archives is "lykon"

In the folders there are always 4 videos and the names should be enough to indicate the method differences. 15 fps videos only have super-resolution applied. 30 and 60 fps videos also have DAIN for frame interpolation.

The test videos I worked on for this test are mbg101 and mbg116. The files are already in the correct format.

@Lykon Would you add me on steam or something?

Video upscaling was my next project after bug fixing, especially those 16 where there are 3D objects (those that usually transition from a background). I managed to get a decent result, but I put it aside to do the main mod.
I'd be all up for us collaborating on that! I'm downloading your last link.
I'd love that and I'm curious about your test result. Yesterday I wasn't really able to fine tune the algorithm as much as I wanted (maybe my workflow was not optimal given the fact that those 16 videos are already upscaled using a really noisy bicubic).

^^ On a related note, I was going to ask about this: The developer's conversion from the psx to steam gave the original steam version an odd color space where everything is de-contrasted (darkness levels 0-16 don't exist, everything is 16 - 255). And the color balance is off. To correct this in sweetFX reshade:

#define Levels_black_point 16     //[0 to 255] The black point is the new black - literally. Everything darker than this will become completely black.
#define Levels_white_point 255    //[0 to 255] The new white point. Everything brighter than this becomes completely white.
#define RGB_Lift  float3(1.000, 1.000, 0.950)  //[0.000 to 2.000] Adjust shadows for Red, Green and Blue.
#define RGB_Gamma float3(1.045, 1.020, 1.000)  //[0.000 to 2.000] Adjust midtones for Red, Green and Blue
#define RGB_Gain  float3(1.045, 1.020, 1.000)  //[0.000 to 2.000] Adjust highlights for Red, Green and Blue

Is the rework trying to correct for the color space or keep it the way it was (necessitating reshade)?
Are you talking about video specifically or the game in general? Because there is a huge color difference between video backgrounds (mbg***.bytes videos) and the corresponding swap to static backgrounds in cutscenes. The difference is even more clear because of the (good) work on backgroud upscaling (but it not really because of colors).

By the way I have uploaded the first version of the 4k video upscaling using super-resolution:
(archive password is qhimm)

It doesn't really solve the color mismatch issue yet, but it's nice on 4k monitors compared to the normal bicubic upscaling. The difference on 1080p monitors is way more subtle because of what I mentioned in the previous post. 
For time reasons I've only upscaled the first 2 FMV videos, the last FMV video and every mbg video. I'd like to discuss more about this with you guys before committing further.

Sorry for the double post.

So, I've started to upscale videos from the Steam version using waifu2x-ncnn-vulkan for videos and srmd-ncnn-vulkan for videos (I'd like to use MMSR but I can't find a decent and stable implementation yet, however it doesn't really matter and I'll explain why).

The main problem I encountered is that videos are natively upscaled to 1080p in the steam version. For videos FMV***.bytes this is not an issue, since they seem to be upscaled decently or simply re-rendered (except FMV060.bytes for some reason). Videso labeled mbg***.bytes are a mess, since they've been upscaled using bicubic. Using a CNN on them "preserves" the bicubic upscaling, giving decent results only when seen on a 4k screen.

I have already upscaled (using super-resolution) every mbg***.bytes video to 4k, plus FMV000.bytes, FMV001.bytes and FMV060.bytes also to 4k.

Another (greater in my opinion) issue is that, regardless of my modification, mbg***.bytes videos do not match the static backgrounds they're swapped from/to (as they did in the original psx version where the transition was smooth and difficult to notice).

As far as I can tell there are 2 (obvious) ways to fix this:
1) adapt the static backgrounds to the videos (easy and probably with a more convincing result)
2) adapt the video to the static backgrounds (may leave a weird "PowerPoint" transition effect)

The effect I'm talking about is most noticeable (because of a completely different color palette, and of course the detail level) when the Alexander staircase appears in front of Dagger (right after mbg111.bytes ends).

I'd try that myself but I have no idea where to get the background images. A package with every background before/after every single mbg***.bytes video would be great.

You probably already know that, but the game accepts 4k videos. The only requirement is that they must use the Theora codec (OGV). Audio track doesn't seem to matter but I'm simply not using that, just like in the original files.

The Gysahl Greens:,
I really like this version but on my screen the desaturation maybe goes too far and Dagger is missing all definition on her lower eyelid.
I agree. That's mainly why I didn't use this version in my game and I just used the first one where I edited just the mouth and the chin (plus Amarant).

Hi. First of all thanks for this amazing mod. It has been a pleasure to play FF9 again after years with this level of detail.

I've noticed that there is some problem with background upscaling when there are multiple frames and (maybe) no attempt at all on background video upscaling (please correct me if I'm wrong).
This is because the CNN used here tends to leave random artifacts when upscaling pictures that may not match between frames in a video (or in a sequence that should suggest motion).

However there are many implementations of video super-resolution (on papers with code for example) that should do the trick.
This is an example of EDVR on a video:
As you can see it's still a good enhance but it's far more stable and less "random" compared to the one used by this awesome mod, making video upscaling possible.

I've also noticed that every video is in OGV format already extracted, so it shouldn't be a problem (it may be more diffucult with animated backgrounds, at least for me).

It's unrelated, but I also made a mod for character faces in the menu. In particular short hair Dagger and Amarant seem off from the original PSX game. I've attempted this edit to "fix" them and used it in my playthrough. Feel free to use it
it's a subtle mod, but made a huge difference to me (the gallery features a second and heavier modification with open eyes, I personally used the one with the original eyes and just the "fix" on the mouth).
This is a version that Caledor furthed modified from the one I posted above. He also fixed Gidan and corrected the saturation from my version.

Thanks again

Pages: [1]