Page 1 of 1
Is there a way to add coronas to GzDoom's dynamic lighting?
Posted: Fri Sep 24, 2010 21:26
by jwaffe
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Fri Sep 24, 2010 21:49
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Fri Sep 24, 2010 22:06
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Fri Sep 24, 2010 22:15
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?
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 0:49
by Major Cooke
You mean things like this?
[spoiler]

[/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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 1:48
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 5:12
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 11:42
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).
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 12:42
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 }
}
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 15:42
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 17:09
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 18:00
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.
Re: Is there a way to add coronas to GzDoom's dynamic lighti
Posted: Sun Sep 26, 2010 19:55
by jwaffe
That doesn't seem to work, using both dynamic lights looks the same as only using one.