Masked filters

New releases and general discussions.

Post » Tue Nov 03, 2009 7:50 pm

[quote:2mltyyrj]that isn't really a workaround, that only lets you change the colour to as many frames as you can be bothered to add, certainly not 16 million.
If you want to let a player chose their starting skin/shirt/trouser/eye/etc colour (but not colour their entire body the same colour), and let them choose from a smooth gradient.[/quote:2mltyyrj]

True, but keep in mind you can load frames externally.

[quote:2mltyyrj]I can think of a workaround which is just cutting out the bits I want to colour of the animation and always setting this new sprite's position on top of it, then using regular colour filters, but doing it this way is very clumsy.[/quote:2mltyyrj]

That will work for some things, but you might get into trouble with higher frame rates.

[quote:2mltyyrj]In the image editor, it could have an "add new channel" option (or just have this in the launch explorer bit like I've suggested before), which creates a new mask which starts out looking like the transparency mask of the image you're editing (in black and white), you can then remove sections, then map this to a new filter (or even effect), so that the filter/effect only acts on this area (with intensity proportional to the brightness of the mask in that area).[/quote:2mltyyrj]

I thought you wanted to do this at runtime?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Tue Nov 03, 2009 11:07 pm

[quote="newt":31hzc2x9]
That will work for some things, but you might get into trouble with higher frame rates.
[/quote:31hzc2x9]
really? well all the more reason this should be added then heh

[quote="newt":31hzc2x9]
I thought you wanted to do this at runtime?[/quote:31hzc2x9]
I only want to be able to change the colour of the filter at runtime, like with the usual colour filters for the entire sprite. There would obviously end up having to have one of these masks per-frame of the animation.

I mean say you want to set the colour of your character's shirt:
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Wed Nov 04, 2009 4:11 am

Yeah, doubt you could get an fx to do this, especially the second part. What you need is a brand new object that supports pallets. something like .spr or kiss .cel's.
Btw did you know there is corner color filter?

Then again you could maybe do something with distort maps color filter.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Nov 04, 2009 11:24 am

Split your sprites up into components - body, shirt, lolpants and turban. You could choose the tone of skin, different color combinations of clothes etc.

Of course that means you'd have to do exact animations for all parts.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Nov 04, 2009 12:18 pm

[quote="newt":251p1aht]Yeah, doubt you could get an fx to do this, especially the second part. What you need is a brand new object that supports pallets. something like .spr or kiss .cel's.
Btw did you know there is corner color filter?

Then again you could maybe do something with distort maps color filter.[/quote:251p1aht]

Would it just be easier to add the pallet to the sprite object properties and have a set pallet action in the event editor.
But then this might be some issue with with animation.
Or maybe there could be a pallets function in the animation properties
(like pallet 1,pallet 2,pallet 3, etc.)
then in set animation action in event you set the animation and set and pallet number.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Wed Nov 04, 2009 5:15 pm

Dunno, Sprites can display millions of colors, compared to images with pallets that usually only handle a few. Plus there's alpha transparencies.....
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Mon Nov 16, 2009 8:24 pm

So.... hue shader applied to the background, using the foreground as a mask, yes?

Keep in mind this will yield incorrect results when the background has composite transparency. I don't know if there is any way to use two foreground textures in a single effect, so I'd go with foreground/background only. You'd need two sprites: the image and the mask for the effect. It would change only one hue at a time.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests