Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: CMK2901 on Wed 26/07/2006 06:32:10

Title: Dynamic Grain Filter
Post by: CMK2901 on Wed 26/07/2006 06:32:10
Hi.

I'm curious if there would be a way to have a grain filter overlay the gameplay, like in old movies.  It would be simple enough for cutscenes, but I'm curious whether AGS has anything to do it over the normal gameplay, or if not, if it is even possible.


- Clark
Title: Re: Dynamic Grain Filter
Post by: DoorKnobHandle on Wed 26/07/2006 06:36:35
Why don't you create such an effect with Photoshop or any movie-production program and then import those frames as gui for example to put it over the whole screen and animate it? Would that not work?
Title: Re: Dynamic Grain Filter
Post by: GarageGothic on Wed 26/07/2006 15:35:03
I would suggest the same solution as dkh. This is exactly how the post-effect filters in Shadowplay work. The only problem I've come across is that when you're using AGS dialog system and the choice of topics is displayed, all animation will halt even if handled in repeatedly_execute_always. I've asked CJ about this, and the cause is that no game loops run during topic selection.

So unless you plan on using your own dialog system (or the scrolling dialog topics module), be aware of this limitation.
Title: Re: Dynamic Grain Filter
Post by: CMK2901 on Wed 26/07/2006 22:57:13
Sounds good...I'll find a way around the limitations.  ;)

Thanks!
Title: Re: Dynamic Grain Filter
Post by: LimpingFish on Sat 29/07/2006 21:11:22
I used a simple noise filter in photoshop to animate the grain effect in my game, Heartland. I just used an animated background of three frames, including the initial room background, and adjusted the speed until I got what I was after.
Title: Re: Dynamic Grain Filter
Post by: GarageGothic on Sun 30/07/2006 00:31:22
The problem with LimpingFish's suggestion is that the characters and objects won't be filtered. A solution would be to add different noise to every character frame and run an idle animation with noise the moment he stands still. It seems a lot of trouble instead of overlaying a filter on the whole scene (and three frames pr. background also adds considerably to the file size).
Title: Re: Dynamic Grain Filter
Post by: LimpingFish on Sun 30/07/2006 01:02:05
Quote from: GarageGothic on Sun 30/07/2006 00:31:22
The problem with LimpingFish's suggestion is that the characters and objects won't be filtered.

This is true, so, yes, you would have to filter each object and character with a similar noisemap. But that wouldn't be too hard. Time consuming, tho. :P