Pages: 1 ... 25 26 27 28 [29] 30   Go Down
  Print  
Author Topic: "Outdoor shadows solution for Quest3D" (source code available for purchase)  (Read 104868 times)
June 04, 2012, 09:38:07 pm
In other words,
why doesn't the pssm just render shadows for the remaining NP instances that are visible
instead of culling all pssm_shadows?
This shadow pipeline is a bit tricky sometimes you should scale up shadow camera or change shadow camera distance. But at the end it will work.

ali-rahimi.net
June 04, 2012, 10:19:24 pm
Quote
The only trick which i know is to using 2 completely separate  Nature painter (one for shadow another one for render). You can paint your Nature painter then save it and import is again as a new one (Copy & past might not work properly according to my test's) This method should work
Thanks Ali.  Involves some redundancy, but better than 'no' solution!.

To be clear, you did mean to render NP_copy_1 as normal with culling=50
and render NP_copy_2 with culling=1700?

Quote
This shadow pipeline is a bit tricky sometimes you should scale up shadow camera or change shadow camera distance. But at the end it will work.
I attempted tweaking the shadow-cam distance yesterday but it had undesirable effects.
I decided it was a bad idea to retro-fit the shadow cam to fix the NP when all other
object shadows are fine.
June 06, 2012, 01:44:44 pm
To be clear, you did mean to render NP_copy_1 as normal with culling=50
and render NP_copy_2 with culling=1700?
Yes 2 separate NP, But its not worth at the end. The only real solution is Q3D5 new HW instancing. You just need to setup a management system for that (LOD and frustrum culling) and the end result would be far more better than any instancing method is Q3D 4.3

ali-rahimi.net
August 08, 2012, 10:27:06 pm
Is anyone using Viktors outdoor PSSM shadow solution in Q3d5 (32bit or 64bit)?

I can't solve the issue of wildly flickering shadows whenever your change the sun's position.
It occurs on both NVidia and ATI cards and with/without hardware shadow mapping.

It seems to be related to the last update that allows you to connect the new [Lightmap Shadow and SSAO] channel to non-shader objects. Prior to that update there wasn't a problem.

I don't think Viktor will be issuing a Q3d5 update so curious to know if anyone has encountered the same problem and found a solution.
August 08, 2012, 10:41:49 pm
Flickering when shadow is not updating per frame and moving sun?

ali-rahimi.net
August 08, 2012, 11:10:51 pm
Flickering when shadow is not updating per frame and moving sun?

The default/orig project setting uses RCL [Always].
Some channels in Viktor's last 4_3 release (source code version) are 'forced once per frame'
others are 'Continuous' and 'Once per frame'. Basically it has a mixture, so not entirely sure how to answer.

Nontheless, the flickering only starts when you're actually moving the sun_position the slider.

After you have stopped moving the sun the flickering will either stop (randomly) on a lit scene
or a blacked-out scene. All the objects in the scene are still there, but they have a completely black texture (presumably the abnormally calculated shadow map).

I had a look through the source files a while ago but the implementation is quite esoteric.
I followed the path of the sun_slider to see what other channels are affceted by changes to its value, but it didn't lead to any answers.

It probably needs Viktor's eyes but I don't think he has time to look into it.
August 08, 2012, 11:26:33 pm
You must edit and recompile pssm shadow code for 5.0. At first it will gave you an error, after editing and recompiling them all it should works fine. I did it with no problem.

ali-rahimi.net
August 08, 2012, 11:38:51 pm
Quote
You must edit and recompile pssm shadow code for 5.0. At first it will gave you an error, after editing and recompiling them all it should works fine. I did it with no problem.
I attempted it yesterday.

I recompiled:

(1) the two HLSL channels under the [Blur shadows] channel graph (pssm deferred shadows utility v1.cgr)

(2) the HLSL channel under the [Deferred Shadows] channel graph (pssm deferred shadows utility v1.cgr)

(3) the HLSL channel under the [Lightmap Shadow Only] channel graph

Unfortunately, it didn't make any difference, but I didn't fix the 30 or so remaining compile warnings that the compiler threw up. Not sure if that is a necessary step.

Did you get a spew of compiler warnings? I got loads, but no compile errors.

So to confirm,  you successfully:

- recompiled the three [HLSL] channels in 'pssm deferred shadows utility v1.cgr'

- published and ran the latest (last) released 4.3 'PSSM & SSAO Outdoor shadow solution' in Q3d5
  64bit / Win7

- ran the demo scene as expected without any flickering?


Could you tell me the file version number Viktor added to the top of the files for:

(a) Startgroup.cgr (mine is 2.4)
(b) ssao v3_4 source code.cgr (mine is 3.4)
(c) pssm deffered shadows utility v1.cgr (mine is 2.4)

Just to confirm we are compiling the same project.

Cheers.
August 09, 2012, 08:58:54 am
Also converted all uses of half to float which eliminated about 70%of the warnings.

Still left with those as shown in image (about 30 of them), and same shadowmap flickering.


* compilewarnings.jpg (84.83 KB, 683x146 - viewed 534 times.)
August 09, 2012, 09:14:03 am
Sorry. I hardly can remember what was the exact issue. What you can do is to break down each part and illuminate the issue. I am using the last update. If i open v24_4_3_OSSfQ3D_Skinned_character_nature_painter project directly in Q3D 5 shadow is flickering and it looks totally black. So indeed there is a conflict with Q3D5. Fixing all of those warning is the only think you can do for now. Then lets see what will happen.

ali-rahimi.net
August 09, 2012, 09:20:55 am
ok, thanks for checking.

p.s.
Cleared up the warnings, but not improvement.
August 09, 2012, 10:04:56 am
Are you using constant value for RefreshSM? It must be set always as a constant value (1) if you dont want to see any flicker when moving sun. Otherwise shadow will always flicker when moving the sun or rotating camera.

ali-rahimi.net
August 09, 2012, 10:35:07 am
[RefreshSM] was replaced by [ConstantUpdateOfShadowMaps], which is hardcoded to [1]
(tweak was recommended by Viktor).
March 04, 2013, 05:46:13 am
Quote
So indeed there is a conflict with Q3D5. Fixing all of those warning is the only think you can do for now. Then lets see what will happen.

Is anyone actually using Viktor's PSSM outdoor shadow solution (the very last 4.3 release) in Quest3d5?

I have never been able to use it in q3d5 due to flickering black shadows, particularly when the sun position is changed. Worst still, Viktor is no longer available so basically I am rather stuck.

I managed to debug the problem down to a channel called [Save colors into texture]
(in Perez clear sky.cgr). Disconnecting that group of channels will stop the wild black flickering over the whole scene, but the channel is required so that isn't a solution.

The earlier versions of PSSM don't have the same problem as the bug crept into the last
release which had some important updates. Unfortunately the VRM team no longer support their products, and given that I make extensive use of PSSM it is a problem to proceed any further.

If anyone has encountered this issue and resolved it I would appreciate the feedback.

Source versions from final release: 4_3 Update package.03.dec.2009:
ssao v3_4 source code.cgr (v3.4)
pssm deffered shadows utility v1.cgr (v2.4)



* savecolorsintotexture.jpg (156.39 KB, 695x775 - viewed 438 times.)
March 04, 2013, 07:42:20 am
Flickering issue only happen if you use that optimize update per 3 or n frame, and if you rotate the camera or change the sun position it might produce flicker. So my suggestions are
1. remove that part and use a constant update
2. You can change the pssm to cascade shadow map. They both works the same. the only different is that pssm save a bit more space for shadow areas. with cascade you don't need any of those crazy calculation. The trick for cascade is to move shadow matrix every n camera unit, and for that all you need is this formula: ROUND(A/B)*B
A is camera x and B is step range. And if all your objects are static you can even update the whole shadow rt based on this formula which will give you almost a shadow without any performance impact and it's not related to camera rotation too. Bigger splits must have a higher step range.

ali-rahimi.net
Pages: 1 ... 25 26 27 28 [29] 30   Go Down
  Print  
 
Jump to: