MegaMan-Stlye Color Swap

Post your own tutorials, guides and demos.

Post » Sat Dec 25, 2010 9:04 pm

http://www.mediafire.com/?f14sc4ugg4lai9s

Play with the 'Weapon' value to load a color.
Using the Color Replace FX and ImageManipulator, I've made a color swap using a palette file. (Image)

The number of lines of events for the palette is the number of colors the sprite has x3. Example: MegaMan has 7 colors (including his outline color). Each color has RGB. You'd have to change each R, G, and B in each color. Thus 7x3=21, or 21 lines of events.

It reads the RGB from the image file loaded from ImageMul. It's R, G, B at the image X,Y coords.

The palette file is a image that is 7 x 3. The Color Value (which color to load) is Y and X is each color on that line. Think of it as a sort of array.

"CLR1" is the black darkest blue of MegaMan's outer armor. "Color" is the name of the ImageManipulator.
So:
GetR(X,Y) =Color.GetR(1,Pla_MMX('Weapon'))
GetR(X,Y) =Color.GetR(1,Pla_MMX('Weapon'))
GetR(X,Y) =Color.GetB(1,Pla_MMX('Weapon'))
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Sat Jan 08, 2011 8:01 pm

So, anyone find it helpful?
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Thu Jan 13, 2011 4:42 pm

Nothing is happening for me. He's just black. But that's okay.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Jan 13, 2011 5:08 pm

You need the Color Replacer.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Thu Jan 13, 2011 5:11 pm

Wasn't that the file in the archive? If it was, then i have it. And if i hand't i wouldn't be able to open the .cap.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Jan 13, 2011 5:17 pm

Quite some time ago, I was working on an effect for color palettes, called C-DEX. It works quite similar to what you present, but without the need for any events. However, there was no feedback or overall interest in it, so I cancelled the development.

This is the working method of the effect:

(could easily be adapted to use other conversion methods, like alpha, one channel, etc.)

And here are two super simple examples, showing what C-DEX is capable of:
[url:333ww7su]http://www.mediafire.com/file/qtaoorzu9psjrba/C-DEX%20Demo.rar[/url:333ww7su]
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Thu Jan 13, 2011 6:16 pm

[quote="tulamide":27xpiyvy]Quite some time ago, I was working on an effect for color palettes, called C-DEX. It works quite similar to what you present, but without the need for any events. However, there was no feedback or overall interest in it, so I cancelled the development.[/quote:27xpiyvy]

Say WHAT? I've been looking forward to it for months ;.;
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Jan 13, 2011 6:29 pm

Work on it!
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Thu Jan 13, 2011 6:49 pm

WOoh, that looks awsome tulamide. Here's some feedback and overall interest to get you working on it: WOoh, that looks awsome tulamide!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Jan 13, 2011 7:13 pm

I would love to, but I'm stucked. What I need most is feedback about what exactly you expect such a palette effect to do.

For example, having it swap certain exactly defined colors (as in Azu's example) is almost impossible because of limitations of HLSL and Construct's implementation of it (the maximum of exact colors that could be defined is three)
That's why the effect currently converts colors to indices with the greyscale model. I could think of a couple of other ways to do the conversion, but I simply don't know what would be the most useful one.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests