YesNoOk
avatar

Maintaining Color for stages, the RGB method (Read 17273 times)

Started by Jango, February 16, 2008, 11:06:34 pm
Share this topic:
Maintaining Color for stages, the RGB method
#1  February 16, 2008, 11:06:34 pm
  • ******
  • Double-Crosser
  • I'm not standing out. This isn't weird at all.
    • USA
As most people will tell you, separating an image into multiple pieces is the best way to conserve the background image. However, doing this can be incredibly time-consuming and difficult to align. Furthermore, this won't prevent against color-loss 100% of the time (Mugen can only handle 16-bit colors, and will downgrade anything above that), and will cause problems if your image has non-whole number deltas. Thus, if you don't mind generating lag in your stages on crappy computers, then you can always resort to this method.

Tools Needed:
- Graphics Gale. Although there are other programs that can separate colors, I find this one the easiest to use, and believe it seemingly gives the best results when converting images to lower color depths.

- A program that can convert the image to .pcx (Graphics Gale doesn't support .pcx format)


How to do it

1) Open up your image in Graphics Gale. Here I'm using a DVD screen capture from the Brak Show. Aside from it being, well Brak, the backgrounds use a lot of color.



2) Under All Frames, go to Color Depth, and change it to 16-bit without dithering as a test. The reason for this is because it will show you what the resulting image will look like in M.U.G.E.N, regardless of whether you decide to go with the image break-up method or this one.




As you can see, it looks fine after that preliminary step, so we'll just stay with that. If it looks shitty, undo, and try again and check "dither." It won't look exactly like the source, but that's the best you can do for Mugen.

3) Under All Frames, go to Adjust Color, and under the panel that says "RGB," set Green and Blue to -256 and leave Red as is.




If you did this right, there should be nothing but shades of red in your image. Go back to Color Depth and convert to 8-bit. As there are only shades of red here, it will have no effect on your image. Save it. Then hit "undo" twice.

4) Repeat the previous step, but this time set Red and Blue to -256 and Green to 0. Save under another name.

5) Repeat the previous step, but this time, set Red and Green to -256 and Blue to 0. Save under another name.

6) I'm assuming you now how to do file conversions and SFF compilation so I'll skip those steps. Now we'll move onto how you handle this in your .def file.  Assuming the alignment in the SFF for all the images is exactly the same, your coding would look something like this:

Code:
[BG Image 1]
type = normal
spriteno = 0,0
layerno = 0
start = 0,0
delta = 1,0
mask = 0

[BG Image 2]
type = normal
spriteno = 0,1
layerno = 0
start = 0,0
delta = 1,0
trans = add
mask = 0

[BG Image 3]
type = normal
spriteno = 0,2
layerno = 0
start = 0,0
delta = 1,0
trans = add
mask = 0

If you didn't catch on, basically I stacked them on top of each other, but gave the two top-most layers the "trans=add" parameter. What this does is use additive blending to blend the colors together and add the values to each other. This way, the image should come out exactly as what you got when you initially converted the image to 16-bit.

On a side note, just so I don't get complaints about it, plug in your own deltas, I just made those up off the top of my head.

7) Fire up Winmugen and try it out!


---------------------------------------------------------------------------
I'd like to give [E] credit as he was the one that really got me interested in this method, and we spent about an hour tweaking this stuff to make sure it worked its best.

BONUS DOWNLOAD:

As a thank you for reading this tutorial, you can download the stage that I was constructing in this tutorial. It's for Winmugen Plus or any of the older Hi-Res Mugen builds. NON-HIRES BUILDS WILL NOT WORK.

Click Here
Re: Maintaining Color for stages, the RGB method
#2  February 17, 2008, 05:53:50 am
  • ******
  • Double-Crosser
  • I'm not standing out. This isn't weird at all.
    • USA
DOUBLE-POSTING BECAUSE THIS IS IMPORTANT.

This method does have a flaw besides performance. If a character uses bgpalfx or allpalfx for an attack you'll get completely white stuff. As an example, this is my Ren Stage with that happening:



As you can see, everything that I applied the method to is white while the elements that don't have this are just inversed. Thus, while this is merely a minor cosmetic problem that doesn't affect gameplay, just be aware that this happens and is entirely Mugen's fault >_> .

Thanks to Sion of Randomselect for pointing this out. I didn't notice it because I don't use a lot of characters with these kinds of effects.
Re: Maintaining Color for stages, the RGB method
#3  February 18, 2008, 05:59:47 pm
  • avatar
  • ***
now i now how to do that :D

good as custom hyper bg  :yugoi:
Re: Maintaining Color for stages, the RGB method
#4  February 18, 2008, 06:32:05 pm
  • ******
  • [E]
    • Mexico
thanks for the credits, and is cool of you to post an easy to follow, run down of the method.
Re: Maintaining Color for stages, the RGB method
#5  February 21, 2008, 10:17:28 pm
  • avatar
  • ******
    • USA
that's why everybody who uses invertfx should set a nofg assertspecial during them :P
Re: Maintaining Color for stages, the RGB method
#6  October 09, 2008, 03:29:29 pm
  • ******
  • JoJo is boring
    • USA
please excuse me for necro bumping but how do u get your colors back after the image is all green?

Re: Maintaining Color for stages, the RGB method
#7  October 09, 2008, 04:07:44 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Ctrl + Z?

That or you don't save over the original one with the green one. So just reopen the orignal image and make it red, reopen then save a blue.
My shitty mugen stuff:
Re: Maintaining Color for stages, the RGB method
#8  October 09, 2008, 04:51:29 pm
  • ******
  • JoJo is boring
    • USA
thats the part i dont get xD will the image be left blue? i pressed ctrl z and is went back 16 bit
Last Edit: October 09, 2008, 04:59:57 pm by ~Dont_Touche_ME~
Re: Maintaining Color for stages, the RGB method
#9  October 15, 2008, 06:49:13 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Ugh.
You make it blue/red/greeen 8 bit, then save it as ANOTHER IMAGE.
Then ctrl+z to make it 16 bit full color bg, next color and save as ANOTHER IMAGE again. And so on.
My shitty mugen stuff:
Re: Maintaining Color for stages, the RGB method
#10  November 28, 2008, 01:20:13 pm
  • ****
  • Sunglasses Security Guy is watching you necrobump.
    • x-ism.co.cc/index.html
Sorry for the necro, but IrfanView can do this entire process, and it does support PCX format.