Qhimm.com Forums

Final Fantasy Forums => Tools => FF8 Tools => Topic started by: Omzy on 2012-08-17 03:43:13

Title: [PSX/PC] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2012-08-17 03:43:13
PuPu
FF8 Field Importer/Exporter

(http://img214.imageshack.us/img214/1839/screenshottxy.th.png) (http://imageshack.us/photo/my-images/214/screenshottxy.png/)

This tool allows you to:
I) View the individual layers of each field file that the game reads to synthesize a background
II) Export these layers to PNGs so they can be manipulated in image-editing programs (batch enabled)
III) Import resized versions of these layers back into a format that can be played in game with Tonberry (batch enabled)
--> Get Tonberry (http://forums.qhimm.com/index.php?topic=15291.0)

Instructions:
1. Use Qhimm's Garden (http://forums.qhimm.com/index.php?topic=8461.0) or Mirex's Unmass (http://mirex.mypage.sk/index.php?selected=1#Unmass) to extract the contents of FF8 field
2. Unzip PuPu_v2.1.rar
3. Place PuPu.exe in the same directory as the extracted 'mapdata' folder (changed from previous release)
4. Run the program and it will automatically load all field files contained in the 'mapdata' folder
5. Select one or multiple field files in the left box (CTRL + click  for multiple or SHIFT + END to select all)
6. Select the layer you want to view in the right box
7. Use the 'Export' button to save the selected files as PNGs
8. Use the 'Import' button to convert the selected files back to the game format

Download: PuPu_v2.1.rar (http://goo.gl/xCYxdn)

Credits:
-Aali for writing Palmer, which inspired this tool

*Known issues:
Not memory-perfect (may mistakenly report 'Missing import files...' after a long run of files) - Close, re-open, and restart where it left off if this happens
(http://img9.imageshack.us/img9/3584/pupuav.png) (http://imageshack.us/photo/my-images/9/pupuav.png/)
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: obesebear on 2012-08-17 04:33:59
Oh for the love of.... please don't give me an excuse to play that game again.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Mendelevium on 2012-08-19 18:47:49
Glad to see Final Fantasy VIII getting some graphical tools. Might I ask why the openGL driver (which I assume is Aali's) doesn't work? It seems like a curious problem :O.

Also I am glad to see you back on the modding scene as of late. Your field backgrounds in FF7 made the experience fairly fantastic :). I can't wait to see what else you cook up with this! :).
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: magochocobo on 2012-08-19 19:26:28
wow so now its posible improve the backgrounds!!
I hope in the future edit the textures of the characters models with pupu!!
Good work Omzy!!!
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Mendelevium on 2012-08-19 19:39:33
For simplicity sake, which I think is the best policy when it comes to programs like this, I would hope the field/battle model editor would be a separate program. However, it would be immensely awesome if Lusky made such a program.

My hopes are for a kimera like program, but for FF8 :).
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2012-08-19 21:06:11
Might I ask why the openGL driver (which I assume is Aali's) doesn't work? It seems like a curious problem :O.
OpenGL is a different beast, which I have no knowledge of. Aali is the developer of the OpenGL driver for FF7/FF8 and his hard work has paid off for all of us. It is apparently a lot tougher to read backgrounds into OpenGL in FF8 than in FF7, so for now, there is no driver support. When that eventually comes around, however, we'll be ready for it.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Mendelevium on 2012-08-19 22:24:53
Programming seems to be a bit more complicated than I thought @[email protected]
Nevertheless, you have done several great things, and I for one am extremely grateful.
I didn't mean to pass off as rude, if that was the case. I was genuinely curious :)
I eagerly await any and all updates that are sure to come! :).
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2012-08-19 22:27:40
Programming seems to be a bit more complicated than I thought @[email protected]
Nevertheless, you have done several great things, and I for one am extremely grateful.
I didn't mean to pass off as rude, if that was the case. I was genuinely curious :)
I eagerly await any and all updates that are sure to come! :).
Thanks for the support--you definitely didn't come off as rude. Asking questions is the only way any of us learn  :wink:
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Mendelevium on 2012-08-19 22:35:04
Learning is the fruit of life, or said an old weird English teacher of mine once. :).
And the support is well deserved. I tried dabbling in programming once, for a whole year; but my mind just couldn't process things like bytes and hex data. Went right over my head. All I could do was basic Java stuff and made a very "Dumbed down" text game. I essentially treated the computer like it knew nothing and scripted every event out by hand, and didn't know how to do algorithms :P. I had a bad teacher, is probably why...

So seeing what you folks can do is at times baffling, and very impressive. :). So as I said before, support that is very well placed.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2012-08-19 22:54:48
I remember trying to learn programming in high school. A big mess. The best way to learn is to teach yourself. Pretty much every project I do, I have to learn a new programming language and new concepts. I learned if/then statements and loops in a classroom years ago, but I learned how to work with binary/hex files from my ff7 modding.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Mendelevium on 2012-08-19 22:59:32
I would have failed the class, had I not taught myself. He just threw packets at us. Told us to do work. The packets had a lot useless information, and I was told by a friend of mind that programming was all about improvisation. You cannot follow a set pattern that works every time; you have to build upon what you know and often times alter it.

Still, High School programming was messy, I agree entirely. I am tempted to take a college course on it, but as you said the best way to learn is on your own. I tried with FF7 a long time ago. The most I was able to do was custom scripting in Meteor. That is hardly a feat though; I cannot make my own programs, or decipher bytes and hex data. I suppose I would just have to sit down and learn it all, perhaps it was because I was fifteen at the time of learning too. It's been about four years. :).

Sorry about the rant, I was just relating to what you said. Final Fantasy VII modding sort of taught all that I know about computers now. From editing my registry, to editing a configuration file. It's kinda silly that I use some of the skills I learned from this forum to fix my friends computer :).
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2012-08-20 03:43:01
Haha, its all good, I guess its just easier to learn anything when you really care about it and have fun doing it.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: EditorMaster on 2012-10-09 11:33:33
Good job Omzy
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Zure on 2012-10-29 10:07:08
Can't open Pupu v1.exe

don't know why

the right folder is ....\ff8\data\eng ???

Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: ZackNeji on 2013-07-01 23:31:33
Can't open Pupu v1.exe

don't know why

the right folder is ....\ff8\data\eng ???

I have the same problem.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2013-07-07 02:17:23
You must first extract the field.fs using Garden (linked in first post). Then place Pupu.exe into the newly extracted field folder.
Title: Re: [REL] PuPu - FF8 Field Importer/Exporter
Post by: Omzy on 2014-06-13 02:31:22
Updated main post with version 2 which now works with Tonberry  :D

*Note that the working directories are different, I've changed them and the prompts should make it harder to screw up now.
*Also, for the 1 person that already downloaded it, re-download, had a tiny bug I fixed.
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: LeonhartGR on 2014-06-13 10:49:27
I can sense a server overload soon :P :P
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: senboy on 2014-06-16 22:30:59
need help i tried extract field fs using garden but it always say no data files found
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: LeonhartGR on 2014-06-16 23:42:34
(http://i.imgur.com/P22GTKT.gif) (http://forums.qhimm.com/index.php?topic=14868.msg214002#msg214002)
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: Omzy on 2014-06-17 00:13:41
Haha, Leonhart at it again

need help i tried extract field fs using garden but it always say no data files found

I'm not sure, can someone else chime in on this? I haven't used it in ages, I use the same set of files I extracted years ago.
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: Shard on 2014-06-17 00:21:19
Garden will fail to extract the field files if the field has been opened in another program (like Deling, or the game itself). Try closing everything else and extracting again.

BTW, Garden fails to recompile the files. It always gives me a corrupt field.fs, so it's only really good for decompiling.
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: EQ2Alyza on 2014-06-17 00:35:03
I ran into the same issues with Garden. I use Unmass w0.92 to extract the archives. Download is at the bottom of the page: http://mirex.mypage.sk/index.php?selected=1#Unmass
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: senboy on 2014-06-17 12:24:27
Need help again T_T

i use unmass ( thanks to Alyza) to extract field  after that , i place PuPu in the same directory as the extracted 'mapdata' folder
it open but i only see text elixir pliss! in the right corner,... 
Title: Re: [REL] PuPu v2.0 - FF8 Field Importer/Exporter
Post by: EQ2Alyza on 2014-06-17 14:11:35
Use Unmass on field.fi first. Then use it again on, for example, ...\field\Data\eng\FIELD\mapdata\bg\bg2f_1.fi

Then place PuPu.exe inside the folder that has the mapdata folder and you should see bg2f_1 show up on the left side. Click/highlight it and use the Export button to make the PNGs.
Title: Re: [REL] PuPu v2.1 - FF8 Field Importer/Exporter
Post by: Omzy on 2014-06-20 01:51:45
New version released, v2.1, see main post for download. This version corrected some of the bad memory leaks introduced in v2.0, but there are still memory leaks that I haven't figured out yet. If you're doing a bunch of files and you get the error "Missing import files...", the memory leak has become too bad to continue, so restart PuPu. I've tested it using multiple runs, however, and it works well enough to convert all files without too much hardship.
Title: Re: [REL] PuPu v2.1 - FF8 Field Importer/Exporter
Post by: Yugisokubodai on 2014-06-25 17:17:08
I converted the field files with Pupu to png images, twisted them with an editor. But the problem is when I imported these edited png, It just saved a mapdata folder with png format (and somewhat distorted), not the game format.
Title: Re: [REL] PuPu v2.1 - FF8 Field Importer/Exporter
Post by: EQ2Alyza on 2014-06-25 17:24:53
It will look distorted (cut up into pieces) when you import them back. The PNGs you get go into the textures folder that is included with Tonberry. The folder format should be ff8\textures\xx\xxxxx\PNGs. For example, on scene may be ff8\textures\bc\bccent_1\bccent_1_0.png, bccent_1_1.png, bccent_1_2.png, etc...
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: TerriblyGrimm on 2014-12-15 09:21:55
Hello, i've downloaded the latest build of PUPU and using Deling extracted the field folder from field.fs
( As i couldn't get unmass or garden to work but essentially this is the same outcome )

But everytime I open PUPU it doesn't show any list of files?
can anyone help me with this, I would like to re-render and edit by hand using Photoshop CS-6 all the games textures

(http://i50.photobucket.com/albums/f345/BffWithDEATH/Untitled_zpsb0e1408b.png)
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Ironmad on 2016-05-20 23:06:16
Anyone know if this program is dead or not? I have same problem as BffWithDEATH above me had. I used Unmass.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: zwuw on 2016-11-18 00:08:54
I noticed some problems on my textures, especially banding, when I import them with Pupu:

ingame
http://imgur.com/a/PuPSG (http://imgur.com/a/PuPSG)

texture(resized) :
http://imgur.com/a/7kWzq (http://imgur.com/a/7kWzq)

The subtextures are ok but after Pupu converts them, I see the banding on tiles. If anyone has a solution for this please tell me. Thanks

Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Mcindus on 2016-11-18 07:13:21
I noticed some problems on my textures, especially banding, when I import them with Pupu:

ingame
http://imgur.com/a/PuPSG (http://imgur.com/a/PuPSG)

texture(resized) :
http://imgur.com/a/7kWzq (http://imgur.com/a/7kWzq)

The subtextures are ok but after Pupu converts them, I see the banding on tiles. If anyone has a solution for this please tell me. Thanks



Are you importing them directly back into the game?  The banding would be the difference in bitrates between your file and what ff8 can handle.

You should test your texture in Tonberry and see if it looks like the one you created without the banding.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: zwuw on 2016-11-18 13:00:55
Yes, I loaded the backgrounds(1280x896) with Tonberry and this problem happens to all of them, although bggate_5 banding is more noticeable. I also noticed the same problem on Eden's backgrounds. The problem really appears when Pupu converts the subtextures, I don't know if that conversion/gamma handling is necessary for compatibility. Here are the subtextures, before and after Pupu conversion:

https://mega.nz/#!KhxmzB7a!-lCEjmth5cVDR_bPqKPymZEqv6ZMWZOrfT5krqwEzTc

Is there any way for me to replace directly my backgrounds(non-resized) with the original ones(on field.fs)  so I can check if banding still happens?
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2016-12-13 22:36:01
PuPu just pulls the bitstream exactly as it is in the archives and rearranges the tiles to match their proper coordinates. It doesn't at all influence any pixel values, so it is not the cause of banding--the original textures are. Please let me know if I'm misunderstanding the question.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Yagami Light on 2017-01-26 11:14:08
Pupu seems to limit the files to 8 bit when importing them into the readable game files, which makes no sense since we are using external textures, there should be no limit. If I export, import then upscale them there is no banding, but they appear black in game. If I export, upscale each file individually they look fine, but the moment I import them you get really bad banding and it just ruins the whole picture.

EDIT: Managed to fix the banding by importing the original and upscaling it using 8 bit mode, though the tile lines show up and I dont know how to get rid of them.

(http://i.imgur.com/L9sW3oG.jpg)                                                    (http://i.imgur.com/Ze4IE4u.jpg)
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: FatedCourage on 2017-01-26 18:22:06
Pupu seems to limit the files to 8 bit when importing them into the readable game files, which makes no sense since we are using external textures, there should be no limit. If I export, import then upscale them there is no banding, but they appear black in game. If I export, upscale each file individually they look fine, but the moment I import them you get really bad banding and it just ruins the whole picture.

EDIT: Managed to fix the banding by importing the original and upscaling it using 8 bit mode, though the tile lines show up and I dont know how to get rid of them.

(http://i.imgur.com/L9sW3oG.jpg)                                                    (http://i.imgur.com/Ze4IE4u.jpg)

Yes, upscaling the already cut textures will get rid of banding. Downside is... Upscaling them with waifu alters the lines/segments in the textures. Making them noticeably visible. The only way around this for me is to combine the textures, which gives a more accurate upscale, run them through Pupu, then use upscaled alpha channels to get rid of the excess from the textures. This is how I've been doing it. But it takes considerably longer and you'd still have to use Pupu. :P
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2017-01-26 18:45:49
These are the kinds of bands you expect to see when you upscale a texture before it is reassembled into its layers. It almost looks like you used the raw textures from the archives. You must properly export the textures using PuPu to get the layers, up scaling this way won't work. This is simply an artifact of up scaling and doesn't really have anything to do with PuPu. PuPu can perform the original export and assembly, you do your magic, then reimport and it deassembles back into blocks.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Yagami Light on 2017-01-26 19:59:25
Right I exported/imported the original low res textures to get the tile format texture then upscaled them. Cause if I export then upscale them, they look fine, but when I import using Pupu it causes banding and looks completely different from the textures I had before. Only upside if there is no tile seams. I just want to know why this happens and if it can be fixed.

(http://i.imgur.com/xFVNh5M.jpg)

(http://i.imgur.com/ohgBThG.png)
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2017-01-26 20:46:08
This is the reasoning behind facepalmer and project eden scripts. The entire scene must be composed before resize is performed for each individual animation or you will get bending wherever 2 blocks come together on the original texture.  This is why upscale with this method is extremely tedious without a powerful script. Look into the project eden script code. Can anyone else elaborate on the explanation here? I'm busy at work
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Mcindus on 2017-02-01 15:04:00
This is the reasoning behind facepalmer and project eden scripts. The entire scene must be composed before resize is performed for each individual animation or you will get bending wherever 2 blocks come together on the original texture.  This is why upscale with this method is extremely tedious without a powerful script. Look into the project eden script code. Can anyone else elaborate on the explanation here? I'm busy at work


Hey Omar, I think he's saying that when he imports his texture using PuPu, it creates color 'banding'.  The 'border' issue he was having was because he was trying to go around the issue, and it didn't fix it.

If you look at the last couple of images he posted above, the texture looks great, but after he PuPu's it for import, look at the banding in the colors (noticeable in the bluish area the best).  He wants to know why this happens and what the issue might be?

The 'borders' that he had were only because he was upscaling the file directly without using PuPu for re-alignment because he was trying to get around the 'color-banding' issue that PuPu seems to create for him.

Does PuPu convert the image to 16 or 24 bit by chance, instead of 32?  This would create an issue, as there wouldn't be enough bits for the alpha channel, and it might crush the color information in 'conversion'
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2017-02-01 15:11:38
Ahh, ok sorry for the misunderstanding. I'll try to dig up the source code and post it here after work. I recall it being a fairly simple program, if anyone wants to dig into it and improve it it would probably be pretty easy.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2017-02-08 00:57:32
Sorry for the delay, here is the source code if anyone is interested in improving this program: -- See link in later post

It uses visual studio, if I recall its a fairly simple program so shouldnt be too hard to dig into if you have some basic programming knowledge.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: zwuw on 2017-03-04 08:16:59
Thank you for providing the source code for the program.
Title: Re: [FF8] Field Importer/Exporter - PuPu (v2.1)
Post by: Omzy on 2017-03-12 05:13:26
Sorry again! I uploaded the wrong version as zwuw let me know. Here is the most recent version -- PuPu_v2.1 (https://goo.gl/DqvznR)
Title: Re: [PSX/PC] Field Importer/Exporter - PuPu (v2.1)
Post by: Maki on 2019-05-22 18:58:22
*Fixed null reference at listbox selectedItem=null
*Fixed unwanted conversion from ARGB8888 (32bpp) to ARGB1555 (16bpp) resulting in loss of colour

https://drive.google.com/file/d/1Yr8Lw_wFBzuqPOV-TqfGAcwbXTHLtPwI/view?usp=sharing