[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/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 - sun light in DP

sun light in DP

Discuss the construction of maps and the tools to create maps for 3D games.

Moderator: InsideQC Admins

sun light in DP

Postby toneddu2000 » Sat Apr 14, 2012 9:59 pm

Hi guys, do you know if there is the possibility to add a dynamic sun light in Darkplaces Engine? I know that is possible to use q3 shader q3map_sun key but I'd like to use a real dynamic sun, like far cry 2 engine. And, tied to the first question, is it possible to move dynamic lights in dp? For example, linked to an object, so when the object moves even the dynamic light moves and casts dynamic lights. Or linked to a swinging model, so when the model swings all the shadows are dynamically spread on the map (like a map in far cry 1 or doom 3)...groovy :)

thanks in advance
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby Seven » Sun Apr 15, 2012 1:16 pm

Hello toneddu2000,

I have no answer for you, but I want to lead you to 2 very interesting threads with a quite similar topic.

Please look in here:
viewtopic.php?f=6&t=4355

And here (see youtube clip in 1st post and 2nd post):
viewtopic.php?f=2&t=4274

Good luck.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: sun light in DP

Postby toneddu2000 » Sun Apr 15, 2012 5:05 pm

thank you for your input, Seven. I took a look even at Blood Ominicide code but, with no luck. I'm pretty sure DP can handle dynamic sun lights. Infact if you use r_editlights 1 and, pointing to a light, the light settings mask appears showing an "angles" value. I supposed tweaking angles I could transform a "spotlight" into a direct light, like sun, but altering those values it doesn't set any changes.
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby Spike » Sun Apr 15, 2012 7:45 pm

the problem with dp's lights is that you cannot configure the lights to cast shadows along parallel planes. That is, such a light will not be a near-infinite distance away from the ground. You might be able to have a high enough sky for it in rooms you make, but you'll see the shadows move weirdly on eg: start.

DP doesn't really do spotlights either. They're just cubemaps with all but one side masked out. They won't help you with realistic shadows.

You can use TENEBRAE_GFX_DLIGHTS to create a movable dynamic light.

self.light_lev = 3000; //really big light
self.color = '0.5 0.5 0.5'; //white light that won't wash out everything else
self.style = 0; //lightstyle, so it doesn't flicker
self.pflags = PFLAGS_FULLDYNAMIC; //so its visible even without a model
self.angles = vectoangles(lightdirection); //rotate the cubemap to face some spot
self.skin = 5; //cubemap number, cubemaps/%i%s.tga where %i is the skin and %s is some pos/neg etc thing.

then give it a think function and get it to move to some spot based upon the result of sin/cos.

like I say, I don't think cubemaps will be that useful to you, other than perhaps for simulating a cloud layer? so you probably want to set skin to 0.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: sun light in DP

Postby toneddu2000 » Mon Apr 16, 2012 10:46 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby Spike » Mon Apr 16, 2012 12:04 pm

cubemaps on lights can be used for projective texturing. its basically to model a filter or some such around the bulb/lightsource.
the most obvious example is when the lightsource is on the other side of a stained-glass window. with a texture on one side with the rest pure black, you can make it look like the light is shining through the window, when in fact its actually on the near side.
Another use is to project light as if it came from a florescent tube, or 4.
They're really just for projective texturing effects.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: sun light in DP

Postby toneddu2000 » Mon Apr 16, 2012 6:57 pm

ok now I understood. thanks Spike
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby goldenboy » Fri Apr 20, 2012 3:06 pm

If it can use lightmaps at the same time as dynamic light, you can use static sunlight.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Re: sun light in DP

Postby toneddu2000 » Fri Apr 20, 2012 10:32 pm

sorry but I didn't get your point, Do you mean by using q3map_sun in Radiant? Yes that would be the alternative. The only problem is that it's static light and doesn't dinamically lit monsters or dynamic objetcs
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby goldenboy » Sat Apr 21, 2012 2:16 pm

Yes, true. It would be mixed lighting, static and dynamic.

TBH I don't think static vs. dynamic sunlight in outdoor areas would make such a huge difference. Static sunlight will still cast shadows on geometry.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Re: sun light in DP

Postby toneddu2000 » Sat Apr 21, 2012 2:47 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby goldenboy » Sat Apr 21, 2012 6:23 pm

geometry = brushes etc.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Re: sun light in DP

Postby toneddu2000 » Sat Apr 21, 2012 10:46 pm

tried. With r_shadows 1 sun casts shadows even on characters but honestly are ugly. I think I don't to use open space on dp, at least until LordHavoc won't create dynamic sun lights! :)
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby toneddu2000 » Tue May 15, 2012 12:22 pm

is Darkplaces Engine. And this seems to be dynamic! How they did this?! :shock:
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: sun light in DP

Postby frag.machine » Wed May 16, 2012 2:30 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Next

Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest