Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - subspark

#921
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.
#922
Thankyou guys.  :)
#923
Thanks Strazer. Got it working now. I got wound up in all the unessicary windows spits at you.

Cheers again.
#924
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.
#925
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.
#926
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.
#927
Yeah I figured. Cheers for that SSH.
#928
Can anyone else shed some light on this?

I don't think its working correctly. It opens AGS but am I to expect it to open the game or just start the editor? The latter seems almost pointless.
#929
Argh! So simple. It just didn't hit me seing that > showed up correctly. I don't know why anybody would make a font with > but not <. Odd.
#930
I've scripted cEgo to say "<Sigh!> It's so peacefull here."

Whenever this runs in-game the <Sigh!> is turned into éSigh!>
I've looked through the manual and browsed through and searched the forums but there is no explination as to why <S seems to be read as an acute accent 'e'.

It's exactly the way classic LucasArts Adventure games used to indicate a non present sound or action. Always between a <>.
For example: <THUD!>
#931
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.
#932
Thanks Strazer. Could you be a bit more specific perhaps. I am using Windows XP and it has turned out to be a little more complicated than I would have liked. I found myself in "Folder Options -> File Types. I then Added a new file association with the DTA extension. Once added I then had the option of editing the filetype further. It came up with a list of properties such as Change Icon and Actions. Naturally I chose Add action and chose agsedit.exe as the 'Application used to perform action". Then I added -shelllaunch "%1" as the action. When I double click my agsgame.dta file it opens AGS as expected but the Welcome to AGS screen pops up as my game hasnt actually loaded.

Any clues?
#933
Sure. I was affraid it may be a little to pie in the sky.
Good going.

PS: What exactly is the most convenient way to work with projects. You mentioned you store them seperately to the engine. Won't this cause the need to constantly ruvvage through folders in search of your .ags file at load? Or have you set up a windows variable so that you can double click the .ags file and it will open up in the editor with all the folders remembered from last time?
#934
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.
#935
The ideal AGS Directory Structure:Ã,  8)



What are your current thoughts on this?
#936
Listen, Manuel_man991,

Apart from being very vague with your explanation of your issue you failed to enlighten the rest of us exactly how you solved it.

Don't you think you could be a little more generous next time someone offers to help you. With all due respect, give a little back will ya buddy.
Some of us have the very same problems you were trying to explain in your first post.

EDIT: My apologies for sounding rather rash, Manuel_man991 but understand, it's about time EVERYBODY stop posting long vague chunks of code that dont provide any clue as to the problem and when it is solved, saying OH NEVER MIND FIXED IT. - Post end is just silly. I'm not pointing fingers to any particular induvidual but this kind of mentality is all too common amongst the forums and it's rather shortsighted and inconvenient. I hate bringing up old posts and asking "So how exactly DID you solve it?" At the end and posting new topics of the same problem just gets tireing for the moderators.

I hope my point is clear.
No worries. Just keep that in mind friend.
#937
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:


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.
#938
Would you care to export your fixed version as a template for the rest of us?

Good on you pal. Nice coding!
#939
Wow Strazer your fast! I just typed that 30 seconds ago. You people are mind boggelingly prompt.

You got me thinking. How about a 'Projects' subfolder for all games.
Call me excessivly neat and overly logical but the Editor deserves it's own domain seperate from it's output. Make sense?

Cheers to you!
#940
It would be rather nice if AGS, with all of those fantastic templates for beginners and avid game developers, could look for .agt files in a Template Subfolder in the AGS root directory.
The same goes for Plugins. Theres nothing like a spring clean especially when dealing with hundreds and hundreds of files.

Cheers!
SMF spam blocked by CleanTalk