Game Maker Community: Dark Hdr Lighting (dhdrl) - Game Maker Community

Jump to content

Work in Progress Rules

This forum is for people to post information regarding their WIP projects for discussion and feedback. Note: by WIP projects, we mean those that are well underway, and we require that you post a demo. Make sure that you READ these rules prior to posting. Also, the General GMC Rules apply here too.
  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Dark Hdr Lighting (dhdrl) Lighting To End All Others

#1 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Post icon  Posted 14 October 2005 - 08:11 PM

As some of you may remember I created "Dark Lighting" a few months ago which revialed GearGOD's engine. A few weeks after that I set out to create a great Lighting Engine. Finally it is almost done. I was not going to let it out to the GMC because it was going to be feacherred In ME (a game I was making with Kumori). Sadly our sprite artist left so the project was scrapped. Many people told me to keep it to my self but I really don't have any use for it at the time so I desided to let it out to the GMC.
btw I no cats die GearGOD ;) .

I would like to thank GearGOD for insperring me to make this engine and Kumori for pushing me. Also coffee for the helping me stay awake at night. :)

Dark HDR Lighting (DHDRL) Lights runs ~2 than other engines that I haev seen.
Dark HDR Lighting (DHDRL) Shadows runs ~2 than darklighting and much more faster than many others.
Dark HDR Lighting (DHDRL) Also has a new function called Flare. That is mostly the part that is not done yet for this WIP. Lighting and shadows seem to work fine as of now.
Also I added lots of dugging messages so it's easy to find out errors you have made in your code. :)

One warning is that the script: scrDHDRL_Full_Destroy is not done yet.

To change modes go into: objDHDRL_System_Create

Here is a image that should help you understand the basic structure more:
Posted Image

Here are 2 Screen shots the first one is showing off light with shadows.
The second one is showing off full Flare effects.
Click the image to see a full size one.

Posted Image

Posted Image

Download DHDRL Here
CLICK HERE

Here's an EXE for everyone who is not reg.:
Click here for exe

Well that's about all I have to say just remember to give credit when credit is needed.

- Eric

This post has been edited by Dark Walk: 14 October 2005 - 08:36 PM

0

#2 User is offline   thegreatgaveno@mac.com 

  • GMC Member
  • Group: GMC Member
  • Posts: 155
  • Joined: 27-May 04

Posted 14 October 2005 - 08:16 PM

That looks really cool! Unfortunately I don't have registered gm6 so I cannot try it out, but from the screenshots it looks like it would make games very beautiful!
-Gavin
0

#3 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 14 October 2005 - 08:20 PM

thanks for the feed back I could make an exe for you if you wanted.
0

#4 User is offline   thegreatgaveno@mac.com 

  • GMC Member
  • Group: GMC Member
  • Posts: 155
  • Joined: 27-May 04

Posted 14 October 2005 - 08:24 PM

Oh, that would be cool! I would like to see how it works.
0

#5 User is offline   chromegod 

  • GMC Member
  • Group: GMC Member
  • Posts: 521
  • Joined: 22-May 05

Posted 14 October 2005 - 08:25 PM

Wow, great work. I got very high framerates and it looked pretty good.
Could you explain what HDR lighting is and how this is "HDR"?
Not very many people know much about it, including myself.
0

#6 User is offline   Bami 

  • StupideGames
  • Group: GMC Member
  • Posts: 389
  • Joined: 09-December 03

Posted 14 October 2005 - 08:38 PM

This is not anywhere NEAR real HDR, the only thing it has is bloom, and you think that is HDR because VALVe added bloom with their HDR update.

Dynamic Range (the DR in HDR) is the ratio of the largest value of a signal to the lowest measurable value. Current 16-bit integer-based formats use colour component values from 0 ("black") to 1 ("white"), but don't allow for what is known as "over-range" values, for example, a whiter-than-white highlight glinting off a piece of metal that is being lit from a very bright light source.

so "real" HDR is not possible on today's current monitors, so they are trying to emulate this effect in a couple of ways:

1. "Bloom" areas that are lighter then the maximum brightness value, making it seem the light is leaking from that particular spot.
2. Exposure Control, Making the whole scene light up when coming from a dark place to a light one, and otherwise (when driving through a tunnel, being blinded by the sun when coming out).
3. HDR lightmaps. Skyboxes are lit using a 32-bit HDR lightmap file, and objects are also being lit by a HDR-cubemap, thus the scene is more "naturally" lit then normal, and very intense lit objects also bloom. This only goes for static objects.
4. HDR refraction. When light passes through a coloured transparent object, the light "takes" that color, and in dusty areas, you would see a coloured beam of light (for example)
0

#7 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 14 October 2005 - 08:39 PM

thegreatgaveno@mac.com
It has been added. :)

chromegod, on Oct 14 2005, 08:28 PM, said:

Wow, great work.  I got very high framerates and it looked pretty good.
Could you explain what HDR lighting is and how this is "HDR"?
Not very many people know much about it, including myself.
<{POST_SNAPBACK}>

HDR is the new thing I have added. Basicly it is "kinda" like blur of light close to a bloom that has many other effects in it too.

Bami it was created to be "close" to it with fps in mind.

This post has been edited by Dark Walk: 14 October 2005 - 08:41 PM

0

#8 User is offline   thegreatgaveno@mac.com 

  • GMC Member
  • Group: GMC Member
  • Posts: 155
  • Joined: 27-May 04

Posted 14 October 2005 - 08:47 PM

That works pretty good! Best shadow engine I've seen in gm.
0

#9 User is offline   Bami 

  • StupideGames
  • Group: GMC Member
  • Posts: 389
  • Joined: 09-December 03

Posted 14 October 2005 - 08:49 PM

Hmm, seems that I forgot to add my opinion, lol.

Anyways, nice effort. There is still a little glitch, when you move your mouse at the same height as the lower bit of a wall, the shadow isn't rendered.
Another thing, It seems that you use a lower resolution for your "lighting map", then GearGOD's examples, which might explain the reason why your engine is faster (although I don't have a clue, they both run on perfect FPS on my crap machine).

This is a great engine, but gearGOD's engine has a slight edge in features (and quality).
0

#10 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 14 October 2005 - 09:05 PM

Bami, on Oct 14 2005, 08:52 PM, said:

Hmm, seems that I forgot to add my opinion, lol.

Anyways, nice effort. There is still a little glitch, when you move your mouse at the same height as the lower bit of a wall, the shadow isn't rendered.
Another thing, It seems that you use a lower resolution for your "lighting map", then GearGOD's examples, which might explain the reason why your engine is faster (although I don't have a clue, they both run on perfect FPS on my crap machine).

This is a great engine, but gearGOD's engine has a slight edge in features (and quality).
<{POST_SNAPBACK}>


If anyone can notice the quality I would be amazed in their eye sight. If you looked at my first engine you would see that it has same maps. Also if you think it needs more features would you mind requesting some. I would be happy to make them. I have GearGOD on msn and I assure you that this engine is fine. He did some of the testing. :)
Anyway this engine was created with pure speed in mind.

This post has been edited by Dark Walk: 14 October 2005 - 09:07 PM

0

#11 User is offline   J-Labs 

  • J-Labs
  • Group: GMC Member
  • Posts: 339
  • Joined: 04-November 03

Post icon  Posted 15 October 2005 - 07:30 AM

Sorry for the noobish question but how do you turn off the shadows I can turn it off in geargods but Im not sure how to do it in yours.
0

#12 User is offline   larttaus 

  • GMC Member
  • Group: GMC Member
  • Posts: 14
  • Joined: 05-April 04

Posted 15 October 2005 - 02:17 PM

In the example look for the object:

objDHDRL_System_Create

Open the create event action, find the line:

scrDHDRL_Engine_Create(true,true,false,false,
false,false)


Using the argument list below, alter the arguments passed. I don't know what the other options do.

//argument0 = (bool)    Lights On
//argument1 = (bool)    Shadows On
//argument2 = (bool)    Blurs On
//argument3 = (bool)    Indents On
//argument4 = (bool)    Equal Screen On
//argument5 = (bool)    Stars On


To turn off shadows alter the line so it looks like this:

scrDHDRL_Engine_Create(true,false,false,false,
false,false)


Hope this helps

EDIT:

Oh nice engine by the way... get a good constant fps..

Keep up the good work..

This post has been edited by larttaus: 15 October 2005 - 02:20 PM

0

#13 User is offline   HolyCause 

  • Music Composer
  • Group: GMC Member
  • Posts: 830
  • Joined: 29-December 04

Posted 15 October 2005 - 03:36 PM

Bami said:

This is not anywhere NEAR real HDR, the only thing it has is bloom, and you think that is HDR because VALVe added bloom with their HDR update.
<{POST_SNAPBACK}>

That's what everyone with a bloom filter in their lighting engines believes: "OMFG I CREATE HDR".

At any rate, I wasn't very impressed with this lighting engine. Luminare does a better job with shadows, but this runs faster at least.

How do I activate the bloom filter? Or did you even include it in this example? Unless this "flare" effect is the bloom filter.

Kind Regards,
-- HolyCause :)
0

#14 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 15 October 2005 - 03:59 PM

larttaus thank you for showing everyone how it works.:)
HolyCause read larttaus post to find out.
0

#15 User is offline   HolyCause 

  • Music Composer
  • Group: GMC Member
  • Posts: 830
  • Joined: 29-December 04

Posted 15 October 2005 - 08:42 PM

Dark Walk said:

HolyCause read larttaus post to find out.
<{POST_SNAPBACK}>

Ah, I see now. You should probably indicate how to set all those options in the Game Information.. that's what it's there for >_>

EDIT: Oh wow, that sure did a lot [/sarcasm]
After changing all of the arguments that larttaus said, it didn't effect the BLOOM FILTER. I asked on how to enable that, not alter the shadows.

http://hcshrine.x10h...images/bug1.JPG
(Btw, there's a missing pixel in there.. just thought I'd mention that ;))

Looking into another script, I changed it like so:
scrDHDRL_Main_Create(true,true)
It says in the script that the second argument controls the bloom filter (or flare, whatever you call it). Guess what happens when I enable it:

http://hcshrine.x10h...images/bug2.JPG

Wah, I really wanted to see the bloom filter :(

Kind Regards,
-- HolyCause :)

This post has been edited by HolyCause: 15 October 2005 - 09:00 PM

0

#16 User is offline   mr.cooljamesbond 

  • GMC Member
  • Group: GMC Member
  • Posts: 1256
  • Joined: 05-January 05

Posted 15 October 2005 - 10:22 PM

good! but its kinda hard to understand...
0

#17 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 15 October 2005 - 10:56 PM

yeah I guessed lots of people won't understand it.
I gave you more control over what happens but it seems some people don't know how to do it. So I'll post some code to get you started.

IN objDHDRL_System_Create

Quote

scrDHDRL_System_Create(0,objDHDRL_System_Handel, ma
ke_color_rgb(32,32,32))
scrDHDRL_Main_Create(true,false)
scrDHDRL_Engine_Create(true,true,false,false,false
,false)

That sets up lighting mode.

if you look in:
scrDHDRL_Engine_Create

it has the following:

Quote

/*  Script Name:
scrDHDRL_Engine_Create

/************************************/
//argument0 = (bool)    Lights On
//argument1 = (bool)    Shadows On
//argument2 = (bool)    Blurs On
//argument3 = (bool)    Indents On
//argument4 = (bool)    Equal Screen On
//argument5 = (bool)    Stars On

//works:
//returns true
//else
//return false
/************************************/


that gives you the info on the function.

to add a light use this:

Quote

/*  Script Name:
scrDHDRL_Light_Add

/*************************************/
//argument0 = (ind)    sprite index
//argument1 = (int)    sub - image
//argument2 = (double)  x
//argument3 = (double)  y
//argument4 = (double)  width
//argument5 = (double)  height
//argument6 = (int)    rotate amount
//argument7 = (COLOR)  color
//argument8 = (float)  alpha amount

//If Worked
//return true
//Else
//return false
/*************************************/


now to set full flares on you have to use this code to set it up:
scrDHDRL_System_Create(0,objDHDRL_System_Handel,
make_color_rgb(32,32,32))
scrDHDRL_Main_Create(true,false)
scrDHDRL_Engine_Create(false,false,true,true,true,
true)


then to add a flare you have to use:
scrDHDRL_Flare_Add


I hope that clears up some things if not post a question and I'll try my best to help you. ;)
0

#18 User is offline   mr.cooljamesbond 

  • GMC Member
  • Group: GMC Member
  • Posts: 1256
  • Joined: 05-January 05

Posted 16 October 2005 - 01:28 AM

Dark Walk, on Oct 15 2005, 05:59 PM, said:

yeah I guessed lots of people won't understand it.
I gave you more control over what happens but it seems some people don't know how to do it. So I'll post some code to get you started.

IN objDHDRL_System_Create

Quote

scrDHDRL_System_Create(0,objDHDRL_System_Handel, ma
ke_color_rgb(32,32,32))
scrDHDRL_Main_Create(true,false)
scrDHDRL_Engine_Create(true,true,false,false,false
,false)

That sets up lighting mode.

if you look in:
scrDHDRL_Engine_Create

it has the following:

Quote

/*  Script Name:
scrDHDRL_Engine_Create

/************************************/
//argument0 = (bool)    Lights On
//argument1 = (bool)    Shadows On
//argument2 = (bool)    Blurs On
//argument3 = (bool)    Indents On
//argument4 = (bool)    Equal Screen On
//argument5 = (bool)    Stars On

//works:
//returns true
//else
//return false
/************************************/


that gives you the info on the function.

to add a light use this:

Quote

/*  Script Name:
scrDHDRL_Light_Add

/*************************************/
//argument0 = (ind)     sprite index
//argument1 = (int)     sub - image
//argument2 = (double)  x
//argument3 = (double)  y
//argument4 = (double)  width
//argument5 = (double)  height
//argument6 = (int)     rotate amount
//argument7 = (COLOR)   color
//argument8 = (float)   alpha amount

//If Worked
//return true
//Else
//return false
/*************************************/


now to set full flares on you have to use this code to set it up:
scrDHDRL_System_Create(0,objDHDRL_System_Handel,
make_color_rgb(32,32,32))
scrDHDRL_Main_Create(true,false)
scrDHDRL_Engine_Create(false,false,true,true,true,
true)


then to add a flare you have to use:
scrDHDRL_Flare_Add


I hope that clears up some things if not post a question and I'll try my best to help you. ;)
<{POST_SNAPBACK}>


thanks, hey would it work with a FPS?
0

#19 User is offline   FireScreen 

  • GMC Member
  • Group: GMC Member
  • Posts: 552
  • Joined: 06-July 04

Posted 16 October 2005 - 03:23 AM

Quote

thanks, hey would it work with a FPS?

I was wishing the same thing too, but when 3D mode starts all surfaces are destroyed and surfaces don't function in 3d mode too. Your best bet would be using a sprite.
0

#20 User is offline   Melee-Master 

  • Metalhead
  • Group: GMC Member
  • Posts: 1170
  • Joined: 10-April 05

Posted 16 October 2005 - 08:58 AM

For ease of use, maybe you should simply make scripts that call scripts needed for certain effects? That way someone knows exactly what they're doing.
Like, make a script that calls:

scrDHDRL_System_Create(0,objDHDRL_System_Handel,
ma
ke_color_rgb(32,32,32))
scrDHDRL_Main_Create(true,false)
scrDHDRL_Engine_Create(true,true,false,false,false
,false)


And name it something simple like "setup_lighting". And if people need to modify arguments, then they can go into the calling script to do it. Just an idea.

Those screenshots rule. ;)
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users