lightning _NOT_ lighting

Started by
12 comments, last by ryacketta 21 years, 10 months ago
I have searched the forums and found numerous posts asking for help with lightning when they actual ment lighting *snicker* Well this is not one of those posts I am attempting to create (code) some realistic lightning effects to add to my currently short list of OpenGL experience. I was wondering if anyone out their in GDEV land knew of a solid tutorial/example/source I could look at to get some pointers/hints/ideas etc. Regards, Ron
Advertisement
I think the two terms "good looking" and "solid tutorial" doesn''t fit very well together, if we''re talking about those kind of highend effects

Seriously, it''s almost impossible to find good tutorials about this kind of stuff. The only good resource about realistic lightning I know is this paper: "Efficient Rendering of Lightning Taking into Account Scattering Effects due to Cloud and Atmospheric Particles" from Dobashi et al. You can download it somewhere on this site. The visual results are highly impressive, but have fun doing that in realtime (although it is possible)...

There are other resources, but they are almost all either very basic and not good looking, or lightyears away from realtime rendering...

You might also want to take a look here, down in the lightning section. They have some other resources listed there (besides the already mentioned Dobashi paper).

/ Yann
This article about on Gamasutra mentions (briefly) using particle systems for rendering lightning effects. Haven''t found any other resources so far, I don''t think it''s a very common effect in games yet.
You could probably do this pretty easily, and still have it look good. Why not just billboard a texture of a lightning bolt on a quad, self-illuminate it, and make it "flicker" in and out of existence for a few tenths of a second? You could get a _little_ more complicated and use a very simple particle system to allow the lightning bolt to branch... or you could get even more complicated and allow your particle system to randomly branch a random number of times, with each branch having a random lifespan... but all at "lightning" speed, in the most literal, non-pun sense possible.


use 2d smoothed noise
x = position (absolute, relative whatever)
y = time

http://uk.geocities.com/sloppyturds/gotterdammerung.html
Go to Nehe''s website (nehe.gamedev.net), the LOTR contest section. Download my demo (Brebion Flavien) plus the source code. Included there is a module to generate procedural lightnings, and display them in real-time. Granted, it''s not photorealistic, but the effect looks pretty nice in the demo, and the code is surprizingly simple. Hope that helps,

F. Brebion / Ysaneya
Looks like NeHe left out the source for that demo, I DL'ed the .zip and it only contains the application with no source.

-Ron

Nevermind, I am a complete idiot!
I DL'ed the Demo not the source *sigh*



[edited by - ryacketta on May 31, 2002 11:25:33 AM]
Flavien,

Thanxs for your help! After reading more of the lightning code I am able to have a more precise control over the lightning effect.

To all:

I started to look into collision detection, so that when a lightning bolt strikes (colides) with a surface a nice little particle efect takes place.

After searching for the past day and finding numerous collision detection alog''s and mounting a massive headache I caved in.

What would you recommend for a decent collision detection for the lightning?

Regards,
Ron
You can check my apps FellowshipZ and RainZ for some examples and source on lightning.

I used a series of quads w/ a procedural texture, randomly flashing, w/ ball lightning effects, and spark particles for collision w/ the ground.

Along w/ distance-cued thunder and ambient light increases.

zin

zintel.com - 3d graphics & more or less
zintel.com - 3d graphics & more or less
Zin,

One word for yah mate .... ACK!!...
my god, that thing is uncontrolable on my 2.2GHZ with 512MB RAM and Gforce 4.

The scenes fly by, you can not even tell what is what. I looked at the code and see no obvious way to slow this hunk of burning demo down. I am sure it is am awsome demo, but it runs way way to fast on my machine.

Hehehe bet that is a first?

-Ron

[edited by - ryacketta on June 5, 2002 6:53:34 PM]

This topic is closed to new replies.

Advertisement