PDA

View Full Version : Wind Waker - sea maps



Spinal83
June 15th, 2009, 13:21
Okay, I've finally found the time to play Wind Waker again and now I want to make a map for it, like the maps on vgmaps.com
However, I don't know how.

I'm pretty sure that the sea maps are stored in \res\Fmap\Fmap.arc
This extracts two folders, cm and fm.
cm contains 196 Yaz0-compressed files. After decompressing, there are 196 new files, all 10432 bytes in size.
fm contains 49 Yaz0-compressed files. In WW, the overall map is 7x7 squares which is 49. So these files could be the "zoomed out" maps. 196 = 49x4, so the cm files could be the zoomed in maps (1000x1000 and 200x200), and something else.
Note: this is all speculative, I have no idea what the files are yet.

All mentioned files appear to start with the following bytes: 0x02 0x02 0x00 0x64 0x00 0x64
They are not BTI files (tested by converting them to DDS) and not TPL files (tested by converting with using tplx)

If anyone has information on these files, or wants to help, please say so :)

-edit-
by taking a picture of my tv while showing the map, I could count the number of pixels each map tile takes. I think they are 48x48 pixels (though it's difficult to be 100% sure)
The big maps (1000x1000 and 200x200) take up 5x5 tiles, which would make them 240x240 pixels.

Spinal83
June 27th, 2009, 15:27
85 views and 0 replies :(
I'm going to try a different approach: run the game in an emulator. Then I will know the exact size of the maps, and maybe even see how the files are loaded.
I'll report back when I got the game running (unfortunately I do not have a DVD-ROM player capable of reading GC discs so it will take a while to get the game in "some other way")

Anton
July 1st, 2009, 13:44
No replies because nobody knows (me too) what that file type is, with this header (0x02 0x02 0x00 0x64 0x00 0x64), I guess...

I repeated all that you've done - no success, too...
I don't know what to do next with those files.

Spinal83
July 8th, 2009, 15:34
Yeah, I was afraid of that... I digged into the Dolphin source code a bit, but couldn't find anything useful.
I don't know how they handle things, but there was no mention of RARC files, BTI files, Yaz0 compression or whatever in the source.
I guess it will be printscreen copy-pasting to make the map...

Anton
July 9th, 2009, 07:25
I guess it will be printscreen copy-pasting to make the map...

Not a bad idea, because if you even will figure out what to do with those files, the resolution of that maps won't be very high. Maybe printscreening will be even better in quality, I guess.

Lunaboy
July 9th, 2009, 14:42
The archive Fmap.arc indeed contains the images of the sea map. I've never tried the BTI to DDS converter, but the files are just standard BTI files. Because it looks like your converter doesn't work with all BTI-formats, I've written a BTI conversion program for you.

This program is a console program. It can convert a given BTI file to BMP and TGA format by giving the filename as an argument. To make life easier for you, I've also added support for ARC archives. When you specify the filename of an ARC archive as argument, the converter will convert all BTI files it finds in the archive to BMP and TGA format. The converter recursively creates directories to store the image files. As extra bonus I’ve also included Yaz0 and Yay0 decompression-routines, so all Yaz0 and Yay0 compressed files will be decompressed automatically during the conversion. You only have to extract the Fmap.arc file from the Gamecube image and feed it directly to my BtiConverter.

This is a basic step-by-step plan to use the program:
1. Extract the ZIP file and place BtiConvert.exe in an empty directory
2. Place the Fmap.arc file in the same directory as BtiConvert.exe
3. Start Windows Explorer and go to the directory containing the two files
4. Drag the Fmap.arc file and place it on top of the BtiConvert.exe file
5. The converter will pop-up and extracts the files
6. When the console-window closes, the images are ready to use

When no images or directories appears, you can use the command prompt:
1. Choose 'Run' from the Start-menu and type 'cmd'
2. Use 'cd' to change to the directory containing the two files
3. Type: 'BtiConvert.exe Fmap.arc'
4. The images should be extracted

Good luck

Because I get an 'Unable to move/copy file' error while uploading the attachment, I'm using RapidShare:
http://rapidshare.de/files/47801207/BtiConvert.zip.html

Anton
July 9th, 2009, 16:13
Excellent!
I tried to extract Fmap.arc - it works excellent!

But - for making maps, I guess, the file Fmap.arc isn't the good choice.
Each map fragment is extracted to a 3 (with size of 100x100 pixels each) files:

1. BMP file of a map fragment which shows how alpha-channel looks like
2. BMP file of a map fragment itself
3. TGA file which contains image of file #2 + alpha-channel which shows file #1.

All files are 100x100 pixels, black-and-white, but Photoshop opens it like RGB images:

http://pic.ipicture.ru/uploads/090709/thumbs/WRJsvEitTX.jpg (http://ipicture.ru/Gallery/Viewfull/20765625.html)

I guess it converts each color channel to a separate file, so it must be all combined in Photoshop somehow.

Lunaboy
July 9th, 2009, 19:10
The images are indeed black-and-white, because they’re stored as black-and-white in the Gamecube Image. The menu-program of the game first paints the background of the map (using texture-environment-colors to color it up) and blends the sea map images on top of the map-background. That's why the images have alpha-planes. The game has to use separate images, because some locations might not be discovered yet.

The converter saves all images as full-color images. Because the BMP format doesn't support alpha (only RGB), I've chosen to write the image as two separate BMP files (one full-color RGB image and one grayscale Alpha image). The TGA image-format, however, does support alpha-channels, so the 32-bit color (Red, Green, Blue, Alpha) can be saved as a single TGA file. The TGA file is just a combination of the two BMP files (the full-color RGB image ‘_color.bmp’ and the grayscale Alpha image ‘_alpha.bmp’). Try to load the TGA file in Photoshop and look for Alpha-planes. You'll see the alpha-image as a separate alpha-plane in the TGA file.

I found out that nearly all map-overviews are stored in low-resolution images with only a few colors. The icons, for example ‘\Res\Msg\Itemicon.arc’, are stored as full-color images.

If you're also looking for the dungeon-maps, they're saved in the same ARC archive as the 3d-model. For the first room of the Earth-temple, extract '\Res\Stage\M_dai\Room0.arc' and feed it to the converter. You’ll end up with the image shown in the submap-box on the screen. The complete dungeon maps are saved per floor in '\Res\Stage\M_dai\Stage.arc'. The textures are saved inside the model-file (model.bdl) and won’t be extracted.

Spinal83
July 20th, 2009, 16:44
:o I go away for a few days and now I find this. Thanks a lot!
I've only looked at the sea maps so far (which was my original plan) but it works with dungeon maps as well, I'll try that too.

Thanks again for your program!

Spinal83
July 30th, 2009, 14:09
Just to let you all know: this program also works on the maps (radar) and various other bti's used in Pikmin 2!

Anton
August 7th, 2009, 08:51
Lunaboy - is it possible to do a back conversion?
(BMP or TGA back to BTI)

antidote
August 7th, 2009, 17:33
Yes it is, according to Thakis, BTI is just a custom dxt3 image file (DDS).


http://amnoid.de/gc/bti.txt

Anton
August 7th, 2009, 18:10
antidote, thanks, but - is there a some tool for this?
Or any explanation - how to do such conversion with Thakis' "BTI dump" or Lunaboy's "BTI converter"?
Such specs are nothing for me, I'm not a programmer...
The tool would be great...

Also, it would be very cool not only to convert edited images to BTI, but also to pack all stuff to a *.rarc file back, from which those images are extracted. (on Thakis's site there is only "RarcDUMP"-er. No reverse process).

I need all this for a translation of ZeldaTP to russian.
I'd like to redraw some images (bti) to russian.
As for script translation - I use RARC files directly. No need to extract these for a script translation.

But in case of BTI files - each RARC contains more than one *.bti file + directories. So I need to pack all this stuff back to RARC after editing.

antidote
August 7th, 2009, 18:22
I don't think there is a tool *currently* however making one would be trivial.

I'm busy trying to crack the MP3 .pak since SaraHarp hasn't released his spec document on it, otherwise I would write one.

Anton
August 7th, 2009, 19:10
I would write one.

It would be very nice, if you'll write such tool. :)

Lunaboy
August 25th, 2009, 18:45
At your request I’ve written a simple TGA to BTI converter.

The converter is a console application and can convert 24 or 32 bit uncompressed TGA files to Rgb4A3 and Rgb565 BTI files. You can select the output format (Rgb4A3 or Rgb565) with a command line parameter. The Rgb4A3 format includes the alpha-plane from a 32-bit TGA file. For more help, run the program without parameters.

Be aware that the size of the output file might be larger than the original BTI file, since palette based files are not supported. This might be a problem if you inject the converted BTI files inside original game images without rebuilding the file-table. When you’re rebuilding the image (create a new image from a list of files), the increased file size shouldn’t be a problem.

Because I get an 'Unable to move/copy file' error while uploading the attachment, I'm using RapidShare:
http://rapidshare.de/files/48205529/Tga2bti.zip.html

Have fun. :)

Anton
August 26th, 2009, 07:34
Lunaboy - Thanks a lot!
I'll try this ASAP.

I think there will be no problem inserting it to iso with this tool:
http://emutalk.net/showthread.php?t=49346

Anton
August 26th, 2009, 14:14
The converter works just fine.
Thanks again! :)

But there are still any tool to pack extracted contents of RARC files back to RARC...
Doing this in Hex-editor for now...

Vanit
August 27th, 2009, 01:12
Couldn't you have dumped the textures using Dolphin?

Christi258
April 27th, 2011, 12:54
Please upload again the tga to bti converter

Lunaboy
May 4th, 2011, 01:12
Here is the tga2bti converter again.
I've also included the tools for extracting and creating ARC (RARC) archives.
Have fun. :shifty:

Christi258
May 5th, 2011, 20:15
Thanks very well

Anton
May 6th, 2011, 17:26
Lunaboy, is there any changes in tga2bti/arc pack/extract?

In any case, I use your tools and it saved my life while translating ZeldaTP and ZeldaWW to Russian! Thanks again!

BTW, I've added you to game credits: http://imageshack.us/photo/my-images/845/zeldatprusthanks.jpg/
"GRATITUDE (for useful programs)" :)

Christi258
May 7th, 2011, 11:31
My converter don't convert my tga files. What shall I do?

Anton
May 7th, 2011, 12:19
How do you use it?

Here's parameters:
http://imageshack.us/photo/my-images/402/tga2btiparameters.jpg

Christi258
May 7th, 2011, 14:14
How can I uncompress them and how can I see how lot of bit my tga file has?

Anton
May 7th, 2011, 17:44
How can I uncompress them and how can I see how lot of bit my tga file has?
Uncompress what?

If you need to extract TGA from BTI, use BtiConvert (http://www.shedevr.org.ru/zelda64rus/tools/BTI_convert.zip)

As for how many bits - I use Photoshop. Just resave tga file - pop-up window will appear. Choose.
(If you need alpha channel - use 32 bit).

Christi258
May 7th, 2011, 19:32
Uncompress what?
As for how many bits - I use Photoshop. Just resave tga file - pop-up window will appear. Choose.
(If you need alpha channel - use 32 bit).

How do you meen "resave the file"? I've Photoshop CS2

Anton
May 7th, 2011, 20:11
How do you meen "resave the file"? I've Photoshop CS2

Open TGA
File-> Save As...

Christi258
May 8th, 2011, 15:19
Sorry but the converter doesn't run at all!

How can I start the programm without parameter?

Anton
May 8th, 2011, 19:39
Christi258, tga2bti is a DOS program and has no GUI.

Push START button->Run, then type cmd: get DOS window

Or:
Make a *txt file with this text:

tga2bti -IA4 tgafilename.tga btifilename.bti

save this file in the same folder where tga2bti.exe is.
rename file extension from *txt to *.bat (or *.cmd).
run this file: btifilename.bti file will be created in current folder.

- IA4: type needed parameter instead
- tgafilename.tga: type your TGA filename
- btifilename.bti: type your BTI filename

Christi258
May 9th, 2011, 14:12
Thanks, now it runs.

Christi258
May 11th, 2011, 20:24
My last problem:
I've injected that image in a GC game, but now ist only black and white!

Anton
May 12th, 2011, 08:36
Just try another parameter...
What game do you edit?

Christi258
May 12th, 2011, 17:56
Mario Kart Double Dash

EDIT:
What does "Intensy format" mean exactly?

Anton
May 13th, 2011, 15:44
What does "Intensy format" mean exactly?

4-bit Intensity = 4-bit color image, etc. - but this is for bti only.
TGA files must be RGB (+ alpha channel, if needed)

Christi258
May 13th, 2011, 20:17
Just try another parameter...

I get on your nerves but how shall I do that?

Edit: It also reflects the image

Anton
May 14th, 2011, 21:06
I get on your nerves but how shall I do that?


tga2bti -IA4 tgafilename.tga btifilename.bti

try "changing/experimenting with" the RED colored parameter in the string above )

>Edit: It also reflects the image
can't help with that, maybe you'll better try to ask the author of this tool ;)