View Issue Details

IDProjectCategoryView StatusLast Update
0027607Open CASCADEOCCT:Visualizationpublic2020-10-27 07:21
ReporterdbpAssigned Tokgv  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027607: Visualization - Implement adaptive screen space sampling in path tracing
DescriptionTODO
Steps To ReproduceActivating the feature
vrenderparams -iss

Activating debug mode
vrenderparams -issd
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • pathtrace_amd_700.png (522,516 bytes)
  • pathtrace_amd_710dev.png (582,577 bytes)

Relationships

related to 0027898 newdbp Open CASCADE Visualization, Ray Tracing - Use OpenGL background drawing subroutines in ray tracing 
related to 0027956 closedbugmaster Open CASCADE Visualization, Path tracing - Verify correctness of path tracing by comparing it to Blender Cycles 
parent of 0030476 closedapn Open CASCADE Visualization, Path Tracing - Adaptive Screen Sampling leads to unstable results 
parent of 0030483 closedapn Open CASCADE Visualization, Path Tracing - make Tile Size configurable 
parent of 0031881 closedbugmaster Community Coding Rules - OpenGl_HaltonSampler::initRandom() uses deprecated in C++14 function std::random_shuffle 
related to 0027962 closedbugmaster Open CASCADE Visualization, path tracing - Performance comparison of the current version and OCCT 7.0.0 for AMD GPUs 

Activities

git

2016-06-15 14:01

administrator   ~0055006

Branch CR27607 has been created by dbp.

SHA-1: b344cf964824494becb6743daac4ad99e1af00e1


Detailed log of new commits:

Author: dbp
Date: Wed Jun 15 13:59:26 2016 +0300

    3!

Author: dbp
Date: Tue Jun 14 16:53:45 2016 +0300

    2.

Author: dbp
Date: Tue Jun 14 15:18:01 2016 +0300

    Initial commit.

git

2016-06-15 14:10

administrator   ~0055011

Branch CR27607 has been updated by dbp.

SHA-1: d2cdcdb51e99a1abaa7bd7a0a079b91082f12d9b


Detailed log of new commits:

Author: dbp
Date: Wed Jun 15 14:09:58 2016 +0300

    Add missing files.

git

2016-06-15 14:58

administrator   ~0055026

Branch CR27607 has been updated by dbp.

SHA-1: a13825f727c7787925839f68aec4a18ba1d8766d


Detailed log of new commits:

Author: dbp
Date: Wed Jun 15 14:58:40 2016 +0300

    Bug fix.

git

2016-06-15 16:04

administrator   ~0055034

Branch CR27607 has been updated by dbp.

SHA-1: 4a740a637a613e6955f4718019891eaff1638186


Detailed log of new commits:

Author: dbp
Date: Wed Jun 15 16:04:45 2016 +0300

    Improve variance estimation.

git

2016-06-16 11:44

administrator   ~0055062

Branch CR27607 has been updated by duv.

SHA-1: cc4b19ac441c8dadff547a858d5f7cb931bf13e2


Detailed log of new commits:

Author: duv
Date: Thu Jun 16 11:44:11 2016 +0300

    Border tiles fix

git

2016-06-16 15:59

administrator   ~0055086

Branch CR27607 has been updated by duv.

SHA-1: b552b3a9c36b92c76f006123e4de764e5b714cce


Detailed log of new commits:

Author: duv
Date: Thu Jun 16 15:57:31 2016 +0300

    Refactoring in progress

Author: duv
Date: Thu Jun 16 13:08:30 2016 +0300

    Refactoring in progress

git

2016-06-16 16:19

administrator   ~0055089

Branch CR27607 has been updated by dbp.

SHA-1: 9edbb3637513ef11c51aafb2e0a95c1f645dc3a1


Detailed log of new commits:

Author: dbp
Date: Thu Jun 16 16:19:35 2016 +0300

    Code style.

Author: dbp
Date: Thu Jun 16 15:59:43 2016 +0300

    Update.

Author: dbp
Date: Thu Jun 16 14:26:05 2016 +0300

    Fix issue in point light sampling.

git

2016-06-16 16:50

administrator   ~0055095

Branch CR27607 has been updated by dbp.

SHA-1: d9d405310c746bc1d6e675e6d0128be10a0d701d


Detailed log of new commits:

Author: dbp
Date: Thu Jun 16 16:50:01 2016 +0300

    Code style.

git

2016-06-16 17:02

administrator   ~0055096

Branch CR27607 has been updated by dbp.

SHA-1: fa1e7e4cbef1fab18d6a02626a187bad9156c6a7


Detailed log of new commits:

Author: dbp
Date: Thu Jun 16 17:02:32 2016 +0300

    Code style.

git

2016-06-16 17:16

administrator   ~0055097

Branch CR27607 has been updated by duv.

SHA-1: aea1011dd783fefd67fbf214a5bee256ac37e513


Detailed log of new commits:

Author: duv
Date: Thu Jun 16 17:14:12 2016 +0300

    ImportanceScreenSampling parameter.

Author: duv
Date: Thu Jun 16 16:10:45 2016 +0300

    Stereo for adaptive path tracing

git

2016-06-17 14:39

administrator   ~0055173

Branch CR27607 has been updated by duv.

SHA-1: d4fbc481c2bec2c3e81a3ff3f20c3033924e3c44


Detailed log of new commits:

Author: duv
Date: Fri Jun 17 14:38:51 2016 +0300

    Framebuffer fix

Author: duv
Date: Fri Jun 17 11:43:12 2016 +0300

    Refactoring in progress

git

2016-06-20 11:02

administrator   ~0055204

Branch CR27607 has been updated by duv.

SHA-1: b2d46b6d7b6c3c61ed9f99fae31a8057db97e66b


Detailed log of new commits:

Author: duv
Date: Mon Jun 20 11:02:19 2016 +0300

    Error metric instead of variance

Author: duv
Date: Mon Jun 20 10:49:25 2016 +0300

    Fix FSAA.

git

2016-07-12 09:37

administrator   ~0055845

Branch CR27607_3 has been created by dbp.

SHA-1: 0f949f8ad380ec2a8ed4d414a69cff1a8ce59b16


Detailed log of new commits:

Author: dbp
Date: Sun Jun 26 14:02:15 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing

Author: dbp
Date: Mon Jun 20 19:43:44 2016 +0300

    0027590: Visualization, Ray Tracing - port to quad BVH trees (QBVH)
    
    In frames of this issue binary BVH tree produced by building algorithms was collapsed into 4-ary BVH (QBVH).
    The BVH traversal code in GLSL was modified to process such trees correctly.
    This allows to implore thread coherence, decrease BVH memory consumption (~2 times), and use traversal stack of the half size.
    As a result, ray tracing scalability is improved, as well as rendering performance. For various setups, speedup is 12-18%.

git

2016-07-13 09:26

administrator   ~0055878

Branch CR27607_3 has been updated forcibly by dbp.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542

git

2016-07-13 09:27

administrator   ~0055879

Branch CR27607_4 has been created by dbp.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542


No new revisions were added by this update.

git

2016-07-13 12:19

administrator   ~0055884

Branch CR27607_5 has been created by dbp.

SHA-1: 73558799eff52486a25af91a5b89ade573712548


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core. Graphic3d_RenderingParams
    class was extended with additional AdaptiveScreenSampling option (disabled by default). If this option is
    enabled, path tracing tries to adjust the number of samples for different screen pixels. In this way, the
    more complex areas (from the point of light conditions) are sampled more intensively, while the simple
    areas are sampled very rarely. For example, caustics and glossy reflections are typical candidates for
    more precise sampling. In general, this allows to equalize image convergence and not to waste resources
    for already converged areas. It is also possible to visualize sampling densities by enabling ShowSamplingTiles
    option (activeting and deactivating this option does not affect on the accumulated image).

dbp

2016-07-13 12:21

developer   ~0055885

Dear kgv,

Could you please review the issue in CR27607_5 branch?

git

2016-07-14 09:55

administrator   ~0055901

Branch CR27607_5 has been updated forcibly by dbp.

SHA-1: 297550742e0fbc11d6b3ee568880383369913aeb

kgv

2016-07-15 10:00

developer   ~0055925

Last edited: 2016-07-15 10:23

+float randFloat (int /*theDimension*/)
+{
+  return (float)rand() / RAND_MAX;
+}

why rand()?

+void OpenGl_TileSampler::GrabVarianceMap()

GrabVarianceMap(Handle(OpenGl_Context)& theCtx)
and preferably add glGetTexImage to OpenGl_Context for consistency.

+  if (glGetError() != GL_NO_ERROR)
+  {
+    Standard_ASSERT_INVOKE ("Error! Failed to fetch visual error map");
+  }
...
+    if (glGetError() != GL_NO_ERROR)
+    {
+      Standard_ASSERT_INVOKE ("Error! Failed to upload tile offset map");
+    }

inconsistent error handling in TKOpenGl - asserts are not used here.
And please use theCtx->core11fwd->glGetError().

+  glGetTexImage (GL_TEXTURE_2D, 0, GL_RED_INTEGER, GL_INT, &aRawData.front());

please update headers to avoid compiler errors on Android with OpenGL ES 2.0
(see OpenGl_GlFunctions.hxx - GL_RED_INTEGER/GL_RG_INTEGER/GL_RG32I are not defined within #if defined(GL_ES_VERSION_2_0).

+float& OpenGl_TileSampler::Tile (const int theX, const int theY)

ChangeTile() will be better.

+void OpenGl_TileSampler::Upload (const Handle(OpenGl_Context)& theContext, const Handle(OpenGl_Texture)& theTexture, bool theAdaptive)
+{
+  if (theTexture != NULL)

inconsistent NULL check for Handle type.

+    glTexImage2D (GL_TEXTURE_2D, 0, GL_RG32I, myTilesX, myTilesY, 0, GL_RG_INTEGER, GL_UNSIGNED_INT, &aData.front());

theCtx->core11fwd->glTexImage2D().

+#ifdef ADAPTIVE_SAMPLING
+  #extension GL_ARB_shader_image_load_store : require
+  #extension GL_NV_shader_atomic_float : require
+#endif

I suppose this makes new mode compatible with NVIDIA hardware only - I don't see any AMD driver supporting GL_NV_shader_atomic_float. Any chance using some alternative?
These extensions should be also checked on C++ level to provide meaningful error description instead of shader compilation error.

This commit provides useful functionality for path tracing rendering core. Graphic3d_RenderingParams
class was extended with additional AdaptiveScreenSampling option (disabled by default). If this option is
enabled, path tracing tries to adjust the number of samples for different screen pixels. In this way, the
more complex areas (from the point of light conditions) are sampled more intensively, while the simple
areas are sampled very rarely. For example, caustics and glossy reflections are typical candidates for
more precise sampling. In general, this allows to equalize image convergence and not to waste resources
for already converged areas. It is also possible to visualize sampling densities by enabling ShowSamplingTiles
option (activeting and deactivating this option does not affect on the accumulated image).

the commit description should be revised / split into smaller blocks.
Changes with mixture of rasterization / RT / PT should be documented as well.

git

2016-07-18 14:25

administrator   ~0055992

Branch CR27607_6 has been created by dbp.

SHA-1: 91e8cda5254cb7b85b9a4c11046783941005a78e


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core.
    
    1) Graphic3d_RenderingParams class was extended with additional
       AdaptiveScreenSampling option (disabled by default). If this
       option is enabled, path tracing tries to adjust the number of
       samples for different screen areas.
    
       In this way, the more complex areas (from the point of light
       conditions) are sampled more intensively, while the simple
       areas are sampled very rarely. For example, caustics and
       glossy reflections are typical candidates for more precise
       sampling.
    
       In general, this allows to equalize image convergence and not
       to waste resources for already converged areas. It is also
       possible to visualize sampling densities by enabling ShowSamplingTiles
       option (activating and deactivating this option does not affect on the
       accumulated image).
    
    2) Mixing OpenGL and ray-tracing output has been changed. Now blending is
       performed using OpenGL functionality, while ray-tracing shaders only
       output correct Z-value.

dbp

2016-07-18 14:26

developer   ~0055993

Dear kgv,

Could you please review corrected patch (CR27607_6)?

git

2016-08-17 12:35

administrator   ~0056782

Branch CR27607_7 has been created by dbp.

SHA-1: 7a31d96d549b911fc68caeaf19211f07d02b3833


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core.
    
    1) Graphic3d_RenderingParams class was extended with additional
       AdaptiveScreenSampling option (disabled by default). If this
       option is enabled, path tracing tries to adjust the number of
       samples for different screen areas.
    
       In this way, the more complex areas (from the point of light
       conditions) are sampled more intensively, while the simple
       areas are sampled very rarely. For example, caustics and
       glossy reflections are typical candidates for more precise
       sampling.
    
       In general, this allows to equalize image convergence and not
       to waste resources for already converged areas. It is also
       possible to visualize sampling densities by enabling ShowSamplingTiles
       option (activating and deactivating this option does not affect on the
       accumulated image).
    
    2) Mixing OpenGL and ray-tracing output has been changed. Now blending is
       performed using OpenGL functionality, while ray-tracing shaders only
       output correct Z-value.

git

2016-08-17 13:08

administrator   ~0056783

Branch CR27607_8 has been created by dbp.

SHA-1: 11616f0b6ab2056adb3881bf3646024e31185ac8


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core.
    
    1) Graphic3d_RenderingParams class was extended with additional
       AdaptiveScreenSampling option (disabled by default). If this
       option is enabled, path tracing tries to adjust the number of
       samples for different screen areas.
    
       In this way, the more complex areas (from the point of light
       conditions) are sampled more intensively, while the simple
       areas are sampled very rarely. For example, caustics and
       glossy reflections are typical candidates for more precise
       sampling.
    
       In general, this allows to equalize image convergence and not
       to waste resources for already converged areas. It is also
       possible to visualize sampling densities by enabling ShowSamplingTiles
       option (activating and deactivating this option does not affect on the
       accumulated image).
    
    2) Mixing OpenGL and ray-tracing output has been changed. Now blending is
       performed using OpenGL functionality, while ray-tracing shaders only
       output correct Z-value.

dbp

2016-08-17 13:10

developer   ~0056784

Dear kgv,

Could you please review the patch in branch CR27607_8?

git

2016-08-18 21:44

administrator   ~0056845

Branch CR27607_8 has been updated by kgv.

SHA-1: 99f88509e48ea5adcb30fe0cbe85328c6ee559da


Detailed log of new commits:

Author: kgv
Date: Thu Aug 18 21:44:07 2016 +0300

    fix compilation error

kgv

2016-08-18 21:46

developer   ~0056846

Please test the patch.

git

2016-08-19 13:04

administrator   ~0056864

Branch CR27607_8 has been updated forcibly by apv.

SHA-1: 4b6a90809a08b2a50a0b44c755e1b8d46efdb292

apv

2016-08-19 13:05

tester   ~0056865

Branch CR27607_8 has been rebased on the current master

apv

2016-08-22 10:18

tester   ~0056911

Dear BugMaster,

Branch CR27607_8 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 4b6a90809a08b2a50a0b44c755e1b8d46efdb292

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: Not available
products component:
   Linux: 64
   Windows: 0
   MacOS: Not available
During building of branch CR27607_8 from occt git-repository (and master from products git-repository) compilation errors have been detected.
On MacOS:
http://jenkins-test-05.nnov.opencascade.com/view/CR27607_8-master/job/CR27607_8-master-OCCT-MacOS-opt-compile/2/parsed_console/

Regressions/Differences:
http://occt-tests/CR27607_8-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27607_8-master-OCCT/Windows-64-VC10/summary.html
bugs vis bug27083

Testing on Linux:
Total MEMORY difference: 89620534 / 89521833 [+0.11%]
Total CPU difference: 19477.57000000005 / 19495.010000000108 [-0.09%]

Testing on Windows:
Total MEMORY difference: 57148740 / 57161393 [-0.02%]
Total CPU difference: 17998.755775898862 / 18084.68112669885 [-0.48%]

There are differences in images found by testdiff:
http://occt-tests/CR27607_8-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27607_8-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d raytrace bug24819

apv

2016-08-22 10:20

tester   ~0056912

Dear Kirill,

Branch CR27607_8 has been rejected due to:
- compilation errors
- regressions/differences/improvements
- differences in images

kgv

2016-08-22 11:55

developer   ~0056913

Please also add at least one test case for new rendering mode.

san

2016-08-22 16:48

developer   ~0056931

Results for test case v3d raytrace bug24819 show that blending semi-transparent ray traced fragments over non-raytraceable scene elements (e.g. wireframe or text labels) is no longer supported.
Meanwhile, this feature improves the visual results and user perception significantly for a mixed scene. Thus it should be restored in the updated patch.

kgv

2016-09-16 09:38

developer   ~0057839

Please also extend Graphic3d_TypeOfLimit enumeration and method OpenGl_GraphicDriver::InquireLimit() with new entities to check which RayTracing / PathTracing features are expected to be available in current context.

E.g. Graphic3d_TypeOfLimit_HasRayTracing, Graphic3d_TypeOfLimit_HasRayTracingTextures, Graphic3d_TypeOfLimit_HasRayTracingAdaptiveScreenSpace.

So that application can display options actually available to user without duplicating the same checks that buried inside TKOpenGl.

git

2016-09-24 15:02

administrator   ~0058114

Branch CR27607_9 has been created by dbp.

SHA-1: ee30cfbf2fe4578d421434476524f3873bdb5310


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core.
    
    1) Graphic3d_RenderingParams class was extended with additional
       AdaptiveScreenSampling option (disabled by default). If this
       option is enabled, path tracing tries to adjust the number of
       samples for different screen areas.
    
       In this way, the more complex areas (from the point of light
       conditions) are sampled more intensively, while the simple
       areas are sampled very rarely. For example, caustics and
       glossy reflections are typical candidates for more precise
       sampling.
    
       In general, this allows to equalize image convergence and not
       to waste resources for already converged areas. It is also
       possible to visualize sampling densities by enabling ShowSamplingTiles
       option (activating and deactivating this option does not affect on the
       accumulated image).
    
    2) Mixing OpenGL and ray-tracing output has been changed. Now blending is
       performed using OpenGL functionality, while ray-tracing shaders only
       output correct Z-value.

dbp

2016-09-24 15:04

developer   ~0058115

Dear kgv,

Could you please review the patch in branch CR27607_9?

Please note that background/text mixing issues will be resolved in separate patch (0027898: Visualization, Ray Tracing - Use OpenGL background drawing subroutines in ray tracing).

git

2016-09-24 15:07

administrator   ~0058116

Branch CR27607_9 has been updated forcibly by dbp.

SHA-1: e8b3257a9fa031b1fc2bc2b9e6295c67d8df35f0

git

2016-09-25 14:05

administrator   ~0058119

Branch CR27607_9 has been updated by kgv.

SHA-1: 90d1f6b87fb5c76d5535cbc6502e075f40202915


Detailed log of new commits:

Author: kgv
Date: Sun Sep 25 14:05:35 2016 +0300

    cosmetics, fix compilation on OpenGL ES

kgv

2016-09-25 14:06

developer   ~0058120

Please test the patch.
Please check also compilation on Android platform.

apv

2016-09-27 14:53

tester   ~0058214

During building of branch CR27607_9 (SHA-1: 90d1f6b87fb5c76d5535cbc6502e075f40202915) from occt git-repository (and master from products git-repository) compilation errors have been detected.
On Linux:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-Debian70-64-opt-compile/1/parsed_console/
On Windows:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-Windows-64-VC10-opt-compile/1/parsed_console/
On MacOS:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-MacOS-opt-compile/1/parsed_console/

apv

2016-09-27 14:54

tester   ~0058215

Dear Kirill,

Branch CR27607_9 has been rejected due to:
- compilation errors

git

2016-09-27 14:59

administrator   ~0058216

Branch CR27607_9 has been updated forcibly by kgv.

SHA-1: 5635ca25194ad4614f649fb0671bb996e2983527

kgv

2016-09-27 14:59

developer   ~0058217

The compilation error should be fixed now.
Why there was no log for Android build?

apv

2016-09-28 13:47

tester   ~0058251

Last edited: 2016-09-28 13:53

Dear BugMaster,

Branch CR27607_9 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS, Windows and Android platforms and tested.
SHA-1: 5635ca25194ad4614f649fb0671bb996e2983527

Number of compiler warnings:
occt component:
   Linux: 2 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 2 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1152
New warnings have been detected during OCCT component building
on Linux:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-Debian70-64-opt-compile/2/warnings18Result/
on MacOS:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-MacOS-opt-compile/2/warnings8Result/

Compilation errors have been detected durng building on Android:
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-Debian70-32-Android-opt-compile/2/parsed_console/
http://jenkins-test-08.nnov.opencascade.com/view/%20CR27607_9/job/CR27607_9_master-OCCT-Windows-32-Android-opt-compile/2/parsed_console/

Regressions/Differences:
http://occt-tests/CR27607_9_master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27607_9_master-OCCT/Windows-64-VC10/summary.html
bugs vis bug27083

Testing on Linux:
Total MEMORY difference: 90518828 / 90241021 [+0.31%]
Total CPU difference: 19911.680000000142 / 19251.879999999877 [+3.43%]

Testing on Windows:
Total MEMORY difference: 57207264 / 57221541 [-0.02%]
Total CPU difference: 18077.6142813987 / 18310.78897609872 [-1.27%]

There are differences in images found by testdiff:
http://occt-tests/CR27607_9_master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27607_9_master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d raytrace bug24819 (approved by developer)

apv

2016-09-28 13:51

tester   ~0058252

Last edited: 2016-09-28 13:52

Dear Kirill,

Branch CR27607_9 has been rejected due to:
- compilation errors
- additional warnings
- regressions/differences/improvements

git

2016-09-28 13:53

administrator   ~0058253

Branch CR27607_9 has been updated by kgv.

SHA-1: c0769120c51d590d2f41aaec6748206eebe5ea8e


Detailed log of new commits:

Author: kgv
Date: Wed Sep 28 13:53:28 2016 +0300

    fix compiler warnings

git

2016-09-28 14:03

administrator   ~0058254

Branch CR27607_9 has been updated by kgv.

SHA-1: 1c7557bcdd38278925260a17402291249c14d83f


Detailed log of new commits:

Author: kgv
Date: Wed Sep 28 14:03:11 2016 +0300

    Test case bugs vis bug27083 has been updated
    (the alpha value is now correctly set by Ray-Tracing to 1, opaque).

git

2016-09-28 14:11

administrator   ~0058255

Branch CR27607_9 has been updated by kgv.

SHA-1: 5335082f872988f67b52fcac4d0bdb76d5900921


Detailed log of new commits:

Author: kgv
Date: Wed Sep 28 14:11:21 2016 +0300

    Fix compilation issues when using OpenGL ES.

git

2016-09-28 14:16

administrator   ~0058256

Branch CR27607_10 has been created by kgv.

SHA-1: b38e7827acabb520302a97aec3bd4da62bb5a3b2


Detailed log of new commits:

Author: dbp
Date: Wed Jul 13 12:19:27 2016 +0300

    0027607: Visualization - Implement adaptive screen space sampling in path tracing
    
    This commit provides useful functionality for path tracing rendering core.
    
    1) Graphic3d_RenderingParams class was extended with additional AdaptiveScreenSampling option (disabled by default).
       If this option is enabled, path tracing tries to adjust the number of samples for different screen areas.
    
       In this way, the more complex areas (from the point of light conditions) are sampled more intensively,
       while the simple areas are sampled very rarely.
       For example, caustics and glossy reflections are typical candidates for more precise sampling.
    
       In general, this allows to equalize image convergence and not to waste resources for already converged areas.
       It is also possible to visualize sampling densities by enabling ShowSamplingTiles option
       (activating and deactivating this option does not affect on the accumulated image).
    
    2) Mixing OpenGL and ray-tracing output has been changed.
       Now blending is performed using OpenGL functionality, while ray-tracing shaders only output correct Z-value.
    
    Test case bugs vis bug27083 has been updated,
    since the alpha value is now correctly set by Ray-Tracing to 1, opaque.

kgv

2016-09-28 14:19

developer   ~0058257

Please check building of updated patch in branch CR27607_10.
Regression testing is not needed.

> Regressions/Differences:
> bugs vis bug27083
Test case has been updated to accept new color value.
Please check only this test (re-building of full patch is not needed for checking).

git

2016-09-29 09:54

administrator   ~0058292

Branch CR27607_10 has been updated by apv.

SHA-1: 628ba501dff5c6543ee37c5bd8c21f2c9f6492d3


Detailed log of new commits:

Author: apv
Date: Thu Sep 29 09:54:42 2016 +0300

    Tuning of test case bugs/vis/bug27083

apv

2016-09-29 10:06

tester   ~0058293

Last edited: 2016-09-29 10:08

ear BugMaster,

Branch CR27607_10 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS, Windows and Android platforms and tested.
SHA-1: b38e7827acabb520302a97aec3bd4da62bb5a3b2

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1156

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 90744196 / 90237446 [+0.56%]
Total CPU difference: 19533.88999999991 / 19251.959999999875 [+1.46%]

Testing on Windows:
Total MEMORY difference: 57208751 / 57221541 [-0.02%]
Total CPU difference: 18076.1166717987 / 18310.78897609872 [-1.28%]

There are differences in images found by testdiff:
http://occt-tests/CR27607_10_master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27607_10_master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d raytrace bug24819 (approved by developer)

kgv

2016-10-11 23:22

developer   ~0058599

Performance comparison of test case "pathtrace.tcl" on current master and 7.0.0:
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace.tcl
dversion
vcaps -vsync 0
vzoom 1.001
vfps
vglinfo

# OpenGL info
OpenGL info:
  GLvendor    = 'ATI Technologies Inc.'
  GLdevice    = 'AMD Radeon R9 200 Series'
  GLversion   = '4.5.13447 Compatibility Profile Context 16.300.2311.0'
  GLSLversion = '4.50'

# occt 7.0.0
FPS: 80.493047313671539
CPU: 0.31200200000000011 msec
MRays/sec (upper bound): 337.61231031992179

# occt 7.1.0 dev (current master)
FPS: 48.963984436177611
CPU: 0.31200200000000011 msec
MRays/sec (upper bound): 205.36983577659751

kgv

2016-10-12 14:11

developer  

pathtrace_amd_700.png (522,516 bytes)

kgv

2016-10-12 14:12

developer  

pathtrace_amd_710dev.png (582,577 bytes)

dbp

2016-10-13 20:10

developer   ~0058693

Last edited: 2016-10-13 20:25

The same comparison on GeForce GTX 680:

occt 7.0.0 - 34 FPS
current master - 48 fps

So, we have 1.4x improvement.

We should analyze the reason of performance drop on AMD!

git

2016-10-28 21:41

administrator   ~0059440

Branch CR27607_10 has been deleted by kgv.

SHA-1: 628ba501dff5c6543ee37c5bd8c21f2c9f6492d3

git

2016-10-28 21:41

administrator   ~0059441

Branch CR27607_9 has been deleted by kgv.

SHA-1: 5335082f872988f67b52fcac4d0bdb76d5900921

git

2016-10-28 21:48

administrator   ~0059552

Branch CR27607_7 has been deleted by kgv.

SHA-1: 7a31d96d549b911fc68caeaf19211f07d02b3833

git

2016-10-28 21:48

administrator   ~0059553

Branch CR27607_8 has been deleted by kgv.

SHA-1: 4b6a90809a08b2a50a0b44c755e1b8d46efdb292

git

2016-10-28 21:51

administrator   ~0059604

Branch CR27607 has been deleted by kgv.

SHA-1: b2d46b6d7b6c3c61ed9f99fae31a8057db97e66b

git

2016-10-28 21:51

administrator   ~0059605

Branch CR27607_3 has been deleted by kgv.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542

git

2016-10-28 21:51

administrator   ~0059606

Branch CR27607_4 has been deleted by kgv.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542

git

2016-10-28 21:51

administrator   ~0059607

Branch CR27607_5 has been deleted by kgv.

SHA-1: 297550742e0fbc11d6b3ee568880383369913aeb

git

2016-10-28 21:51

administrator   ~0059608

Branch CR27607_6 has been deleted by kgv.

SHA-1: 91e8cda5254cb7b85b9a4c11046783941005a78e

Related Changesets

occt: master 3a9b5dc8

2016-07-13 09:19:27

dbp


Committer: kgv Details Diff
0027607: Visualization - Implement adaptive screen space sampling in path tracing

This commit provides useful functionality for path tracing rendering core.

1) Graphic3d_RenderingParams class was extended with additional AdaptiveScreenSampling option (disabled by default).
If this option is enabled, path tracing tries to adjust the number of samples for different screen areas.

In this way, the more complex areas (from the point of light conditions) are sampled more intensively,
while the simple areas are sampled very rarely.
For example, caustics and glossy reflections are typical candidates for more precise sampling.

In general, this allows to equalize image convergence and not to waste resources for already converged areas.
It is also possible to visualize sampling densities by enabling ShowSamplingTiles option
(activating and deactivating this option does not affect on the accumulated image).

2) Mixing OpenGL and ray-tracing output has been changed.
Now blending is performed using OpenGL functionality, while ray-tracing shaders only output correct Z-value.

Test case bugs vis bug27083 has been updated,
since the alpha value is now correctly set by Ray-Tracing to 1, opaque.
Affected Issues
0027607
mod - samples/tcl/pathtrace.tcl Diff File
mod - src/Graphic3d/Graphic3d_RenderingParams.hxx Diff File
mod - src/Graphic3d/Graphic3d_TypeOfLimit.hxx Diff File
mod - src/OpenGl/FILES Diff File
mod - src/OpenGl/OpenGl_Context.cxx Diff File
mod - src/OpenGl/OpenGl_Context.hxx Diff File
mod - src/OpenGl/OpenGl_GlCore11Fwd.hxx Diff File
mod - src/OpenGl/OpenGl_GlFunctions.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
add - src/OpenGl/OpenGl_HaltonSampler.hxx Diff File
mod - src/OpenGl/OpenGl_SceneGeometry.cxx Diff File
add - src/OpenGl/OpenGl_TileSampler.cxx Diff File
add - src/OpenGl/OpenGl_TileSampler.hxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Raytrace.cxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File
mod - src/Shaders/Display.fs Diff File
mod - src/Shaders/PathtraceBase.fs Diff File
mod - src/Shaders/RaytraceBase.fs Diff File
mod - src/Shaders/RaytraceRender.fs Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - tests/bugs/vis/bug27083 Diff File

Issue History

Date Modified Username Field Change
2016-06-15 14:01 dbp New Issue
2016-06-15 14:01 dbp Assigned To => dbp
2016-06-15 14:01 git Note Added: 0055006
2016-06-15 14:10 git Note Added: 0055011
2016-06-15 14:58 git Note Added: 0055026
2016-06-15 16:04 git Note Added: 0055034
2016-06-16 11:44 git Note Added: 0055062
2016-06-16 15:59 git Note Added: 0055086
2016-06-16 16:19 git Note Added: 0055089
2016-06-16 16:50 git Note Added: 0055095
2016-06-16 17:02 git Note Added: 0055096
2016-06-16 17:16 git Note Added: 0055097
2016-06-17 13:56 kgv Severity minor => feature
2016-06-17 13:56 kgv Status new => assigned
2016-06-17 13:56 kgv Product Version Unscheduled =>
2016-06-17 13:56 kgv Target Version Unscheduled => 7.1.0
2016-06-17 14:39 git Note Added: 0055173
2016-06-20 11:02 git Note Added: 0055204
2016-07-12 09:37 git Note Added: 0055845
2016-07-13 09:26 git Note Added: 0055878
2016-07-13 09:27 git Note Added: 0055879
2016-07-13 12:19 git Note Added: 0055884
2016-07-13 12:21 dbp Note Added: 0055885
2016-07-13 12:21 dbp Assigned To dbp => kgv
2016-07-13 12:21 dbp Status assigned => resolved
2016-07-13 12:21 dbp Steps to Reproduce Updated
2016-07-14 09:55 git Note Added: 0055901
2016-07-15 10:00 kgv Note Added: 0055925
2016-07-15 10:00 kgv Assigned To kgv => dbp
2016-07-15 10:00 kgv Status resolved => assigned
2016-07-15 10:23 kgv Note Edited: 0055925
2016-07-18 14:25 git Note Added: 0055992
2016-07-18 14:26 dbp Note Added: 0055993
2016-07-18 14:26 dbp Assigned To dbp => kgv
2016-07-18 14:26 dbp Status assigned => resolved
2016-07-19 15:06 kgv Assigned To kgv => dbp
2016-07-19 15:06 kgv Status resolved => assigned
2016-08-17 12:35 git Note Added: 0056782
2016-08-17 13:08 git Note Added: 0056783
2016-08-17 13:10 dbp Note Added: 0056784
2016-08-17 13:10 dbp Assigned To dbp => kgv
2016-08-17 13:10 dbp Status assigned => resolved
2016-08-18 21:44 git Note Added: 0056845
2016-08-18 21:46 kgv Note Added: 0056846
2016-08-18 21:46 kgv Assigned To kgv => bugmaster
2016-08-18 21:46 kgv Status resolved => reviewed
2016-08-19 09:23 mkv Assigned To bugmaster => apv
2016-08-19 13:04 git Note Added: 0056864
2016-08-19 13:05 apv Note Added: 0056865
2016-08-22 10:18 apv Note Added: 0056911
2016-08-22 10:18 apv Assigned To apv => kgv
2016-08-22 10:18 apv Status reviewed => assigned
2016-08-22 10:20 apv Note Added: 0056912
2016-08-22 11:55 kgv Note Added: 0056913
2016-08-22 11:55 kgv Assigned To kgv => dbp
2016-08-22 16:48 san Note Added: 0056931
2016-09-16 09:38 kgv Note Added: 0057839
2016-09-24 13:48 dbp Relationship added child of 0027898
2016-09-24 13:48 dbp Relationship deleted child of 0027898
2016-09-24 13:48 dbp Relationship added parent of 0027898
2016-09-24 13:48 dbp Relationship deleted parent of 0027898
2016-09-24 13:49 dbp Relationship added related to 0027898
2016-09-24 15:02 git Note Added: 0058114
2016-09-24 15:04 dbp Note Added: 0058115
2016-09-24 15:04 dbp Assigned To dbp => kgv
2016-09-24 15:04 dbp Status assigned => resolved
2016-09-24 15:07 git Note Added: 0058116
2016-09-25 14:05 git Note Added: 0058119
2016-09-25 14:06 kgv Note Added: 0058120
2016-09-25 14:06 kgv Assigned To kgv => bugmaster
2016-09-25 14:06 kgv Status resolved => reviewed
2016-09-26 09:48 apv Assigned To bugmaster => apv
2016-09-27 14:53 apv Note Added: 0058214
2016-09-27 14:53 apv Assigned To apv => kgv
2016-09-27 14:53 apv Status reviewed => assigned
2016-09-27 14:54 apv Note Added: 0058215
2016-09-27 14:55 kgv Assigned To kgv => dbp
2016-09-27 14:59 git Note Added: 0058216
2016-09-27 14:59 kgv Note Added: 0058217
2016-09-27 14:59 kgv Assigned To dbp => bugmaster
2016-09-27 14:59 kgv Status assigned => resolved
2016-09-27 15:00 kgv Status resolved => reviewed
2016-09-27 15:16 apv Assigned To bugmaster => apv
2016-09-28 13:47 apv Note Added: 0058251
2016-09-28 13:47 apv Assigned To apv => kgv
2016-09-28 13:47 apv Status reviewed => assigned
2016-09-28 13:49 apv Note Edited: 0058251
2016-09-28 13:51 apv Note Added: 0058252
2016-09-28 13:52 apv Note Edited: 0058252
2016-09-28 13:53 apv Note Edited: 0058251
2016-09-28 13:53 git Note Added: 0058253
2016-09-28 14:03 git Note Added: 0058254
2016-09-28 14:11 git Note Added: 0058255
2016-09-28 14:16 git Note Added: 0058256
2016-09-28 14:19 kgv Note Added: 0058257
2016-09-28 14:19 kgv Assigned To kgv => bugmaster
2016-09-28 14:19 kgv Status assigned => resolved
2016-09-28 14:19 kgv Status resolved => reviewed
2016-09-28 14:26 mkv Assigned To bugmaster => apv
2016-09-29 09:54 git Note Added: 0058292
2016-09-29 10:04 apv Test case number => Not needed
2016-09-29 10:06 apv Note Added: 0058293
2016-09-29 10:06 apv Assigned To apv => bugmaster
2016-09-29 10:06 apv Status reviewed => tested
2016-09-29 10:08 apv Note Edited: 0058293
2016-10-03 13:47 kgv Changeset attached => occt master 3a9b5dc8
2016-10-03 13:47 kgv Assigned To bugmaster => kgv
2016-10-03 13:47 kgv Status tested => verified
2016-10-03 13:47 kgv Resolution open => fixed
2016-10-11 23:22 kgv Note Added: 0058599
2016-10-12 14:11 kgv File Added: pathtrace_amd_700.png
2016-10-12 14:12 kgv File Added: pathtrace_amd_710dev.png
2016-10-13 15:00 san Relationship added related to 0027956
2016-10-13 18:36 san Relationship added related to 0027962
2016-10-13 20:10 dbp Note Added: 0058693
2016-10-13 20:24 dbp Note Edited: 0058693
2016-10-13 20:25 dbp Note Edited: 0058693
2016-10-28 21:41 git Note Added: 0059440
2016-10-28 21:41 git Note Added: 0059441
2016-10-28 21:48 git Note Added: 0059552
2016-10-28 21:48 git Note Added: 0059553
2016-10-28 21:51 git Note Added: 0059604
2016-10-28 21:51 git Note Added: 0059605
2016-10-28 21:51 git Note Added: 0059606
2016-10-28 21:51 git Note Added: 0059607
2016-10-28 21:51 git Note Added: 0059608
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0
2019-02-05 12:39 kgv Relationship added parent of 0030476
2019-02-07 12:00 kgv Relationship added parent of 0030483
2020-10-27 07:21 kgv Relationship added parent of 0031881