written by Fidcal
Grime corners are material shaders that give impressions of dirt and shadow at the edges and corners of surfaces. They are decals which need to be applied as patches over brush surfaces.
Use of grime corners decals can be time-consuming and tricky so it is not recommended you attempt to apply to every surface throughout your FM. Instead focus on dirty rooms such as cellars, dungeons; showcase rooms where you want them to look the best in the FM; and barely lit areas that have mostly or only ambient light - these areas can be 'lifted' and enhanced without needing lights so they don't look so flat and uninteresting. You need to consider where 'grimed' areas meet non-grimed areas. A non-grimed area can look odd next to a heavily grimed area that ends abruptly. Try to fade out the grime as best you can in-between.
This is basically how to apply grime corners decals....
Select some brush surface(s) Menu > Create decal patch will cover them with a patch. While still all selected pick a texture from: darkmod > decals > dirt > grime.... *see below Then while still selected hit 'fit' on the surface inspector. Now individually you need to adjust them. Some patches exactly fit the visible surface, say a blank wall or ceiling in a room. Others are on walls that are divided into different brushes. These need stretching to cover the wall. Others go on surfaces that go partly behind other brushes. These need resizing too to drag the edges of the grime patch to reach the edges of the visible surface
Most of these materials give a transparent rectangle that fades to dark at the edges and corners. Or if you like, it's a dark rectangle that fades to transparency in the middle.
I recommend for most cases use grime_corners_light for a reasonable average grime.
The original grime_corners is very dark; only use that in the grimmest darkest dirtiest places because it is completely black at the edges.
grime_corners_medium is a colorme. Ideally it would be named textures/darkmod/decals/dirt/grime_corners_medium_colorme I think but it cannot be changed now or it would break maps. What this means is you apply it then make the patch (or patches) a func_static. Then it is essential (or it won't show at all) to give the func_static entity the property _color and values like a light (can't use the color picker though) 3 values from 0 to 1. They are reversed brightness so 1 is black and 0 is invisible. You would use eg, 0.9 0.9 0.9 for fairly dark and say 0. 4 0.4 0.4 for light (it does depend where used how dark/light it looks though.) In addition you can set it's color. In Heart there are some pillars in the main hall that are a bit greeny as I recall. The color also is reversed. What you do is set say 0.99 0.99 0.99 (RGB) which is almost black. Then say you want the shadow/grime to be brown (dark red) you would turn DOWN the red component (which means you are turning it up from black you are adding a bit of red. So 0.7 0.99 0.99 might be dark brown.
grime_full_light is the same as light above but constant throughout the rectangle. It does not fade to light. Sometimes useful for plugging a gap in a doorway between two rooms that have grime_corners_light on the floor ending abruptly at the doorway. We really need a new one that is colorme.
grime_corners_square_colorme is an inverse one and the dark area is in the middle fading to light at the edges. This is suitable for placing under pillars (and at the top) and also under some items of furniture etc to give a false shadow especially where there is only ambient light. For example, you might have an outdoor area with an old table in a gloomy corner with only ambient light. The floor under the table and the wall behind might look rather light because the human eye expects it to be darker even in ambient light. Like 'medium' it's a colorme and the same rules apply - you need to give it _color.
Hints and tips
A great many applications of the above materials need some imagination and improvisation to scroll and rescale the texture where appropriate. Often you want just grime in one corner so have to enlarge the scale of the texture (not the patch) in surface inspector. Not that currently with Dark Radiant you *reduce* the scale to increase it on patches. As you do this one side of the shadow moves off past the edge. You might need to scroll it around if its the wrong edge or even rotate the patch.
Moderately small windows in the middle of a wall you can put the patch over the whole wall because the transparent part is over the window(s). Doorways are tricky. Sometimes you can improvise with three patches around the door. Other times it is best to bend one patch around the door (see Patches#Bend L Shapes) Note that after fitting such a patch, exit vertex mode then use 'fit' again on Surface Inspector.
L or U shaped rooms use the same method as around doorways.