Is there a way to add coronas to GzDoom's dynamic lighting?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
jwaffe
Posts: 9
Joined: Wed Jun 02, 2010 18:30

Is there a way to add coronas to GzDoom's dynamic lighting?

Post by jwaffe »

I was really impressed by the look of Legacy's dynamic lighting.
Spoiler: legacy screenshot
I've heard the glowing orb in the center is called a corona, is there any way to get something like that in GzDoom?
Spoiler: skulltag screenshot for comparison
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Rex Claussen »

Actually, I believe a corona is the ring of light that appears around a light source as a result of diffraction, and occasionally because a solid object is mostly blocking the light source (as in a total eclipse).

However, I wonder if you may be asking for a light source that is denser at the center than at the periphery.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Gez »

We discussed about Legacy's coronas in this thread. The bottom line is that if Legacy's code was intelligible, it would have been added long ago.
User avatar
jwaffe
Posts: 9
Joined: Wed Jun 02, 2010 18:30

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by jwaffe »

Rex Claussen wrote:Actually, I believe a corona is the ring of light that appears around a light source as a result of diffraction, and occasionally because a solid object is mostly blocking the light source (as in a total eclipse).
yeah, the term seemed odd to me too.
However, I wonder if you may be asking for a light source that is denser at the center than at the periphery.
pretty much. A very dense ball of light in the center is what I'm looking for. I suppose I could add another, tiny point light, but I can't seem to add more than one light to a frame.

My pointlight definitions:

Code: Select all

Pointlight LandingLight
{
color 1.0 1.0 0.6
size 40
offset 0 27 0
}

Pointlight Landinglightflare
{
color 1.0 1.0 1.0
size 6
offset 0 27 0
}
And, my attempts to put them both on one frame:

I tried both of these, and both of them cause the dynamic lighting to not be rendered at all for the object.

Code: Select all

object ChexLandingLight
{
FRAME COLUA {light LandingLight}
Frame COLUA {light Landinglightflare}
}

Code: Select all

object ChexLandingLight
{
Frame COLUA {light LandingLight light Landinglightflare}
}

adding a comma between LandingLight and Landinglightflare also had no effect. Is it not possible to have two lights on the same frame?


EDIT - I think I know what that guy meant by coronas, I think he was referring to how the dynamic lights seemed to light up translucent sidedefs nearby. That's not what I'm trying to do, though. I just want that bright ball in the center.

hmm... does GzDoom support lens flares?
Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Major Cooke »

You mean things like this?

[spoiler]Image[/spoiler]

Those you'll have to create by hand with a program such as photoshop or (my favorite) 3DS Max as a sprite...

GZdoom renders them quite well, but just be careful of the settings you choose when you save them. I wouldn't go over 24-bit RGB if you use something like 3DS Max, because you'll notice a definite lag spike in FPS when it first displays the graphic. NEVER convert them away from PNGs because I can guarantee you, it will go and completely screw the image up. The ultimate question here is, "You CAN, but will it be worth it through hand-making as a sprite?"

And while they still may look nice and all, high effects like these you won't be able to fully replicate since OpenGL doesn't support them (i.e. refraction waves, pixel effects, and so on). So, really, don't expect much out of even nicely made things like this. Unless handled carefully, they will only be more of a burden than a benefit.

If you're talking about internally created, then no, it's not possible.
User avatar
jwaffe
Posts: 9
Joined: Wed Jun 02, 2010 18:30

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by jwaffe »

I tried doing something in photoshop, it looks ok, but not great

is there any way I can attach two dynamic lights to the same frame? Maybe if I put a really tiny one in there, it would look like a lens flare.
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by NeuralStunner »

jwaffe wrote:is there any way I can attach two dynamic lights to the same frame?
You could try binding one via GLDefs and another directly in Decorate with Light(), but I doubt that'd work.
jwaffe wrote:Maybe if I put a really tiny one in there, it would look like a lens flare.
Wouldn't. Dynamic lights are meaningless without something to shine on, and even in that case they light up whole sprites.
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Gez »

jwaffe wrote:is there any way I can attach two dynamic lights to the same frame?
No. The last defined wins and replaces the earlier one(s).
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Graf Zahl »

With a small trick you can. Have a look at this definition from lights.pk3:

Code: Select all

object BlurSphere
{
    frame PINS { light BLURSPHERE1 }

    frame PINSA { light BLURSPHERE2 }
    frame PINSB { light BLURSPHERE3 }
    frame PINSC { light BLURSPHERE4 }
    frame PINSD { light BLURSPHERE5 }
}
User avatar
jwaffe
Posts: 9
Joined: Wed Jun 02, 2010 18:30

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by jwaffe »

NeuralStunner wrote:Dynamic lights are meaningless without something to shine on, and even in that case they light up whole sprites.
you're right

At the moment, I'm out of ideas as to how to fake the effect. Lucius had an idea, maybe when he comes back, he'll have something figured out.

thanks anyway, though.
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Rex Claussen »

jwaffe wrote:At the moment, I'm out of ideas as to how to fake the effect.
You may have been on the right track earlier when you said:
jwaffe wrote:I suppose I could add another, tiny point light...
I know you meant that you wanted to achieve this through a (code) definition. However, try this:
1. At the point you want the denser sphere of light, use a dynamic light thing with a small radius and light value, say, [255, 255, 255]
2. Put another dynamic light things at the same x, y, z, coordinates as your first dynamic light, but with a larger radius and lower light value, say, [128, 128, 128].

I admit this is a gerry-rig mething of doing it, but it may serve.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by Gez »

If it works, you can automatize that by using replacement lights which use A_SpawnItemEx to create predefined dynlights at the correct places.
User avatar
jwaffe
Posts: 9
Joined: Wed Jun 02, 2010 18:30

Re: Is there a way to add coronas to GzDoom's dynamic lighti

Post by jwaffe »

That doesn't seem to work, using both dynamic lights looks the same as only using one.
Locked

Return to “GZDoom”