MantisBT - Open CASCADE
View Issue Details
0027607Open CASCADE[OCCT] OCCT:Visualizationpublic2016-06-15 14:012019-02-07 12:00
dbp 
kgv 
normalfeature 
closedfixed 
 
[OCCT] 7.1.0[OCCT] 7.1.0 
Not needed
0027607: Visualization - Implement adaptive screen space sampling in path tracing
TODO
Activating the feature
vrenderparams -iss

Activating debug mode
vrenderparams -issd
No tags attached.
related to 0027898new dbp Visualization, Ray Tracing - Use OpenGL background drawing subroutines in ray tracing 
related to 0027956closed bugmaster Visualization, Path tracing - Verify correctness of path tracing by comparing it to Blender Cycles 
parent of 0030476verified apn Visualization, Path Tracing - Adaptive Screen Sampling leads to unstable results 
parent of 0030483verified apn Visualization, Path Tracing - make Tile Size configurable 
related to 0027962closed bugmaster Visualization, path tracing - Performance comparison of the current version and OCCT 7.0.0 for AMD GPUs 
png pathtrace_amd_700.png (522,516) 2016-10-12 14:11
https://tracker.dev.opencascade.org/
png pathtrace_amd_710dev.png (582,577) 2016-10-12 14:12
https://tracker.dev.opencascade.org/
Issue History
2016-06-15 14:01dbpNew Issue
2016-06-15 14:01dbpAssigned To => dbp
2016-06-15 14:01gitNote Added: 0055006
2016-06-15 14:10gitNote Added: 0055011
2016-06-15 14:58gitNote Added: 0055026
2016-06-15 16:04gitNote Added: 0055034
2016-06-16 11:44gitNote Added: 0055062
2016-06-16 15:59gitNote Added: 0055086
2016-06-16 16:19gitNote Added: 0055089
2016-06-16 16:50gitNote Added: 0055095
2016-06-16 17:02gitNote Added: 0055096
2016-06-16 17:16gitNote Added: 0055097
2016-06-17 13:56kgvSeverityminor => feature
2016-06-17 13:56kgvStatusnew => assigned
2016-06-17 13:56kgvProduct VersionUnscheduled =>
2016-06-17 13:56kgvTarget VersionUnscheduled => 7.1.0
2016-06-17 14:39gitNote Added: 0055173
2016-06-20 11:02gitNote Added: 0055204
2016-07-12 09:37gitNote Added: 0055845
2016-07-13 09:26gitNote Added: 0055878
2016-07-13 09:27gitNote Added: 0055879
2016-07-13 12:19gitNote Added: 0055884
2016-07-13 12:21dbpNote Added: 0055885
2016-07-13 12:21dbpAssigned Todbp => kgv
2016-07-13 12:21dbpStatusassigned => resolved
2016-07-13 12:21dbpSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14168#r14168
2016-07-14 09:55gitNote Added: 0055901
2016-07-15 10:00kgvNote Added: 0055925
2016-07-15 10:00kgvAssigned Tokgv => dbp
2016-07-15 10:00kgvStatusresolved => assigned
2016-07-15 10:23kgvNote Edited: 0055925bug_revision_view_page.php?bugnote_id=55925#r14182
2016-07-18 14:25gitNote Added: 0055992
2016-07-18 14:26dbpNote Added: 0055993
2016-07-18 14:26dbpAssigned Todbp => kgv
2016-07-18 14:26dbpStatusassigned => resolved
2016-07-19 15:06kgvAssigned Tokgv => dbp
2016-07-19 15:06kgvStatusresolved => assigned
2016-08-17 12:35gitNote Added: 0056782
2016-08-17 13:08gitNote Added: 0056783
2016-08-17 13:10dbpNote Added: 0056784
2016-08-17 13:10dbpAssigned Todbp => kgv
2016-08-17 13:10dbpStatusassigned => resolved
2016-08-18 21:44gitNote Added: 0056845
2016-08-18 21:46kgvNote Added: 0056846
2016-08-18 21:46kgvAssigned Tokgv => bugmaster
2016-08-18 21:46kgvStatusresolved => reviewed
2016-08-19 09:23mkvAssigned Tobugmaster => apv
2016-08-19 13:04gitNote Added: 0056864
2016-08-19 13:05apvNote Added: 0056865
2016-08-22 10:18apvNote Added: 0056911
2016-08-22 10:18apvAssigned Toapv => kgv
2016-08-22 10:18apvStatusreviewed => assigned
2016-08-22 10:20apvNote Added: 0056912
2016-08-22 11:55kgvNote Added: 0056913
2016-08-22 11:55kgvAssigned Tokgv => dbp
2016-08-22 16:48sanNote Added: 0056931
2016-09-16 09:38kgvNote Added: 0057839
2016-09-24 13:48dbpRelationship addedchild of 0027898
2016-09-24 13:48dbpRelationship deletedchild of 0027898
2016-09-24 13:48dbpRelationship addedparent of 0027898
2016-09-24 13:48dbpRelationship deletedparent of 0027898
2016-09-24 13:49dbpRelationship addedrelated to 0027898
2016-09-24 15:02gitNote Added: 0058114
2016-09-24 15:04dbpNote Added: 0058115
2016-09-24 15:04dbpAssigned Todbp => kgv
2016-09-24 15:04dbpStatusassigned => resolved
2016-09-24 15:07gitNote Added: 0058116
2016-09-25 14:05gitNote Added: 0058119
2016-09-25 14:06kgvNote Added: 0058120
2016-09-25 14:06kgvAssigned Tokgv => bugmaster
2016-09-25 14:06kgvStatusresolved => reviewed
2016-09-26 09:48apvAssigned Tobugmaster => apv
2016-09-27 14:53apvNote Added: 0058214
2016-09-27 14:53apvAssigned Toapv => kgv
2016-09-27 14:53apvStatusreviewed => assigned
2016-09-27 14:54apvNote Added: 0058215
2016-09-27 14:55kgvAssigned Tokgv => dbp
2016-09-27 14:59gitNote Added: 0058216
2016-09-27 14:59kgvNote Added: 0058217
2016-09-27 14:59kgvAssigned Todbp => bugmaster
2016-09-27 14:59kgvStatusassigned => resolved
2016-09-27 15:00kgvStatusresolved => reviewed
2016-09-27 15:16apvAssigned Tobugmaster => apv
2016-09-28 13:47apvNote Added: 0058251
2016-09-28 13:47apvAssigned Toapv => kgv
2016-09-28 13:47apvStatusreviewed => assigned
2016-09-28 13:49apvNote Edited: 0058251bug_revision_view_page.php?bugnote_id=58251#r14822
2016-09-28 13:51apvNote Added: 0058252
2016-09-28 13:52apvNote Edited: 0058252bug_revision_view_page.php?bugnote_id=58252#r14824
2016-09-28 13:53apvNote Edited: 0058251bug_revision_view_page.php?bugnote_id=58251#r14825
2016-09-28 13:53gitNote Added: 0058253
2016-09-28 14:03gitNote Added: 0058254
2016-09-28 14:11gitNote Added: 0058255
2016-09-28 14:16gitNote Added: 0058256
2016-09-28 14:19kgvNote Added: 0058257
2016-09-28 14:19kgvAssigned Tokgv => bugmaster
2016-09-28 14:19kgvStatusassigned => resolved
2016-09-28 14:19kgvStatusresolved => reviewed
2016-09-28 14:26mkvAssigned Tobugmaster => apv
2016-09-29 09:54gitNote Added: 0058292
2016-09-29 10:04apvTest case number => Not needed
2016-09-29 10:06apvNote Added: 0058293
2016-09-29 10:06apvAssigned Toapv => bugmaster
2016-09-29 10:06apvStatusreviewed => tested
2016-09-29 10:08apvNote Edited: 0058293bug_revision_view_page.php?bugnote_id=58293#r14836
2016-10-03 13:47kgvChangeset attached => occt master 3a9b5dc8
2016-10-03 13:47kgvAssigned Tobugmaster => kgv
2016-10-03 13:47kgvStatustested => verified
2016-10-03 13:47kgvResolutionopen => fixed
2016-10-11 23:22kgvNote Added: 0058599
2016-10-12 14:11kgvFile Added: pathtrace_amd_700.png
2016-10-12 14:12kgvFile Added: pathtrace_amd_710dev.png
2016-10-13 15:00sanRelationship addedrelated to 0027956
2016-10-13 18:36sanRelationship addedrelated to 0027962
2016-10-13 20:10dbpNote Added: 0058693
2016-10-13 20:24dbpNote Edited: 0058693bug_revision_view_page.php?bugnote_id=58693#r14957
2016-10-13 20:25dbpNote Edited: 0058693bug_revision_view_page.php?bugnote_id=58693#r14960
2016-10-28 21:41gitNote Added: 0059440
2016-10-28 21:41gitNote Added: 0059441
2016-10-28 21:48gitNote Added: 0059552
2016-10-28 21:48gitNote Added: 0059553
2016-10-28 21:51gitNote Added: 0059604
2016-10-28 21:51gitNote Added: 0059605
2016-10-28 21:51gitNote Added: 0059606
2016-10-28 21:51gitNote Added: 0059607
2016-10-28 21:51gitNote Added: 0059608
2016-12-09 16:30aivStatusverified => closed
2016-12-09 16:39aivFixed in Version => 7.1.0
2019-02-05 12:39kgvRelationship addedparent of 0030476
2019-02-07 12:00kgvRelationship addedparent of 0030483

Notes
(0055006)
git   
2016-06-15 14:01   
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.
(0055011)
git   
2016-06-15 14:10   
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.

(0055026)
git   
2016-06-15 14:58   
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.

(0055034)
git   
2016-06-15 16:04   
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.

(0055062)
git   
2016-06-16 11:44   
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

(0055086)
git   
2016-06-16 15:59   
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

(0055089)
git   
2016-06-16 16:19   
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.

(0055095)
git   
2016-06-16 16:50   
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.

(0055096)
git   
2016-06-16 17:02   
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.

(0055097)
git   
2016-06-16 17:16   
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

(0055173)
git   
2016-06-17 14:39   
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

(0055204)
git   
2016-06-20 11:02   
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.

(0055845)
git   
2016-07-12 09:37   
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%.
(0055878)
git   
2016-07-13 09:26   
Branch CR27607_3 has been updated forcibly by dbp.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542
(0055879)
git   
2016-07-13 09:27   
Branch CR27607_4 has been created by dbp.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542


No new revisions were added by this update.
(0055884)
git   
2016-07-13 12:19   
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).
(0055885)
dbp   
2016-07-13 12:21   
Dear kgv,

Could you please review the issue in CR27607_5 branch?
(0055901)
git   
2016-07-14 09:55   
Branch CR27607_5 has been updated forcibly by dbp.

SHA-1: 297550742e0fbc11d6b3ee568880383369913aeb
(0055925)
kgv   
2016-07-15 10:00   
(edited on: 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.

(0055992)
git   
2016-07-18 14:25   
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.
(0055993)
dbp   
2016-07-18 14:26   
Dear kgv,

Could you please review corrected patch (CR27607_6)?
(0056782)
git   
2016-08-17 12:35   
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.
(0056783)
git   
2016-08-17 13:08   
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.
(0056784)
dbp   
2016-08-17 13:10   
Dear kgv,

Could you please review the patch in branch CR27607_8?
(0056845)
git   
2016-08-18 21:44   
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

(0056846)
kgv   
2016-08-18 21:46   
Please test the patch.
(0056864)
git   
2016-08-19 13:04   
Branch CR27607_8 has been updated forcibly by apv.

SHA-1: 4b6a90809a08b2a50a0b44c755e1b8d46efdb292
(0056865)
apv   
2016-08-19 13:05   
Branch CR27607_8 has been rebased on the current master
(0056911)
apv   
2016-08-22 10:18   
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
(0056912)
apv   
2016-08-22 10:20   
Dear Kirill,

Branch CR27607_8 has been rejected due to:
- compilation errors
- regressions/differences/improvements
- differences in images
(0056913)
kgv   
2016-08-22 11:55   
Please also add at least one test case for new rendering mode.
(0056931)
san   
2016-08-22 16:48   
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.
(0057839)
kgv   
2016-09-16 09:38   
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.
(0058114)
git   
2016-09-24 15:02   
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.
(0058115)
dbp   
2016-09-24 15:04   
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).
(0058116)
git   
2016-09-24 15:07   
Branch CR27607_9 has been updated forcibly by dbp.

SHA-1: e8b3257a9fa031b1fc2bc2b9e6295c67d8df35f0
(0058119)
git   
2016-09-25 14:05   
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

(0058120)
kgv   
2016-09-25 14:06   
Please test the patch.
Please check also compilation on Android platform.
(0058214)
apv   
2016-09-27 14:53   
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/ [^]
(0058215)
apv   
2016-09-27 14:54   
Dear Kirill,

Branch CR27607_9 has been rejected due to:
- compilation errors
(0058216)
git   
2016-09-27 14:59   
Branch CR27607_9 has been updated forcibly by kgv.

SHA-1: 5635ca25194ad4614f649fb0671bb996e2983527
(0058217)
kgv   
2016-09-27 14:59   
The compilation error should be fixed now.
Why there was no log for Android build?
(0058251)
apv   
2016-09-28 13:47   
(edited on: 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)

(0058252)
apv   
2016-09-28 13:51   
(edited on: 2016-09-28 13:52)
Dear Kirill,

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

(0058253)
git   
2016-09-28 13:53   
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

(0058254)
git   
2016-09-28 14:03   
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).

(0058255)
git   
2016-09-28 14:11   
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.

(0058256)
git   
2016-09-28 14:16   
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.
(0058257)
kgv   
2016-09-28 14:19   
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).
(0058292)
git   
2016-09-29 09:54   
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

(0058293)
apv   
2016-09-29 10:06   
(edited on: 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)

(0058599)
kgv   
2016-10-11 23:22   
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
(0058693)
dbp   
2016-10-13 20:10   
(edited on: 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!

(0059440)
git   
2016-10-28 21:41   
Branch CR27607_10 has been deleted by kgv.

SHA-1: 628ba501dff5c6543ee37c5bd8c21f2c9f6492d3
(0059441)
git   
2016-10-28 21:41   
Branch CR27607_9 has been deleted by kgv.

SHA-1: 5335082f872988f67b52fcac4d0bdb76d5900921
(0059552)
git   
2016-10-28 21:48   
Branch CR27607_7 has been deleted by kgv.

SHA-1: 7a31d96d549b911fc68caeaf19211f07d02b3833
(0059553)
git   
2016-10-28 21:48   
Branch CR27607_8 has been deleted by kgv.

SHA-1: 4b6a90809a08b2a50a0b44c755e1b8d46efdb292
(0059604)
git   
2016-10-28 21:51   
Branch CR27607 has been deleted by kgv.

SHA-1: b2d46b6d7b6c3c61ed9f99fae31a8057db97e66b
(0059605)
git   
2016-10-28 21:51   
Branch CR27607_3 has been deleted by kgv.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542
(0059606)
git   
2016-10-28 21:51   
Branch CR27607_4 has been deleted by kgv.

SHA-1: 530bec5ee1d1ac06c5eb84696e1e6370c6669542
(0059607)
git   
2016-10-28 21:51   
Branch CR27607_5 has been deleted by kgv.

SHA-1: 297550742e0fbc11d6b3ee568880383369913aeb
(0059608)
git   
2016-10-28 21:51   
Branch CR27607_6 has been deleted by kgv.

SHA-1: 91e8cda5254cb7b85b9a4c11046783941005a78e