Page 1 of 1

I need a light halo texture

Posted: Mon Dec 04, 2006 9:00 am
by Diedel
I need a texture to create this spiked halo around bright lights. Shouldn't be too hard to do. 512x512 preferred, with decreasing alpha towards the outer regions of the halo. Anybody? :)

Posted: Mon Dec 04, 2006 9:42 am
by DarkFlameWolf
so we're doing coronas/light blooms now around lights? That'd be cool.

we should have bloom effect in D2. j/k :P

Posted: Mon Jan 08, 2007 12:53 am
by novacron
Can you give me an example of what you need?

Posted: Mon Jan 08, 2007 3:42 am
by Diedel
Just a texture I can overlay on a light creating a corona effect. 512x512 would be cool. Maybe a white, yellow, red and green one (the colored ones not too strong), if possible? :)

Posted: Tue Jan 09, 2007 7:22 am
by DarkFlameWolf
If this will look as good as I imagine it will in D2, I am salivating over this new feature.

Posted: Tue Jan 09, 2007 7:57 am
by Diedel
/Diedel reaches a towel to DFW :P

Nova,

basically I thought of a big, white, round spot, transparency increasing towards the periphery, with some rays of slightly different length moving radially out in a somewhat irregular pattern.

Just imagine kind of a light bloom effect around a lamp.

Posted: Thu Jan 11, 2007 9:39 am
by Shadowfury333
Diedel wrote:Just imagine kind of a light bloom effect around a lamp.
Why don't you just code post-processing effects?

Posted: Thu Jan 11, 2007 10:21 am
by Diedel
Because I don't know how to do that.

Posted: Thu Jan 11, 2007 12:40 pm
by heftig
Diedel wrote:Because I don't know how to do that.
I don't know either, but I just googled for "bloom opengl" and found this as first result:

http://harkal.sylphis3d.com/ ... bloom-for-hdr-rendering/

It contains no code, but it describes an impressive bloom technique, so at least it's a start.

edit: I recreated the technique in Photoshop and used it on some images from your worklog.
ImageImageImage
You'd have to render the Bloom before the HUD, of course. ;)

Posted: Thu Jan 11, 2007 3:15 pm
by DarkFlameWolf
/me drools

all we need now is fog effects and we're all set for a recreation of Descent 3 in Descent 2. :P

Posted: Thu Jan 11, 2007 3:47 pm
by Duper
lol...\"drool\"??? heh. looks like someone smeared finger prints all over the inside of the canopy. ... I gotta keep the kids outta my pyro. >:(


;)

Posted: Thu Jan 11, 2007 4:24 pm
by Diedel
Sorry, but either I get some code I can easily adopt, or I will not add this.

Posted: Thu Jan 11, 2007 4:32 pm
by fliptw
you'd need programable shader support in order to implement bloom or 16-bit HDR.

for the coronas... lens flare on a transparent background?

Posted: Thu Jan 11, 2007 6:04 pm
by Diedel
flip,

I know the theory, but I am not gonna dig through half-baked internet tutorials for weeks and months again to get this done.

Actually I think it would be sufficient to stick a corona on the brightest lights. That would look better than the overly bright bloom demo pics posted above.

Posted: Thu Jan 11, 2007 9:34 pm
by Shadowfury333
Diedel wrote:Actually I think it would be sufficient to stick a corona on the brightest lights. That would look better than the overly bright bloom demo pics posted above.
Well, you would have to set a rather high brightness threshold for the blooming. To be perfectly honest, I only suggested it because it would be soft-coded, but I was rather worried about it being overdone. I've seen several games use this effect and only Company of Heroes comes to mind as one that did it right.

Posted: Fri Jan 12, 2007 5:41 am
by Diedel
Shadowfury,

if I wanted to do this, I'd either have to render the current frame to a texture (fast) and disable shadows (ATI doesn't support stencil buffering w/ render to texture), or grab the frame from the frame buffer (slow).

Then I'd have brightness filter it, downsample it, up-sample, blur and render it over the frame several times.

Performance? D'uh.

Coding? More d'uh. It's a plain PITA to find good coding examples for any kind of gfx programming on the inet. The stuff is either so advanced and complete (entire rendering engines) that it's a major task to dig through it, or so imcomplete that it takes me weeks to get everyting together from experimentation and bits of information from several sources. I am just not such a gfx coding pro that I could pull this out of my sleeve in a day (or even a week).

Posted: Fri Jan 12, 2007 7:28 am
by Richard Cranium
While you’re at it you should add in the distortion you see when looking at objects on the other side of radiant heat waves.

Posted: Fri Jan 12, 2007 7:52 am
by DCrazy
Yeah, and light refraction due to humidity. :P

Posted: Fri Jan 12, 2007 10:43 am
by Diedel
Hm. I have dug up a nice free soft shadow renderer on the inet recently. If I manage to integrate it into D2X-XL, you are all up to a big, pleasant surprise. That thing is a complete renderer with particle engine and everything.

Posted: Fri Jan 12, 2007 7:17 pm
by Shadowfury333
Diedel wrote:Hm. I have dug up a nice free soft shadow renderer on the inet recently. If I manage to integrate it into D2X-XL, you are all up to a big, pleasant surprise. That thing is a complete renderer with particle engine and everything.
Is that the research site I mentioned, or is this something else?

Also, for the Bloom, why would you need to down/up-sample the image, or render the blur multiple times?

Posted: Fri Jan 12, 2007 7:56 pm
by Diedel
Don't you read the stuff you post links to for me? ;)

Posted: Fri Jan 12, 2007 11:08 pm
by Sirius
DCrazy wrote:Yeah, and light refraction due to humidity. :P
Good point.

I realise that it may not always be easy to be completely sure what you're asking for, but at least consider before asking for features; how would it be done?

In the case of light distortion due to radiant heat, that's not only a technically difficult effect to implement (even Oblivion doesn't have it), it also relies on data that isn't there - that is, how hot the area is and where the heat is coming from.

Thus you'd need to precalculate that from the level geometry and presence or absence of lava... seriously, it'd be quite a mission.

Just remember, Diedel is not doing this for a job and is unlikely to consider features that are extremely time-consuming. :)

Posted: Sat Jan 13, 2007 1:17 am
by Kyouryuu
Well, if you wanted a quick and dirty way to do light coronas, I might suggest somehow hijacking Descent's sprite-rendering abilities for power-ups to support putting a sprite near a light. It would be like putting a shield orb next to a light fixture. :lol:

But blooming and HDR is definitely the way to go if you have the skills and time. The difference is night and day. :)

Posted: Sat Jan 13, 2007 1:46 am
by fliptw
that would require a rewrite of the engine, just for the sake of sanity.

there's nothing wrong with not releasing for a year, and spend some time adding some really nice stuff.

Posted: Sat Jan 13, 2007 3:07 am
by Diedel
Listen ppl,

what you actually want is a game engine with all the bells and whistles of today's gfx. That's something I just cannot do, because I lack the time.

If win a lot of money in a lottery, I will spend a few million euro bucks on creating such a game just for my pleasure (and it will have mouselook (toggleable) :P) ... ;)

Posted: Sat Jan 13, 2007 7:18 am
by DarkFlameWolf
yes, this is Descent 2, not Descent 3. (although its getting to the point it might as well be a lesser version of Descent 3. :P

Posted: Sat Jan 13, 2007 2:17 pm
by Kyouryuu
I don't know. In some ways it's better than Descent 3. Descent 2 always \"felt\" better. And since the gameplay is essentially the same, why invest two months making one Descent 3 map when you could make a half-dozen Descent 2 maps in that time?

... Diedel's Lunar Outpost Reloaded aside. :lol:

Posted: Sat Jan 13, 2007 3:37 pm
by Diedel
You can use the increased cube count and extra features to build a great singleplayer mission that just offers bigger environments, you don't need to go overboard with tiny details and what not.

LOR was a fun project to show what can be done with D2X-XL, if you want to. Nothing else. Think of it as a tech demo. Alright? You have said often enough that you don't like LOR. Can we leave it at that now? :)

Apart from that, I love the D2 gameplay as much as I dislike D3's gameplay. D3 is an unbalanced and ugly game for me. If I could, I would create a modern D2-like game with the exact D2 gameplay and graphics that would make everybody pea their pants with excitement. ;)

What D2X-XL definitely does not try is to recreate D3.

Posted: Sat Jan 13, 2007 5:26 pm
by heftig
May I ask which renderer you dug up?

Posted: Sat Jan 13, 2007 6:27 pm
by Diedel
It's called 'bleifrei', and is from some Swedish uni. There is a link somewhere in this forum area, but I knew it already.

Posted: Sun Jan 14, 2007 4:57 am
by Sirius
Kyouryuu wrote:Well, if you wanted a quick and dirty way to do light coronas, I might suggest somehow hijacking Descent's sprite-rendering abilities for power-ups to support putting a sprite near a light. It would be like putting a shield orb next to a light fixture. :lol:
In other words the D3 coronas? They were respectable.

Edit: Just realised there may have to be a significant difference. D3 dumped coronas on the middle of a face. It worked because that's how the lights worked.

There are some light textures in D2 which consist of two lights on a 20x20 face. Clearly the same strategy will not work, or the glare will be coming from... rock. Which doesn't make a lot of sense really.

Easiest solution I can think of - more data. For each texture just store the number of coronas and their UV positions on the texture. Probably not that technically difficult.

Posted: Sun Jan 14, 2007 7:26 pm
by Kyouryuu
Or actually place them one-by-one. Not all lights need coronas, after all. That would be the most flexible solution, albeit perhaps tedious to do.

It's not strictly a sprite like the power-ups are because you will likely want to take into account distance from player (coronas typically get larger the farther away you are) and if there are any obstructions (coronas usually fade out or disappear if they are behind something).

What I propose is essentially the way Descent 3 and Unreal Tournament do coronas.

Posted: Mon Jan 15, 2007 9:05 am
by DarkFlameWolf
*pounces Kyouryuu*

I'm still slowly working on my Descent 2 campaign, I've decided to shorten it a bit, but its much easier now that I can just simply set light textures anywhere and just let the editor do the shading for me. Its great, makes things so much faster. Just need to come up with some nice level designs, that's the hardest part.

Posted: Tue Jan 16, 2007 6:38 am
by Sirius
Tell me about it. :/

Posted: Tue Jan 16, 2007 6:53 am
by DarkFlameWolf
You're doing one too? awesome. Maybe we could work together! XD (read my PM)