Author Topic: I felt it was time to make my return to the forums with an AMAZING idea...  (Read 36902 times)

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Here is a screen of what this could look like if we can get it to work.
http://i.imgur.com/azEZkAs.jpg

And here is what I have so far.

https://docs.google.com/file/d/0B3FK0dqybqUCZ3lzR3dvY1c1Zmc/edit?usp=sharing
(download is not a working shader but a wip progress, causes extreme glitches and should only be used by someone who knows how to fix them.  I am only posting them up in hopes that someone will fix the errors, if you do try them back up your original shaders)

Okay so a lot has happened since I last posted here, but I have a great idea that will be well worth the time if someone can help me figure this out.  I am sure most assumed by now that I died or just killed my project.  For those who do not know me I was working on Project Blackfan, you can find it somewhere on here.  It eventually evolved thanks to Omzy into his field rescaling package.  His script work wonders but honestly I was still dissatisfied with the results for several reasons. Firstly that there were still several glitches, and that I never really liked the blotched look that fractals seemed to create.  Also I was extremely upset about the filesize of the project which pretty much ensures that only the most fanatical will spend the time to download several gigs just for a moderate graphics improvement.

Believe it or not I continued working out ways to improve my project over the years however a lot has happened to slow progress (graduated, married, baby, work, etc.).  But I have been doing tons a research on image scaling, and working out different ways to improve my results.  I have tried literally every program that claims to scale images well (well every english language program at least), and even came across a patent that may or may not prove very interesting if IBM ever decided to do anything with it (however there is nothing so far).

check it out if your interested here
http://www.tomshardware.com/news/ibm-patent-image-resize-quality,15472.html

But back to the point.  So far my results have been very unremarkable and really not worth mentioning.  But I have stumbled across something that could do exactly what I was trying to do with Project Blackfan, only automatically, with better results and without having to do any manual work.  Best of all it would only require a file download of a few kilobytes in size.

I am talking about a relatively new open source shading algorithm called xBR and xBRZ that is being used to improve the graphics of several game emulation programs.  I have already tested the algorithm on both 2x and 4x the original background sizes and it looks beautiful with no blotched effecct that fractals produce and it works in real time and uses a reasonable amount of resources.  If you want to see for yourself, check this out



this is 2x the original image size.  I personally feel it looks even better than the fractal method.  Although nothing provided perfect results I feel this shader is the best overall solution since it provides the highest quality image without any major file replacements and can be downloaded and installed in seconds.  This is actually an even bigger deal if you were to realize the insane glitches that came from upscaling these images and then trying to put them back in the game.  Its just an unreasonable amount of work.

Basically the layers had to be cut out manually or they looked blocky and horrible which kinda ruined the effect completely but then smoothing them out required several manual edits to get them to fit correctly and they still looked kinda awkward in game even after hours of work and you've only finished a single scene... (and it never ended)

The only problem with my idea is that I know absolutely nothing about programming shaders.  I can provide everything I have found so far and of course since this is an open source project there are several common shaders (which are not inherently compatible with aali's driver yet), which i am sure someone with the know how could convert into a texture filter.  I am not even 100% sure this is at all possible for aali's driver.  I don't think a fullscreen filter effect would work because it would probably blend the 3d objects in undesirable ways but a texture filter is theoretically possible (and has already been implemented in PPSSPP emulator with great results).

So as for what I have discovered so far there are two implementations of this algorithms with several variations.

The original is simply the xBR shader and the original author and is algorithm are presented completely in this forum
http://board.byuu.org/viewtopic.php?f=10&t=2248
in the forum you can find links to several variations of the shader

There is also the xBRZ project
http://vogons.zetafleet.com/viewtopic.php?p=287296
This is essentially the same algorithm with different rules and it was completely rewritten to support multi-core processing and 64-bit architecture.

Pretty much all the resources and information regarding this method can be found if you follow these two links.  Hopefully we can get someone who knows what they are doing or perhaps even raise up a few bucks to pay a professional if we can get aali or someone who would know if this would be achievable with the driver in its current state.

If so I think this could be one of the best enhancements so far.
« Last Edit: 2013-06-15 23:51:18 by ABHA »

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
I also hate the blotchy look of Omzy's pack (although I respect the enormous amount of work and they are 100x better than the originals). I think that example looks great. I know fullscreen effects are possible because there's a bloom post-processing shader available in Aali's driver already. I don't really know much but don't you just need to make text like this shitty ass bloom I made?
Code: [Select]
uniform sampler2D samp9;

out vec4 ocol0;
in vec2 uv0;

uniform vec4 resolution;

void main()
{
  float4 c_center = texture(samp9, uv0);

  float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0);
  vec2 pos = uv0 + float2(0.3, 0.3) * resolution.zw;
  float2 radius1 = 1.3 * resolution.zw;
  bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius1);
  bloom_sum += texture(samp9, pos + float2(-2.5, 0)  * radius1);
  bloom_sum += texture(samp9, pos + float2(-1.5, 1.5) * radius1);
  bloom_sum += texture(samp9, pos + float2(0, 2.5) * radius1);
  bloom_sum += texture(samp9, pos + float2(1.5, 1.5) * radius1);
  bloom_sum += texture(samp9, pos + float2(2.5, 0) * radius1);
  bloom_sum += texture(samp9, pos + float2(1.5, -1.5) * radius1);
  bloom_sum += texture(samp9, pos + float2(0, -2.5) * radius1);

  float2 radius2 = 4.6 * resolution.zw;
  bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius2);
  bloom_sum += texture(samp9, pos + float2(-2.5, 0)  * radius2);
  bloom_sum += texture(samp9, pos + float2(-1.5, 1.5)  * radius2);
  bloom_sum += texture(samp9, pos + float2(0, 2.5)  * radius2);
  bloom_sum += texture(samp9, pos + float2(1.5, 1.5)  * radius2);
  bloom_sum += texture(samp9, pos + float2(2.5, 0)  * radius2);
  bloom_sum += texture(samp9, pos + float2(1.5, -1.5)  * radius2);
  bloom_sum += texture(samp9, pos + float2(0, -2.5)  * radius2);

  bloom_sum *= 0.07;
  bloom_sum -= float4(0.3, 0.3, 0.3, 0.3);
  bloom_sum = max(bloom_sum, float4(0,0,0,0));

  float2 vpos = (uv0 - float2(.5, .5)) * 2;
  float dist = (dot(vpos, vpos));
  dist = 1 - 0.4*dist;

  ocol0 = (c_center * 0.7 + bloom_sum) * dist;
}
« Last Edit: 2013-06-12 02:10:43 by [CleverNameHere] »

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Note down my prediction... FF7 remake @2015 E3 :P :P

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Yeah I just tried it out on ePSXe.  I guess somebody implemented the filter for a special plugin for the emu so I thought it would be a good test drive.  Sure enough it looks great.  Easily comparable to the field upscale project.  Might even look better to those who dislike the blotched look. 

However after some more reflection I do not think a texture filter would work after all as it would probably cause distortion on the layer edges but the good news is that it looks great as a fullscreen effect anyway.  I'll try to get a screenshot or something.  As for implementing the filter I think your right. 

I am sure it is pretty basic but I don't know the first thing about shading code so somebody else would have to do it.  I just want to put the idea out there since I have been at this for literally years now and this is the best option I have found so far.

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
I have only minor experience in writing post-processing effects. The one I posted earlier was made very quickly, but it pixelates the edges of the lights too much and makes the unlighted areas too dark. I could do much better but I haven't tested it in FFVII.
« Last Edit: 2013-06-12 03:15:08 by [CleverNameHere] »

Aavock

  • *
  • Posts: 303
    • View Profile
This shader processing filter cross my mind a while ago, I already made a research on the xBR algorithm which looks extremely good but an issue came up because the shader will be processing the entire game including the 3D models and text menus for example. I think Omzy made a fantastic job but I share the same opinion as you about the final results. However, an xBR filtering for backgrounds would definitely be a must-have !! If I can help you somehow just let me know.

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
Well perhaps you can but first we need somebody to confirm whether or not texture filtering would be possible to try it out.  If not the best we could do is a full screen filter.  But like I said I tried it on an emu and it looks pretty damn good.

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
What did you try on an emu, the xbr thing?

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
yeah somebody implemented the xbr filter on a plugin for epsxe so i tried ff7 psx version on that emu to see what it would look like.  And it looks great.

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
This sounds really good and that screenshot looks amazing wish i could help somehow sadly i don't know much about shaders, plugins etc

But maybe this could be of some help or reference there's these complex shaders made by Asmodean about an year ago and is linked with shader editing of yours kinda, check through his posts and see what he did and that on his er new, complex awesome shaders for the ffvii:
(He made several different releases of these find his posts for more)
http://forums.qhimm.com/index.php?topic=11992.msg180880#msg180880
http://forums.qhimm.com/index.php?topic=11992.msg181040#msg181040

Think they're included in Bootleg aswell i think.
« Last Edit: 2013-06-16 02:46:37 by e1sunz »

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
Do these have the "everything's made of light" problem?

KaidenJames

  • *
  • Posts: 361
  • It's cuz of the !@#$ 'pizza'
    • View Profile
I believe he uploaded those with the No Light fix. But you should be able to just use the shaders themselves.

Edit: I just downloaded and moved the smartbloom.post to my shaders folder and changed the config. Game loaded up just fine.
« Last Edit: 2013-06-14 21:04:54 by KyubiNemesis »

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
This gives the backgrounds more depth and detail. Especially with internal resolution set at 4x window resolution.

KaidenJames

  • *
  • Posts: 361
  • It's cuz of the !@#$ 'pizza'
    • View Profile
Here is the newest shader I think from Asmodean. This makes the game look great, except for me, when I try and disable SSAO in the shader, the shader doesn't load at all. Other than that, it makes the game look amazing. But it lags for me on my old ass laptop lol.

Edit: So speedyshare sucks...  http://www.mediafire.com/download/p214x9ftu2rxbge/ComplexMultiShader.post
« Last Edit: 2013-06-14 21:32:33 by KyubiNemesis »

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
Yeah screen space ambient occlusion is costly but I didn't know anyone has ever dropped below full fps in FFVII lol.

EDIT: Post processing initialization failed. And I know it's not my computer because my specs are outrageous. I'm just gonna use the version e1sunz linked, that one works fine.
« Last Edit: 2013-06-14 21:51:33 by [CleverNameHere] »

Aavock

  • *
  • Posts: 303
    • View Profile
This shader is quite interesting; I've been looking for editing the couple of *.hlsl files inside the "shaders" folder of the re-release version but the game crashes, any chance to make them work ?

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Here is the newest shader I think from Asmodean. This makes the game look great, except for me, when I try and disable SSAO in the shader, the shader doesn't load at all. Other than that, it makes the game look amazing. But it lags for me on my old ass laptop lol.

Edit: So speedyshare sucks...  http://www.mediafire.com/download/p214x9ftu2rxbge/ComplexMultiShader.post

Could somebody please post some pics with these shader? Because it only works correctly with ATI cards, so I do not know what it does exactly.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Well that complex post-processing shader is included with bootleg 40. It actually doesn't work very well for me. The one that looks best is the HDRAdvanced. Here's the thing, these only work for me if I have my internal resolution set to a multiple of 320X240, same for Hardware anti-aliasing (which I prefer above all these shaders). This HDRadvanced script is very intensive for my little AMD system, it becomes clear when the battle swirl engages that it is running much slower, the hardware AA works much much better. I can do 24x supersampling, no slowdown. I'll follow up with some screenshots.
24xAASmartBloomHDRNo FiltersAdvancedHDRAA&SmartBloomHDRAA&SmartBloomAdvanced

Obviously, the effects are slightly subtle but after the test I was thinking the AdvancedHDR shader was actually doing about nothing. To my eye the SmartBloomHDR was the clear winner among the few shaders I got working at all. But it just doesn't come out in the screenshots. I think the shot does show the effect of hardware AA tho. I wanted to get some screenshots of the world map, which I think AA works on, but between clearing the cache and trying it with caching off and all that and trying to see if there was anything happening there with the filters I got annoyed and gave up.

Kaldrashara: Your Cloud is almost perfect...it's just, well,,,,, there's something wrong with his butt.......

ALSO: I figured out my tests were being compromised by a habit bootloader has of switching around other options automatically when you change to different shader configurations. My internal resolution got flipped to 3840X2160 at some point... couldnt get AA working right and was kinda getting grumpy til I saw that had been changed. I'm going to rerun these tests with the correct internal resolution for my setup of 5120X3840 (which is a multiple of 320X240 the orig res).

Screenshots have been updated with correct internal resolution. Gonna do a quick 3 panel comp for the world map. Huge improvement with AA. Either the HDR shaders don't work on the map or they dont work at all. I can't tell, other than they slow my FPS down.
24xAASmartBloomHDRNo filters


« Last Edit: 2013-06-26 04:24:47 by Template »

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile
The one e1sunz linked works on my 780's, but the one KyubiNemesis linked must only work on ATI because it fails every time.

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
After looking closer at the backgrounds themselves in the screenies it would appear the HDR and HDR advanced blooms do brighten up the background slightly.. I know they are doing something heavy cause FPS drops on the battle swirl noticeably, and it isn't because it's capped. I can't really speculate as to the advantage of doing both hardware AA and the postprocessing, as it causes noticeable slowdown in the menu and swirl. Perhaps it would be the best setting for a more advanced AMD system. I am interested in further developments with the shaders but so far I am unimpressed by them.

Win 7 Home 64bit
AMD 960t quad core @3.0Ghz
8GB Ram
AMD 6850 1GDDR5

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
The one e1sunz linked works on my 780's, but the one KyubiNemesis linked must only work on ATI because it fails every time.

The one KyubiNemesis linked shouldn't work for him either. Or he have some new incredible driver, because the shader wants to run with a higher shader model then 2.0.
I have played around with it and this is the best I could get: ComplexMultiShader_Nvidia.7z
HQBR (an AA-filter) and FXAA (works as a dynamic screen color filter) are disabled, because they do not work right with my settings. If you experience FPS drops, reduce the internal resolution (only if it's higher than the output resolution.)


KaidenJames

  • *
  • Posts: 361
  • It's cuz of the !@#$ 'pizza'
    • View Profile
The one I linked works for me to an extent. Like I said above turning of SSAO will cause the shader to not load. And there is incredible lag when I use it. So I don't use it. Speaking of, Template can you upload the SmartBloomHDR  shader please? I would like to try it.

Rundas

  • *
  • Posts: 704
  • What do you even do?
    • View Profile

yarLson

  • *
  • Posts: 708
  • spr nrd
    • View Profile
found this post by aali himself
http://forums.qhimm.com/index.php?topic=10054.460;wap2
now I know it is definitely possible to convert this filter but in his own words
"They can work, but you need to make some changes to the code. Only GLSL shaders will work and you need to have some experience with the language to make the necessary changes."

*edit* Here is a screen of what this would look like if we could get this shader to work correctly.
http://i.imgur.com/azEZkAs.jpg

Here are my results so far in porting over the shaders.  A man named guest ported over the cg xbr filter for a psx plugin.  He converted it to GLSL vertex and fragment format.  I have tried plugin in those shaders into ff7 pc directly and the shaders do load without errors unfortunately they cause a ton of glitches.  Hard to explain but if you try replacing them yourself you'll see what I mean.  All the textures seem to fail to load and are replaced with weird red boxes.  However I believe the fact that they load with errors is significant.  If only we could get an expert to look at these.

https://docs.google.com/file/d/0B3FK0dqybqUCZ3lzR3dvY1c1Zmc/edit?usp=sharing

Here are the shaders I am trying to use.  If you try to test them be sure to backup your old shaders.  I am gonna mess around a bit but seriously if only someone who understood this language could take a look I know we could get to the bottom of this.  In the meantime to encourage enthusiasm for this I am going to take some screenshots of how this shader looks on a psx emulator because seriously it looks amazing.  I will edit this post with some screens soon.
« Last Edit: 2013-06-16 00:17:35 by ABHA »

Template

  • *
  • Posts: 862
  • Life is a series of cats.
    • View Profile
Speaking of, Template can you upload the SmartBloomHDR  shader please?
Bootleg40shaders

Those are all of the shaders included with bootleg 40... PB says they are really nice but on my 6850 none of these can come anywhere near to replacing the hardware AA; I cant use them AND anti-aliasing so... maybe in the future someone will write one that is good for this particular game.