Author Topic: Fractal Interpolation revisited  (Read 3217 times)

Cyberman

  • *
  • Posts: 1572
    • View Profile
Fractal Interpolation revisited
« on: 2007-09-29 13:30:06 »
The original thread is here
Instead of reopening it, I've spent the last few days reading up on it specifically. (don't ask why)
In any case this URL was very helpful in understanding how it works as well as understanding it's limitations.  The IFS/PIFS systems are useful for enhancing images however, and might be useful in Q-gears. The enhancement is not as good as some people would like on to believe.  Also it does not actually ADD detail. Instead it adds "possible" detail.

Anyhow that FAQ should be very helpful. The algorithm is quite tedious. So expecting speedy enhancement is unrealistic. The interesting thing is FF7's backgrounds are already sorted and broken up into 8x8 blocks so processing them may not be as big of a deal as would be otherwise.

Cyb

Micky

  • *
  • Posts: 300
    • View Profile
Re: Fractal Interpolation revisited
« Reply #1 on: 2007-09-30 11:58:37 »
I experimented a bit with New Edge-Directed Interpolation. It isn't fast, but relatively easy to implement, and "good enough" if you just want a 2x or 4x scale. This could be applied both to textures and to field backgrounds, though you may need to tweak the algorithm a bit to avoid occluded pixel messing up the interpolation weights.
« Last Edit: 2007-09-30 12:04:05 by Micky »

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Fractal Interpolation revisited
« Reply #2 on: 2007-09-30 20:59:38 »
I experimented a bit with New Edge-Directed Interpolation. It isn't fast, but relatively easy to implement, and "good enough" if you just want a 2x or 4x scale. This could be applied both to textures and to field backgrounds, though you may need to tweak the algorithm a bit to avoid occluded pixel messing up the interpolation weights.
The textures included in FF7's battle models are actually fairly detailed (at least that's the way I see it).
I think part of enhancing any such texture one must template (IE make a vectorized outline) the sections that aren't used or are transparent.
Gaussian interpolation works well, but causes edge bleeding. In any case perhaps perform an interpolation pass and then using a vector type outlining type method to make the real edge (and cut anything outside them) would help?
The back ground images are all scanned artwork from what I can tell.
The nice thing about the background, being worked with are the following:
  • The backgrounds are already broken into blocks 8x8 ones to be precise.  This makes them easier to 'toy' with. 
  • Transparency information is included in sprites this allows one to excise excess data.
  • Each layer of the background can be processed separately this make the need for as much data for scaling the texture.
I'll scan that paper erstwhile to see if there are things that can be used in Q-gears (at a later date).
It's a bit of work here, a bit of work there, playing catchup is slow work.

Cyb

RW_66

  • *
  • Posts: 74
    • View Profile
Re: Fractal Interpolation revisited
« Reply #3 on: 2007-10-01 03:33:09 »
Cyb,

I'm just curious..  would you use a substitution table to point to a (already processed) BG table, or do you plan to implement it (FI) in real time fashion? I'm just curious because from what I've read, you'd almost HAVE to have the BG tiles pre-rendered ahead of time.

Still, anything to improve the BG tiles would be GREATLY appreciated. I recently started replaying with ePSX using ISO's of MY PSX disc's (using the Delta util. program). I'm using Pete's (Pete Bernard) OGL renderer with a post-processing shader utility for 'AA bloom'. It actually applies AA to the backgrounds, as well as the foregrounds, thus doing something that can't be done (currently) with the PC version. It really makes the backgrounds very, very smooth without looking "washed out".

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Fractal Interpolation revisited
« Reply #4 on: 2007-10-02 00:56:19 »
I'm just curious..  would you use a substitution table to point to a (already processed) BG table, or do you plan to implement it (FI) in real time fashion? I'm just curious because from what I've read, you'd almost HAVE to have the BG tiles pre-rendered ahead of time.
Are you referring to IFS style interpolation or the paper Mickey gave a link too? If you read that little link (explanation of strengths and weaknesses of IFS interpolation) and the one Mickey gave you can better appreciate what we are discussing instead of me having to specifically tell you what where how and why. In any case Q-gears related things require not to modify and redistribute content.  That pretty much answers your question.. You can create your own new redone backgrounds but you cannot distribute them legally.  The original engine had a limited tile set size it could work with (mostly because of the PS1's hardware).  I don't see why one needs to have pre-rendered backgrounds, if it takes a second longer is it such a big deal? As I said the backgrounds are already broken up into tiles this makes using any fractal form of interpolation a LOT easier since one already has PREDEFINED RANGE sets and all there needs to be is domain sets computed.  Plus we already have numerous hints from the walk mesh and the layering position for the engine.  There are Lots of things one can do you just have to use your imagination. :D

Cyb
« Last Edit: 2007-10-03 11:16:22 by Cyberman »

Micky

  • *
  • Posts: 300
    • View Profile
Re: Fractal Interpolation revisited
« Reply #5 on: 2007-10-03 06:46:36 »
Though my link doesn't do any fractal stuff, it is basically a smarter way of doing a linear interpolation that avoids some of the jaggieness you get from a normal linear or cubic interpolation.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Fractal Interpolation revisited
« Reply #6 on: 2007-10-03 11:25:00 »
Least Aliasing algorithm? :)

Fractal interpolation isn't that great but it does a fairly good job. As I said it's an IFS / PIFS from my reading the algorithim although 'fractal' based is similar to other forms of interpolation because they all depend on a 2 dimensional world.

Apparently IFS/PIFS methods are NOT good for gray scale data, however with color they work well, something interesting to note I guess.

No matter how I look at it the blocks are a bonus not a bane to use PIFS style interpolation.  They are predetermined and sorted, it can't get much easier than that!

Cyb