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.

Newcomers DBPro Corner / Help on defining lots of glow in the dark 3D objects.

Author
Message
Out There Dude
21
Years of Service
User Offline
Joined: 30th Apr 2003
Location: United Kingdom
Posted: 12th May 2003 14:40 Edited at: 12th May 2003 14:41
I'm looking at creating a full on 3D laser light show using DarkBASIC 1.1.2 (Enhanced). Only problem is that I can only have 7 light sources at any one time when I want dozens, even hundreds of glow-in-the-dark objects to play with.

I've seen games using the kind of effects I'm looking for with big bright explosions, lasers and special FX that seem to glow in the dark independently of basic ambient lighting and fogging and that's what I would like to work towards, hence the above.

Little help here!
AsriCE
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Brunei
Posted: 12th May 2003 15:12
The number of lights that can be created in DB really depends on your graphic card. I've seen some DB games before that can have more then eight.

So as an alternative, you can try using textured ghosted plains instead of real lights as this will increase the performance several times.

Asri CE Crew

Anak Brunei!
Out There Dude
21
Years of Service
User Offline
Joined: 30th Apr 2003
Location: United Kingdom
Posted: 19th May 2003 16:52
According to the instructions I'm only allowed 7 light sources irrespective of what the system is capable of handling. Is there a way around this? :-s
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 20th May 2003 01:07
I dont see any way that you can have more than 7 light sources, however, you CAN turn the effect of fogging and ambient light on an object off:

set object ObjectNo, wireFrame, transparency, cull, filter, light, fog, ambient.

wireFrame, tranparency, cull, filter, light, fog and ambient are all flag values, i.e, they take 1 or 0. To set transparency on, set the value for it as 0 (I know, strange, but its the way). The ones you'll need are the light, fog and ambient flag. Light cam turn the object's sensitivity to light sources on/off, fog does the same for fog, and ambient does the same for ambient light. Play around until you get the optimal settings.

Whatever I did I didn't do it!
Out There Dude
21
Years of Service
User Offline
Joined: 30th Apr 2003
Location: United Kingdom
Posted: 20th May 2003 17:42 Edited at: 20th May 2003 18:03
Thanks everyone!

Yoda I talk like when drunk, yeess!
ozak
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Denmark
Posted: 26th May 2003 16:59
What you do normally, is that before you render each object, you enable the lights that affect it. When you render the next, you see if any lights have changed, and then update them. That way each object can be lit by up to 8 lights (usual limit), but you can have "unlimited" lights in the scene.

Regards

Ozak

ozak
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Denmark
Posted: 26th May 2003 17:00
Ups. Forgot.

Before you start talking about needing more than 8 lights for an object, forget it. It usually blends into a big mess, and doesn't look good. If you really must, another idea is to average the color of nearby lights into the ambient color.
So you could have 8 "real" lights + as many as you'd like, merged into the ambient color.

Regards

Ozak

Login to post a reply

Server time is: 2024-09-20 09:41:50
Your offset time is: 2024-09-20 09:41:50