News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Utilities: Rainbow: texture format converter  (Read 12228 times)

RHDNBot

  • Guest
Utilities: Rainbow: texture format converter
« on: July 13, 2014, 07:38:46 pm »

Update By: PhOeNiX

Rainbow is a tool intended to convert different graphics formats from video games assets to and from user editable images (like png). It currently supports almost every variant of the TIM2 format.

The main difference with other great tools like Tile Molester and Crystal Tile 2 is to provide direct support to proprietary graphics formats found in "new generation" consoles, like PS2, PSP, Wii, etc., instead of dealing with just the raw image data.

Features
  • The underlying image library has almost complete support to TIM2 texture files usually found in PS2 and PSP games. The app supports multi-layer, multi-clut, swizzled (PSP)/unswizzled TIM2 images with both linear, interleaved palettes, and segments headers eventually extended with custom user data (usually used by programmers).
  • Can open textures in any format supported by the underlying image library.
  • Can open whole folders in search of supported texture formats. All known texture files are then displayed in a list.
  • Can export and import textures in suitable image formats for editing (like png).
  • Any additional information specific to the texture is preserved when exporting/importing (like the TIM2 header data), in order to have a one-to-one correspondence with the original texture.
  • Customizable background color for transparent and semi-transparent images with chessboard like pattern.
  • Finally, Rainbow supports parameters via command line: the first parameter is the name of a texture you would like to open.


The GitHub repository in the relevant link contains the complete source code and more informations on how to use Rainbow.

RHDN Project Page

Relevant Link: (http://github.com/marco-calautti/Rainbow)

VicVergil

  • Hero Member
  • *****
  • Posts: 716
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #1 on: July 13, 2014, 08:43:40 pm »
You're my hero :D
... You mentioned "Wii": does that mean you intend to add support to "tpl" graphics and other GC/Wii-specific formats (like you intend to for PSP with GIM support)?
Any way to include tree support and TOS rebuilding support for PS2 (maybe PS1 and PSP if possible) to the limited extent possible, even just as a GUI for other existing tools for practical reasons?

Also, is there any possibility to include (already-made) TIM support within this tool for completeness sake?
Any chance -and that's a *big* stretch- to make the tool as comprehensive as Tinke or CT2 by including compression/decompression support for known formats like slz (tri-ace stuff), cpk, pkg (whatever Square Enix is using for PSP releases) and the like, instead of resorting to command line? A GUI would be really nice.

What do you think about the feasibility of including Saturn graphics support (attempts were going underways back in the late nineties for a graphical editor but fizzled out due to a complete lack of interest)?
Or making something like Tilemolester but with more options, better coding, and much more flexible clipboard handling (like with CT2), included within the tool? (one of the aspects I wish Tinke included. It does have a hex editor that's awesome to use on the fly for any file under the arborescence)

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #2 on: July 13, 2014, 10:03:59 pm »
You mentioned "Wii": does that mean you intend to add support to "tpl" graphics and other GC/Wii-specific formats (like you intend to for PSP with GIM support)?
Yes, the roadmap for future versions of the tool would be to add support for mipmap TIM2 images and GIM files. Then, adding support to tpl images found in GC/Wii games.

Quote
Any way to include tree support and TOS rebuilding support for PS2 (maybe PS1 and PSP if possible) to the limited extent possible, even just as a GUI for other existing tools for practical reasons?
I am not sure I got what you mean. You mean ISO rebuilding?

Quote
Also, is there any possibility to include (already-made) TIM support within this tool for completeness sake?
This is not considered a main feature right now, but it is not excluded. As for now, there are many good tools that can deal with TIM images.

Quote
Any chance -and that's a *big* stretch- to make the tool as comprehensive as Tinke or CT2 by including compression/decompression support for known formats like slz (tri-ace stuff), cpk, pkg (whatever Square Enix is using for PSP releases) and the like, instead of resorting to command line? A GUI would be really nice.
It is very unlikely. The main goal of Rainbow is to manage specific graphics formats. Compression and archive formats go out of this scope.
Even if a GUI would be nicer for many people, I still think that for such kind of files, a command line tool would be more suitable (since they can be used inside scripts to rebuild the whole structure of the game disc).

Quote
What do you think about the feasibility of including Saturn graphics support (attempts were going underways back in the late nineties for a graphical editor but fizzled out due to a complete lack of interest)?
I did not dig too much into such formats. But if I manage to find enough documentation and good debuggers for such a platform, then yes, it is definitely possible that Saturn graphics support wiil be added.
 
Quote
Or making something like Tilemolester but with more options, better coding, and much more flexible clipboard handling (like with CT2), included within the tool? (one of the aspects I wish Tinke included. It does have a hex editor that's awesome to use on the fly for any file under the arborescence)
As I said for the previous quotes, this would go out of the main goal of this tool. So, no there is no plan, right now, to extend the program with such features.

P.S. It seems to be something wrong with the image link on this news. May some staff member fix it?

krat0s

  • Jr. Member
  • **
  • Posts: 48
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #3 on: July 13, 2014, 10:06:14 pm »
Sweeetttttttt!!!!
Great work , matey great work. I am going to give this a try with a PS2 game font, if it works, you are my here. It was time someone wrote a tool for TIM2 images, I know they are many available but sometmes TIM2 are not really that standart, especiallly in PS2 games.
Cheers.

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #4 on: July 13, 2014, 10:08:35 pm »
Let me know if it works. I would like to collect bug reports and suggestions for the next releases of the tool. I managed to correctly modify some TIM2 images for the PSP game Kingdom Hearts : Birth by Sleep.

krat0s

  • Jr. Member
  • **
  • Posts: 48
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #5 on: July 13, 2014, 10:13:24 pm »
Let me know if it works. I would like to collect bug reports and suggestions for the releases of the tool. I managed to correctly modify some TIM2 images for the PSP game Kingdom Hearts : Birth by Sleep.
Thamks for this really mate. How about making this a more wide one, regarding the PS2?  I can find some formats for you, in some popular gma,e and you can make this toll, one in all, to become the icon of image editing. I am no sure of the font format, I might send you ti , just in case ,if you want to take a look. Also ig you need PS2 specific detials and help, GS palettes info and evrything let me know, I have thousand of docs, maybe you can add MC icon feature in it(I know that other software do this, but the programming is not a hassle honestly, the format is tandart , and the datas are at static offset. Thank You again for this, will let you know after a few hours.
Cheers.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Utilities: Rainbow: texture format converter
« Reply #6 on: July 14, 2014, 02:55:42 am »
Thanks, Phoenix!
I'll be on the look out for the GIM support that you have on your todo list. Keep me posted & expect tests from me when that comes in!

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #7 on: July 14, 2014, 10:00:06 am »
I remember trying to look into replacing textures in PS2 games using TextER + OptiPix like half a year ago and found the process a bit uncomfortable. I'll definitely take a look into this when I get the time. Great work :thumbsup:

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #8 on: July 14, 2014, 10:21:51 am »
Yeah, unfortunately, you will still need to use TextER to extract tim2 files from other files. This feature is planned for the next release.
As for OptPix, it just supports the PS2 variant of the TIM2 format. Moreover, it is also a proprietary tool, that's why I wanted to write this tool.

-EDIT- Furthermore, it seems that even OptPix does not properly support the alpha channel in 32-bit TIM2 images.



As you can see, the semi-transparency and even the full transparency is not preserved when TIM2 files are loaded with the official tool. Note the border of the characters' hair. This just for visualization of course.
« Last Edit: July 14, 2014, 11:44:17 am by PhOeNiX »

esperknight

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #9 on: July 14, 2014, 01:47:19 pm »
This is pretty awesome and can't wait to see more formats added such as GIM and others.

One request I have or maybe it's already implemented... is there a way to use it via command line?  Or possibly this be a feature to add in the future?  I prefer to automate insertion a lot of times if I can.

For GIM support, will this support GIMs that have headers already so you can just insert it back into that particular file or will this just convert into the GIM format?  As I've seen it where they add extra information to GIM files that isn't necessary for the format that needs to be removed for use with GimConv and then I'd have to readd it back on later for use ingame when converting it back.

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #10 on: July 14, 2014, 02:00:53 pm »
The command-line support is a planned feature indeed, I think that it will be implemented together with the mimap TIM2 textures. As for the GIM header, I think that it will
be implicitly supported by the extraction/insertion feature. That is, the tool will allow to search for known formats inside other files, extract them and reinsert them.
« Last Edit: July 14, 2014, 02:11:07 pm by PhOeNiX »

esperknight

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #11 on: July 14, 2014, 02:18:07 pm »
And I realized I can't read... saw you posted in the description of the post it does support command line... I read everything else but that apparently :)

Sounds great on the GIMs.  I didn't realize TIM2 does the same thing as well as I haven't ran into them as much.

Thanks!

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #12 on: July 14, 2014, 02:19:23 pm »
It supports opening known formats from the command line. Just that for now. Maybe the description is misleading and I should change it.

MegamanX

  • Full Member
  • ***
  • Posts: 210
    • View Profile
    • X Translations
Re: Utilities: Rainbow: texture format converter
« Reply #13 on: July 14, 2014, 02:35:19 pm »
This sounds amazing.  I really need to get my computer working again to give it a try.

RadioTails

  • Sr. Member
  • ****
  • Posts: 338
  • Holding the Mega Drive controller
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #14 on: July 14, 2014, 06:26:44 pm »
Really cool tool.  Really wish the tool could open .nut files.  Basically textures that were used in Donkey Konga 2, Donkey Konga 3 and Star Fox Assault. From what I understand, the palettes are included in the file.
Avatar by LazyNinjartist

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #15 on: July 15, 2014, 05:41:45 am »
I will have a look at that. Hope that Dolphin has a good debugger.

Dashman

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #16 on: July 15, 2014, 06:22:09 am »
I will have a look at that. Hope that Dolphin has a good debugger.
It has some issues. Memory breakpoints (as in "break when a specific RAM address is read / written on") don't work even in builds made specifically for enabling them (DebugFast). If you plan on using them, your best bet is to download the emulator's code and edit the read / write functions, but it may or may not work, so cross your fingers.

I inquired recently about this in the Dolphin forums, check it out if you need more info on how to do it:

https://forums.dolphin-emu.org/Thread-solved-recompiling-dolphin-to-set-memory-read-breakpoint

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #17 on: July 15, 2014, 07:13:54 am »
Thank you Dashman, your link is very useful! :).

MarkGrass

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #18 on: July 15, 2014, 10:54:20 pm »
Excellent utility! I'm especially looking forward to mipmap support.


...any planned support for DreamCast PV textures?

PhOeNiX

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #19 on: July 16, 2014, 04:12:33 am »
As for now, the priority would be GIM textures, since I am working on some PSP game right know. When GIM support is implemented, yes, I I'll move on other platforms that lack support for their standard texture formats, including Dreamcast.

Strange you are looking forward mipmap images. Some huge game mod in mind? :P