Author Topic: [FF8PC-Steam] BerryMapper- texture replacement for Tonberry mod (2014-12-15)  (Read 353381 times)

Omzy

  • *
  • Posts: 205
    • View Profile
where the tiles are flipped to the opposite sites of the image (top/bottom).  I'll have all of the codes if I use all 4 objmap codes for each enemy.  I think it has something to do with if the texture is loaded with multiple rows of enemies...

If I provide all of these codes (objmap codes actually), then it seems like most every instance of that enemy works unless they share a hashcode.
I sent some relevant info to someone in a PM the other day regarding what it means when images fall into different dump folders. I remember encountering this problem and designing a solution for it (this is why objmap file exists, but no one uses it and I haven't tested if it works):

Quote
-unsupported: size/format is not yet supported (256x256 currently only supported)
Originally I programmed Tonberry to only care about 256x256 size textures, which is the size of the memory image buffer. The hashing algorithm only looks at the left side of this square since the left half (128x256) contains the last image loaded into memory. I later added the getobj() function, which checks the top/bottom left quarters of memory for a single texture since I noticed many objects like save points and many character textures use only a quarter of the memory (128x128), so it searches through hashes in the objmap.csv. I'm not sure that anyone uses/knows about that functionality, but maybe they do (might explain why many character hashes fail). Anyhow, unsupported fall outside of those ranges and really only should occur if the texture is larger than 256x256 (video frames, for example).
-nomatch: not yet hashed, but will be in the future with modder help
In other words, there isn't any hashcode in the csv files that matches the image (hasn't been replaced yet by modders)
-nomatch2: hashed once, failed second round of hashing (shouldn't happen)
When textures are so similar that the second hash fails too
-noreplace: hashed and intended to be replaced but the new texture failed to load or didn't exist
-replaced: successfully replaced
-error: texture not otherwise accounted for (shouldn't happen)

Last bucket category, no images should really fall into it

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
I sent some relevant info to someone in a PM the other day regarding what it means when images fall into different dump folders. I remember encountering this problem and designing a solution for it (this is why objmap file exists, but no one uses it and I haven't tested if it works):

All of the character texture mods currently use the objmap.csv file for their locations.  I am using them in conjunction with a few hashmap codes for my enemy upscale and they seem to work great!  They seem to dominate, so if you use a texture that shares a hashcode with another one, Tonberry will populate both and show incorrect textures.  The reason a lot of people are seeing 'missing' textures is because the game is populating the art from the same hashmap, but possibly a different part of the image.  I'm still working on an effective fix without the need for a better hashing algo, and I'm making progress.
As far as 'missing' textures - it seems to be because the game is trying to pull a texture from a page with a code that has only one filled quadrant.. (the other quadrant is transparent, so the object pulls a transparent texture and 'vanishes').  To test this, an image with only a top or bottom 128x128 tile should have a bright neon color (like green or pink) placed in the adjacent top/bottom tile.  You can then discover which .png the texture is trying to access.

P.S. - with some of the objmap files I've run into and with the "wm_worldmap" texture (hashmap) that I added to HorizonPack, I get file dumps in my "error" folder regularly.  This is probably due to being on the worldmap, considering that it only seems to regularly dump the textures visible on the wm (like world squall, the world map, some random text)
« Last Edit: 2015-02-27 20:50:53 by Mcindus »

Omzy

  • *
  • Posts: 205
    • View Profile
Ah, ok, I didn't realize that. In that case, BerryMapper may benefit from a simple rewrite for all objects(including character textures and other 'quarter' memory objects). Here is the algorithm for hashing objects that takes into account these quarters of memory:
http://pastebin.com/N3VKFuJs

Edit: This algorithm simply takes all of the pixel values from Hash_Algorithm_1 from the top half up to 32 pixels and the same for the bottom half up to 32 pixels. It then produces a hash value from those 32 pixels only. If these values are plugged in, (theoretically) Tonberry should recognize them regardless of whether they are top left or bottom left.
« Last Edit: 2015-02-27 21:04:11 by Omzy »

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
For those of you who are curious about my enemy upscale, here are a couple of screenshots:




And then phoenix showed up RIGHT after I turned off the debugger.... lol.  Oh well.

Shunsq

  • *
  • Posts: 142
  • 20 years to mod a game, that's insanely long
    • View Profile
Hello Omzy,
Actually Berrymapper already integrates this algorithm, otherwise it wouldn't read the character textures. The problem is sometimes top and bottom textures are switched for the same character. Berrymapper can't identify which texture (top or bottom) is useful. Berrymapper delivers both  top and bottom hashcodes. You have to choose manually which one to use.


Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Hello Omzy,
Actually Berrymapper already integrates this algorithm, otherwise it wouldn't read the character textures. The problem is sometimes top and bottom textures are switched for the same character. Berrymapper can't identify which texture (top or bottom) is useful. Berrymapper delivers both  top and bottom hashcodes. You have to choose manually which one to use.

And in fact, both -need- to be used in order to not have missing objmap codes :)  At least in my experience so far.

JeMaCheHi

  • *
  • Posts: 194
  • You can just call me J!
    • View Profile
    • My YouTube Channel :D
All of the character texture mods currently use the objmap.csv file for their locations.  I am using them in conjunction with a few hashmap codes for my enemy upscale and they seem to work great!  They seem to dominate, so if you use a texture that shares a hashcode with another one, Tonberry will populate both and show incorrect textures.  The reason a lot of people are seeing 'missing' textures is because the game is populating the art from the same hashmap, but possibly a different part of the image.  I'm still working on an effective fix without the need for a better hashing algo, and I'm making progress.

Since Tonberry internal implementation of the hashmap was made with a map structure, if you guys put two or more texturenames with the same hashcode, the map structure will keep just one of them. By definition, every key on a map (in our case, the hashcode) is unique. That's why a duplicated hashcode means losing one of the textures.

BTW Mcindus, I LOVED you changing the red 0 in battle hud with a skull. Hope you include it on the next SeeD release ;)
« Last Edit: 2015-02-28 12:01:53 by JeMaCheHi »

Omzy

  • *
  • Posts: 205
    • View Profile
Actually Berrymapper already integrates this algorithm, otherwise it wouldn't read the character textures. The problem is sometimes top and bottom textures are switched for the same character. Berrymapper can't identify which texture (top or bottom) is useful. Berrymapper delivers both  top and bottom hashcodes. You have to choose manually which one to use.
Ahh, I see. Sorry for my ignorance about your program--I haven't had time to test it myself. I can see that since the hash algorithm is not symmetrical across the 2 quarters, the hash codes for each are different. In the future, this should be considered so that we can have only a single hash code to represent each no matter which position it is in. For now, perhaps Tonberry can be modified to add 'top' or 'bottom' to each of those names, to allow it to use both codes.

mavirick

  • *
  • Posts: 76
    • View Profile
I can see that since the hash algorithm is not symmetrical across the 2 quarters, the hash codes for each are different. In the future, this should be considered so that we can have only a single hash code to represent each no matter which position it is in.

I've thought a lot about this in trying to design a better algorithm.  Ideally there wouldn't have to be separate algorithms for full 128X256 textures and the 128X128 "objects." If the hashing algorithm is good enough, then just running it on the top left corner should be able to match both objects in that corner as well as 128X256 textures based only on their top half. Then we would only have to check the bottom for objects when either a) there are no matches for the top or b) to resolve collisions.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Hey guys! Just wanted to you to know I've released the official Lunar Cry Enemy Upscale mod!

All 59/59 regular enemies are complete!  Let me know if you run into any problems! This is my first time using objmap codes :)
http://forums.qhimm.com/index.php?topic=15977.0

Encore

  • *
  • Posts: 7
    • View Profile


Where can I find the background for fighting?
« Last Edit: 2015-03-01 11:58:57 by NexusHD »

Mirrorman95

  • *
  • Posts: 144
    • View Profile
    • Mirrorman95 - YouTube Channel
FatedCourage, I've got your new textures working on my Windows 7 FF8 installation, but Squall's bandages texture looks terrible. Upon further inspection, it seems you upscaled it nearest neighborly, instead of linearly or by applying a pixel filter like 4xBRZ. Now if I had the bandages texture without the rest of Squall's face on it I could perform such an upscale myself, but otherwise it could take a while to isolate that particular region. Also, I'd suggest moving your Texture Improvement mod to its own topic, because it's gotten far bigger than a mere offshoot of this topic, and it would make it easier to post further replies to inquiries just regarding those files.

Also, the objmap hash zel_13,2080093695 from the front post causes background characters to be skinned incorrectly.
« Last Edit: 2015-03-01 13:41:02 by Mirrorman95 »

FatedCourage

  • *
  • Posts: 337
  • I'll never regret knowing you.
    • View Profile
    • Youtube Channel
This is excellent!  You wouldn't happen to have any alternate bitmaps that you haven't thrown out, would you?  for example - where the tiles are flipped to the opposite sites of the image (top/bottom).  I'll have all of the codes if I use all 4 objmap codes for each enemy.  I think it has something to do with if the texture is loaded with multiple rows of enemies... let's use forbidden as an example:




If I provide all of these codes (objmap codes actually), then it seems like most every instance of that enemy works unless they share a hashcode.

I didn't find any alternates like that. But I didn't change out my party to see if that made a difference. And some of the monsters spawn in different areas than I was in, so that could change it up. But I'm glad you were able to get the rest. Excited to use the actual release. :D

FatedCourage, I've got your new textures working on my Windows 7 FF8 installation, but Squall's bandages texture looks terrible. Upon further inspection, it seems you upscaled it nearest neighborly, instead of linearly or by applying a pixel filter like 4xBRZ. Now if I had the bandages texture without the rest of Squall's face on it I could perform such an upscale myself, but otherwise it could take a while to isolate that particular region. Also, I'd suggest moving your Texture Improvement mod to its own topic, because it's gotten far bigger than a mere offshoot of this topic, and it would make it easier to post further replies to inquiries just regarding those files.

Also, the objmap hash zel_13,2080093695 from the front post causes background characters to be skinned incorrectly.

That's because it is terrible. I didn't do a good job with it, I'll admit. At the time it was only for testing the code and my upscale skills...well aren't great. I'll admit that it is somewhat tricky posting the progress here at times. But this all branched off Shunsq's and Mortael's work which all reside here. I'm really only adding to what they've done so far.

I do know of two places where I've seen that happen. One, being the bar in Timber. And two, outer space where one of his codes skins itself to the space suits. Also, I think one did something to Irvine at one point, but I believe I fixed that. Where is yours happening?

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
I didn't find any alternates like that. But I didn't change out my party to see if that made a difference. And some of the monsters spawn in different areas than I was in, so that could change it up. But I'm glad you were able to get the rest. Excited to use the actual release. :D

That's because it is terrible. I didn't do a good job with it, I'll admit. At the time it was only for testing the code and my upscale skills...well aren't great. I'll admit that it is somewhat tricky posting the progress here at times. But this all branched off Shunsq's and Mortael's work which all reside here. I'm really only adding to what they've done so far.

I do know of two places where I've seen that happen. One, being the bar in Timber. And two, outer space where one of his codes skins itself to the space suits. Also, I think one did something to Irvine at one point, but I believe I fixed that. Where is yours happening?

Thanks! Your textures were a huge help.

I think that you really should make your own release post  - make it a Beta.  We can contribute to it en-masse that way.  Also, I'd like a crack at the bandage... could you send me links to the original bitmaps through pm?

I just clarified this a bit for mavirick:
In my images above, my objmap codes turn out to be:

enemy_forbidden_13,3941295447
enemy_forbidden_13,1856653823
enemy_forbidden_14,1571182079
enemy_forbidden_14,3665278502

Because I have two textures on each .png - 2 .png's total, 4 codes - no issues (mostly)

I hope this helps with erroneous objcodes!
« Last Edit: 2015-03-01 20:27:16 by Mcindus »

FatedCourage

  • *
  • Posts: 337
  • I'll never regret knowing you.
    • View Profile
    • Youtube Channel
Thanks! Your textures were a huge help.

I think that you really should make your own release post  - make it a Beta.  We can contribute to it en-masse that way.  Also, I'd like a crack at the bandage... could you send me links to the original bitmaps through pm?

I just clarified this a bit for mavirick:
In my images above, my objmap codes turn out to be:

enemy_forbidden_13,3941295447
enemy_forbidden_13,1856653823
enemy_forbidden_14,1571182079
enemy_forbidden_14,3665278502

Because I have two textures on each .png - 2 .png's total, 4 codes - no issues (mostly)

I hope this helps with erroneous objcodes!

No problem.

You think so, too, huh? It does make sense. Perhaps I should. It would be good to have a place where it's easier for people to help out.

I think it helps a bit. Any questions about it, and I'll come to you.

Mirrorman95

  • *
  • Posts: 144
    • View Profile
    • Mirrorman95 - YouTube Channel
I didn't find any alternates like that. But I didn't change out my party to see if that made a difference. And some of the monsters spawn in different areas than I was in, so that could change it up. But I'm glad you were able to get the rest. Excited to use the actual release. :D

That's because it is terrible. I didn't do a good job with it, I'll admit. At the time it was only for testing the code and my upscale skills...well aren't great. I'll admit that it is somewhat tricky posting the progress here at times. But this all branched off Shunsq's and Mortael's work which all reside here. I'm really only adding to what they've done so far.

I do know of two places where I've seen that happen. One, being the bar in Timber. And two, outer space where one of his codes skins itself to the space suits. Also, I think one did something to Irvine at one point, but I believe I fixed that. Where is yours happening?
After the tour with Selphie at the start of the game, if you go northeast of the Save Point near the Balamb directory, there's a schoolgirl whose base texture flickers in and out with the zel_13 texture if you have that objmap enabled. Additionally, I have found that the Texture Improvement mod highly improves the game's quality on the whole, despite a few rough patches here and there.

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Here is a new bandage texture for Squall.  Something I threw together in 20 min - but it looks better than what we've got! :)


And here it is in action:



FatedCourage

  • *
  • Posts: 337
  • I'll never regret knowing you.
    • View Profile
    • Youtube Channel
Here is a new bandage texture for Squall.  Something I threw together in 20 min - but it looks better than what we've got! :)


And here it is in action:




Looks fantastic. Much better, now.

After the tour with Selphie at the start of the game, if you go northeast of the Save Point near the Balamb directory, there's a schoolgirl whose base texture flickers in and out with the zel_13 texture if you have that objmap enabled. Additionally, I have found that the Texture Improvement mod highly improves the game's quality on the whole, despite a few rough patches here and there.

I've tried to find the person you're talking about at that point, but I didn't find any flickering texture. Which means I probably already had it disabled on my end. I agree. It's just that sometimes codes are shared and cause things like what you just saw.

Mirrorman95

  • *
  • Posts: 144
    • View Profile
    • Mirrorman95 - YouTube Channel
Looks fantastic. Much better, now.

I've tried to find the person you're talking about at that point, but I didn't find any flickering texture. Which means I probably already had it disabled on my end. I agree. It's just that sometimes codes are shared and cause things like what you just saw.
That new texture looks great! By the way, here are some snapshots I took of that hash glitch:
http://www.brickshelf.com/gallery/mirrorman95/FF8/2015-03-01_00002.jpg
http://www.brickshelf.com/gallery/mirrorman95/FF8/2015-03-01_00003.jpg
EDIT: Screenshots taken down; I'll need to wait for Majhost to come back up again to repost them.
« Last Edit: 2015-03-18 14:32:49 by Mirrorman95 »

Falkenauge

  • *
  • Posts: 3
    • View Profile
Hi wanted to ask if there is a guide on how to install this mod?
have the steam version

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Where can I find the background for fighting?

It's a HUGE undertaking.  I'm only doing little pieces at a time.

Current Complete Battlefields:
Grasslands
Grasslands Coastline
Grasslands Mountains
Fire Cavern

In Progress:
Main Forest
Path to Comm Tower
Snowy Forest
Snowy Tundra
Main Desert

Need help with:
Training Center
Communications Tower
Dollet Street

Extras:
"Analyze Target" and Status Text for Scan - complete

Considering the size of this project, I am looking for people to help with a few textures! Let's get this machine rolling!

I'll release the first 'draft' of this mod as soon as I clean up the mountiains in the grasslands mountains battlefield.  I figure I can release the mod one area at a time, so as not to tease too many people.
I'm going to release the entire collection I have of the battlefield bitmaps as soon as I've collected a few bit more.  I've just fixed my hyne save and can go to more of the battle areas in the game.  I just collected all of Ultimecia's Castle, and I'm digging for more and more battle scenes.  I haven't collected ANY from the laguna flashbacks, so I guess that's next.
« Last Edit: 2015-03-04 03:33:18 by Mcindus »

NewBeginning

  • *
  • Posts: 1
    • View Profile
Hi wanted to ask if there is a guide on how to install this mod?
have the steam version

Seconded. Been trying to get this mod to work. It's especially confusing, even for a FFVIII mod. Can anyone give us a step-by-step?

Mcindus

  • *
  • Posts: 929
  • Artist, Modder, Musician.
    • View Profile
    • Lunatic Pandora
Seconded. Been trying to get this mod to work. It's especially confusing, even for a FFVIII mod. Can anyone give us a step-by-step?

If it's the character textures you're talking about, the mod is really in Beta right now so if you wait for the release, it will have thorough instructions and I will even make a tutorial video.

FatedCourage

  • *
  • Posts: 337
  • I'll never regret knowing you.
    • View Profile
    • Youtube Channel
If it's the character textures you're talking about, the mod is really in Beta right now so if you wait for the release, it will have thorough instructions and I will even make a tutorial video.

I've been working on getting this into a standalone and whatnot. Was just trying to fix a few textures and get everything organized. And deciding on a suitable name... Though, with the textures being buggier than other mods and the lacking of a huge amount of codes, I wasn't sure if it was deserving of beta status or not. :P

FatedCourage

  • *
  • Posts: 337
  • I'll never regret knowing you.
    • View Profile
    • Youtube Channel
Just wanted to post the textures I've been fixing up. Think they look better...in my opinion. :-P And I've fixed the wrapping issue with both.