I need a light halo texture

D2X-XL - Descent II update for modern systems with many new features and enhanced graphics. Home Page

Moderators: Grendel, Aus-RED-5

Post Reply
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

I need a light halo texture

Post 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? :)
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post 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
User avatar
novacron
DBB Ace
DBB Ace
Posts: 61
Joined: Thu Jul 28, 2005 6:25 pm
Location: CA
Contact:

Post by novacron »

Can you give me an example of what you need?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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? :)
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post by DarkFlameWolf »

If this will look as good as I imagine it will in D2, I am salivating over this new feature.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
Shadowfury333
DBB Ace
DBB Ace
Posts: 326
Joined: Mon Aug 09, 2004 8:36 pm

Post by Shadowfury333 »

Diedel wrote:Just imagine kind of a light bloom effect around a lamp.
Why don't you just code post-processing effects?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Because I don't know how to do that.
User avatar
heftig
DBB Ace
DBB Ace
Posts: 138
Joined: Mon Jun 05, 2006 9:55 pm
Location: Germany
Contact:

Post 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. ;)
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post 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
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post 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. >:(


;)
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Sorry, but either I get some code I can easily adopt, or I will not add this.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6458
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post 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?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
Shadowfury333
DBB Ace
DBB Ace
Posts: 326
Joined: Mon Aug 09, 2004 8:36 pm

Post 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.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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).
Richard Cranium
DBB Supporter
DBB Supporter
Posts: 1444
Joined: Tue Aug 07, 2001 2:01 am

Post 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.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Yeah, and light refraction due to humidity. :P
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
Shadowfury333
DBB Ace
DBB Ace
Posts: 326
Joined: Mon Aug 09, 2004 8:36 pm

Post 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?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Don't you read the stuff you post links to for me? ;)
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post 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. :)
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post 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. :)
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6458
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post 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.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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) ... ;)
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post 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
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post 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:
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
heftig
DBB Ace
DBB Ace
Posts: 138
Joined: Mon Jun 05, 2006 9:55 pm
Location: Germany
Contact:

Post by heftig »

May I ask which renderer you dug up?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post 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.
User avatar
Kyouryuu
DBB Alumni
DBB Alumni
Posts: 5775
Joined: Fri Apr 30, 1999 2:01 am
Location: Isla Nublar
Contact:

Post 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.
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post 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.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Tell me about it. :/
User avatar
DarkFlameWolf
DBB Admiral
DBB Admiral
Posts: 1022
Joined: Sat Mar 13, 2004 9:21 pm
Location: North Carolina

Post by DarkFlameWolf »

You're doing one too? awesome. Maybe we could work together! XD (read my PM)
Post Reply