How do I use shadow regions?

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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

How do I use shadow regions?

Post by SkinnyODST »

What do shadow regions do and how do I use them? I have lots of trees in my map that don`t cast shadows, will shadow regions give them shadows?

I can`t seem to find a tutorial on them so if there`s already one out there somewhere can someone please link me it?

Thanks
User avatar
CT108
Rebel Sergeant
Rebel Sergeant
Posts: 186
Joined: Mon Aug 22, 2016 6:20 am
Projects :: None
Games I'm Playing :: CS2
xbox live or psn: Captain CT108
Location: Xanadu

Re: How do I use shadow regions?

Post by CT108 »

If you want your trees cast shadows, in zero editor, place the lighting and select at the left of your screen "cast shadows" (or "shadows", I don't remember but select the box xith "shadows" in the name :lol: ). This might work :)
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: How do I use shadow regions?

Post by Marth8880 »

The stock trees don't include shadowvolumes, primarily because of the way the branches are set up since they're large rectangular planes with a masked texture. In any regard, look at stock Endor for an example on how to implement tree shadows - specifically, look in the world's .fx file for WorldShadowRegion:

Code: Select all

Effect("WorldShadowMap")
{
	Enable(1);
	Texture("end_canopy");
	LightName("sun");
	TextureScale(70.0);	
	AnimationFrequency(0.1);
	AnimationAmplitude0(2.0, 0.0);
	AnimationAmplitude1(0.05,-0.1);
}
User avatar
CT108
Rebel Sergeant
Rebel Sergeant
Posts: 186
Joined: Mon Aug 22, 2016 6:20 am
Projects :: None
Games I'm Playing :: CS2
xbox live or psn: Captain CT108
Location: Xanadu

Re: How do I use shadow regions?

Post by CT108 »

Marth8880 wrote:The stock trees don't include shadowvolumes, primarily because of the way the branches are set up since they're large rectangular planes with a masked texture. In any regard, look at stock Endor for an example on how to implement tree shadows - specifically, look in the world's .fx file for WorldShadowRegion:

Code: Select all

Effect("WorldShadowMap")
{
	Enable(1);
	Texture("end_canopy");
	LightName("sun");
	TextureScale(70.0);	
	AnimationFrequency(0.1);
	AnimationAmplitude0(2.0, 0.0);
	AnimationAmplitude1(0.05,-0.1);
}
When I see your post, I have the impression that my answer was totally wrong ^^
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: How do I use shadow regions?

Post by Marth8880 »

CT108 wrote:When I see your post, I have the impression that my answer was totally wrong ^^
Your answer's not wrong, it just doesn't apply to the tree assets that come with the mod tools.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How do I use shadow regions?

Post by thelegend »

Shadow regions simply darken certain kind of objects in your map. Specially units, weapons and vehicles.
You can create them and assign them as "ShadowRegion". In ZE it will give you empty fields to fill: Top Ambient, Bottom Ambient Lighting, Dir 1 and 2 lighting intensity and even an env. map to apply.
I use them for places on my maps where no light falls in and no lights were set there. Darker corridors, places with a long roof or...simply to change the ambient colors of a certain place. But remember that the lighting (dir 1 and 2) still exist. You might want to create a new dir. light assigning them to bounding regions.
Post Reply