How to improve shadow quality

Started by DragonClaw
08/08/2011 05:55
Page 1 of 1
DragonClaw08/08/2011 05:55

Hello!
This is my first tut and since I haven't seen such one, I decided to go for it! :D
What I'm going to do is show you the use of some parameters which can help you get the most of the engine.
1. -bounce # - Set number of radiosity bounces.
Quoting ZHLT Command Reference:
[blockquote]This option sets the number of times light bounces in the radiosity pass. By the time the code gets to this point, all the data is precomputed, and extra bounces are very fast. It will make the shadows less harsh using more bounces, but can help light up dark areas much more naturally.[/blockquote]
I suppose I needn't saying more, you'll see some pics at the bottom.
2. -chop # - Set radiosity patch size for normal textures.
Quoting ZHLT Command Reference:
[blockquote]Each face in the world has a grid projected onto it, and chopped up into a rather coarse set of sample points. These points are patches, and are what HLRAD uses to do the bounced lighting calculations. A higher chop sacrifices quality for both speed and memory consumption of HLRAD. A lower chop increases the quality at the expense of speed and memory usage.[/blockquote]
I suppose many of you have been stumbled by the error MAX_PATCHES at some point. The default value for -chop is 64. As the quote says, higher ones decrease quality, but it's a handy way of evading MAX_PATCHES if you've no other alternatives (well, there is one more). Smaller values, however, improve shadow quality, but it is very likely that if your value (which must be divisible by 2) is very low, you'll get to the MAX_PATCHES error yourself.
And here comes another parameter which gives you a higher limit of patches.
3. -sparse - Enable low memory vismatrix algorithm.
Quoting ZHLT Command Reference:
[blockquote]The original vismatrix algorithm was limited to 65535 patches due to its design. Its memory usage also grew polynomially with the number of patches (patches * patches / 16 bytes). This option enables a compressed vismatrix, which at the cost of extra CPU time, breaks the 65535 limit, and also uses about 10% of the memory the vismatrix would.[/blockquote]
In addition - even though you'll have to wait quite a bit, you'll be able to do some activities on your PC as the time goes by, because it makes HLRAD use about half the capacity of your CPU. I don't know exactly how many more patches can we reach, but I've compiled a map with just over 235000 with no problem.
4. -texchop # - Set radiosity patch size for texture light faces.
Quoting ZHLT Command Reference:
[blockquote]Texture light faces are chopped with a different granularity than the normal faces, primarily so that the lighting looks good. Generally it should be half of the chop value. Adding -extra to HLRAD will automatically divide this value by 2 at runtime.[/blockquote]
5. -extra - Turns on 9 point oversampling for lighting, making it look much better.
Well, -extra is a very nice parameter, but I didn't quite liked it at first, because in one of my Bomb/Defuse maps it made a bunch of light bugs on the ground, which are incredibly obvious on lighter textures. On darker textures, however, and in kreedz maps it is more unlikely that -extra will cause you problems.

Here come a couple of example comparisons. And remember - if you're planning to use some of those parameters, they're time consuming and it's recommended to use them in final compiles.
[IMG]http://img34.imageshack.us/img34/1287/newpicture1xe.th.png[/IMG]
[IMG]http://img215.imageshack.us/img215/5110/newpicture3u.th.png[/IMG]

Just to give you an idea of how slower your map will compile - to make the screens I used my second kz_ project which is far from being finished but by using the parameters in the screens it takes 3875.48 seconds [1h 4m 35s] to finish. Where as on default settings, it takes 19 seconds to finish. Of course, if the map's bigger and has more patches, they will multiply the time and the difference may be bigger.

And if you find something wrong about the information or have different experience, please write. :)

Kic mapper18/08/2012 19:20(edited 18/08/2012 20:47)

Where to write these parameters ? :D

EDIT* found :)

nerv.08/10/2012 19:24

The secong image dont load , idk why , can you reupload it please?

btw very good tutorial , i knew some stuff but there are some nice info there =D

Page 1 of 1

Please log in to post replies.