Jump to content

Hi There

Welcome to Klub Exile. If you happened to make your way to the site either from Lovers Lab or a Search on Google, we are glad you found us.  To unlock the entire site you will need to have a account registered.  Don't worry it is free but in the mean time you can read up on why we made the site and other little tidbits.  Feel free to join or Discord Server also if you have any more questions.  Thanks for stopping by and See You on the other side.

admin admin

Update from 22.04.2018 - Separate shadows


pervokpetr

Recommended Posts

New update was sent:
- separate shadows
- shadow depth offset changes

separate shadows
Experimental algorithm, allow me separate shadows to static and dynamic, and static shadows rendered only once, which allow me preserve some performance. Actually I implemented this algorithm a 3~4 months ago, but it works only in debug version, when I did releasse compilation the shadows start glitching, all this month I tried again and again find reason for this glithes without success. Yesterday I found that problem was caused by hairworks, if hairworks object was last in shadow render list, because hairworks corrupt my render settings so finally I resolved this problem. This will work differently in depends from room, here some results:
1. Photostudio( couple objects, 3 spotlight, 1 omnilight):
   - old shadows - 110 fps
   - separate shadows 110 fps
   - performance gain 0%
2. Siberia's "Light Show" ( ~30 objects, 1 spotlight, 3 omnilight )
   - old shadows - 79 fps
   - separate shadows - 88 fps
   - performace gain - ~10 %
3. Siberia's large room ( lot of hypoly objects, lot of lights )
   - old shadows - 50 fps
   - separate shadows - 80 fps
   - performance gain ~60%
As you can see method become effective with large amount object and lights, for now it used only for spotlights and omni lights, I'm think I will try it also for sun light later. To enable separate shadows algorithm use - iUseSeparateShadows in render settings of hook, if you will notice any bugs with shadows tell me. For now this method optional, but if there is will no be problem with it, I will make it constant.

shadow depth offset changes
Another long-long story of attempts to improve shadows precision, due to non-linear perspective projection objects that close to camera(or light) got more precise than distanced objects, I did a lot of experiments of various methods trying make linear depth distribution to get identical precise on all distance of light - no success. Almost accepted situation as it is, but then I saw (in new Berger room) that one of lights placed high enough from floor, clipped shadows from furniture - this made me mad and I again start to experiment with shadows code. Long story short - instead of trying linearize depth distribution, I decided to turn shadow_bias from linear to some curve....hmm not sure for 100%, but I'm think this works:
sorry large pic:

image.thumb.png.e151cd2d123041008fe88dce849d8b65.png

Need to test this version to I can know that I can move further.

Reason for crash:
nim604 April 24, 2018, 04:02:13 PM
It seems UseSeparateShadows is not compatible with MultithreadRenderEnable. One or the other works, immediate crash if both are set.
Cheers and thanks for your brilliant work!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

WARNING! Adult Only Content You must be 18 years of age or older to enter. By accepting you agree to Klub Exile's Terms of Use and Guidelines upon creating an account.