Inside3D!
     

Controlling Sunlight and Sunmangle from engine?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Sun Nov 30, 2008 6:52 pm    Post subject: Controlling Sunlight and Sunmangle from engine? Reply with quote

Hi

Are there any commands to control sunlight and sunmangle from engine?
I want to make a day & night function.
Back to top
View user's profile Send private message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sun Nov 30, 2008 9:50 pm    Post subject: Reply with quote

How do you control a precompiled light variable?
Back to top
View user's profile Send private message
Downsider



Joined: 16 Sep 2008
Posts: 478

PostPosted: Sun Nov 30, 2008 10:46 pm    Post subject: Reply with quote

leileilol wrote:
How do you control a precompiled light variable?


Well that wasn't very clear of an answer if you don't really understand how the format works, but.. Yeah, unfortunately the shadows are baked into the map. Not very dynamic.
Back to top
View user's profile Send private message
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Sun Nov 30, 2008 11:44 pm    Post subject: Reply with quote

hmmmm

are there any other ways to make the map brighter or darker from engine?

r_fullbright makes the map bright
is it possible to change the brightness value of r_fullbright?
Back to top
View user's profile Send private message
Downsider



Joined: 16 Sep 2008
Posts: 478

PostPosted: Mon Dec 01, 2008 12:33 am    Post subject: Reply with quote

Stealth Kill wrote:
hmmmm

are there any other ways to make the map brighter or darker from engine?

r_fullbright makes the map bright
is it possible to change the brightness value of r_fullbright?


Well it certainly wouldn't cast shadows correctly, and I'm not sure if it's built in, but adding that feature into the engine should be pretty simple, just adjust the contrast between shadows/lights, right?

Forgive me if I'm totally wrong.
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Mon Dec 01, 2008 12:48 am    Post subject: Reply with quote

Stealth Kill wrote:
hmmmm

are there any other ways to make the map brighter or darker from engine?


I don't claim to know exactly what r_ambient does, but it controls the lightlevel or something in DarkPlaces maybe?

I think I've heard ppl talk about the cvar to make DarkPlaces less dark.

/Add: it looks like it is similar to r_fullbright except it can do it less than absolute fullbright. The range is (0-128)
Back to top
View user's profile Send private message
metlslime



Joined: 05 Feb 2008
Posts: 177

PostPosted: Mon Dec 01, 2008 1:24 am    Post subject: Reply with quote

lightstyle 0 controls all the static lights in the map, this can be set by quakec just like any other lightstyle. That's how the screen pulsed to black when you kill shub.

No way to control sunlight direction, though.
Back to top
View user's profile Send private message
KrimZon



Joined: 05 Nov 2004
Posts: 10

PostPosted: Mon Dec 01, 2008 4:51 pm    Post subject: Reply with quote

You could use different lightstyles for different lighting conditions (at its simplest, it could be day/night) and then change the levels of them to make a smooth transition between them. There'd be no way to change the sun direction without some heavy modification of the light program, but you could place lights to give the impression of the sun being in a particular direction. There's a limitation to the number of simultaneous lightstyles that can be used on a face though, iirc.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Mon Dec 01, 2008 8:46 pm    Post subject: Reply with quote

if its single player, you could make a trigger that turns off one light, turns on another, and centerprints "time passes" when they're inside somewhere.
but that's probably not practical.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Mon Dec 01, 2008 8:53 pm    Post subject: Reply with quote

Bigmap had three lights, one on each opposite (west/east) horizon and one directly above and it blended the three of these using lightstyle, so basically what KrimZon said. It looked okay, but Bigmap was essentially all cube shapes, and that's what it looks best on.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group