Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / random lightning flashes

Author
Message
Guruchild
21
Years of Service
User Offline
Joined: 13th May 2003
Location: United States
Posted: 19th Jun 2003 13:03
I'm sure this is nothing remarkable and I'm sure it's been done before however in the course of working with some simple projects in DBPRO I created a decent simple random lightning environmental effect. Try playing with the values if it isn't working right for you. Remember, the colors used by the flash need to be brighter than the ambient and fog colors of your scene.

NOTE: If you run the program as-is you won't see much of a flash. For simplicty's sake I didn't include any media. The flashes fot in much better with landscapes that already exist. Just throw the lightning code into your loop and it should work. THEN you can play with the values.

Please forgive me if this code is inefficient or sloppy. Just something I plucked from my projects to offer.

Login to post a reply

Server time is: 2024-11-24 02:48:50
Your offset time is: 2024-11-24 02:48:50