Jump to content


Photo

Adventus L 2 S : Lighting & Shadow Engine


  • Please log in to reply
116 replies to this topic

#41 Adventus

Adventus

    GMC Member

  • New Member
  • 516 posts

Posted 22 July 2006 - 11:29 PM

and this one too:

more stuff that could probably help.......

Yea I've been looking into HDR recently.... but without access to custom data stuctures It means that i might have to make another surface for each increase in the range or possibly use the other two colour channels. The "Simple HDR" i mention above is more just an increase in contrast, by redrawing either all or part of the light surface and using it as a contrast map.

A very impressive piece of work. This far outclasses the currently released Luminaire and every other lighting library I know of. I think I will send future users of the current version over here instead.
Looking forward to your next version and seeing how it will compare to my own toy in the works (it does a little more than just blooms and pre-calculated shadows, beware )

haha a little competition is always good, but im guessing you've managed to render HDR and i've only just finished making my bresenhams radial blurring algorithm for my light bloom (which is still painfully slow i might add, i might just go back to the old trusty box blur XD).... I look forward to your next Release.... Its been awhile.

Cheers,
  • 0

#42 OpticalLiam

OpticalLiam

    GMC Member

  • New Member
  • 782 posts

Posted 28 July 2006 - 01:52 PM

ERROR in
action number 1
of Mouse Event for Glob Right Button
for object_player:

Error in code at line 1:
light.x=mouse_x

at position 1: Unknown variable light


Hmmm

"Treat all uninitialized variables as value 0" ticked in (global game options [errors])

Seemed to solve it though (to give you an idea...)

Great engine!
  • 0

#43 kickboxer89

kickboxer89

    GMC Member

  • New Member
  • 110 posts

Posted 28 July 2006 - 02:14 PM

hello, i think i've found a problem...
i maked one instance called lantern.
it position (in step event) is

x=target.x;
y=target.y;
image_angle=target.image_angle;

where target can be the main character or a npc player.
in the player's create event:

a=instance_create(x,y,lantern);
a.target=id;

the same in the npc's create event..

but here the problem, i only saw one lantern. the other lantern isn't there..

i don't know why :S


problem done... my fault. srry :(

Edited by kickboxer89, 28 July 2006 - 02:24 PM.

  • 0

#44 Richard90

Richard90

    Electroman

  • New Member
  • 304 posts

Posted 28 July 2006 - 02:24 PM

Wow! This is the best Lighting & Shadow engine I've ever seen! Runs very smooth on my pc. I might use this, not now, but later on.
  • 0

#45 >Leroy222<

>Leroy222<

    GMC Member

  • New Member
  • 473 posts

Posted 28 July 2006 - 06:57 PM

Glad to see you like my idea. Cant wait for thenext version, which i think ill use in my game.
  • 0

#46 relyt_123

relyt_123

    GMC Member

  • New Member
  • 44 posts

Posted 01 August 2006 - 03:58 AM

I've been looking through your code for the past 10 minutes, but I can't seem to find out how you make it so it stay's dark the whole time and doesn't change.
  • 0

#47 the bull

the bull

    GMC Member

  • New Member
  • 176 posts

Posted 01 August 2006 - 04:26 AM

Remove the last 2 lines in the endstep event of the object obj lightengine
global.LS_ambient=make_color_hsv(20,170,max(45,min(230,lengthdir_y(230,time))))
if fps {time+=6/fps}

  • 0

#48 relyt_123

relyt_123

    GMC Member

  • New Member
  • 44 posts

Posted 01 August 2006 - 04:32 AM

Ahh, thankyou very much for the help.

By the way this is a very amazing engine, good work!
  • 0

#49 kickboxer89

kickboxer89

    GMC Member

  • New Member
  • 110 posts

Posted 05 August 2006 - 06:33 PM

Hello! ^^ One question!
What is faster, to use vertex o bouding box casters?
I was doing a test and I think that vertex are faster, but I am not sure...

By the way, what about the next version?
Ciao!
  • 0

#50 Adventus

Adventus

    GMC Member

  • New Member
  • 516 posts

Posted 06 August 2006 - 03:02 AM

Hello! ^^ One question!
What is faster, to use vertex o bouding box casters?
I was doing a test and I think that vertex are faster, but I am not sure...

Im pretty certain that the bounding box casters are faster than the polygon casters. It would have been pretty pointless making them if they weren't... XD.

By the way, what about the next version?

Good question, right now im concentrating on my game "condemned" but i have implemented (into L3S) a pretty good light bloom effect. I really have no idea when it will be finished, mainly because i cant justify a whole new release with the current minor improvements and im struggling to find lighting effects GM can realistically handle (except the light bloom, it works quite well).

cheers....
  • 0

#51 mr.gibblet

mr.gibblet

    GMC Member

  • New Member
  • 374 posts

Posted 08 August 2006 - 04:47 AM

Well, i love the engine and all but i was wandering if i could use the graphics?? :rolleyes: i will give you credit if u want... please pm me with the results
  • 0

#52 arcooke

arcooke

    GMC Member

  • New Member
  • 1055 posts

Posted 09 August 2006 - 08:05 AM

I looked all over and I couldn't see bumpmapping anywhere in the demo.. for a second I thought that steel floor with the bumps on it used bumpmapping until I looked closely at it and light wasnt changing the shadows on the bumps or anything.

Where is it?
  • 0

#53 Archville

Archville

    GMC Member

  • New Member
  • 10 posts

Posted 09 August 2006 - 01:29 PM

Would it be possible to make the ambient light not that dark ? I would like the default light level a bit lighter.

By the way, impressive lighting engine.
  • 0

#54 OpticalLiam

OpticalLiam

    GMC Member

  • New Member
  • 782 posts

Posted 09 August 2006 - 03:11 PM

I looked all over and I couldn't see bumpmapping anywhere in the demo..  for a second I thought that steel floor with the bumps on it used bumpmapping until I looked closely at it and light wasnt changing the shadows on the bumps or anything.

Where is it?

<{POST_SNAPBACK}>


There is a "sort-of" bumpmapping on the barrels, crates and boxes (looks best on the boxes - those grey things). Try moving light over those and you can sort of see it working.
  • 0

#55 Adventus

Adventus

    GMC Member

  • New Member
  • 516 posts

Posted 10 August 2006 - 07:42 AM

There is a "sort-of" bumpmapping on the barrels, crates and boxes (looks best on the boxes - those grey things). Try moving light over those and you can sort of see it working.

Yea in the example the "bumpmapping effect" is really under utilised, But you can get some really good 3d looking effects using it. Try changing (darkening) the overlays in the example to get a more extreme effect.

Would it be possible to make the ambient light not that dark ? I would like the default light level a bit lighter.

By the way, impressive lighting engine.

Thanks and yes, you can easily change the ambient colour by manipulating the variable "global.LS_ambient". A lighter ambient colour obviously corresponds to a lighter background, so "global.LS_ambient=make_color_rgb(100,100,100)" would be really bright.

Cheers,

Edited by Pheonix101, 10 August 2006 - 07:43 AM.

  • 0

#56 Archville

Archville

    GMC Member

  • New Member
  • 10 posts

Posted 12 August 2006 - 12:00 PM

Hello again. Thanks for the help.

Just one suggestion for the next version...
¿ Could you make it so "Treat unitialized variables as value 0" is not needed anymore ?

I have problems using your engine at the same time as a transitions engine that requires some variables to not exists when the game starts. I have it fixed now by changing !variable_exists to variable = 0 on the other engine.

EDIT...
¿ Can alpha values be applied to the shadows ? I would like them to fade in/out as my player is near/far of them.

Edited by Archville, 12 August 2006 - 12:04 PM.

  • 0

#57 wnston

wnston

    GMC Member

  • New Member
  • 22 posts

Posted 12 August 2006 - 07:02 PM

Nice engine
but when i come back from my screensaver i get an error :P :P :)
ERROR in
action number1
end step event
for object obj_lightengine
Trying to use non-existing surface
i can use it if it is fixed you are already in the credits :P
  • 0

#58 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 14 August 2006 - 01:14 PM

I like the Engine too and I'm actually using it in my game too. But i have a question. Is there a possibility to make a Luminance tracker in it. It would be a lot of help to create a smart AI wich i need of course. So if you already have it or you can create it, then it would be a lot of help.

Edited by dender, 14 August 2006 - 02:45 PM.

  • 0

#59 Adventus

Adventus

    GMC Member

  • New Member
  • 516 posts

Posted 15 August 2006 - 09:48 AM

¿ Could you make it so "Treat unitialized variables as value 0" is not needed anymore ?

Yea that error has had me fooled for a long time although im pretty sure the next version has it fixed. It occurs in the Shadow update script.... and thats pretty much all i know at the present, maybe a duplicate variable or something... ill look into it.

¿ Can alpha values be applied to the shadows ? I would like them to fade in/out as my player is near/far of them.

Simply put, yes although im not sure it will give you the effect you want. If you set "draw_set_alpha(alpha)" before the shadow update script it will cast them lighter.... but as i said its likely to give strange results.

Nice engine
but when i come back from my screensaver i get an error

I dont think this error is my fault, probably your screensaver is overwriting my (or GM's) surfaces and throwing that error. All i can suggest is dont use screensavers.

I like the Engine too and I'm actually using it in my game too. But i have a question. Is there a possibility to make a Luminance tracker in it. It would be a lot of help to create a smart AI wich i need of course. So if you already have it or you can create it, then it would be a lot of help.

Ahh yes this is quite easily achieved, i havent tested but this should work.
//L2S_luminance(x,y)
//argument0= x position in room
//argument1= y position in room
return color_get_value(
surface_getpixel(
global.LS_lightmap,argument0-view_xview,argument1-view_yview))
But remember that you can only grab values that are actually on screen at the moment.

Cheers,

Edited by Pheonix101, 15 August 2006 - 09:49 AM.

  • 0

#60 dender

dender

    GMC Member

  • New Member
  • 308 posts

Posted 15 August 2006 - 10:43 AM

Tnx it worked and it's perfect (Y)

Edited by dender, 15 August 2006 - 11:49 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users