Page 1 of 1

How do I use shadow regions?

Posted: Sun Feb 26, 2017 4:53 am
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

Re: How do I use shadow regions?

Posted: Sun Feb 26, 2017 7:56 am
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 :)

Re: How do I use shadow regions?

Posted: Sun Feb 26, 2017 2:22 pm
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);
}

Re: How do I use shadow regions?

Posted: Sun Feb 26, 2017 4:47 pm
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 ^^

Re: How do I use shadow regions?

Posted: Sun Feb 26, 2017 4:56 pm
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.

Re: How do I use shadow regions?

Posted: Sun Feb 26, 2017 6:59 pm
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.