Author Topic: Doubts about FF7 Backgrounds  (Read 19784 times)

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3941
  • Just Covarr. No "n".
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #25 on: 2006-06-15 18:16:44 »
Actually, it's more likely black than white. Black is the only color you can get with no color data (hex #000000), whereas white is the opposite, full color data (hex #FFFFFF)

VincentVal

  • *
  • Posts: 142
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #26 on: 2006-06-15 18:18:20 »
Ahh I got mixed up! I was thinking backwards, Im slightly familliar with the digital color wheel, but I was thinking

"White is the absence of color"

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #27 on: 2006-06-15 19:35:21 »
10357 is 51 palettes + 1 color isn't it? :D

This is a rather suspicious number no?

So your real limit is 51 palettes. I suspect it's hard set for 50 palettes, nothing you can do about that in the engine eh? :D
I suggest using 2 approachs.
1) use fractal resolution enhancement instead of traditional ones. This will make the image more closely resemble the original.
2) palette match.  Do not use a unique palette for each section, it's kind of wasteful.  Since you are likely using 4 times the number of tiles you should be able to use 4 tile sections to a palette.  You can use the 'close enough' method of reducing color count.  IE if a color is +-1 count off of an existing RGB value AND you have exhausted the palette then find something closer.  This process would take quite a few passes on the image to get an optimal palette. Also you need to compute the colors by popularity.  Being that you can mix and match tiles in all sorts of strange ways you should do a 'pallette' pass and sort them by tile location. IE each tile gets a palette sorted by popularity. (16x16 256 pixels etc.) so you end up with a huge number of palettes.  You can then collect tiles by matching the palettes.  As I said this takes forever but the results are pretty good.  since decoding is easy by comparison. It's not a big deal.  You just have to be sure to have no more than 50 palettes afterward.
I've used 2 for reducing palettes for GBA tiles myself. It works quite well, inspite of the fact it takes a LONG time. LOL.

Cyb

Borde

  • *
  • Posts: 891
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #28 on: 2006-06-16 21:54:18 »
I'm back. I finally found what was causing those stupid black holes: it was simply a pice of code I didn't remove after doing some early tests. Oh well. Anyway, now I've got a new problem (well, not exacly new): some of the foreground tiles are transparent.

This is starting to become quiet boring. Is there anyone interested in finishing this? :-P
About the filtering, fractal interpolation would really rock. The problem is that I was trying to create a completly automated patch. So unless someone knows about some DLL that allows me to use that filter...
Oh, about the extra color, I don't think it's black (because every pallete has his black entry). However, I've just realized that GEARS says that the number of colors is stored incremented by one :-P. By the way, the number of colors was actually there, the problem is that it's a 2 byte value instead of a 4 bytes one (as noted in GEARS).

NobodyImportant

  • *
  • Posts: 92
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #29 on: 2006-06-16 22:34:49 »
Okay, wait, this is a dumb question but:

What is the resolution of the regular FF7 backgrounds?

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: Doubts about FF7 Backgrounds
« Reply #30 on: 2006-06-16 22:44:25 »
Borde, you are doing very well, ill love that patch!!!
i cant help you here, but i can wish much success!! :lol:

bluesummers182

  • *
  • Posts: 55
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #31 on: 2006-06-16 22:48:33 »
This is starting to become quiet boring. Is there anyone interested in finishing this? :-P

Nay, Borde!  You should go on! We've already got better models!  All we need is higher res backgrounds.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #32 on: 2006-06-17 05:43:23 »
Okay, wait, this is a dumb question but:

What is the resolution of the regular FF7 backgrounds?
Well I imagine this answer might be a bit shocking.. but they are all different :D

They range from 320x224 (Some place in the subway) to 1280 x 320 (forest of the ancients).
Cyb

NobodyImportant

  • *
  • Posts: 92
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #33 on: 2006-06-17 06:18:01 »
Oh, ermm, it should have been easy to notice that.

In the screenshot posted above, is that double the normal resolution?

Borde

  • *
  • Posts: 891
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #34 on: 2006-06-17 08:09:53 »
Yes, it is. It's scaled and (not specially well) filtered.

Borde

  • *
  • Posts: 891
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #35 on: 2006-06-21 21:48:01 »
Well, I've got some very bad news. FF7 can display a limited amount of tiles. That's because it decides first which tiles must be drawn, calculates their vertex and stores them in a temporal buffer. So basically if there are too many tiles on screen the game just crashes. And that's something that happens very soon (in the second field, for examle).
Is this Game Over then? Well, maybe not yet. I've got an idea: test just one of every 4 tiles then, when drawing them, draw the 3 extra tiles. However, I must find where the tiles are drawn and see if I can fit the extra code there. if this doesn't work... well, then this surpases my limited hacking hablities.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Doubts about FF7 Backgrounds
« Reply #36 on: 2006-06-22 18:56:38 »
You are learning how the background tile system works. Remeber that in science even in failure, you learn something the can benifit the next experiments

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #37 on: 2006-06-22 19:38:29 »
Well, I've got some very bad news. FF7 can display a limited amount of tiles. That's because it decides first which tiles must be drawn, calculates their vertex and stores them in a temporal buffer. So basically if there are too many tiles on screen the game just crashes. And that's something that happens very soon (in the second field, for examle).
Is this Game Over then? Well, maybe not yet. I've got an idea: test just one of every 4 tiles then, when drawing them, draw the 3 extra tiles. However, I must find where the tiles are drawn and see if I can fit the extra code there. if this doesn't work... well, then this surpases my limited hacking hablities.
Have you acertained the limit? It is likely something to do with the 'maped' area IE the tile sets.   I know in my experiementation with decoding the PS1 versions MIM and field information it appeared that they used a 'tile swatch' of 256 x 1280 which is 2x10 tile sets in the video memory.  This gives you 1280 tiles max. Technically one could add 2 more tile swatchs BUT, no background uses that many.  Since the PC version is based on the PS1 code and the data was recompiled some for the PC. I suspect this is the 'hard' limit for the PC as well.

Otokoshi

  • *
  • Posts: 552
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #38 on: 2006-06-22 22:15:51 »
Quote from: Borde
About the filtering, fractal interpolation would really rock. The problem is that I was trying to create a completly automated patch. So unless someone knows about some DLL that allows me to use that filter...
Well I found this fractal interpolation .dll.  I haven't experimented with it personally, but it also mentions using "Adaptive Noise Reduction" before or after you use fractal interpolation.  I guess that could be something to test out.  Also be sure to check out the batch processing plugin right above it.  It may make your life a little easier down the road.  :-D  Hope this helps.

Fractal Interpolation.dll
Plugin Info Page

EDIT:
I should mention it is for the Image Analyzer editor.  I wasn't sure if you had been using Photoshop or whatever, but at least its freeware.

An alternative would be to download the trial of Genuine Fractals, which comes as a Photoshop plugin.
« Last Edit: 2006-06-22 22:47:11 by Otokoshi »

Borde

  • *
  • Posts: 891
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #39 on: 2006-06-24 17:06:25 »
Mmmm... probably you are right about the limit Cyberman. I haven't botehered testing it though. It would take some valuous time.
Otokoshi, thanks for directing me to that link, but I wonder if I'll really be able to use that DLL under Visual Basic or Visual C.
Anyway, I'm going to quit from this project temporaly. I want to work on the next version of Kimera first. I'm trying to implement some interesting features this time :-D.

Otokoshi

  • *
  • Posts: 552
    • View Profile
Re: Doubts about FF7 Backgrounds
« Reply #40 on: 2006-06-25 05:01:02 »
Quote from: Borde
Otokoshi, thanks for directing me to that link, but I wonder if I'll really be able to use that DLL under Visual Basic or Visual C.
Not a problem.  I gave it a try and it works as advertised, giving good results when doubling the pixel dimensions.  I figured the .dll may need to be tweaked to work with anything but the supported program.  If not that, it could serve as a reference to a new .dll.  I just figured that could lay the ground work for something greater, such as this patch.

Nonetheless, I'm looking forward to whatever treats you got cooking for your next version of Kimera.

khelben

  • Guest
Re: Doubts about FF7 Backgrounds
« Reply #41 on: 2007-10-27 09:38:40 »
::resurrect thread::

Borde, if you're interested in continuing this project, I'm pretty savvy with asm and dll injection, not so much however with graphics programming. Nice backgrounds would be awesome.

Sorry for the thread resurrection, but it didn't really make sense to start a new one.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Doubts about FF7 Backgrounds
« Reply #42 on: 2007-10-27 10:00:19 »
Start a new thread by referencing this one with a link please. Necromancy is still bad.

The reason why Necromancy is bad is not because of some desire for thread cleanliness, it's because you just posted on a thread that dealt with an experiment almost a year and a half old. I can assure you no one is working on it.

What you just did is walk into an old room and started talking to yourself. No one is here to answer you.

You need to start a new conversation, we'll see what you've got.