Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-24 03:27:09



Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Problem with Shadows in 1.26.5.5 
Author Message

Joined: 2011-08-27 17:31:05
Posts: 98
Reply with quote
It looks like the new shaders from LL's 3.4 that you added to v1.26.5.5 have a bug when it comes to shadows. They exhibit an unwanted effect which is called "surface acne" if I remember this correctly. :)

The effect is that the surface seems to project a shadow on itself. There needs to be a corrective offset in the shadow-calculation when the shadow-distance from the light-source is compared with the distance from the camera to the surface of the object. Another reason may be that the precision of the shadow-map isn't high enough. This causes the shadow to sometimes start just above the surface instead of just behind it.

I have included part of a snapshot that illustrates this. As well as a logfile.

There is a workaround for this that can mask this effect at least partially. Enable Screen-Space-Ambient-Occlusion and set the Debug-Setting "RenderShadowBlurSize" to at least 3.0, better even to 4.0. That blurs the shadow enough so that the effect becomes almost invisible.

Info from Help/About below:
-------------

Cool VL Viewer 1.26.5 (5) Aug 25 2012 15:22:08 (Cool VL Viewer)
Release Notes

You are at 188773.7, 356270.6, 24.7 in The Connection located at sim3319.agni.lindenlab.com (216.82.18.182:12035)
Second Life Server 12.08.14.263480
Release Notes: Retrieving...

CPU: Intel(R) Core(TM) i7 CPU X 980 @ 3.33GHz (3337.54 MHz)
Memory: 12280 MB
OS Version: Microsoft Windows 7 64-bit Service Pack 1 (Build 7601)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce GTX 580/PCIe/SSE2
Windows Graphics Driver Version: 9.18.0013.0479
OpenGL Version: 4.2.0

libcurl Version: libcurl/7.21.1 OpenSSL/0.9.8q zlib/1.2.5 c-ares/1.7.1
J2C Decoder Version: KDU
Audio Driver Version: FMOD version 3.750000
Qt Webkit Version: 4.7.1 (version number hard-coded)
Packets Lost: 0/456 (0.0%)

Built with MSVC version 1600

Compile flags used for this build:
-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG /O2 /Oi /arch:SSE2 /MD /MP -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0 /DWIN32 /D_WINDOWS /W3 /EHsc /GR /Oy- /GS /arch:SSE2 /fp:fast /TP /W2 /Zc:forScope /Zc:wchar_t- /c /nologo /DLL_USE_TCMALLOC=1 /DLL_WINDOWS=1 /D_SECURE_SCL=0 /DDOM_DYNAMIC /DUNICODE /D_UNICODE /DWINVER=0x0501 /D_WIN32_WINNT=0x0501 /DCARES_STATICLIB /DLIB_NDOF=1


Attachments:
Snapshot_002.jpg
Snapshot_002.jpg [ 59.57 KiB | Viewed 3000 times ]
SecondLife_1.26.5.5.zip [17.3 KiB]
Downloaded 176 times
2012-08-25 15:21:51
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
I suggest that you reproduce this effect with LL's viewer and file a JIRA for it. I'm not going to fix rendering glitches myself. The aim of v1.26.5 is to stay in sync with LL's viewer.


2012-08-25 15:51:46
Profile WWW

Joined: 2011-08-27 17:31:05
Posts: 98
Reply with quote
I have just tried this with LL's 3.4.0 (263727) and with 3.4.1 (263920). Both work fine.

I also removed v1.26.5.5 completely. I even deleted the directory as the character sub-directory was still there after uninstall, and also deleted the file settings_coolvlviewer_1265.xml. Then I did a clean re-install of v1.26.5.5. The problem is still there.

It seems to be specific to 1.26.5.5. Or did I miss any other viewer from LL which I should try?

One other thing I found weird when trying LL's viewers... Even though I set them to the same graphic settings, to my big surprise LL's viewers gave me a MUCH better framerate than your viewer. It used to be the other way around. Cool VL viewer gives me about 25fps with shadows and SSAO, while LL's viewers give me about 38fps now. Is this because you aren't finished yet with porting LL's current codebase to Cool VL?


2012-08-25 17:16:23
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
Nicolette Lefevre wrote:
I have just tried this with LL's 3.4.0 (263727) and with 3.4.1 (263920). Both work fine.
.../...
It seems to be specific to 1.26.5.5. Or did I miss any other viewer from LL which I should try?
The new shaders have not yet been released (even the latest viewer-development v3.4.1 binary released on the 16 August doesn't yet have them). You'll have to wait till Oz triggers a new viewer-development build to test it.

Quote:
One other thing I found weird when trying LL's viewers... Even though I set them to the same graphic settings, to my big surprise LL's viewers gave me a MUCH better framerate than your viewer. It used to be the other way around. Cool VL viewer gives me about 25fps with shadows and SSAO, while LL's viewers give me about 38fps now.
In an "average" place (not render-heavy but not light either), with deferred rendering off, I get 33% higher frame rates with the Cool VL Viewer v1.26.5.5 than with v3.4.1 (62 fps against 45 fps), but with deferred rendering on, v3.4.1 is 17% faster (34 fps against 29fps).

Please, note that the Cool VL Viewer uses a (much) higher level of details (LOD) to render oblong sculpts (a fixed LOD of 4 instead of 2 or lower, depending on distance), it also got legacy clouds and water reflection for (all) clouds, which v3.3/4 don't have any more (it also got animating trees, but I do hope these were not enabled in your tests !). It also affects a RenderVolumLODFactor of 3.0 when the "Object details" is set to the max, against only 2.0 for LL's viewer. It also got the "Automatic Alpha masks (deferred)" on by default (off by default for LL's viewer)... You must take all of this into account when benchmarking (i.e turn legacy clouds off (and relog), use the same automatic alpha masks and RenderVolumLODFactor settings, no oblong sculpt around).
Also, please, do make sure to follow the "recipe" I posted here when benchmarking viewers, or you will get irrelevant and non-reproducible results...

EDIT: I almost forgot... The Cool VL Viewer also uses a lower discard level for animating textures (so that they don't stay blurry like with LL's viewer): so, no animating texture around while benchmarking, please !... And switch off the "Boost Attachments Textures" advanced setting too...

Quote:
Is this because you aren't finished yet with porting LL's current codebase to Cool VL?
v1.26.5 is an experimental branch, that still got issues and quirks (one of the biggest being that it can't render prims in Inworldz while LL's viewer can: it's definitively the result of a bug that I still have to discover and fix, and that could well be causing extraneous calls to functions and slow down the viewer).
This said, v1.26.5 currently got one difference as far as the renderer is concerned: the UI is not rendered in the same way (LL's viewer renders it in one big batch, while the Cool VL Viewer renders it in small batches, on the fly): this could explain the speed differences (since the GPU and the CPU each must do some work to render: depending which have to idle waiting for the other makes a big difference).


2012-08-25 20:32:20
Profile WWW

Joined: 2012-02-09 21:01:50
Posts: 284
Reply with quote
Can second that bug, was all well till 1.26.5.4. :)

1.26.5.5 looks like this:

Image


2012-08-25 21:06:31
Profile

Joined: 2011-08-27 17:31:05
Posts: 98
Reply with quote
Henri Beauchamp wrote:
The new shaders have not yet been released (even the latest viewer-development v3.4.1 binary released on the 16 August doesn't yet have them). You'll have to wait till Oz triggers a new viewer-development build to test it.

The file SecondLifeDevelopment.exe and all the shaders for it have time-stamps from 23-Aug and of about 9pm. Looking at http://hg.secondlife.com/viewer-development/changesets I can see no commits after that? I'm not familiar with how the development process works at LL, but it looks to me like I did my testing with the latest version.

Henri Beauchamp wrote:
Please, note that the Cool VL Viewer uses a (much) higher level of details (LOD) to render oblong sculpts (a fixed LOD of 4 instead of 2 or lower, depending on distance), it also got legacy clouds and water reflection for (all) clouds, which v3.3/4 don't have any more (it also got animating trees, but I do hope these were not enabled in your tests !). It also affects a RenderVolumLODFactor of 3.0 when the "Object details" is set to the max, against only 2.0 for LL's viewer. It also got the "Automatic Alpha masks (deferred)" on by default (off by default for LL's viewer)... You must take all of this into account when benchmarking (i.e turn legacy clouds off (and relog), use the same automatic alpha masks and RenderVolumLODFactor settings, no oblong sculpt around).
Also, please, do make sure to follow the "recipe" I posted here when benchmarking viewers, or you will get irrelevant and non-reproducible results...

EDIT: I almost forgot... The Cool VL Viewer also uses a lower discard level for animating textures (so that they don't stay blurry like with LL's viewer): so, no animating texture around while benchmarking, please !... And switch off the "Boost Attachments Textures" advanced setting too...

Ah, I already had legacy clouds off in Cool VL, but I wasn't aware of the other things. I wasn't intending to do a thorough benchmark. It was more like a quick observation. :)


2012-08-26 08:45:36
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
Nicolette Lefevre wrote:
Henri Beauchamp wrote:
The new shaders have not yet been released (even the latest viewer-development v3.4.1 binary released on the 16 August doesn't yet have them). You'll have to wait till Oz triggers a new viewer-development build to test it.

The file SecondLifeDevelopment.exe and all the shaders for it have time-stamps from 23-Aug and of about 9pm. Looking at http://hg.secondlife.com/viewer-development/changesets I can see no commits after that? I'm not familiar with how the development process works at LL, but it looks to me like I did my testing with the latest version.
Compare the files in app_settings/shaders and you will know for sure...


2012-08-26 08:56:11
Profile WWW

Joined: 2011-08-27 17:31:05
Posts: 98
Reply with quote
Cool VL was missing 3 pathfinding-related shaders from the development viewer. I doubted they had anything to do with this, but I copied them to the Cool VL shaders directory anyway. Still not working. If it had been that, it probably would have showed up in the logfile anyway as shaders failing to load.

I was unable to do a recursive compare through all the subdirectories (at least I couldn't find an easy way to do this), but they do contain the same number of files now with the exact same number of total bytes. So as another test I simply renamed the shaders directory of LL's development viewer to shaders.LL and copied the shaders directory from Cool VL to the LL viewer. The LL viewer still works fine.

I also tested it the other way around. Replacing the shaders directory of Cool VL with the original one from LL's development viewer. Cool VL still exhibits the same problem.

I think this conclusively proves that it is NOT the shaders themselves. It must be something else.


2012-08-26 09:37:38
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
Nicolette Lefevre wrote:
Cool VL was missing 3 pathfinding-related shaders from the development viewer. I doubted they had anything to do with this, but I copied them to the Cool VL shaders directory anyway. Still not working. If it had been that, it probably would have showed up in the logfile anyway as shaders failing to load.
The pathfinding shaders are not "missing", they are just useless (and won't be loaded if you add them anyway), since the Havok rendering code on which the navmesh rendering tool is based is not available to Open Source viewers.

Quote:
I was unable to do a recursive compare through all the subdirectories (at least I couldn't find an easy way to do this), but they do contain the same number of files now with the exact same number of total bytes. So as another test I simply renamed the shaders directory of LL's development viewer to shaders.LL and copied the shaders directory from Cool VL to the LL viewer. The LL viewer still works fine.

I also tested it the other way around. Replacing the shaders directory of Cool VL with the original one from LL's development viewer.
Strange, the Linux binary for v3.4.1 is still 3.4.1.263582 and dated 16 August, with the old shaders... Linux is again being ostracized, apparently...

Quote:
Cool VL still exhibits the same problem. I think this conclusively proves that it is NOT the shaders themselves. It must be something else.
And it can't be the code (same renderer, same shaders), so I had a look at the settings.xml file and indeed found out that settings that existed already for the v2.6 shaders have since been largely changed... Once synced with the v3.4 viewer's, the renderer behaves the same. You can grab the modified settings.xml file here and put it in place of the one in the app_settings/ directory of the viewer installation (be sure to reset all the settings you played with however, since these are stored in the user_settings directory). Alternatively, here is the diff file that you may use to spot and manually change the settings:
Code:
--- cv12656/indra/newview/app_settings/settings.xml   2012-08-22 20:16:17.000000000 +0200
+++ cv12657/indra/newview/app_settings/settings.xml   2012-08-26 19:52:30.000000000 +0200
@@ -9196,21 +9196,21 @@
     <key>RenderShadowGaussian</key>
     <map>
       <key>Comment</key>
       <string>Gaussian coefficients for the two shadow/SSAO blurring passes (z component unused).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Vector3</string>
       <key>Value</key>
       <array>
-        <real>2.0</real>
+        <real>3.0</real>
         <real>2.0</real>
         <real>0.0</real>
       </array>
     </map>
     <key>RenderShadowNearDist</key>
     <map>
       <key>Comment</key>
       <string>Near clip plane of shadow camera (affects precision of depth shadows).</string>
       <key>Persist</key>
       <integer>1</integer>
@@ -9226,23 +9226,23 @@
     <key>RenderShadowClipPlanes</key>
     <map>
       <key>Comment</key>
       <string>Near clip plane split distances for shadow map frusta.</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Vector3</string>
       <key>Value</key>
       <array>
-        <real>4.0</real>
-        <real>8.0</real>
-        <real>24.0</real>
+        <real>1.0</real>
+        <real>12.0</real>
+        <real>32.0</real>
       </array>
     </map>
      <key>RenderShadowSplitExponent</key>
     <map>
       <key>Comment</key>
       <string>Near clip plane split distances for shadow map frusta (x=perspective, y=ortho, z=transition rate).</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Vector3</string>
@@ -9281,21 +9281,21 @@
     </map>
     <key>RenderSSAOMaxScale</key>
     <map>
       <key>Comment</key>
       <string>Maximum screen radius for sampling (pixels)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>U32</string>
       <key>Value</key>
-      <integer>60</integer>
+      <integer>200</integer>
     </map>
     <key>RenderSSAOFactor</key>
     <map>
       <key>Comment</key>
       <string>Occlusion sensitivity factor for ambient occlusion (larger is more)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
@@ -9304,21 +9304,21 @@
     <key>RenderSSAOEffect</key>
     <map>
       <key>Comment</key>
       <string>Multiplier for (1) value and (2) saturation (HSV definition), for areas which are totally occluded.  Blends with original color for partly-occluded areas.  (Third component is unused.)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Vector3</string>
       <key>Value</key>
       <array>
-        <real>0.40</real>
+        <real>0.80</real>
         <real>1.00</real>
         <real>0.00</real>
       </array>
     </map>
     <key>RenderBumpmapMinDistanceSquared</key>
       <map>
         <key>Comment</key>
         <string>Maximum distance at which to render bumpmapped primitives (distance in meters, squared)</string>
         <key>Persist</key>
         <integer>1</integer>
@@ -9329,21 +9329,21 @@
       </map>
     <key>RenderNormalMapScale</key>
     <map>
       <key>Comment</key>
       <string>Scaler applied to height map when generating normal maps</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>F32</string>
       <key>Value</key>
-      <real>128</real>
+      <real>64</real>
     </map>
     <key>RenderCubeMap</key>
     <map>
       <key>Comment</key>
       <string>Whether we can render the cube map or not</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
@@ -9593,21 +9593,21 @@
   </map>
   <key>RenderShadowBiasError</key>
   <map>
     <key>Comment</key>
     <string>Error scale for shadow bias (based on altitude).</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0</real>
+    <real>-0.007</real>
   </map>
 <!--
   <key>RenderShadowOffsetError</key>
   <map>
     <key>Comment</key>
     <string>Error scale for shadow offset (based on altitude).</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>F32</string>
@@ -9765,21 +9765,21 @@
   </map>
   <key>RenderSpecularResX</key>
   <map>
     <key>Comment</key>
     <string>Spec map resolution.</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>U32</string>
     <key>Value</key>
-    <integer>128</integer>
+    <integer>512</integer>
   </map>
   <key>RenderSpecularResY</key>
   <map>
     <key>Comment</key>
     <string>Spec map resolution.</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>U32</string>
     <key>Value</key>
@@ -9787,21 +9787,21 @@
   </map>
   <key>RenderSpecularExponent</key>
   <map>
     <key>Comment</key>
     <string>Specular exponent for generating spec map</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>8</real>
+    <real>384.0</real>
   </map>
   <key>RenderDeferred</key>
   <map>
     <key>Comment</key>
     <string>Use deferred rendering pipeline.</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>Boolean</string>
     <key>Value</key>
@@ -9897,21 +9897,21 @@
   </map>
   <key>RenderShadowBlurSize</key>
   <map>
     <key>Comment</key>
     <string>Scale of shadow softening kernel.</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
-    <real>0.7</real>
+    <real>1.4</real>
   </map>
   <key>RenderShadowBlurDistFactor</key>
   <map>
     <key>Comment</key>
     <string>Distance scaler for shadow blur.</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>F32</string>
     <key>Value</key>
@@ -10312,21 +10312,21 @@
     </map>
   <key>RenderMaxNodeSize</key>
   <map>
     <key>Comment</key>
     <string>Maximum size of a single node's vertex data (in KB)</string>
     <key>Persist</key>
     <integer>1</integer>
     <key>Type</key>
     <string>U32</string>
     <key>Value</key>
-    <integer>8192</integer>
+    <integer>65536</integer>
   </map>
     <key>RenderMaxVBOSize</key>
     <map>
       <key>Comment</key>
       <string>Maximum size of a vertex buffer (in KB)</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
       <string>U32</string>
       <key>Value</key>


With the new settings file (that will be used for v1.26.5.7), the "shadow acne" disappears when Screen Space Ambient Occlusion is on or, when it's off, after increasing the RenderShadowOffset setting to 0.1.


2012-08-26 18:51:54
Profile WWW

Joined: 2011-08-27 17:31:05
Posts: 98
Reply with quote
I have now made a clean re-install of v1.26.5.6, then replaced the settings.xml file in the app-settings directory. I also deleted settings_coolvlviewer_1265.xml before first running it to make sure I start with the default settings. While this reduced shadow-acne considerably, it doesn't completely eliminate it. It still looks very different from what I see with LL's development-viewer. So there must be some other change.

Strangely I still see shadow-acne even with RenderShadowOffset set to 10.0. And with that big an offset that should NOT be possible at all.

One thing that I have found is about gpu_table.txt. Yours has 432 lines while LL's has 537 lines. Replacing yours with LL's didn't make any difference in rendering though. My graphics card is listed exactly the same in both ones, so I didn't expect any difference.

I'll keep looking. Gonna download the sources next. This is really bugging me... :)


2012-08-27 18:10:30
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.