Shadow Regions don't affect Terrain?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Shadow Regions don't affect Terrain?

Post by jangoisbaddest »

I've been trying to produce a nighttime feel in my map through the use of a Shadow Region that's as big as the map (I'd use the Lighting tools in Zero Editor, but I don't want this nighttime effect for every gamemode). Now, everything seems to be effected except the terrain - I set the Top and Bottom Ambient color to the 30-30-30 range, and the terrain is just as bright as before. When I change the Ambient color in ZE, the terrain is indeed affected, so am I missing something, or is what i'm trying to do not possible (or should be done through other means)?
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

RE: Shadow Regions don

Post by jangoisbaddest »

Once again, I may not be making myself clear. My goal is to have one layer be quite dark (terrain and all), and another be normal, default lighting. Judging from th simple fact that ZE did not seem to differentiate between the two layers when i messed around with the lighting on one layer, I thought it was a global thing.
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

Look in the bf2_scripting_system docs. (I think) You can enable and disable ZE lights (under the lighting tab) via the script. But I think doing it to the sun makes a crash.

My suggestion then would be to have the sun not actually be a sun, just a light with distance, if you even need to specify a sun at all. Then just use to different sun-lights for the different modes. Wait...do you even specify a particular light as sun? I forget...

I wish there was a way to make shadow regions affect objects too. I'm trying to make the under-water area of my map dark, and retexturing is not an option and ZE lights might be to too much of a performance hog.
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Post by jangoisbaddest »

Okay, are ZE lights considered objects? Specifically omni lights? Because I had actually thought of this RIGHT after I posted my other thread and had gone to work: if there is a command to destroy/disable lights in the LUA, then all I have to do is set the global lighting settings and terrain color to the nighttime brightness, and then have a giant omni - light that is only active for the daytime modes. The only thing is....if lights are NOT objects, there may not be a function to disable them. I'll try it out. Meanwhile, if anyone knows of a specific function that can indeed affect lights in ZE, please feel free to share the information.

Edit: Blast! Looks like you can't use KillObject for lights. Hopefully there is some other function out there than can help.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

I was under the impression that terrain lighting was burned in at mungetime and was not affected by dynamic lights?
User avatar
Snork
Lieutenant General
Lieutenant General
Posts: 669
Joined: Thu Jun 07, 2007 3:34 pm
Games I'm Playing :: SWBF2 and Minecraft
xbox live or psn: No gamertag set
Contact:

Post by Snork »

wellll... you could just remove
SetMemoryPoolSize("EntityLight", 200)
from your LUA. I think that would work.
Post Reply