[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Add realtime lighting for DP in my map? & spotlights

Add realtime lighting for DP in my map? & spotlights

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Add realtime lighting for DP in my map? & spotlights

Postby lth » Mon Jul 20, 2009 9:54 am

So, two questions:

1. How do I add realtime lights to my map for use with darkplaces?

2. Is it possible to make realtime spotlights for DP, ie. light projected from a specific point with limited angles?

Thanks!
User avatar
lth
 
Posts: 144
Joined: Thu Nov 11, 2004 1:15 pm

Postby revelator » Mon Jul 20, 2009 10:16 am

1: rtlights can be added from inside darkplaces (editor built in).
2: as far as i know yes ?.

rtlights are seperate scripts since quake maps dont have the nessesary
data structures for the lighting information. A bit like lit's for colored lighting but uses cubemaps and specular highlights for reflection/depth and point light.

lord havoc can probably fill you in on the specifics since im not a mapper ;)
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby lth » Mon Jul 20, 2009 10:24 am

But can I add my rtlights in my level editor instead of having to apply them separately? If I can add spotlights, then how?
User avatar
lth
 
Posts: 144
Joined: Thu Nov 11, 2004 1:15 pm

Postby revelator » Mon Jul 20, 2009 10:36 am

not sure if it works from your level editor. rtlights where added years after quake was opensourced by lord havoc so im not sure if there are any editors capable of creating the scripts (i might be wrong since im not a mapper) :).

tenebrae was probably the first to add realtime lighting but the code was a mess and used entity scripting parsed from the maps with a console program which you then had to edit by hand. lord havoc added rtlights later and provided a built in editor to make the scripts from inside darkplaces so you could see the effect beforehand.

its as easy as loading your map in darkplaces then go into edit mode (sorry cant remember the command) and start plucking away at pointlights etc. untill satisfied ;). save after and you're done. you will get some extra files in the map folder called *.rtlight those are the scripts holding the lights.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby lth » Mon Jul 20, 2009 9:04 pm

User avatar
lth
 
Posts: 144
Joined: Thu Nov 11, 2004 1:15 pm

Postby revelator » Mon Jul 20, 2009 10:48 pm

it could probably be added but would break protocol with regular quake engines my guess is thats the reason why there has been some hesitation to do it.

i.e it would create more problems since not all use the same engine of choice :).

this was a reasonable middleway so to speak.

if you dont care about compatibility i can provide some work i done on the last tenebrae2 engine which uses Quake 3 map format and uses shaders for realtime lighting (can be added with most good Q3 map editors) the engine is far from done though but if someone picks up where i left it i think it could reach a usefull state for a custom engine pretty fast as the things remaining to fix are quite small.

most notable buggers it still has are weapon poking into the walls
animated models (roq format) has no collision detection and shadows sometimes cut off to soon.

minor bugs in the menu system which uses xml (flickers a bit) but is mouse driven and works a bit like doom3's.

its pretty fast on modern hardware.

i can link a copy with sourcecode sdk and a miniversion of industry (tenebrae mod) so you can have a look at what its capable of.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Mon Jul 20, 2009 11:29 pm

You can do it from worldcraft/etc, yes.
Use the r_editlights_importlightentitiesfrommap command to import them from the BSP. And then use the relevent command to save them.
Cubemaps can be set on lights by using the skin field (skin must be greater than 16 or so).
So yes, it can be done outside the game.
But if you do so, you can easily add too many lights or whatever and cause the game to run at a crawl. Or not enough.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby revelator » Tue Jul 21, 2009 10:21 pm

User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests