Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable AmbientLight in a specific area?
Dalroc Offline
Member

Posts: 57
Threads: 2
Joined: Mar 2011
Reputation: 0
#1
Disable AmbientLight in a specific area?

I've just started working on a project and at one point I want the AmbientLight set to 0. AmbientLight is the nightvision kinda thing you get when you're in darkness.

My solution for the moment is to set AmbientLightIntensity = "0.0" in a custom game.cfg and do a full conversion, but that removes the AmbientLight for the whole game. I can work areound this by adding box lights with low intensity to simulate "nightvision".

Is there anyway to fiddle with this without making a full conversion or even better in just that specific area?
03-28-2011, 11:33 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Disable AmbientLight in a specific area?

Well you can add large-radius point lights with a very dark color (I used around 0.2 for each RGB field) and it will give you a low, ambient lighting feel. But it counts as a light source, so it will prevent sanity drain. Other than that I haven't much suggestions

Good luck
03-29-2011, 01:37 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#3
RE: Disable AmbientLight in a specific area?

I'm not sure if it would work, but you could use global variables. I have a feeling it wouldn't though.
03-29-2011, 03:03 AM
Find
Dalroc Offline
Member

Posts: 57
Threads: 2
Joined: Mar 2011
Reputation: 0
#4
RE: Disable AmbientLight in a specific area?

(03-29-2011, 03:03 AM)MrBigzy Wrote: I'm not sure if it would work, but you could use global variables. I have a feeling it wouldn't though.
Setting AmbientLightIntensity = ambientLight in the game.cfg and then add AddGlobalVarFloat("ambientLight", 0.5); in the script for the first map gives the same result as setting the intensity to 0, no nightvision.

Is that how you meant?

@palistov
Well you can work around the sanity problem by adding a function that slowly drains your sanity when in dark areas.. But that is a lot of extra scripting :/
03-29-2011, 12:15 PM
Find
gandalf91 Offline
Senior Member

Posts: 439
Threads: 13
Joined: Feb 2011
Reputation: 0
#5
RE: Disable AmbientLight in a specific area?

Really really dark lights still drain sanity...at least they seem to in my map. I have a box light in one area with RGB all around 0.03.
03-29-2011, 02:39 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#6
RE: Disable AmbientLight in a specific area?

<Player_Darkness

MinLightLevel = "0.15"

That's the point at which you drain sanity. I'm guessing R, G, or B can't be above 0.15.
And yea, I meant you use the variable to change the ambient light, but only in the areas you want it to. Did using it work?
(This post was last modified: 03-29-2011, 06:45 PM by MrBigzy.)
03-29-2011, 06:43 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#7
RE: Disable AmbientLight in a specific area?

Cool MrBigzy good tip. Smile
03-29-2011, 11:08 PM
Find




Users browsing this thread: 1 Guest(s)