Doubts about FF7 Backgrounds

  • Thread starter Thread starter Borde
  • Start date Start date
Status
Not open for further replies.
(...)which makes them look ugly in my opinion(...)
Exactly. Your opinion.

In this situation, that's all it boils down to. Discussion over. :lol:
 
Well Cyb, I finally was able to add new pallettes. As a result, I've been able to improve the colors (althought they are not as good as i'd like yet). However, I found a rellay stupid constraint about the number of colors: you can't have more than 13057. If you try to add one more, the game crashes. Frankly, I don't get it. This number isn't even a multiple of 256.
I was also able to remove some image artifacts (mostly the brown blocks). However, I haven't managed to remove those black squares (that only seem to afect the foreground) nor that strange green cloud. I had a look at LGPTools source code, but couldn't find the code that draws the backgrounds. I found It at the shared code, but it looked horribly outdated (it did nothing about transparencies nor animations). as usual, if someone can point me to a more complet version, I'd be glad.
 
13057 might not be, but 13056 is. I'm not sure where that extra one comes from.
 
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)
 
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"
 
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
 
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.
Test02.jpg

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).
 
Okay, wait, this is a dumb question but:

What is the resolution of the regular FF7 backgrounds?
 
Borde, you are doing very well, ill love that patch!!!
i cant help you here, but i can wish much success!! :lol:
 
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.
 
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
 
Oh, ermm, it should have been easy to notice that.

In the screenshot posted above, is that double the normal resolution?
 
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.
 
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
 
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.
 
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 edited:
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.
 
Status
Not open for further replies.
Back
Top