Shadows, Shadow regions, and other shadowy problems

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
ZoomV
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 308
Joined: Thu Aug 15, 2013 11:27 am
Projects :: Old Republic Map pack
Games I'm Playing :: BF2 SWTOR and GW2
xbox live or psn: No gamertag set
Location: Belsavis, Maximum Security Ward

Shadows, Shadow regions, and other shadowy problems

Post by ZoomV »

So I've been trying to improve the lighting in my maps but I have been having issues.

When I tried to use a shadow region in the Treefall cave, instead of making the cave darker I ended up with this eyesore.
Hidden/Spoiler:
Image

Also I have had these lines cropping up across my map, and I have no idea what's causing them. I'm thinking it might have something to do with the world shadow map, but I'm not sure how.
Hidden/Spoiler:
Image
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Shadows, Shadow regions, and other shadowy problems

Post by Marth8880 »

Shadow regions don't affect terrain or static objects like props (the CP's being affected because it's dynamic due to its special properties and junk). Use omni-lights or region-bound directional lights to light specific parts of terrain.

Edit:

Just realized that's not even terrain in the first image! :runaway: With that said, is your shadow region encompassing the entire Geonosis prop? Also, I took a look at the stock geo_prop_cave.msh.option file and it contains "-vertexlighting", which is likely the cause of your first problem. Does your prop's msh.option file still have this parameter? If so, try removing it.

In regards to your second problem, what does your world shadow map texture look like? :0 What are the WorldShadowMap effect settings set to in your map's ENVFX file?
ZoomV
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 308
Joined: Thu Aug 15, 2013 11:27 am
Projects :: Old Republic Map pack
Games I'm Playing :: BF2 SWTOR and GW2
xbox live or psn: No gamertag set
Location: Belsavis, Maximum Security Ward

Re: Shadows, Shadow regions, and other shadowy problems

Post by ZoomV »

World shadow map is stock endor, with stock endor settings in the file
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Shadows, Shadow regions, and other shadowy problems

Post by Marth8880 »

What happens if you disable it?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Shadows, Shadow regions, and other shadowy problems

Post by AQT »

ZoomV wrote:Also I have had these lines cropping up across my map, and I have no idea what's causing them.
I had a similar (if not the same) problem before and it was due to terrain cutters. Did you recently add any new terrain cutters to the map?
ZoomV
Rebel Warrant Officer
Rebel Warrant Officer
Posts: 308
Joined: Thu Aug 15, 2013 11:27 am
Projects :: Old Republic Map pack
Games I'm Playing :: BF2 SWTOR and GW2
xbox live or psn: No gamertag set
Location: Belsavis, Maximum Security Ward

Re: Shadows, Shadow regions, and other shadowy problems

Post by ZoomV »

Just the two terrain cutters from the geonosis cave asset

EDIT
Marth8880 wrote:What happens if you disable it?
If I disable the world shadow map, the lines go away.

EDIT: I think I figured it out. I changed the rotation of the main directional light to match the rotation of Endor's light, and the lines went away. Apparently the lines occur when the angle between the directional light and the terrain becomes too shallow.

EDIT2: The only way I can get it to not have the lines is to have the directional light have a identical rotation to the stock endor directional. Any deviation is causing the lines. :cpu:
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Shadows, Shadow regions, and other shadowy problems

Post by jedimoose32 »

Would you consider making your own shadow map and seeing how well that works?
Post Reply