Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ryacketta

lightning _NOT_ lighting

This topic is 5976 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
use 2d smoothed noise
x = position (absolute, relative whatever)
y = time

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!