Jump to content


Photo

DirtyBloom - Lensglare System


  • Please log in to reply
35 replies to this topic

#1 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 13 August 2014 - 01:56 AM

DirtyBloomLogo.png

 

 
Features:
  • Easy to use system, just a couple script calls to enable
  • Fully customizable
  • It just works!
Purchasing this asset grants you free updates as the product continues to evolve and improve.
 
INSTRUCTIONS FOR USE: You must first call DirtyBloom_define(), then simply call DirtyBloom_enable() or DirtyBloom_disable(). There are more functions included. Feel free to browse through them to learn what they do.
 
Coming Soon:
  • Improved blurring
  • various other improvements...

 

 

Demo: DirtyBloomPreview.zip (win)

 

 

Click Here or the banner above to view the asset's Marketplace listing!


Edited by Indecom4000, 13 August 2014 - 01:57 AM.

  • 4

LD-Logo-sml.png


#2 hippyman

hippyman

    Dirty Stinky Hippy

  • GMC Member
  • 837 posts
  • Version:GM:Studio

Posted 13 August 2014 - 02:00 AM

So does this basically just make lighter colors have a cool glow effect? The screens look really good and I'm going to download the demo after I post this.


Edited by hippyman, 13 August 2014 - 02:00 AM.

  • 0

 badge.png?dl=0

HM Audio Soundcloud: https://soundcloud.com/hm-audio


#3 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 13 August 2014 - 02:04 AM

It basically simulates a dusty camera lens, you'll see bright things on screen lighting up the little specs of dirt stuck on your screen.


  • 0

LD-Logo-sml.png


#4 hippyman

hippyman

    Dirty Stinky Hippy

  • GMC Member
  • 837 posts
  • Version:GM:Studio

Posted 13 August 2014 - 02:10 AM

It looks pretty cool. This is way beyond anything I could do!  :sweat:


  • 1

 badge.png?dl=0

HM Audio Soundcloud: https://soundcloud.com/hm-audio


#5 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 13 August 2014 - 02:13 AM

Luckily, now, you won't have to. :P


  • 1

LD-Logo-sml.png


#6 solowebnv

solowebnv

    GMC Member

  • GMC Member
  • 27 posts
  • Version:GM:Studio

Posted 13 August 2014 - 07:43 PM

Hi Indecom

 

I bought your effect but I have issues to make it work.

Here few questions:

The script DirtyBloom_define requires 5 arguments, can you please explain in details what these 5 arguments are?

The DirtyBloom_obj you included in the package needs to be added in the room regardless?

Does some kind of depth need to be set and would it work with wide side scrollers?

 

thanks in advance


  • 0

We are proud to announce Aero's Quest our coming new indie title. If you are interested you can follow the development on Aero's Twitter, Aero's Facebook and Aero's Youtube channel. We host the GameMaker Blog net community.

 


#7 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 13 August 2014 - 07:54 PM

You do not need to include the object in the room. The script DirtyBloom_enable() will place it in the room for you.

 

DirtyBloom_define() works like this:

DirtyBloom_define( float strength, bool Halo, bool ChromAbb, int Ghosts, float Dispersal );

Strength is used to increase or decrease the visual effect. The higher the number, the brighter the effect.

Halo is either 0 or 1, and if set to 1 will draw a halo effect around the screen.

ChromAbb is either 0 or 1, and if set to 1 will create a sort of split in the colors, like this image.

Chosts is how many times the bright spots on screen will create ghost flares, like this image.

Dispersal is the fading rate of the ghosts. You'll want to toy around with this, but too high a number or too low a number will give you strange results. I think it looks good at 0.07.

 

You do not need to set any kinds of dept and it should work well with any kind of game. Just keep in mind that anything bright or close to white in the game will create flares. If you need any help tweaking the settings, let me know.

 

Also this asset will be getting fairly steady updates and improvements.


Edited by Indecom4000, 13 August 2014 - 07:56 PM.

  • 0

LD-Logo-sml.png


#8 solowebnv

solowebnv

    GMC Member

  • GMC Member
  • 27 posts
  • Version:GM:Studio

Posted 13 August 2014 - 08:00 PM

Quick to answer and very efficient, thank you very much.


  • 0

We are proud to announce Aero's Quest our coming new indie title. If you are interested you can follow the development on Aero's Twitter, Aero's Facebook and Aero's Youtube channel. We host the GameMaker Blog net community.

 


#9 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 13 August 2014 - 08:02 PM

@solowebnv: Not a problem bud!


  • 0

LD-Logo-sml.png


#10 obscene

obscene

    GMC Member

  • GMC Member
  • 3171 posts
  • Version:GM:Studio

Posted 14 August 2014 - 12:13 AM

I'm absolutely intrigued by how you did this as I know nothing about shaders. I have a lensflare effect built into my game that has a totally different look (anamorphic) without all the dirt and stuff, but in order to trigger it I have an object that follows a light source by code and then uses draw_getpixel to check if the light is obstructed by a foreground object or anything, then the rest is drawn. Long story short, draw_getpixel is SLOW while you apparently are using a shader to detect brightness automatically! Having never purchased an asset before nor understand shaders, would I be able to take your shader and apply my own graphics?


  • 0

#11 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 August 2014 - 12:28 AM

This shader automatically works, no matter what your graphics are. It relies on two background images to create the lens flares, and although you can change these graphics, do so at your own risk, because you may or may not like the results.

I'm absolutely intrigued by how you did this as I know nothing about shaders. I have a lensflare effect built into my game that has a totally different look (anamorphic) without all the dirt and stuff, but in order to trigger it I have an object that follows a light source by code and then uses draw_getpixel to check if the light is obstructed by a foreground object or anything, then the rest is drawn. Long story short, draw_getpixel is SLOW while you apparently are using a shader to detect brightness automatically! Having never purchased an asset before nor understand shaders, would I be able to take your shader and apply my own graphics?


  • 0

LD-Logo-sml.png


#12 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 785 posts
  • Version:GM:Studio

Posted 14 August 2014 - 02:20 AM

Before I'd make a puchase, I'd like to know if the effect is surface based at all. My game is fundamentally incompatible with surface effects.
  • 0

lord5.png

 


#13 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 August 2014 - 02:23 AM

Yes, this requires multiple surfaces, and relies on the game using the application_surface feature.


  • 0

LD-Logo-sml.png


#14 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 14 August 2014 - 02:50 AM

Just purchased it. :thumbsup:

 

[edit]

Just noticed it doesn't play well when your room size is greater than 1024 x 768 :(

 

Pretty much every project I create has a base resolution of 1600 x 900.

 

Any ideas how to fix this?


Edited by Lonewolff, 26 August 2014 - 07:29 AM.

  • 0

#15 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 August 2014 - 03:18 AM

Nope, you just need to set the size of view[0] to match your game's resolution.


  • 0

LD-Logo-sml.png


#16 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 14 August 2014 - 03:24 AM

Nope, you just need to set the size of view[0] to match your game's resolution.

 

Nice one. That fixed it (even though my test project doesn't have views enabled. :thanks:

 

Might be worth mentioning this in your original post somewhere as I am sure others will come across this :)

 

Out of interest what settings did you use to achieve this?

 

Spoiler

Edited by Lonewolff, 14 August 2014 - 04:07 AM.

  • 0

#17 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 August 2014 - 03:27 AM

That's not actually from my shader, that's a demontration of an effect used in my shader. It's Chromatic Abberation, and is enabled or disabled when you use DirtyBloom_define


  • 0

LD-Logo-sml.png


#18 Alvare

Alvare

    Not an administrator

  • GMC Member
  • 1812 posts
  • Version:None

Posted 16 August 2014 - 07:52 PM

Is this easy to use with 3D? I mean.. doesn't this force you to do a draw_everything script?.. If you know what I mean.  :teehee:


  • 0

#19 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 16 August 2014 - 09:20 PM

This works with any kind of game. Just call the DirtyBloom_define() script followed by DirtyBloom_enable().

 

The only caveats are that you must utilize the application surface, which is in use by default. So if you havent purposefully disabled that then it will just autmatically work for you, even if your game is 3d.


  • 1

LD-Logo-sml.png


#20 Alvare

Alvare

    Not an administrator

  • GMC Member
  • 1812 posts
  • Version:None

Posted 16 August 2014 - 10:50 PM

This works with any kind of game. Just call the DirtyBloom_define() script followed by DirtyBloom_enable().

 

The only caveats are that you must utilize the application surface, which is in use by default. So if you havent purposefully disabled that then it will just autmatically work for you, even if your game is 3d.

Cool. I already use the application surface without a shader_set added to it so I guess it should work then.

I'm definitely thinking of buying this.  :)


  • 0

#21 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 16 August 2014 - 11:14 PM

great. it should work for you automatically then


  • 0

LD-Logo-sml.png


#22 j4m1ef0rd

j4m1ef0rd

    GMC Member

  • GMC Member
  • 74 posts
  • Version:GM:Studio

Posted 21 August 2014 - 01:34 AM

I cant seem to get it to look right, can you tell me what im doing wrong, i tryed the shaders in a few of my games and it just looks like this:
TmCq2Ur.png

I have tryed all diferent settings, atm its at DirtyBloom_define(15,1,1,5,5);
i even tryed putting the downsample to 1. it seems like the blur isnt working like it should?


Edited by j4m1ef0rd, 21 August 2014 - 01:36 AM.

  • 0

sig_zps773ace79.png


#23 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 21 August 2014 - 01:53 AM

I cant seem to get it to look right, can you tell me what im doing wrong, i tryed the shaders in a few of my games and it just looks like this:
TmCq2Ur.png

I have tryed all diferent settings, atm its at DirtyBloom_define(15,1,1,5,5);
i even tryed putting the downsample to 1. it seems like the blur isnt working like it should?

 

The problem is interpolation being disabled. The shader relies on it, so what you need to do is open the DirtyBloom_obj and in the draw gui being event, in the first code block, add a line at the beginning that says texture_set_interpolation(true), then in the second code block, at the end, add texture_set_interpolation(false).

 

this is something that i'll have automated in a future update.

 

EDIT: here are some good values to try, DirtyBloom_define(1,1,5,0.07);

 

The first value is either 0 or 1, that determines if a halo is drawn or not, so setting it to 15 won't help you. The last value, the ghost fade value, you need to toy around with it, but if you set it too high you'll get the weird tiling effect that you're seeing in your image.


Edited by Indecom4000, 21 August 2014 - 02:01 AM.

  • 1

LD-Logo-sml.png


#24 j4m1ef0rd

j4m1ef0rd

    GMC Member

  • GMC Member
  • 74 posts
  • Version:GM:Studio

Posted 21 August 2014 - 03:39 AM

ok i added in the interpolation and adjusted the ghost fade.it looks much better now, But i still get a lot of flickering when i move around, looks like the down sampling is causing a flickering effect, is there any way to stop this?
Thanks for your help btw.


  • 0

sig_zps773ace79.png


#25 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 21 August 2014 - 03:44 AM

The flickering is caused by the down sampling. I plan to implement a fix to that in the future, just have a lot of planning to do. Lol


  • 0

LD-Logo-sml.png


#26 j4m1ef0rd

j4m1ef0rd

    GMC Member

  • GMC Member
  • 74 posts
  • Version:GM:Studio

Posted 21 August 2014 - 05:20 AM

ok, good to know that its on the todo list :)
Keep up the good work.


  • 0

sig_zps773ace79.png


#27 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 01 September 2014 - 06:16 AM

Got an odd one here
 
DirtyBloom_define(1,false,false,0,0);
 
Result
 
dirty_bloom.png
 
As you can see there is a distinct boxing effect going on.
 
Any ideas how to resolve this?
 
Thanks in advance :)
  • 0

#28 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 01 September 2014 - 06:49 AM

The problem is interpolation being disabled. The shader relies on it, so what you need to do is open the DirtyBloom_obj and in the draw gui being event, in the first code block, add a line at the beginning that says texture_set_interpolation(true), then in the second code block, at the end, add texture_set_interpolation(false).

 

this is something that i'll have automated in a future update.

 

Yup, do this^^


  • 0

LD-Logo-sml.png


#29 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 01 September 2014 - 07:07 AM

 

The problem is interpolation being disabled. The shader relies on it, so what you need to do is open the DirtyBloom_obj and in the draw gui being event, in the first code block, add a line at the beginning that says texture_set_interpolation(true), then in the second code block, at the end, add texture_set_interpolation(false).

 

this is something that i'll have automated in a future update.

 

Yup, do this^^

 

 

 

I'll take a look, but I use interpolation by default on all of my projects.

 

Just checked this particular project and it is currently turned on in global settings.


  • 0

#30 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 01 September 2014 - 07:40 AM

Try entering that code anyhow. It's possible that somewhere in code it's being disabled then enabled perhaps in the gui draw event of some object.


  • 0

LD-Logo-sml.png


#31 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 01 September 2014 - 08:27 AM

Will do! :)

 

Probably wont be able to test this until tomorrow. Will report back then. :thumbsup:


  • 0

#32 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 02 September 2014 - 09:35 PM

Did that manage to fix the issue for you at all?


  • 0

LD-Logo-sml.png


#33 Lonewolff

Lonewolff

    Permanent Resident

  • GMC Member
  • 3517 posts
  • Version:GM:Studio

Posted 02 September 2014 - 10:04 PM

Sorry dude, had a killer headache yesterday. Wasn't much good for doing anything except for posting random banter with people on the status updates.

Will give it a crack in about an hour :)
  • 0

#34 ShrikeGFX

ShrikeGFX

    GMC Member

  • GMC Member
  • 66 posts
  • Version:GM:Studio

Posted 02 April 2015 - 01:05 PM

Hello, I bought the Package and the first thing I noticed is the lack of basic instructions in the pack

Its maybe easy for you but other people do not instantly know how to use it

 

I had to go back to the marketplace page and then get here through the link to find out what to do, which is really not how it should be

 

also there are no comments , not even in the dirtybloom define script, which is the most important of all it seems.

 

how is anyone supposed to know what this should mean:

 

DB_Halos,DB_ChromAbb,DBEffect,DGhosts,DGhostDispersal;

 

and which values they should use. Chromatic Abberation, Ok I get that one, but what is the input, 1, 10000 ?   30s of basic commenting should be the minimum if you put something

on the marketplace, as you see I was kinda frustrated

 

effect looks nice however

 

Is there a way to control the color changing speed of the halo ? Edit: it seems the blur size defines that

And is it possible to tile the dirt effect texture instead of stretching it ? for scanlines or  such things ?


Edited by ShrikeGFX, 02 April 2015 - 03:47 PM.

  • 0

#35 DifferentName

DifferentName

    GMC Member

  • GMC Member
  • 59 posts
  • Version:GM:Studio

Posted 18 November 2015 - 01:37 AM

This is giving me multiple Fatal Errors. Are you still updating this thing at all to make sure it's compatible with the current version of gamemaker? 

 

I'm also seeing the boxing effect lonewolff showed, which are blurrier than what j4m1ef0rd showed us. With texture_set_interpolation set to false, it's blurry boxes, with texture_set_interpolation set to true it's solid boxes.


Edited by DifferentName, 18 November 2015 - 01:59 AM.

  • 0

4972484_orig.png


#36 Zoyous

Zoyous

    GMC Member

  • GMC Member
  • 59 posts
  • Version:Unknown

Posted 29 November 2015 - 04:06 PM

This looks great once you get it going. Unfortunately it's causing a memory leak every time the game is reset, approximately 14 MB each time.


  • 0