Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: subspark on Fri 21/04/2006 11:52:36

Title: Suggestion: Color coded anti-aliased masks
Post by: subspark on Fri 21/04/2006 11:52:36
I think room masks 'walk-behinds' could be greatly improved in the following ways:

* Ability to import 24bit Bitmap into mask editor.
* Colors are picked up and automatically assigned baselines and induvidual channels.
* Mask is premultiplied so that the black is transparent with no black halo or artifacts.

For example:
(http://www.neoshockmod.net/images/Sparx_Paul_Wilkinson/FOY/2D/minca_site_mask.jpg)

Note: For some reason masks currently need to have a vertical resolution identical to the game resolution.
For games with the LucasArts GUI or any GUI for that matter the room graphics may not extend to the bottom of the screen.

Such restrictions increase file size and and force unessicary resolutions onto masks beyond that of their graphical counterpart.

I beleive that with this technique we are not just killing two birds with one stone; it's a bird massacare and a life saver for those finnecky artists like myself who take pride in their pixel perfect walk-behinds.

Cheers.
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: strazer on Fri 21/04/2006 13:31:02
Quote from: subspark on Fri 21/04/2006 11:52:36* Ability to import 24bit Bitmap into mask editor

Yeah, even if not all colors are used 24bit format should be supported, if it's not alreasy. If you're talking about aplha-blending, see below.

Quote from: subspark on Fri 21/04/2006 11:52:36* Colors are picked up and automatically assigned baselines and induvidual channels.

I think that would be too much work for too little gain. How often do you have that many walkbehinds anyway? And in most cases the baselines would probably need tweaking anyway, so you can just as well put them there in the first place.

Quote from: subspark on Fri 21/04/2006 11:52:36For some reason masks currently need to have a vertical resolution identical to the game resolution.
For games with the LucasArts GUI or any GUI for that matter the room graphics may not extend to the bottom of the screen.

Why is the filesize of a mask important? It is only used at design-time, it doesn't affect the compiled game at all.

Quote from: subspark on Fri 21/04/2006 11:52:36* Mask is premultiplied so that the black is transparent with no black halo or artifacts.

As to why alpha-blended walkbehinds are a problem, the this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=15758).
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: subspark on Fri 21/04/2006 14:18:45
QuoteWhy is the filesize of a mask important? It is only used at design-time, it doesn't affect the compiled game at all.
It's not. But the error message when you import a mask the same resolution as your background eg. 320x150 is inconvenient and unessicary.

QuoteAs to why alpha-blended walkbehinds are a problem, the this thread.
Read it already. Many have said that you need two images for an alpha blended mask. First the color pass then an alpha.
You really only need one image; like the one I provided above. It essentially IS the alpha only that the colors determine exactly what channel each walkbehind is assigned to.

QuoteAnd in most cases the baselines would probably need tweaking anyway.
Not nessicasrily. The idea is to read the image from the bottom up, catching the first pixel of each color. Yes, the tool does suggest a change in mask format or the feature would be worthless. But thankfully that is up to the artist.

QuoteI think that would be too much work for too little gain. How often do you have that many walkbehinds anyway?
I have many walk behinds as our game is full of interesting places with complex hiearchy and design. The game runs at 32 bit color depth. As intruiging, practical and intuitive this is I fear you may be right. There arne't many games I am aware of that make full use of perspective and complex occluding however I beleive it is better to have the tool and not need it than need the tool and not have it.

As AGS advances so do the games. In fact many games transparently advance AGS. Isn't this the whole idea of being part of the developer community to share ideas particularly those that future proof AGS for more complex games like ours? Please don't get me wrong in a certain light I agree with you Strazer but is it not worth testing and ultimately adding to CJ's to do list?
It's not the tool thats worth worrying about it's the principle and how often it will be applied.

It is my strong opinion that such a tool will prove invaluable beyond a reasonable doubt.
Would anyone agree?

I appreciate your perspective on this folks. It's worth exploring at the very least.
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: strazer on Fri 21/04/2006 15:18:14
Quote from: subspark on Fri 21/04/2006 14:18:45
Quote from: strazer on Fri 21/04/2006 13:31:02Why is the filesize of a mask important? It is only used at design-time, it doesn't affect the compiled game at all.
It's not. But the error message when you import a mask the same resolution as your background eg. 320x150 is inconvenient and unessicary.

True, I'm sure that's doable.

Quote from: subspark on Fri 21/04/2006 14:18:45
Quote from: strazer on Fri 21/04/2006 13:31:02As to why alpha-blended walkbehinds are a problem, the this thread.
Read it already. Many have said that you need two images for an alpha blended mask. First the color pass then an alpha.
You really only need one image; like the one I provided above. It essentially IS the alpha only that the colors determine exactly what channel each walkbehind is assigned to.

I have to admit I don't completely understand the problem, but Steve seemed pretty adamant about it. Maybe someone else can weigh in.

Quote from: subspark on Fri 21/04/2006 14:18:45Isn't this the whole idea of being part of the developer community to share ideas particularly those that future proof AGS for more complex games like ours? Please don't get me wrong in a certain light I agree with you Strazer but is it not worth testing and ultimately adding to CJ's to do list?
It's not the tool thats worth worrying about it's the principle and how often it will be applied.

It's a matter of opinion. I think there a more important things for CJ to work on, but ultimately it's up to him to decide. So let's see what he has to say when he comes back (whenever, from wherever... :P).
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: subspark on Fri 21/04/2006 15:32:49
Agreed.
Although I would have thought the AGS majority's opinion would also be considered seeing we are the ones making the games here.
Not about to call a vote but do any AGS users have an educated opinion? Beware it is for the technical minded.Ã,  ;)

It's up to you in the end CJ!
No problem.
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: scotch on Fri 21/04/2006 15:36:48
There'd have to be some interface for saying where you wanted the mask to go on the screen... I think just making your masks full screen in your paint program is easier (you should probably paint them on a layer above your background anyway...), and there aren't really any drawbacks in size, they are rle compressed, which means that blank areas compress to almost nothing.

As for the problem with walkbehinds, while I'd love intermediate transparency levels for walkbehinds if they'd work, there is a problem that you probably aren't picturing, as pointed out in the thread Strazer linked to. Ã, To get the correct pixel colour for the alpha blended area between the character and the walkbehind you need three layers, the background without the walkbehind, the character, and the alpha channeled walkbehind. Ã, The reason for this I'm not sure I can explain properly, because I'm bad at that, but perhaps I can show you with an image:

What you want is this presumably, character blended onto background, walkbehind blended onto both of them.
(http://www.caverider.com/temp/nohalo.png)

What you'd get with your method of having a layer saying how much to make the character transparent as it walks around is a halo where the character overlaps the attempted semi transparent area, something like
(http://www.caverider.com/temp/halo.png)

This was just a quick example I made in photoshop, it can actually look worse than that.  It certainly isn't an improvement over no alpha channel.  So unfortunately there simply isn't enough information in your setup for AGS to do the alpha blending between walkbehind and character correctly.  The only way to achieve the effect would be to force people to draw their backgrounds in alpha channeled layers.
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: subspark on Fri 21/04/2006 16:21:36
Not at all. You just read the mask as a premultiplied image. The transparent areas are black in my example so, of course, you would set the premultiply color to black.Ã, It's really not that daunting. Better explained in these examples:
http://www.gimp.org/docs/plug-in/appendix-alpha.html
http://www.td-grafik.de/ext/xfrog/alpha/index.html
Trust me I have done a lot of compositing for film and TV I know exactly how this tool will work or I wouldn't have posted it.

Cheers for your example though. Nice palm!

EDIT:
9 Logical steps for AGS import:

1. Check if file is is greater than 4bit. (NO ALPHA!) Just a straight image with at least 256 colors.
2. Read picture from bottom up.
3. Store picture in memory.
4. Remove black from image using techniques described in the latter of the above urls.
5. From stored picture in memory, find the first non black pixel (so ignore 0,0,0) in vertical direction for each shade of color. (Shades of red, shades of Green, Blue, yellow etc.) (Masks regions can not overlap and must be againt a constant color such as black) Note that in my example the base of each color region is a straight jump from 0,0,0 to the most bright of that color.
7. Set baseline on row of first pixels depending on color shade.
8. When all colors have been detected, store color data into memory.
9. Use aquired color data to seperate colored mask regions into different channels and move the baselines to their corrosponding channels.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Privateer Puddin' on Fri 21/04/2006 17:01:44
Eh, i'm pretty sure scotch (and steve in the last post, hopefully he'll see this)

(http://www.custardsclutter.com/rightandwrong.png)

On the left, the black is behind the green and infront of the red. This is how we want it to behave and how it does currently if you have alpha objects on a background.

The problem with having it the other way is that you can't seperate it and the character can't just go behind the green. It'll have both the green and red acting on it as far as i can see.

¬¬
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Sat 22/04/2006 02:02:33
Pre-multiplied alpha wouldn't work here, since you don't have separate textures for the walkbehind object and the background (which is the whole problem in the first place), and since the background color varies from pixel to pixel.

If your background was always red and your foreground was always blue, you could say that in a purple pixel along the edge of the foreground, the red component must come from the background and the blue from the foreground. Then if a yellow object moved behind it, you could mix the blue with the yellow and get green, correctly. However, when both the foreground and the background can be any color, you don't know how they're each contributing to the blended color, and you can't filter out the background component.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Sat 22/04/2006 07:00:11
I'm sorry Snarky but either I'm not with you or you have not fully understood the technique I am describing.

1. Yes you DO have two seperate images. All you need is two. One is the room background image, the second, the mask image.
2. The colors are easily distinguishable from each other because you are choosing from a series of shades. So as long as your colors values are proportionate to each other as they darken in shade then there shouldn't be a problem.

Or were you replying to Privateer Pudding's post, which I also didn't fully understand.

You could essentially do it all with photoshop layers but that wouldnt be as fun to program.
Such steps would include:
1. Read PSD or another format that supports layers.
2. Read picture from bottom up assuming that the first photoshop layer is the background color to become transparent.
3. Store picture in memory.
4. Remove black from image. (AGS treats the layers as premultiplied based on the color constant of the first photoshop layer. In my case, pure black RGB:0,0,0.
5. From stored picture in memory, and reading the file from bottom up, AGS finds the first non black pixel in each layer (so ignore 0,0,0). (Masks regions in this case CAN overlap due to the seperate layers in photoshop) Note that in my example the base of each color region is a straight jump from 0,0,0 to the most bright color. Just gives you better indication in Photoshop of where your basline will end up.
6. AGS sets a baseline on first row of non-black pixels in each layer.
7. AGS loads each detected color region from the photoshop layers and assigns them into a new channel, one layer at a time moving each color region into the next channel.

My method detects all the colors in a single color coded antialiased mask.

Instead of using layers to determine A. the color to premultiply to and B. To distinguish the shades of color from any other, you just need a bitmap. You import the bitmap into AGS.

1. AGS displays a color picker asking you which color is transparent and premultiplied.
2. AGS displays another color picker for you to grab the brightest pixel of each color (basically clicking in the middle of your mask and not the antialiased border)
3. AGS stores the opaque color constant and each shade is then assigned a level of transparency based on the color values chosen.
4. As long as your mask color regions are not overlapping each other in any way and are surrounded by a constant color such as black and are made up of a constant color themselves AGS then assumes that as each detected shade of one of the selected color constants, the shade's color values are proportionate to that of the color constant of that mask region.

For example if I paint a mask with a soft brush in photoshop, using a color such as (RGB:255,216,0) then the value of the darker shades of that color will be proportionate to the brightest value. So AGS knows that the brightest color is (RGB:255,216,0)Ã,  and any darker shades that are detected can be distinguished from lets say a red mask region in the same bitmap because you have specified that the values, in this case (red and green), do not subtract more than one another as they get closer to the premultiply color (in my case black).

So an example of a correct darker shade that would be distinguished from a darker shade of another color would be (RGB:239,202,0) and again darker (more transparent) (RGB:216,183,0). See the pattern? As long as AGS remembers the three color values of the brightest pixel of a given color region, the proportion of those three RGB values in conjunction with another should allow sufficient distinguishability.

In my case I use the fully saturated colors for my mask regions. So one of the color values is always 0. This isn't crucial and plays no part in destroying the relationship of the RGB value's proportions.

This is the brainchild I have been cooking up for a whole day now! Phew!

Now if there was only a n easy way to figure out how to achieve all this with overlapping color regions. Perhaps AGS could compensate between all the color constants.

Tell me some of you are following me here.

Maybe CJ could throw us a bone here. He is the most proven technical mind of all of us and knows AGS better than any.
You just have to get your heads around the logic involved.

As much fun this would be for any whole-hearted programmer I would personally opt for the photoshop layers approach. It's make things easier for AGS as the tool would seem to write itself in a manner of speech.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Mon 24/04/2006 18:54:14
It sounds like you still don't get the issue. The problem isn't providing gradations in the walkbehind mask to provide partial transparency. That bit is easy. The problem is filtering out the background component of those partly transparent pixels.

Pre-multiplied alpha is only able to solve this problem if the background is a known, flat color.

When you're drawing the screen, you're essentially doing it in layers. What you want is:

- foreground (walkbehind part of background image)
-object/character
- background

However, in reality there's no foreground. You're just not drawing the objects in that part of the screen:

-object/character
-foreground+background

So for the partly transparent bits of a soft foreground, say a 50% transparent pixel, you expect:

- foreground: 50%
- object/character: 50%
- background: 0%

But what you actually get is:

- object/character: 50%
- foreground+ background: 50%

And since the foreground and background have already been mixed at 50%, this is the same as:

- foreground: 25%
- object/character: 50%
- background: 25%

The result is halos, bits of the background "shining through" your character, and other nasty artifacts.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gilbert on Tue 25/04/2006 01:58:02
I didn't have time to read all this, but I just couldn't understand, is there a problem with using sprites (objects, characters, etc.) with AA (alpha-blended) edges for this? This is more straight forward and we don't need to deal with the troubles in making AA masks working.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gregjazz on Tue 25/04/2006 09:18:49
Now wait a second... if the problem that is being described is true, we should already be having those problems when two characters using alpha-blended sprites are overlapping. For example, when an alpha-blended character walks partially in front of another alpha-blended character. Then you have essentially the same setup of layers as you would with an alpha-blended foreground...

But the issue is that walkbehinds are NOT drawn like sprites. They are simply pixels of the screen that have orders not to draw sprite pixels, leave the background untouched. Apparently this is the reason why you have that background bleed-through problem, correct?
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gilbert on Tue 25/04/2006 09:27:51
One problem I see is that a background mask is a single bitmap, in which it's very complicated to deal with overlaping edges.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Wed 26/04/2006 07:03:52
Quote from: Geoffkhan on Tue 25/04/2006 09:18:49
Now wait a second... if the problem that is being described is true, we should already be having those problems when two characters using alpha-blended sprites are overlapping. For example, when an alpha-blended character walks partially in front of another alpha-blended character. Then you have essentially the same setup of layers as you would with an alpha-blended foreground...

But the issue is that walkbehinds are NOT drawn like sprites. They are simply pixels of the screen that have orders not to draw sprite pixels, leave the background untouched. Apparently this is the reason why you have that background bleed-through problem, correct?

Right. I'm not sure whether you're responding to me, but we're saying the same thing. The problem is that we're trying to represent three layers, but in reality the "foreground" layer and the "background" layer are part of the same image. That means that when bits of the foreground are partially transparent, the only thing you have is the mix of the foreground with the background, not each separately. So when you're trying to draw the foreground on top of the object (transparently), you're actually drawing both the foreground and the background.

Maybe this clarifies the problem:

(http://home.comcast.net/~snarkibartfast/images/walkbehind1.png)
Background

(http://home.comcast.net/~snarkibartfast/images/walkbehind2.png)
Walkbehind mask

(http://home.comcast.net/~snarkibartfast/images/walkbehind3.png)
This is what we want...

(http://home.comcast.net/~snarkibartfast/images/walkbehind4.png)
...but this is what we get
(Notice that the policeman on the left is transparent, and that the cactus on the right has a halo)
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gregjazz on Wed 26/04/2006 08:34:45
Very well explained, Snarky!

So it's almost looking like a better route would be to use objects rather than walkbehinds... but they're slower.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gilbert on Wed 26/04/2006 09:14:04
Well anyway, making the mask idea possible or making such a mask would be like nightmare, since there're multiple walkable areas, so far trying to develop it to work for a single area is hard already, making it possible for more areas would only make it worse.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Thu 27/04/2006 17:59:24
QuoteVery well explained, Snarky!
I would have to disagree. With all due respect, Snarky, your example is not taking premultiplying into account. I took your red mask sprite into Adobe AfterEffects and used it as a color mask (basically a red alpha). I put one of my characters between a background made from your mask. I then told AE to premultiply the mask to black and voila! The result was as expected.

Despite what I am saying your simply repeatedly producing the same missinterpritation of this technique. I have practically solved this to good end.

1. There is no reason why the halo from the background should be there. I have explained, in detail, that with the use of the color coded mask, and selectivly premiltiplying the mask over a black background, or any chosen color for that matter, effectivly removes any halo and ALL black. Like the way a blue screen keyer works.

2.
QuotePre-multiplied alpha is only able to solve this problem if the background is a known, flat color.
The background IS a known flat color. That is the whole idea Snarky.

3. I suggest you play around with Adobe AfterEffects and try some premultiplying with my mask image against a photograph and a sprite in between. It works for me in AE and should work practically and to good effect in the form of an AGS plugin or module.

Cheers.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gregjazz on Fri 28/04/2006 05:27:43
If there was a way you could select the main color what the walk-behinds are, whenever there's a character or object partially under it, it could use that color to do the alpha blending rather than the background. That's better than nothing.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Sat 29/04/2006 07:07:21
Quote from: subspark on Thu 27/04/2006 17:59:24
QuoteVery well explained, Snarky!
I would have to disagree. With all due respect, Snarky, your example is not taking premultiplying into account. I took your red mask sprite into Adobe AfterEffects and used it as a color mask (basically a red alpha). I put one of my characters between a background made from your mask. I then told AE to premultiply the mask to black and voila! The result was as expected.

A background made from the mask? That doesn't make sense. The mask corresponds to one particular background: namely the first image in my post. Also, "put one of my characters between a background"? There is no between. The background is a single layer, and the characters go on top of it.

QuoteDespite what I am saying your simply repeatedly producing the same missinterpritation of this technique. I have practically solved this to good end.

Look, I read the pages you linked to, and I understood them. Pre-multiplied alpha is not magic. It allows objects with soft edges against a solid-colored background to be lifted off that background while keeping the soft edges. It does not allow you to recreate information that simply does not exist in the image.

A single image and a mask does not provide enough information to extract two separate layers. If a pixel in my image is green, and the mask shows that it's a 50% mix of the upper layer and the lower layer, how do I know whether the upper layer is supposed to be yellow and the lower blue, or vice versa, or whether they were both green in the first place? Pre-multiplied alpha doesn't begin to solve this problem. It assumes that the bottom layer is one uniform, known color. That crucial assumption makes the problem solvable, even trivial.

Quote1. There is no reason why the halo from the background should be there. I have explained, in detail, that with the use of the color coded mask, and selectivly premiltiplying the mask over a black background, or any chosen color for that matter, effectivly removes any halo and ALL black. Like the way a blue screen keyer works.

It is not a question of removing the black. The black is only in the mask, anyway, it's not part of the image.

A blue screen keyer works because the thing you're keying out is a relatively solid blue color. There's no way to do that for an arbitrary background.

QuoteThe background IS a known flat color. That is the whole idea Snarky.

No it bloody well is not! In the pictures I posted, for instance, the background is a wooden floor and violet walls with a green stripe. How does that equal a known flat color?

You need to get your head around what is actually going on here. Maybe this explanation will finally make it sink in:

AGS draws the background image. Then it draws the characters on top of that, but only the parts that are in the black part of the mask, unless the feet of the character are below the baseline of that particular walkbehind. This gives the illusion of the character being "behind" those particular parts of the background (hence: walkbehind). Essentially, the walkbehind mask is merely the inverse of the alpha channel for the characters layer, if we ignore the color coding and baselines.

If AGS allowed soft edges in the mask, it would simply mean that characters would be drawn semi-transparently at those pixels. You can say "premultiplied" as much as you like; it doesn't matter, since we're not actually drawing any part of the background on top of the character: we're drawing the character on top of the (unchanged!) background.

Now, if we were worried about halos around anti-aliased characters, that would be a different thing. Since character sprites come against a known background, you could use pre-multiplied alpha to make nice soft edges. Easy.

Not surprisingly, AGS already supports alpha-blended characters gracefully.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Wretched on Sat 29/04/2006 14:38:45
Firstly your idea although handy won't work for the following reasons.
i) You would have to use a mask with an alpha channel, you cannot use shades of colours fading to black to represent individual masks because of the accuracy of say 8 bits per RGB channel, example (255,128,0) would at some point reach (16,0,0) as it fades to black and would therefore be indestinguishable from a (255,0,0) area. So you would need a seperate alpha channel, or be limited to only having 7 mask colours.
ii) AGS automaticaly assigns walkbehinds to different shades. Ok, that's possible, now suppose you add another walkbehind somewhere in your mask. AGS will now probably automatically assign different values to all the walkbehinds. Great! not. Ok you would need to add a automatic import flag into AGS.
iii) AGS automatically calculates baselines. Fine for the first time you import your background, but you would need to be able to stop it from doing it everytime as you would lose any edits you had made to baselines that were auto generated not where you wanted them. Ok you would need to add a automatic import flag into AGS.
iv) Using the alpha channel in your mask will cause background artifacts to be seen through the characters, as has been amply explained by Snarky, though I don't quite agree with his reasoning, but that might be just me not reading it right, his result is correct.
v) All this can be eliminated by simply using an object with it's own alpha and baseline instead of the walkbehind. If you want to remove the overheads of lots of layers of objects, just cut out the 100% transparent and 0% transparent from the object graphic and use normal walkbehinds to do the job in these areas. I've already used this technique in Bog's Adventures in Underworld with no problems.
vi) 99% of AGS users probably don't even know what an alpha channel is. I think AGS should develop in a way to encourage beginners more and not get itself bogged down in advanced techniques, that can be solved by a little work anyway. But that's maybe a bit off topic.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Scorpiorus on Sat 29/04/2006 22:10:59
So, basically the idea is to have an additional alpha channel information taken from the walkbehind mask which is to be used along with the one in the sprite itself when drawing that sprite onto the background?

alpha = sprite.alpha * mask.alpha; // where alpha range: [0..1]

screen = (1.0 - alpha)*sprite + alpha*background;
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Sun 30/04/2006 05:28:17
Right, except I think you got the coefficients switched in the last formula. It should be:

screen = alpha*sprite + (1.0 - alpha)*background;

I found some of the claims made for premultiplied alpha a bit fishy, so I did some additional reading. To clarify:

1) Premultiplied alpha is an implementation detail in how computers represent transparent images internally, used to optimize layer compositioning. It doesn't change the result of the composition, it just means you can leave out one step (a multiplication, not surprisingly) in the process.
2) The methods described under the label "premultiplied alpha" are simply those of Porter and Duff's seminal SIGGRAPH paper. All modern alpha compositing is based on the principles described in that paper. In other words, they are exactly the regular ways that layers and alpha-transparency work, which anyone who's used Photoshop is already familiar with.

"Premultiplied alpha", then, is just a buzzword, and there's no magic technique that will get around the problems of alpha-blended walkbehinds. It would be nice if at some point AGS could support multi-layered backgrounds, or provide more efficient display of object layers. All kinds of cool transparency and parallax effects could then be achieved. In the mean time, I really like Wretched's solution of using objects just for the edges of walkbehind areas. Nice hack!
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Scorpiorus on Sun 30/04/2006 10:45:30
Quote from: Snarky on Sun 30/04/2006 05:28:17Right, except I think you got the coefficients switched in the last formula.

Yeah indeed, that's it. Also in the first formula I type mask.alpha while meaning the sprite part of alpha taken from mask, ie. it's meant to be already inverted. So, to avoid confusion let's make some redifinition: now mask.alpha actually is an alpha channel of the mask itself (not inverted), then:

alpha = sprite.alpha * (1.0 - mask.alpha);
screen = alpha*sprite + (1.0 - alpha)*background;


Anyway, my original input just was to sum up what we are after and make the suggestion clear.

How much it is needed/useful at the moment (vs. worth the hassle to implement) is another question of course :)
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Sun 30/04/2006 17:33:44
QuoteAGS draws the background image. Then it draws the characters on top of that
It doesnt matter in what order AGS processes are run, the way the technique works gives ags all ther nessicarey information prior to ags performing its tasks.

QuoteNo it bloody well is not! In the pictures I posted, for instance, the background is a wooden floor and violet walls with a green stripe.
Well I'm sorry Snarky, but thats not the idea at all. Keying out the constant black color in the mask is the methodology behind this tool. If you have been following at all, you will note that the only instance where the background image (trees houses whatever) comes into play is what areas of that background the mask makes opaque/transparent. All proccesses are done using the color coded mask.

QuoteLook, I read the pages you linked to, and I understood them.

With all due respect my friend, I doubt that very much.

I really apprecite your interest in my topic and the tool i have proposed, however it would be wise to fully understand the clockwork behind the technique described before assuming that its flawed with no reasonable evidence to suggest as such. With every effort to discredit this approach of convenient one-step-is-all masking it is ever more clear to me that your on a completely different page and what I have proposed is every bit as valid as the positive results i got in After Effects.

QuoteA background made from the mask? That doesn't make sense. The mask corresponds to one particular background: namely the first image in my post. Also, "put one of my characters between a background"? There is no between

What I am describing is in After Effects. Yes I took took your mask and used Photoshop's powerfull tools to come up with a simple background that matched your mask. So with the first layer in AE being the background derived from and based on your mask, I then put the character on layer 2. Next i duplicated the background and used your mask to chop out the black areas with premultiplication. The result was essentially the same as having alpha blended foreground sprites but used every process described succesfully to get there.

Yes I will admit, it is a difficult technique to grasp at first glance. I understand it may be quite easy to overlook some of the finer details so my apologies if my explination of it is not straight forward enough.

Lastly, Snarky I found your last reply to be rather resentfull and rude. I posted this idea in the hopes that it would be explored with keen eyes and a welcoming attitude for new ideas. Whether you take new ideas on with a smile or the fat end of a baseball bat, I have no interest in flaming or ego-quake if you will.

I have provided you just like everybody else with the information one needs to make a mental picture of how this tool will function.

Everybody else is either interested in learning more about what I have described or joining the hate club. I have a long history with AGS and I'm not about posting suggestions without any groundwork to support my claims neither do I have time for childrens games.

Good day.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: scotch on Sun 30/04/2006 17:51:44
I don't see anyone flaming, it's just all the things you've explained don't actually make sense the way you've explained them.Ã,  I certainly can't replicate them in Photoshop or logically, it just doesn't work.Ã,  Perhaps you could show some images from your programs showing what you're doing?Ã,  It isn't like you're talking to people who don't have any experience with graphics programming or computer art in general. I'd love to know how to use this technique, but as far as I can see it just isn't happening without some potentially complicated algorithms for guessing information in the background image, to get rid of the haloing.

If you're not sure how to explain the process technically, just take some screenshots as I suggested, perhaps we can work out what aftereffects is doing.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Pet Terry on Sun 30/04/2006 18:10:41
Yeah, I too would be interested in seeing what you have achieved with the technique you keep mentioning over and over again. It would be a neat feature to have, but I just can't seem to understand how it could possibly work.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Sun 30/04/2006 23:00:46
Quote from: subspark on Sun 30/04/2006 17:33:44
QuoteAGS draws the background image. Then it draws the characters on top of that
It doesnt matter in what order AGS processes are run, the way the technique works gives ags all ther nessicarey information prior to ags performing its tasks.

I thought that maybe when stated this clearly, it would become obvious why the technique you describe won't work. Let's try one more time: The only thing walkbehinds do is define areas of the screen where character sprites are invisible (not drawn). If you added shades to the walkbehind mask, they would define areas of the screen where character sprites are drawn with transparency.

Since you're not modifying the background image, you can't fix the fact that when walkbehind regions in the background image are partially transparent, you can see the "background" through them. When you're then drawing the character sprite transparently on top of that, you can still see "background", which is what causes the artifacts.

Look, I know you think this technique solves the problem, but I'm telling you: You still haven't understood what the problem is.

Quote
QuoteNo it bloody well is not! In the pictures I posted, for instance, the background is a wooden floor and violet walls with a green stripe.
Well I'm sorry Snarky, but thats not the idea at all. Keying out the constant black color in the mask is the methodology behind this tool. If you have been following at all, you will note that the only instance where the background image (trees houses whatever) comes into play is what areas of that background the mask makes opaque/transparent. All proccesses are done using the color coded mask.

See, this is where we have the fundamental miscommunication. You're focusing on the mask, but that's not where the problem is. What the mask does is simple: it just acts as an (additional) alpha channel for the character and object layers. The thing you need to focus on here is how the actual background image and character sprite get composited in those areas where the mask indicates partial transparency.

Quote
QuoteA background made from the mask? That doesn't make sense. The mask corresponds to one particular background: namely the first image in my post. Also, "put one of my characters between a background"? There is no between

What I am describing is in After Effects. Yes I took took your mask and used Photoshop's powerfull tools to come up with a simple background that matched your mask. So with the first layer in AE being the background derived from and based on your mask, I then put the character on layer 2. Next i duplicated the background and used your mask to chop out the black areas with premultiplication. The result was essentially the same as having alpha blended foreground sprites but used every process described succesfully to get there.

That sounds correct (it's what I did to create the example showing the artifacts), so I can only think that you either did something wrong (that is, something that can't be done with just a background image and a walkbehind mask), or you happened to create a background where the artifacts are not noticeable. Halos are most noticeable if the walkbehind object and the "background" color have high contrast, and the character color is similar to the walkbehind. Transparent sprites are most noticeable if the "background" texture has a distinct, high-contrast pattern.

Why not use the background I provided? After all, that's the background the mask was made for/from. It would be much more compelling evidence for your claim.

Actually, the example I provided isn't ideal, since the walkbehind layer is all black. This would make it possible to reconstruct the two layers from the flattened background + mask. I'll provide another one instead.

QuoteLastly, Snarky I found your last reply to be rather resentfull and rude. I posted this idea in the hopes that it would be explored with keen eyes and a welcoming attitude for new ideas. Whether you take new ideas on with a smile or the fat end of a baseball bat, I have no interest in flaming or ego-quake if you will.

I freely admit that I'm getting increasingly frustrated with your insistence on the viability of this technique, in the face of detailed explanations of how and why it breaks down. The reason I persevere is that I'm convinced that once you get that Eureka! moment, you'll turn into a perfectly reasonable human being.

OK. Another example.

First of all, do you agree that if what you propose works, we should be able to do partially transparent walkbehinds? I mean, that's the fundamental claim you're making, right?

OK, let's see if that works:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2a.png)
The background image. (I clearly missed my calling as an artist.) Notice that the steam from the pot is partially transparent.

(http://home.comcast.net/~snarkibartfast/images/walkbehind2b.png)
The walkbehind mask. I didn't bother to color it, but you can pretend that it is red or some color instead of white. Notice that the steam is grey, to show that it's partially transparent.

These two bitmaps are the only things AGS knows about!

So what does this represent? Well:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2c.png)
The "background" part of the background image. Call it the "walkinfrontof" if you like.

(http://home.comcast.net/~snarkibartfast/images/walkbehind2d.png)
The "foreground" part of the background image. In other words, the walkbehind region. (Pink is transparent, and the steam is still partially transparent.)

And they've been composited thus:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2j.png)
Composition of our background image. Keep in mind that our background image is a flat bitmap. This just shows how we created it.

OK.... Now let's add a character, or rather an object into the mix:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2e.png)
It's a ball, I think. (Pink, again, is transparent.)

OK, we have our materials. Now what do we do with them?

This would be great if it worked
What we would really like to do is to put the object on top of the "walkinfrontof", then take the walkbehind and mask it with the walkbehind mask and put that on top of the object:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2d.png) masked by (http://home.comcast.net/~snarkibartfast/images/walkbehind2b.png)

(http://home.comcast.net/~snarkibartfast/images/walkbehind2h.png)
Composite it like so...

(http://home.comcast.net/~snarkibartfast/images/walkbehind2f.png)
And get this. Ta-da!

However, we can't do that!

What actually happens
What actually happens is that we take the object and mask it with the inverse of the walkbehind mask, then slap that on top of the background:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2e.png) (positioned in the correct position on the screen, of course) masked by the inverse of (http://home.comcast.net/~snarkibartfast/images/walkbehind2b.png)

(http://home.comcast.net/~snarkibartfast/images/walkbehind2i.png)
Composite it like so...

(http://home.comcast.net/~snarkibartfast/images/walkbehind2g.png)
And get this. Ugh! Notice that you can see the wallpaper through the ball where it's behind the steam. There's also a faint green halo between the pot and the ball.

What you call "premultiplying" is just the step I've called "masking". If you paid close attention, you will have noticed that we're masking the object, not the walkbehind layer (which doesn't actually exist as far as AGS is concerned) or the background image. Because of this (and I feel like I've repeated this a hundred times now), there's no way to not see the wallpaper if you're seeing the steam. The two are part of the same image, and you cannot separate them.

Edit:
What you're describing you did with AfterEffects should be (but apparently wasn't) something very much like this:

Mask (premultiply) the background with the walkbehind mask:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2a.png) masked by (http://home.comcast.net/~snarkibartfast/images/walkbehind2b.png)

Which gives the walkbehind layer:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2l.png)
Notice that we can still see the green wallpaper and red pattern through the steam. (In this picture, black is transparent. It is, in fact, the premultiplied layer exactly as it is represented internally.)

Draw the background, then the object, then the walkbehind layer:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2k.png)

Which, again, looks like this:
(http://home.comcast.net/~snarkibartfast/images/walkbehind2g.png)
...which is still wrong.

I'd really like to see how you would get this to work properly using the "premultiplying" method you keep talking about, using only the background image and the walkbehind mask. Posting a link to a PSD file would work swell.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Mon 01/05/2006 03:35:13
Quoteonce you get that Eureka! moment, you'll turn into a perfectly reasonable human being
Forgive m,e if I am wrong but was that an insult?

Okay. I know where your at. I know where your at at it's what your trying to explain that is detering you from other possibilities.

The difference is with the way you describe my technique in AGS is, the item the mask affects. In After Effects you create a mask and use it to make a selected object transparent.
The result is like drawing the character around the object in the background essentially making it appear occluded by a particular object. Theres no particuarly beneficial reason why AGS should use the mask to affect the background and bring it forward in front of the character like you described in your 15th image. This is unessicary complication and limited in a number of crucial ways.

Chris could better offer his advice seeing he wrote the program; There may be more than one approach of making objects transparent in the engine.
If theres one thing I may have overlooked which seems to be the basis of your argument Snarky it is that AGS draws transparently 'backwards'. Instead of using a mask to cut the character or object like a cookie cutter with AA, it brings the background forward removing the ability to treat the background and objects as seperate layers. Am I correct in my understanding that all objects and characters are drawn on the screen and collapsed at runtime? If so I must admit that the way alpha's and masks work in AGS is contrary to any other instance of masking I have come across in my history of Computer Graphics. After Effects asside, if I did what I described in say combustion, or Nuke, the result would be the same. Is there any reason why AGS draws its transparency from the background?

Perhaps Chris could bring meaning and reason to this post. It seems to have walked astray and into some frustrated entanglement of conflicting ideas. We really don't know at this point whether AGS is capable of drawing transparency the way I have assumed.

Yes Snarky you are right to question my approach based on this factor but I do not beleive your frustration is justified. Patience and tollerance is something I hope every grown adult is adhere to on these forums.

My sincere apologies for sounding like I was ignoring your feedback however you must understand that in the history of computer graphics, AGS is the first tool I have come across that draws its transparency like it does. I don't know why it does it like that, I dont think any of us besides CJ really knows why. We don't even know if it can draw transparency using the golden standard method every imaging software has since adopted.

So if what you say is correct, Snarky, you'll excuse my ignorance. Such a hitch in my design was unexpected and understandable overlooked.
But we will see if this 'hitch' is really the gobstopper we all think it is. AGS has a track record of offering multiple techniques as a means of getting around some older and obsolete limitations inherent with its design.

A re-write is long overdue. All in good time I guess.

Cheers.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gilbert on Mon 01/05/2006 06:07:41
Just use sprites, I don't see much advantages in using such masks.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Mon 01/05/2006 06:15:46
Quote from: subspark on Mon 01/05/2006 03:35:13
Quoteonce you get that Eureka! moment, you'll turn into a perfectly reasonable human being
Forgive m,e if I am wrong but was that an insult?

On the contrary.

QuoteOkay. I know where your at. I know where your at at it's what your trying to explain that is detering you from other possibilities.

The whole "walkbehind" technique, where you take a flat bitmap and assign different regions to different virtual layers, has inherent limitations. The solution is to use actual layers (which AGS provides, although inefficiently, in the form of objects). That's not exactly news.

QuoteThe difference is with the way you describe my technique in AGS is, the item the mask affects. In After Effects you create a mask and use it to make a selected object transparent.
The result is like drawing the character around the object in the background essentially making it appear occluded by a particular object. Theres no particuarly beneficial reason why AGS should use the mask to affect the background and bring it forward in front of the character like you described in your 15th image. This is unessicary complication and limited in a number of crucial ways.

I must be counting differently from you. I assume you're talking about this:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2k.png)

That is NOT how AGS does it. The picture illustrates what you described: "So with the first layer in AE being the background derived from and based on your mask, I then put the character on layer 2. Next i duplicated the background and used your mask to chop out the black areas with premultiplication." It shows why this would cause artifacts even in AfterEffects.

AGS doesn't do alpha-blended walkbehinds, so none of the pictures illustrate exactly what AGS does. However, this picture shows how it would work if you simply added alpha-blending to the walkbehind masks, as you proposed:

(http://home.comcast.net/~snarkibartfast/images/walkbehind2i.png)

QuoteChris could better offer his advice seeing he wrote the program; There may be more than one approach of making objects transparent in the engine.
If theres one thing I may have overlooked which seems to be the basis of your argument Snarky it is that AGS draws transparently 'backwards'. Instead of using a mask to cut the character or object like a cookie cutter with AA, it brings the background forward removing the ability to treat the background and objects as seperate layers.

No. No. No. Just look at the images, will you, and read what I wrote! "If you paid close attention, you will have noticed that we're masking the object, not the walkbehind layer (which doesn't actually exist as far as AGS is concerned) or the background image."

QuoteAm I correct in my understanding that all objects and characters are drawn on the screen and collapsed at runtime? If so I must admit that the way alpha's and masks work in AGS is contrary to any other instance of masking I have come across in my history of Computer Graphics. After Effects asside, if I did what I described in say combustion, or Nuke, the result would be the same. Is there any reason why AGS draws its transparency from the background?

Alpha transparency and masks work the same way in AGS as they do in familiar image editing apps. Based only on the background image and the mask, there's no way to get the ball behind the steam but in front of the wallpaper WHATEVER application you use. The whole notion of walkbehinds rarely comes up in image editing, because it's not needed. It's a trick from the days of 2D computer graphics for creating an illusion of depth when you only have a flat bitmap to move sprites across. It really is very useful, and very simple, which is why it's still being used.

Look, I've posted exhaustive descriptions and some twenty images to explain this now, and you still seem to be confused. I don't know what more I can do. I give up
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Tue 02/05/2006 21:39:37
(http://home.comcast.net/~snarkibartfast/images/walkbehind2l.png)
Thats your 15th image based on the post before your last.

QuoteForgive m,e if I am wrong but was that an insult?

On the contrary.
On the contrary WHAT. I'd say your avatar message says it all.

As much as you have offered to explain the problem here I don't beleive there is any problem with my technique. I had a programmer look over it and he thinks it's quite mountable. When the tool is finished, I'll get him to explain how it is done.
My dear Snarky, if you feel that you have exhausted yourself and are giving up trying to explain flaws in my design that arent really there then thats fine with me. Saves me the headache of going back over my design and explaining it lamens terms. However I don't beleive there is a simple way to explain this. So I will use what knowledge I have gathered during many years of compositing and put it to good use in the realisation of a plugin. With a programmer this shouldn't be a problem.

Now could somebody lock this goddamn thread. It's original intention has been extinguished apparently and serves no more puspose than to boil everyones blood. I regret I posted it in the first place.
Beers.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Kweepa on Wed 03/05/2006 01:13:52
Yes, it's probably best if you write a plugin to prove to yourself that the technique you originally described is insufficient.

Of course it's perfectly possible to get the effect you desire, assuming you're drawing the backgrounds. That doesn't require a plugin, just a bit more data - using objects for the foreground.

Steve
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Wed 03/05/2006 03:31:38
Sure, I agree mate. But theres more than one way to do anything in practice. This should prove an interesting challenge for us. I'll get Andre to post a walkthru on how we acheived it in the forseeable future.

Thanks for your support.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Wed 03/05/2006 16:20:43
Quote from: subspark on Tue 02/05/2006 21:39:37
(http://home.comcast.net/~snarkibartfast/images/walkbehind2l.png)
Thats your 15th image based on the post before your last.

No, that's actually the 17th one. You missed the small one, the image with the ball (twice). Anyway, it shows the same thing that I guessed: creating a foreground layer by "premultiplying" the background with the walkbehind mask.

Quote
QuoteForgive m,e if I am wrong but was that an insult?

On the contrary.
On the contrary WHAT. I'd say your avatar message says it all.

I'd say that giving you the benefit of assuming you would be a reasonable person if you just got this misapprehension out of your head is a compliment, not an insult.

QuoteAs much as you have offered to explain the problem here I don't beleive there is any problem with my technique.

That's OK. I've given up trying to convince you, since you don't seem to comprehend even the most basic parts of my posts. In response to:

"What you're describing you did with AfterEffects should be (but apparently wasn't) something very much like this"

You wrote:

"If theres one thing I may have overlooked which seems to be the basis of your argument Snarky it is that AGS draws transparently 'backwards'. Instead of using a mask to cut the character or object like a cookie cutter with AA, it brings the background forward removing the ability to treat the background and objects as seperate layers."

That indicates a level of misunderstanding that I just can't help you with. No one else seems to have much trouble understanding what the problem is.

QuoteI had a programmer look over it and he thinks it's quite mountable. When the tool is finished, I'll get him to explain how it is done.
My dear Snarky, if you feel that you have exhausted yourself and are giving up trying to explain flaws in my design that arent really there then thats fine with me. Saves me the headache of going back over my design and explaining it lamens terms. However I don't beleive there is a simple way to explain this. So I will use what knowledge I have gathered during many years of compositing and put it to good use in the realisation of a plugin. With a programmer this shouldn't be a problem.

Knock yourself out. Of course, it would probably be a better idea to mock up the method in Photoshop first: Using only a background image layer, a walkbehind mask layer (with soft edges) and an object layer, create a layer with the effect of an object partially hidden behind a soft walkbehind. Then post it here. Your claim would then either be proven or disproven. It would save your coder friend some work.
Title: Re: [SUGGESTION] Color coded antialiased masks
Post by: Ali on Sat 06/05/2006 13:49:15
I understand why alpha blended backgrounds wouldn't work properly, especially for glass, steam or water. I still thing the wouldn't-really-work method could be good for anti-aliasing though.

When I use an anti-aliased backdrop I always try to draw the walkbehinds slightly smaller than the foreground parts of the image. That way the AA part of the backdrop won't appear in front of a character.

If a dodgy method of alpha blending was employed wouldn't it be possible to do the same thing to achieve preferable results:

(my drawings are normally better than this)
(http://www.2dadventure.com/ags/testblend.gif)

The first image shows what my scenes look like now. The second shows what they could look like with this not-properly-but-sort-of method. They aren't 'correct' because the character overlaps slightly, but that would be less noticeable at higher resolutions. I think the overlapping on the right image is less bothersome than the aliasing on the left image.

Do let me know If I've misunderstood the problem. I don't think I have, I just reckon we could work around it if alpha blended walkbehinds were implemented.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Kweepa on Sat 06/05/2006 16:20:24
Ali, you have understood correctly.

However, it's debatable that your technique looks better - in my opinion, the left image looks better, because the yellow block isn't cutting into the red one so much.

I don't see the point in implementing something that only "sorta" works, given how small of a niche it would supply, how much it would have to be explained, etc. If you really want alpha blended walkbehinds, why not just use objects? If you're worried about efficiency, use Wretched's technique described earlier.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Ali on Sat 06/05/2006 16:35:08
That makes sense, I'd missed Wretched's post. His technique does sound quite nifty.

Sorry for extending this thread unnecessarily!
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Gregjazz on Sat 06/05/2006 21:22:10
What if you had it so that there would be three things required for alpha-blended walkbehinds:

- Background (normal)
- Background (without anti-aliasing)
- Alpha channel

So you would have a copy of the background without the anti-aliasing (which the alpha channel would refer to)

I believe this would be one solution, if someone REALLY needs alpha-blended walkbehinds, though it is more work.

But yes, I would rather not have support for alpha-blended walkbehinds if they only half work.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Pumaman on Mon 08/05/2006 20:44:24
Taking this thread back to basics for a moment, I do agree that allowing 24-bit BMP import for walk-behind masks, with AGS then automatmically assigned a walk-behind colour to each unique colour in the bitmap, is a good idea and should be supported.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Kweepa on Mon 08/05/2006 22:38:39
Yes, that would be great...
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: subspark on Sat 13/05/2006 03:25:50
After a long ponder I have realised I was wrong to be so overly critical and jugemental of those who cannot see how this technique can be applied to AGS. And for the most part you all are right. It is unproven ground. While it may work inside AfterEffects which is a highly specialised graphics application, the same success may not be possible with AGS. They are afterall two completely different software genres. Compositing Software and Games Engines are graphics engines but different in architecture nonetheless.

I'll see what I can do to create a proper tutorial of how the technique works in after effects. Maybe someone will notice what AGS lacks that the method requires.

This is all purely for the spirit of creating faster ways to go about things and further its about having fun along the way. Any assurance that it's going to work lies in pure speculation at this stage.

Snarky and I have come to common terms. I aplogised for being bitter and he has kindly accepted my apology. I cannot ask more from the comunity than the care and enthusiasm he and many of you show on a daily basis.

Cheers.

Paul W.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Fuzzpilz on Sat 13/05/2006 06:10:39
Um, read his post again. It doesn't say what you seem to be reading into it.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Ali on Sat 13/05/2006 11:10:01
Quote from: Pumaman on Mon 08/05/2006 20:44:24
Taking this thread back to basics for a moment, I do agree that allowing 24-bit BMP import for walk-behind masks, with AGS then automatmically assigned a walk-behind colour to each unique colour in the bitmap, is a good idea and should be supported.


I certainly don't want to jump on the naysaying bandwagon, but I'm not sure how assigning a walkbehind colour to each colour in a 24-bit BMP would facilitate your idea of anti-aliasing, subspark.

I could easily be wrong, but if your idea is valid, you haven't explained it with the clarity that Snarky has countered with.

If the majority of posters in this thread are being short-sighted I'm sure we'd rather not be. Please post a diagram that illustrates your method, bearing in mind this message:

Quote from: Snarky on Wed 03/05/2006 16:20:43
Using only a background image layer, a walkbehind mask layer (with soft edges) and an object layer, create a layer with the effect of an object partially hidden behind a soft walkbehind. Then post it here. Your claim would then either be proven or disproven.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: Snarky on Sat 13/05/2006 15:47:28
subspark, when you PMed me with a link to this thread, I thought you'd finally produced a demonstration of your method, so we could judge first-hand whether it works. Instead you're just misreading a comment from CJ and taking it as support for your claims. Frankly, that's a bit insulting.

You keep saying that we should be open to new ideas or that we don't understand your proposal. In fact, it's not a new idea. It has been suggested at least twice before. And I was all for it the first time I heard about it, until someone explained why it wouldn't work. We're not naysayers out of conservatism or fear of new ideas, but because you've failed to provide a convincing justification that you have a working method. If you could convince us of that, I'm sure you'd have the wholehearted support of everybody in this thread.

The ball is in your court. If what you've said is true, it should be trivial for you to answer the challenge that Ali just quoted. As long as you don't, I'll take that as evidence that you're wrong.

Edit: As subspark said, we've resolved any hostility, and agreed to disagree for the time being. I look forward to seeing his ideas demonstrated in a form where we can evaluate them.
Title: Re: Suggestion: Color coded anti-aliased masks
Post by: strazer on Sun 14/05/2006 14:10:35
Quote from: Pumaman on Mon 08/05/2006 20:44:24I do agree that allowing 24-bit BMP import for walk-behind masks, with AGS then automatmically assigned a walk-behind colour to each unique colour in the bitmap, is a good idea and should be supported.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=570