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.

DarkBASIC Discussion / DB Classic Lens Flare? Thankyou in advance

Author
Message
Drew Cameron
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: Scotland
Posted: 16th Jun 2004 18:27 Edited at: 16th Jun 2004 18:33
Never mind! I cracked it...

Simply needed to find out the midpoint of the line through the center but finally remembered that I got taught in Higher Maths a few years ago. I never thought any of my highers would actually be useful

Sorry mods

The Old Remedy 3D Skateboarding - http://www.ddrw.dbspot.com
* * * Coming December 1st - "Dumbo"...
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 16th Jun 2004 21:41
Good job!
................Care to share your wisdom?

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Drew Cameron
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: Scotland
Posted: 16th Jun 2004 23:04
Alright, off the top of my head...

Let 100 be the light source object number (sun, whatever...)
I assume you have a screen resolution of 640,380
Image numbers 1,2,3,4 are the lens flare images



That might not work entirely, but the theory is correct... I was thinking of finding the midpoint of a line when it hit me how obvious it was

The Old Remedy 3D Skateboarding - http://www.ddrw.dbspot.com
* * * Coming December 1st - "Dumbo"...
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 17th Jun 2004 05:19
Awesome!

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Jun 2004 12:51
You might have trouble using sprites, the usual method is to lock some plains to the camera and get a mock sprite system working so you can position these plains at screen locations - but your method should translate into 3D quite easily. I posted a lens-flare snippet a long time ago - but I imagine you'd find a 3D one in the codebase. A DBPro lensflare should migrate back to DBC without too much trouble.


Van-B


The nature of Monkey was irrepressible!.
Drew Cameron
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: Scotland
Posted: 19th Jun 2004 18:42
Thanks, but the sprites seem to be doing OK.
I should've looked in the codebase Didn't think of checking...

The Old Remedy 3D Skateboarding - http://www.ddrw.dbspot.com
* * * Coming December 1st - "Dumbo"...
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 22nd Jun 2004 17:58
I also got the same problem like you, and I decided to share my solution with others, so I posted a tutorial of lens flares that is practically AWESOME . You can found it on my code snippets section of my forum:

http://darkbasicforum.proboards3.com

You'll have to register though...

Login to post a reply

Server time is: 2025-05-26 02:49:36
Your offset time is: 2025-05-26 02:49:36