|
Zaknafein
|
 |
« Reply #40 on: May 06, 2008, 02:33:10 PM » |
|
The filtering differs when using different data per-channel? How so? Gaussian blur works per-channel anyway, it's you're just doing the operation 4 times independently of each other... and since GPUs work on vectors, it shouldn't be much slower to do it on 4 channels instead of a single one.
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #41 on: May 07, 2008, 11:29:18 AM » |
|
The filtering differs when using different data per-channel? How so? Gaussian blur works per-channel anyway, it's you're just doing the operation 4 times independently of each other... and since GPUs work on vectors, it shouldn't be much slower to do it on 4 channels instead of a single one.
Hmm.. I've tested it with a standard gaussian blur and the results weren't satisfieing. If I remeber right, its been the shader from your landscape shadow mapping stuff - I was to lazy to write my own one  But doing it per channel/component worked greatly. Anyhow, I'm not going to pre-filter the shadow map anymore, since its very costly and I got satisfactory results with a five tap PCF. I will keep you up-to-date, when I got http://www.truevision3d.com/forums/shader_development/weird_custom_actor_shader_from_wiki-t17770.0.html to work 
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #42 on: June 15, 2008, 09:29:02 AM » |
|
So this thingy is actually working very nice!    I think I won't create an "example" for this, but I might release the source code of this, if there are enough people requesting it.
|
|
|
|
|
Logged
|
|
|
|
nAo
Community Member

Posts: 6
|
 |
« Reply #43 on: June 15, 2008, 12:10:41 PM » |
|
I found out that its a common issue of ESM with near shadows, which is unacceptable, since my player model only casts "near shadows". You just need to use an higher multiplier for you depth (before you compute exp(depth)) to remove this issue. Unfortunately the available range (before you overflow..) , but you can always resort to log filtering. More info and sample code on that on my blog, or you can have a look at the talk I gave to GDC in San Francisco last February (check the last part of the presentation) or you can read my article on ShaderX6 (but that's not free!  )
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #44 on: June 15, 2008, 01:04:00 PM » |
|
o_O I feel like god himself has spoken  I've already tried factors from 10 up to 85, but overdarkening the results is... crappy. It seems like this isnt a good solution. I have never been able to reproduce the things presented at GDC :/
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #45 on: June 15, 2008, 01:41:47 PM » |
|
Define "thingy"? PSSM, sure, but which filtering method did you end up using? Anyway it's looking great, and even though I have little use for shadow methods right now, I'm sure many people would be interested in the source (now and in the future). You should definitely release it! 
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #46 on: June 15, 2008, 03:03:55 PM » |
|
The role of the step function H(x) is to perform a depth test on all occluders, depth test results are then averaged together to obtain a filtered occlusion term. Hehe, that is exactly what I was doing a month or two ago  I replaced the binary test of PCF with your ESM stuff.. see: http://www.truevision3d.com/forums/indevelopment/parallel_split_shadow_mapping-t17694.0.html;msg121612#msg121612  Define "thingy"? PSSM, sure, but which filtering method did you end up using? I came up with a modified 3x3 PCF kernel, which works actually nice. Its almost the same as nAo desribed in his blog, but this ideas where independent of each other 
|
|
|
|
|
Logged
|
|
|
|
nAo
Community Member

Posts: 6
|
 |
« Reply #47 on: June 15, 2008, 07:18:53 PM » |
|
o_O I feel like god himself has spoken  I've already tried factors from 10 up to 85, but overdarkening the results is... crappy. It seems like this isnt a good solution. I have never been able to reproduce the things presented at GDC :/ Because you are doing the wrong thing. If you have read my article on ShaderX6 or my presentation at GDC you will see there are 2 different K multipliers involved in rendering ESMs. The multiplier used in the occlusion computations will overdark your shadow, but the other one (the one that is used to scale your depth BEFORE you pre filter it) will fix light leaks issues related to casters and receivers that are very close (but shadows will be sharper as well). Now, you are not exactly applying the whole ESM technique, as I understand you are not prefiltering, you are using the ESM occlusion formula to replace PCF which is not exactly a brilliant idea because you are bound to get light leaks everywhere. The function you use maps from 0 to infinite, while a step function maps from 0 to 1!!! If you want to simply substitute a binary depth test with something more soft you have plenty of choicesAs much as we'd like to we can't take only some ideas an from algorithm and expect them to work 
|
|
|
|
|
Logged
|
|
|
|
nAo
Community Member

Posts: 6
|
 |
« Reply #48 on: June 15, 2008, 07:21:01 PM » |
|
I came up with a modified 3x3 PCF kernel, which works actually nice. Its almost the same as nAo desribed in his blog, but this ideas where independent of each other  Actually the ideas are quite different. Your stuff filters shadows after the depth test, mine before the depth test (that's the magic sauce  )
|
|
|
|
|
Logged
|
|
|
|
munna
Community Member

Posts: 7
|
 |
« Reply #49 on: June 16, 2008, 12:33:38 AM » |
|
I think I won't create an "example" for this, but I might release the source code of this, if there are enough people requesting it.
I'm here! 
|
|
|
|
|
Logged
|
|
|
|
petrus
Community Member

Posts: 90
|
 |
« Reply #50 on: June 17, 2008, 05:12:34 AM » |
|
 HAHA - I'm also following your work... And also this very interesting looking title/game you have here - what's that about? 
|
|
|
|
|
Logged
|
|
|
|
|
Baiame
|
 |
« Reply #51 on: June 18, 2008, 12:50:50 AM » |
|
I think I won't create an "example" for this, but I might release the source code of this, if there are enough people requesting it.
Requested!
|
|
|
|
|
Logged
|
|
|
|
Omnicrash
Community Member

Posts: 45
|
 |
« Reply #52 on: June 18, 2008, 01:15:32 AM » |
|
Very nice stuff! I'd also be interested in the source.
|
|
|
|
|
Logged
|
|
|
|
|
JohnB
|
 |
« Reply #53 on: June 18, 2008, 10:08:36 AM » |
|
Me too - It's looking great!
John B.
|
|
|
|
|
Logged
|
|
|
|
GD
Customers
Community Member
    
Posts: 358
Josip Basic
|
 |
« Reply #54 on: June 18, 2008, 11:24:52 AM » |
|
Me also (currently I have no time doing my own). I would love to include it in TVSceneManager so people could have automatic shadow mapping with culling and stuff.
|
|
|
|
|
Logged
|
|
|
|
vbCrLf
Community Member

Posts: 307
|
 |
« Reply #55 on: June 18, 2008, 01:05:16 PM » |
|
Mietze, its look great, good luck with it! By the way, what is the game you are working on? It looks intresting  vbCrLf.
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #56 on: June 19, 2008, 12:44:41 PM » |
|
I would love to include it in TVSceneManager so people could have automatic shadow mapping with culling and stuff.
This is a good idea! I'd like to learn a bit more about space partitioning, too. Add me in ICQ under 172447765 and we'll see if this can work  By the way, what is the game you are working on? It looks intresting  And also this very interesting looking title/game you have here - what's that about?  I'll post more infos about that later, when we can release the first stable version. Please be a little more patient on that 
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #57 on: June 29, 2008, 07:31:27 AM » |
|
So this is how it actually looks after some improvements:  I'm still waiting for GD to discuss the integration into the TVSceneManger .. 
|
|
|
|
|
Logged
|
|
|
|
GD
Customers
Community Member
    
Posts: 358
Josip Basic
|
 |
« Reply #58 on: June 29, 2008, 11:16:42 AM » |
|
GD currently has zero free time, but will contact you as soon as he gets some!
|
|
|
|
|
Logged
|
|
|
|
Mietze
Community Member

Posts: 223
|
 |
« Reply #59 on: July 20, 2008, 05:17:59 AM » |
|
So finally I had some time to grab the code and share it with you! Please let me know if you have done something cool with it  I have translated most of the comments to English within the CParallelSplitShadowMapping-Class, but there are still German ones. I think this is enough to let you guess whats going on there...  Note that some parts of the code arent optimized. If you have an idea how to optimize them, PLEEEEASE let me know EDIT: lol... -> The message exceeds the maximum allowed length (20000 characters).
|
|
|
|
|
Logged
|
|
|
|
|