Some shadows in my map are kinda blurry and I want them to be a bit sharper, especially in certain areas.
Is there a way to do this? And if yes, will it decrease the performance?
Edit: If it helps, I am trying to get this working for a Left 4 Dead 2 map.
1
Re: Sharper Shadows
Posted by Niborius on Tue Mar 30th at 6:46pm 2010
Posted by Niborius on Tue Mar 30th at 6:46pm 2010
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Sharper Shadows
Posted by satchmo on Tue Mar 30th at 8:14pm 2010
Open up the texture application toolbox and change the view in 3D to "lightmap". Using the texture tool, select the surface that you want to adjust the sharpness of the shadow, and change the grid density. The smaller the number, the sharper the shadow.
As a reference, 32 is the default grid density. To make it relatively sharper, change it to 4. To make the shadow really sharp, set it to 2.
One thing to keep in mind when you modify grid density is that if you have two surfaces adjacent to each other and they have different grid density, the shadow falling on them can make the transition between the two surfaces look very obvious and ugly.
Making the shadows sharp does make a performance hit, and it also makes the .BSP file size larger. This is especially true if you change the grid density of a very large surface. So keep this in mind, and use it wisely.
Incidentally, if you want to improve performance and the shadow blurriness doesn't matter in some places, you can make the number bigger. Change it to 64 or even 128.

satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.
Occupation: pediatrician
Posted by satchmo on Tue Mar 30th at 8:14pm 2010
Accepted Answer
You have to adjust the lightmap grid.Open up the texture application toolbox and change the view in 3D to "lightmap". Using the texture tool, select the surface that you want to adjust the sharpness of the shadow, and change the grid density. The smaller the number, the sharper the shadow.
As a reference, 32 is the default grid density. To make it relatively sharper, change it to 4. To make the shadow really sharp, set it to 2.
One thing to keep in mind when you modify grid density is that if you have two surfaces adjacent to each other and they have different grid density, the shadow falling on them can make the transition between the two surfaces look very obvious and ugly.
Making the shadows sharp does make a performance hit, and it also makes the .BSP file size larger. This is especially true if you change the grid density of a very large surface. So keep this in mind, and use it wisely.
Incidentally, if you want to improve performance and the shadow blurriness doesn't matter in some places, you can make the number bigger. Change it to 64 or even 128.
satchmo
member
2077 posts
396 snarkmarks
Registered: Nov 24th 2004
Location: Los Angeles, U.S.

Occupation: pediatrician
Re: Sharper Shadows
Posted by G4MER on Wed Mar 31st at 7:37am 2010
Posted by G4MER on Wed Mar 31st at 7:37am 2010
As explained I think in this youtube vid.
Re: Sharper Shadows
Posted by Le Chief on Wed Mar 31st at 7:37am 2010
Isn't 16 the default?
Posted by Le Chief on Wed Mar 31st at 7:37am 2010
Quoting satchmo
As a reference, 32 is the default grid density.
Isn't 16 the default?
Re: Sharper Shadows
Posted by Niborius on Wed Mar 31st at 1:22pm 2010
Thanks man, this did the trick.
I have one question though: some floor textures in my map have a rotation amount of 45. When a light is casted on them, they give these ugly blocky shadows.
Screenshot:

You can even still see this when I lowered the light grid thingy to 2:
Btw, if you wonder, those screenshots were not taken at the same place.
@Aaron: You're right, it is.
Posted by Niborius on Wed Mar 31st at 1:22pm 2010
Quoting satchmo
You have to adjust the lightmap grid.
Open up the texture application toolbox and change the view in 3D to "lightmap". Using the texture tool, select the surface that you want to adjust the sharpness of the shadow, and change the grid density. The smaller the number, the sharper the shadow.
As a reference, 32 is the default grid density. To make it relatively sharper, change it to 4. To make the shadow really sharp, set it to 2.
One thing to keep in mind when you modify grid density is that if you have two surfaces adjacent to each other and they have different grid density, the shadow falling on them can make the transition between the two surfaces look very obvious and ugly.
Making the shadows sharp does make a performance hit, and it also makes the .BSP file size larger. This is especially true if you change the grid density of a very large surface. So keep this in mind, and use it wisely.
Incidentally, if you want to improve performance and the shadow blurriness doesn't matter in some places, you can make the number bigger. Change it to 64 or even 128.
Open up the texture application toolbox and change the view in 3D to "lightmap". Using the texture tool, select the surface that you want to adjust the sharpness of the shadow, and change the grid density. The smaller the number, the sharper the shadow.
As a reference, 32 is the default grid density. To make it relatively sharper, change it to 4. To make the shadow really sharp, set it to 2.
One thing to keep in mind when you modify grid density is that if you have two surfaces adjacent to each other and they have different grid density, the shadow falling on them can make the transition between the two surfaces look very obvious and ugly.
Making the shadows sharp does make a performance hit, and it also makes the .BSP file size larger. This is especially true if you change the grid density of a very large surface. So keep this in mind, and use it wisely.
Incidentally, if you want to improve performance and the shadow blurriness doesn't matter in some places, you can make the number bigger. Change it to 64 or even 128.
Thanks man, this did the trick.
I have one question though: some floor textures in my map have a rotation amount of 45. When a light is casted on them, they give these ugly blocky shadows.
Screenshot:

You can even still see this when I lowered the light grid thingy to 2:

Btw, if you wonder, those screenshots were not taken at the same place.
@Aaron: You're right, it is.
Youtube Channel: https://www.youtube.com/c/Nibgames
Re: Sharper Shadows
Posted by Crono on Thu Apr 1st at 2:07am 2010
Posted by Crono on Thu Apr 1st at 2:07am 2010
A lot of the lighting in L4D2 appears to actually be dynamic. As far as I can tell, some of the shadow artifacts are due to shadow map resolution. I haven't, personally, seen any way to increase the resolution on them in L4D2. If you could, it would be controlled by the end-user.
Other than that, all static shadows would be controlled by the light map texture resolution of the surface the shadow is being projected onto, maybe there's some issue that's being overlooked in respect to this.
If it is a dynamic light problem and there's no user setting to alter the resolution of the shadow maps used, you're pretty much stuck with those blocky blurred shadows. I guess, if you did some experimenting and found out how it chooses what light sources have dynamic shadows and which ones don't you'd be able to better control it. But, even in L4D1 a lot of the shadows were pretty ugly.
Other than that, all static shadows would be controlled by the light map texture resolution of the surface the shadow is being projected onto, maybe there's some issue that's being overlooked in respect to this.
If it is a dynamic light problem and there's no user setting to alter the resolution of the shadow maps used, you're pretty much stuck with those blocky blurred shadows. I guess, if you did some experimenting and found out how it chooses what light sources have dynamic shadows and which ones don't you'd be able to better control it. But, even in L4D1 a lot of the shadows were pretty ugly.
Blame it on Microsoft, God does.
Re: Sharper Shadows
Posted by Le Chief on Thu Apr 1st at 6:09am 2010
Posted by Le Chief on Thu Apr 1st at 6:09am 2010
What sort of light is that nib? Normal light, spot light, dynamic light, environment light etc?
I've never noticed this problem in the "main" branch of the source engine (hl2/ep2) but this has something to do with the lightmap grid. When you rotate the texture you also are rotating the lightmap grid, the thing which helps determine lighting on brush based surfaces and it looks like it's resulting in poor shadows.
I've never noticed this problem in the "main" branch of the source engine (hl2/ep2) but this has something to do with the lightmap grid. When you rotate the texture you also are rotating the lightmap grid, the thing which helps determine lighting on brush based surfaces and it looks like it's resulting in poor shadows.
Re: Sharper Shadows
Posted by Niborius on Thu Apr 1st at 10:13am 2010
This is an environment light.
The odd thing is, that the lightmap grid does show up normally on that floor in hammer editor (it isn't rotated 45 degrees, but the texture is). In-game, it shows the light as if it was made on a 45 degrees rotated lightmap.
Edit: The floor lightmap grid does not show up normal in hammer editor. Not sure why I thought it did, but I just checked and it's rotated 45 degrees just like the floor texture.
Posted by Niborius on Thu Apr 1st at 10:13am 2010
Quoting aaron_da_killa
What sort of light is that nib? Normal light, spot light, dynamic light, environment light etc?
I've never noticed this problem in the "main" branch of the source engine (hl2/ep2) but this has something to do with the lightmap grid. When you rotate the texture you also are rotating the lightmap grid, the thing which helps determine lighting on brush based surfaces and it looks like it's resulting in poor shadows.
I've never noticed this problem in the "main" branch of the source engine (hl2/ep2) but this has something to do with the lightmap grid. When you rotate the texture you also are rotating the lightmap grid, the thing which helps determine lighting on brush based surfaces and it looks like it's resulting in poor shadows.
This is an environment light.
The odd thing is, that the lightmap grid does show up normally on that floor in hammer editor (it isn't rotated 45 degrees, but the texture is). In-game, it shows the light as if it was made on a 45 degrees rotated lightmap.
Edit: The floor lightmap grid does not show up normal in hammer editor. Not sure why I thought it did, but I just checked and it's rotated 45 degrees just like the floor texture.
Youtube Channel: https://www.youtube.com/c/Nibgames
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0123 seconds.

Snarkpit v6.1.0 created this page in 0.0123 seconds.



