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 Professional Discussion / dynamic lights on bsp

Author
Message
coderguy
23
Years of Service
User Offline
Joined: 17th Jun 2003
Location:
Posted: 26th Jun 2003 22:50
hey, i loaded a quake 3 bsp and i was wondering if it's possible to have lights affect it? i made a light, and have it repositioned wherever the camera moves, but no light is showing up on the bsp..any ideas?

just to make sure i'm setting the light up correctly, i've posted my code:

make light 1
set point light 1, CAMERA POSITION X(),CAMERA POSITION Y(),CAMERA POSITION Z()
set light range 1, 1000
color light 1, rgb(255,0,0)

any idea? can dynamic lights affect bsp in dbpro? thanks!
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 27th Jun 2003 00:08 Edited at: 27th Jun 2003 00:12
Currently BSP files are not effected by dynamic lighting commands, but one suggestion is, if you've got the tools like CShop, convert your BSP files, or original map files to .X models with base textures and Lightmapped textures. Loading your base texture model first, then loading the lightmapped .X model after and ghosting it, will create the desired effect of dyanmic lighting. You will lose the efficiency of BSP rendering though.

Just a thought.

EDIT: When using dynamic lighting, each surface of your BSP geometry will need to be meshed, i.e. multiple triangulated, otherwise only the whole surface is effected by lighting. What I'm trying to say is, if you had a flat surface that was made up of lots of smaller triangles, you will get a much better lighting effect than a surface that was just made up of two triangles. Hope that makes sence

MSI/AMD Athlon 1300, 256Mb, 60GbHD, SoundBlaster Live!, GeForce 4 MX440-64Mb, Win2K, DX9, DarkBASIC Pro(PUv4.1)
coderguy
23
Years of Service
User Offline
Joined: 17th Jun 2003
Location:
Posted: 27th Jun 2003 00:26
And what about projectiles that emit light? can .x files or bsp be dynamically lit by something like that? how is everyone achieving torch effects, etc with db? thanks very much for the help.

APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 27th Jun 2003 01:11
At the moment, as far as I can tell, most dynamically lit areas of maps from, say flares etc, are acheived using the light commands, and yes, they will work with .X based map files, but not with BSP. There's two approaches to this issue under DBPro.

1. Using two .X models of your map file, one with base textures and the other with lightmapped textures which is ghosted ontop of the base textures .X model. This method though is inefficient as you don't get the desired effect of surface removal on a large scale that you get with BSP. Using this method also requires that the .X model, with base textures is heavily triangulated to get the desired effect of dynamically lit areas of surfaces from moving light sources etc.

2. Using a BSP file as standard, both base and lightmapped textures combined. Also using an .X model ghosted ontop but the whole model is coloured white. This ghosted model can be used for the dynamic lighting, although I do not know if ghosted objects are effected by DBPro light sources, you will need to test this hypothesis. Again, your .X model ghosted ontop of the BSP level will need to be heavily triangulated to produce a desirable effect from moving light sources. Also note that DBPro is limited to the number of dynamic lights, although I understand that this is a hardware restriction and not a software limit. From my last reading, this is around eight dynamic lights. Using this method will require you to assign and reassign each of the available lights depending on where the user is located on your map file.

Hope this is useful info for you.

APEX!

MSI/AMD Athlon 1300, 256Mb, 60GbHD, SoundBlaster Live!, GeForce 4 MX440-64Mb, Win2K, DX9, DarkBASIC Pro(PUv4.1)

Login to post a reply

Server time is: 2026-07-17 23:54:19
Your offset time is: 2026-07-17 23:54:19