MantisBT - Open CASCADE
View Issue Details
0028762Open CASCADE[OCCT] OCCT:Visualizationpublic2017-05-19 15:182017-09-29 16:28
age 
bugmaster 
normalfeature 
closedfixed 
 
[OCCT] 7.2.0[OCCT] 7.2.0 
v3d raytrace dof_mono, dof_stereo
0028762: Visualization, Ray tracing - Implement depth-of-field effect
Implement depth-of-field effect
Not required
No tags attached.
png dof_mono.png (318,587) 2017-07-04 10:22
https://tracker.dev.opencascade.org/
png dof_stereo.png (339,700) 2017-07-04 10:23
https://tracker.dev.opencascade.org/
Issue History
2017-05-19 15:18ageNew Issue
2017-05-19 15:18ageAssigned To => age
2017-05-19 15:18ageStatusnew => assigned
2017-05-19 15:21kgvSummaryVisualization - Implement depth-of-field effect => Visualization, Ray tracing - Implement depth-of-field effect
2017-05-19 15:21kgvSeverityminor => feature
2017-05-19 15:21kgvProduct Version7.2.0 =>
2017-05-19 15:26gitNote Added: 0066326
2017-05-19 15:28ageNote Added: 0066328
2017-05-19 15:28ageAssigned Toage => duv
2017-05-19 15:28ageStatusassigned => resolved
2017-05-19 15:28ageSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16675#r16675
2017-05-19 15:33kgvNote Added: 0066329
2017-05-22 11:05gitNote Added: 0066359
2017-05-22 11:06ageAssigned Toduv => age
2017-05-22 11:07ageAssigned Toage => kgv
2017-05-22 11:07ageNote Added: 0066360
2017-05-22 14:54kgvNote Added: 0066396
2017-05-22 14:55kgvNote Edited: 0066396bug_revision_view_page.php?bugnote_id=66396#r16728
2017-05-22 14:55kgvNote Edited: 0066396bug_revision_view_page.php?bugnote_id=66396#r16729
2017-05-22 15:05kgvNote Added: 0066397
2017-05-22 15:05kgvAssigned Tokgv => age
2017-05-22 15:05kgvStatusresolved => assigned
2017-05-23 09:57gitNote Added: 0066431
2017-05-23 09:57ageNote Added: 0066432
2017-05-23 09:57ageAssigned Toage => kgv
2017-05-23 09:57ageStatusassigned => resolved
2017-05-23 10:08kgvNote Added: 0066433
2017-05-23 10:08kgvAssigned Tokgv => age
2017-05-23 10:08kgvStatusresolved => assigned
2017-05-23 10:08kgvNote Edited: 0066433bug_revision_view_page.php?bugnote_id=66433#r16733
2017-05-23 13:13gitNote Added: 0066461
2017-05-23 13:14ageFile Added: dof.png
2017-05-23 13:15ageNote Added: 0066463
2017-05-23 13:15ageAssigned Toage => kgv
2017-05-23 13:15ageStatusassigned => resolved
2017-05-23 13:59kgvNote Added: 0066465
2017-05-23 14:00kgvAssigned Tokgv => age
2017-05-23 14:00kgvStatusresolved => assigned
2017-05-23 15:04gitNote Added: 0066466
2017-05-23 15:06ageNote Added: 0066467
2017-05-23 15:06ageAssigned Toage => kgv
2017-05-23 15:06ageStatusassigned => resolved
2017-05-23 15:11kgvNote Added: 0066469
2017-05-23 15:17kgvNote Added: 0066472
2017-05-23 15:18kgvNote Edited: 0066472bug_revision_view_page.php?bugnote_id=66472#r16739
2017-05-23 15:18kgvAssigned Tokgv => age
2017-05-23 15:18kgvStatusresolved => assigned
2017-05-23 15:19kgvNote Edited: 0066469bug_revision_view_page.php?bugnote_id=66469#r16741
2017-05-23 15:31ageNote Added: 0066473
2017-05-23 15:37ageNote Edited: 0066473bug_revision_view_page.php?bugnote_id=66473#r16743
2017-05-23 15:37ageNote Edited: 0066473bug_revision_view_page.php?bugnote_id=66473#r16748
2017-05-24 09:21ageNote Edited: 0066473bug_revision_view_page.php?bugnote_id=66473#r16766
2017-05-24 14:04ageAssigned Toage => kgv
2017-05-24 14:04ageStatusassigned => resolved
2017-05-24 16:52gitNote Added: 0066537
2017-05-24 17:00gitNote Added: 0066538
2017-05-24 17:04gitNote Added: 0066539
2017-05-24 17:06kgvNote Added: 0066540
2017-05-24 17:06kgvAssigned Tokgv => bugmaster
2017-05-24 17:06kgvStatusresolved => reviewed
2017-05-24 17:06kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16777#r16777
2017-05-24 17:08kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16778#r16778
2017-05-24 17:09kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16779#r16779
2017-05-24 17:43mkvAssigned Tobugmaster => mkv
2017-05-25 12:24mkvNote Added: 0066560
2017-05-25 12:24gitNote Added: 0066561
2017-05-25 12:24mkvNote Added: 0066562
2017-05-25 12:24mkvAssigned Tomkv => kgv
2017-05-25 12:24mkvStatusreviewed => feedback
2017-05-25 12:25mkvTest case number => v3d raytrace dof
2017-05-25 12:29kgvAssigned Tokgv => age
2017-05-25 12:29kgvStatusfeedback => assigned
2017-05-25 12:31kgvNote Added: 0066565
2017-06-07 10:22gitNote Added: 0067162
2017-06-07 10:23kgvNote Added: 0067163
2017-06-07 10:36ageNote Added: 0067165
2017-06-07 10:38ageAssigned Toage => kgv
2017-06-07 10:38ageStatusassigned => resolved
2017-06-07 10:38ageSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16865#r16865
2017-06-08 18:29kgvAssigned Tokgv => age
2017-06-08 18:29kgvStatusresolved => assigned
2017-06-27 11:22gitNote Added: 0067717
2017-06-27 11:25duvNote Added: 0067718
2017-06-27 11:25duvAssigned Toage => kgv
2017-06-27 11:25duvStatusassigned => resolved
2017-06-27 18:58gitNote Added: 0067746
2017-06-27 19:08gitNote Added: 0067747
2017-06-28 09:39kgvNote Added: 0067756
2017-06-28 09:39kgvAssigned Tokgv => duv
2017-06-28 09:39kgvStatusresolved => assigned
2017-06-28 09:53duvAssigned Toduv => age
2017-07-04 10:15gitNote Added: 0067958
2017-07-04 10:20ageNote Added: 0067959
2017-07-04 10:20ageAssigned Toage => kgv
2017-07-04 10:20ageStatusassigned => resolved
2017-07-04 10:22ageFile Added: dof_mono.png
2017-07-04 10:22ageFile Deleted: dof.png
2017-07-04 10:23ageFile Added: dof_stereo.png
2017-07-04 10:28duvNote Added: 0067960
2017-07-04 13:04kgvNote Added: 0067967
2017-07-04 13:05kgvNote Edited: 0067967bug_revision_view_page.php?bugnote_id=67967#r17026
2017-07-04 13:05kgvAssigned Tokgv => age
2017-07-04 13:05kgvStatusresolved => assigned
2017-07-04 13:39gitNote Added: 0067968
2017-07-04 13:45ageNote Added: 0067969
2017-07-04 13:45ageAssigned Toage => kgv
2017-07-04 13:45ageStatusassigned => resolved
2017-07-05 08:03kgvNote Added: 0067987
2017-07-05 08:03kgvAssigned Tokgv => age
2017-07-05 08:03kgvStatusresolved => assigned
2017-07-05 10:24kgvNote Added: 0067988
2017-07-05 10:25kgvNote Edited: 0067988bug_revision_view_page.php?bugnote_id=67988#r17032
2017-07-05 11:42gitNote Added: 0068000
2017-07-05 11:47ageNote Added: 0068001
2017-07-05 11:47ageAssigned Toage => kgv
2017-07-05 11:47ageStatusassigned => resolved
2017-07-05 12:06gitNote Added: 0068003
2017-07-05 12:06kgvNote Added: 0068004
2017-07-05 12:06kgvAssigned Tokgv => bugmaster
2017-07-05 12:06kgvStatusresolved => reviewed
2017-07-05 13:42apvAssigned Tobugmaster => apv
2017-07-05 14:33apvTest case numberv3d raytrace dof => v3d raytrace dof_mono, dof_stereo
2017-07-07 12:27apvNote Added: 0068070
2017-07-07 12:27apvAssigned Toapv => age
2017-07-07 12:27apvStatusreviewed => assigned
2017-07-07 12:29apvNote Added: 0068071
2017-07-07 14:22gitNote Added: 0068081
2017-07-07 14:27ageNote Added: 0068084
2017-07-07 14:27ageAssigned Toage => kgv
2017-07-07 14:27ageStatusassigned => resolved
2017-07-07 14:33kgvNote Added: 0068086
2017-07-07 14:33kgvAssigned Tokgv => bugmaster
2017-07-07 14:33kgvStatusresolved => reviewed
2017-07-07 14:44apvAssigned Tobugmaster => apv
2017-07-09 17:58bugmasterAssigned Toapv => mkv
2017-07-09 17:59bugmasterNote Added: 0068111
2017-07-10 12:49mkvNote Added: 0068153
2017-07-10 12:50mkvNote Added: 0068154
2017-07-10 12:50mkvAssigned Tomkv => bugmaster
2017-07-10 12:50mkvStatusreviewed => tested
2017-07-14 13:55bugmasterChangeset attached => occt master b27ab03d
2017-07-14 13:55bugmasterStatustested => verified
2017-07-14 13:55bugmasterResolutionopen => fixed
2017-07-17 10:05gitNote Added: 0068334
2017-07-17 10:05gitNote Added: 0068335
2017-07-17 10:05gitNote Added: 0068336
2017-07-17 10:05gitNote Added: 0068337
2017-07-17 10:05gitNote Added: 0068338
2017-07-17 10:05gitNote Added: 0068339
2017-07-17 10:05gitNote Added: 0068340
2017-09-29 16:18aivFixed in Version => 7.2.0
2017-09-29 16:28aivStatusverified => closed

Notes
(0066326)
git   
2017-05-19 15:26   
Branch CR28762 has been created by age.

SHA-1: 52f5719f4a3f7b970e03f8b482a33ff08bf2c707


Detailed log of new commits:

Author: age
Date: Fri May 19 13:35:45 2017 +0300

    0028762: Visualization - Implement depth-of-field effect
    
    Added new necessary parameters (aperture size, focal distance) to Graphic3d_RenderingParams.hxx.
    Added new camera parameters to OpenGL_View.hxx.
    Added new ray generation logic to RaytraceBase.fs.
(0066328)
age   
2017-05-19 15:28   
Please check the branch CR28762
(0066329)
kgv   
2017-05-19 15:33   
+    CameraApertureRadius = 0.f;
+    CameraFocalPlaneDist = 1.f;

Please put into member initialization list.

+  if (myRenderParams.CameraApertureRadius != myPrevCameraApertureRadius
+   || myRenderParams.CameraFocalPlaneDist != myPrevCameraFocalPlaneDist) {

Please check coding style.

+//!< aperture radius of camera used for depth-of-field
+uniform float uApertureRadius = 0.f;
+
+//!< focal distance of camera used for depth-of field
+uniform float uFocalPlaneDist = 10.f;

"//!<" is for documenting code at left side on the same line.

+  if (!myCamera->IsOrthographic())
+  {
+    aPrefixString += TCollection_AsciiString("\n#define DEPTH_OF_FIELD");
+  }

How this effect can be disabled for Perspective projection?
(0066359)
git   
2017-05-22 11:05   
Branch CR28762 has been updated by age.

SHA-1: 14cfaddb5632296b79a5d28d71f8b6e8faa8bef8


Detailed log of new commits:

Author: age
Date: Mon May 22 10:18:40 2017 +0300

    0028762: Visualization - Implement depth-of-field effect
    
    Fixed coding style.
    Fixed documentation.
    Added checking for enabling/disabling the effect.

(0066360)
age   
2017-05-22 11:07   
Dear kgv,
Please check the fix
(0066396)
kgv   
2017-05-22 14:54   
(edited on: 2017-05-22 14:55)
4 hours ago 	age	0028762: Visualization - Implement depth-of-field effect
2 days ago 	age	0028762: Visualization - Implement depth-of-field effect

The first commit in branch should start with bug Summary, the following - should not.

Fixed coding style.
Fixed documentation.
Added checking for enabling/disabling the effect.

The comments, which should not be included within final commit description, should be started with //.

(0066397)
kgv   
2017-05-22 15:05   
+  Standard_Boolean                  IsDofEnabled;                //!< enables/disables depth-of-field 
effect

Strong "ToEnableDof" sounds better in this context.
Description should specify default value and scope (e.g. Ray-Tracing).

+    if (myRenderParams.IsDofEnabled && myCamera->IsOrthographic()
+     || !myRenderParams.IsDofEnabled && !myCamera->IsOrthographic())
+    {
+      myRenderParams.IsDofEnabled = !myRenderParams.IsDofEnabled;
+      aToRebuildShaders = Standard_True;
+    }

Modifying input myRenderParams structure does not look correct.
Consider using myRaytraceParameters instead.
(0066431)
git   
2017-05-23 09:57   
Branch CR28762 has been updated by age.

SHA-1: 3f4e500519567349bf65ef0ec2d62b5633eb1065


Detailed log of new commits:

Author: age
Date: Tue May 23 09:36:39 2017 +0300

    // Moved depth-of-field variable from Graphic3d_RenderingParams to RaytracingParams

(0066432)
age   
2017-05-23 09:57   
Please review the fix
(0066433)
kgv   
2017-05-23 10:08   
Please add test case for new functionality and also attach screenshots to this issue.

(0066461)
git   
2017-05-23 13:13   
Branch CR28762 has been updated by age.

SHA-1: 3532ccd87c2c2f9d9e861f83ecb1278077e97cd0


Detailed log of new commits:

Author: age
Date: Tue May 23 11:00:09 2017 +0300

    added -focal and -aperture parameters for vrenderparams command
    added test case

(0066463)
age   
2017-05-23 13:15   
Please review the changes
(0066465)
kgv   
2017-05-23 13:59   
commit 3532ccd87c2c2f9d9e861f83ecb1278077e97cd0
Gitweb: http://git.dev.opencascade.org/gitweb/?p=occt.git&a=commit&h=3532ccd87c2c2f9d9e861f83ecb1278077e97cd0 [^]

Author: age <age@opencascade.com>
Date: Tue May 23 11:00:09 2017 +0300

    added -focal and -aperture parameters for vrenderparams command
    added test case

Summary of changes:
 src/ViewerTest/ViewerTest_ViewerCommands.cxx |   52 ++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

Test case is not pushed into the branch.

+    "\n      '-aperture     >= 0.0'       Aperture size of camera for depth-of-field"

+    "\n      '-focal        >= 0.0'       Focal distance of camera for depth-of-field"


It is unclear how to enable/disable DOF within this syntax.

+        std::cerr << "Error: wrong syntax at argument '" << anArg << "'\n";


std::cout

+      if (aParam.IsRealValue())
+      {
+        float aApertureSize = static_cast<float> (Draw::Atof(aParam.ToCString()));

Either skip IsRealValue() check, or use RealValue() instead of Draw::Atof().

   Standard_ShortReal                CameraApertureRadius;        //!< aperture radius of camera used 
for depth-of-field
   Standard_ShortReal                CameraFocalPlaneDist;        //!< focal distance of camera used 
for depth-of field

Defaults are still not specified within the variable description (see other members in the structure as reference).
(0066466)
git   
2017-05-23 15:04   
Branch CR28762 has been updated by age.

SHA-1: c7782e87162009eaae437973a2153d1ef3f4797c


Detailed log of new commits:

Author: age
Date: Tue May 23 14:41:29 2017 +0300

    added test case
    //fixed documentation
    //changed Draw::Atof() to RealValue()

(0066467)
age   
2017-05-23 15:06   
Please review the fix
(0066469)
kgv   
2017-05-23 15:11   
(edited on: 2017-05-23 15:19)
+        if (aApertureSize < 0)
+        {
+          std::cout << "Error: parameter can't be negative at argument '" << anArg 
<< "'.\n";


-    "\n      '-aperture     >= 0.0'       Aperture size of camera for depth-of-field"

+    "\n      '-aperture     >= 0.0'      Aperture size of perspective camera. Positive value 
enables depth-of-field"

What does it mean "positive value"?
You mean that 0 value disables DOF (since negative value will throw syntax error)?
It is better describing this also within Graphic3d_RenderingParams::CameraApertureRadius, e.g.:
//!< aperture radius of perspective camera for depth-of-field, 0.0 by default (e.g. disabled DOF); should be positive value to enable DOF

(0066472)
kgv   
2017-05-23 15:17   
(edited on: 2017-05-23 15:18)
1421     if (myRaytraceParameters.DepthOfField && myCamera->IsOrthographic()
1422      || !myRaytraceParameters.DepthOfField && !myCamera->IsOrthographic())
1423     {
1424       myRaytraceParameters.DepthOfField = !myRaytraceParameters.DepthOfField;
1425       aToRebuildShaders = Standard_True;
1426     }

As far as I understand the logic, you want DEPTH_OF_FIELD being always defined for perspective projection and always disabled for orthographic.
The following code would be more self-exploitational from my point of view:
 
const bool toEnableDof = !myCamera->IsOrthographic() && myRenderParams.CameraApertureRadius 
> 0.0f;
if (myRaytraceParameters.DepthOfField != toEnableDof)
{
  myRaytraceParameters.DepthOfField = toEnableDof;
  aToRebuildShaders = Standard_True;
}


(0066473)
age   
2017-05-23 15:31   
(edited on: 2017-05-24 09:21)
1) Yes, DOF is always disabled for orthographic and always enabled (even if aperture radius = 0) for perspective camera. If aperture radius = 0 DOF seems to be disabled from the user's point of view, but a new algorithm of rays generetion is still used.
So I think that the condition
   if (myRaytraceParameters.DepthOfField && myCamera->IsOrthographic()
    || !myRaytraceParameters.DepthOfField && !myCamera->IsOrthographic())
is more suitable.

2) "\n '-aperture >= 0.0' Aperture size of perspective camera. Positive value enables depth-of-field"

This style (command, posible values, description) was taken from lines above, e.g.

"\n '-maxrad > 0.0' Value used for clamping radiance estimation (PT mode)"

(0066537)
git   
2017-05-24 16:52   
Branch CR28762 has been updated by kgv.

SHA-1: 16e526723e5ed66f322c4f396059108ce399d0e6


Detailed log of new commits:

Author: kgv
Date: Wed May 24 16:51:56 2017 +0300

    // cosmetics

(0066538)
git   
2017-05-24 17:00   
Branch CR28762 has been updated forcibly by kgv.

SHA-1: 6f48fb006ad7e1ea019d9a1337f9b5cde92bf883
(0066539)
git   
2017-05-24 17:04   
Branch CR28762_1 has been created by kgv.

SHA-1: 4fa186f5def85923761e957f6963297adb0b6932


Detailed log of new commits:

Author: age
Date: Fri May 19 13:35:45 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.
(0066540)
kgv   
2017-05-24 17:06   
Please test the patch.
(0066560)
mkv   
2017-05-25 12:24   
Dear BugMaster,
Branch CR28762_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 4fa186f5def85923761e957f6963297adb0b6932

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1192

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28762_1-master-OCCT/Debian70-64/v3d/raytrace/dof.html [^]
http://occt-tests/CR28762_1-master-OCCT/Windows-64-VC10/v3d/raytrace/dof.html [^]
v3d raytrace dof: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91704027 / 91619223 [+0.09%]
Total CPU difference: 18978.060000000325 / 18660.510000000344 [+1.70%]
products component :
Total MEMORY difference: 31224152 / 31347866 [-0.39%]
Total CPU difference: 5429.849999999985 / 5401.239999999972 [+0.53%]
Testing on Windows:
occt component :
Total MEMORY difference: 58429939 / 58426283 [+0.01%]
Total CPU difference: 17632.278226698712 / 17319.43382129878 [+1.81%]
products component :
Total MEMORY difference: 22719542 / 22681228 [+0.17%]
Total CPU difference: 5430.535210899976 / 5370.256424499971 [+1.12%]

There are following differences in images found by testdiff.
http://occt-tests/CR28762_1-master-OCCT/Debian70-64/diff-Debian70-64.html [^]
http://occt-tests/CR28762_1-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
IMAGE bugs vis bug26676: bug26676.png differs
(0066561)
git   
2017-05-25 12:24   
Branch CR28762_1 has been updated by mkv.

SHA-1: 344ba9560c92be7c3c49a347ba8928fd01626257


Detailed log of new commits:

Author: mkv
Date: Thu May 25 12:03:12 2017 +0300

    // Small correction of image names in test cases

(0066562)
mkv   
2017-05-25 12:24   
Dear kgv,
Branch CR28762_1 has been rejected due to:
- differences in images
(0066565)
kgv   
2017-05-25 12:31   
> IMAGE bugs vis bug26676: bug26676.png differs
Image difference in v3d/raytrace/bug26617 is also a regression.
(0067162)
git   
2017-06-07 10:22   
Branch CR28762_2 has been created by age.

SHA-1: 0d8fd712ce7e25e4b44ae4e9286b854941d95227


Detailed log of new commits:

Author: age
Date: Fri May 19 13:35:45 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.

Author: mkv
Date: Thu May 25 12:03:12 2017 +0300

    // Small correction of image names in test cases

Author: age
Date: Tue May 30 10:18:10 2017 +0300

    // OpenGl_View_Raytrace.cxx - Disabled dof for stereo camera
(0067163)
kgv   
2017-06-07 10:23   
> OpenGl_View_Raytrace.cxx - Disabled dof for stereo camera
Why? What's wrong with DOF that it can not be applied for stereo pair?
(0067165)
age   
2017-06-07 10:36   
Current ray generation algorithm for dof does not work with stereo camera correctly. So due to lack of time it's desided to disable dof for stereo to resolve this issue.
Later (next week) when there will be enough time we will meet together and discuss this problem.
(0067717)
git   
2017-06-27 11:22   
Branch CR28762_3 has been created by duv.

SHA-1: 3976a6a7b842e4c81e26c27ec5e16002ad8f7f59


Detailed log of new commits:

Author: duv
Date: Tue Jun 27 11:22:31 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.
(0067718)
duv   
2017-06-27 11:25   
Dear kgv,
Please review the patch in branch CR28762_3.

A stereo camera should be handled correctly now.
(0067746)
git   
2017-06-27 18:58   
Branch CR28762_3 has been updated by kgv.

SHA-1: 4dae08ab26162a5d1b3a9e7e578e4f1304598fbb


Detailed log of new commits:

Author: kgv
Date: Tue Jun 27 18:58:52 2017 +0300

    # add test case

(0067747)
git   
2017-06-27 19:08   
Branch CR28762_3 has been updated by kgv.

SHA-1: 6d7a223ebe53325519094eb1d4300d25e8e39b10


Detailed log of new commits:

Author: kgv
Date: Tue Jun 27 19:08:49 2017 +0300

    # regenerate GLSL resource file

(0067756)
kgv   
2017-06-28 09:39   
There are regressions and test case for DOF+stereo also produces artifacts.
http://occt-tests/CR28762-master-KGV-OCCT/Windows-64-VC10/diff_summary.html [^]
http://occt-tests/CR28762-master-KGV-OCCT/Debian70-64/diff_summary.html [^]
v3d glsl tiles
v3d raytrace dof_stereo
(0067958)
git   
2017-07-04 10:15   
Branch CR28762_3 has been updated by age.

SHA-1: 6f29eaf9efe8eeb536c8a1c83bb8c7c2923a4bc9


Detailed log of new commits:

Author: age
Date: Tue Jul 4 10:15:02 2017 +0300

    // fixed interaction between adaptive sampling and stereo camera
    // function for ray generating was split into two functions

(0067959)
age   
2017-07-04 10:20   
Dear kgv,
Please review the patch in branch CR28762_3.

Dof is now supported only for path tracing, perspective and stereo camera.
Ray tracing uses old ray generation.
(0067960)
duv   
2017-07-04 10:28   
Dear kgv,
This behaviour chosen for following reasons:
1) DOF effect could not be implemented in ray-tracing mode
2) Tiled rendering is not supported for path tracing anyway

Thus there is no point to use more complicated ray generation routine
(0067967)
kgv   
2017-07-04 13:04   
(edited on: 2017-07-04 13:05)
Author: age
Date: Tue Jul 4 10:15:02 2017 +0300

    // fixed interaction between adaptive sampling and stereo camera
    // function for ray generating was split into two functions

Please note (for future integrations) that since now such commits should start with #, not // (see notification mail from Bugmaster).
Also patch should be squashed into new branch before sending for review, if it contains many changes (see recommended practices in bug advancement workflow).

+  //! Generate viewving rays (path tracing, perspective camera).

viewving

-  theViewPr.Inverted (theUnview);
+  theViewPr.Inverted(theUnview);

Unrelated and inconsistent to OCCT code style.

> 1) DOF effect could not be implemented in ray-tracing mode

It is strange statement, but anyhow.
Please add appropriate comment to Graphic3d_RenderingParams::CameraApertureRadius/CameraFocalPlaneDist in this case.

> 2) Tiled rendering is not supported for path tracing anyway

Tiled rendering failed on test case (v3d/glsl/tiles) using Ray-Tracing mode, not Path-Tracing.

(0067968)
git   
2017-07-04 13:39   
Branch CR28762_4 has been created by age.

SHA-1: 51839482189d55e266075e067e386a85d9a8791e


Detailed log of new commits:

Author: duv
Date: Tue Jun 27 11:22:31 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.
    OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
    OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
(0067969)
age   
2017-07-04 13:45   
Dear kgv,
Please review the patch in branch CR28762_4.

Both ray tracing and path tracing used the same ray generation algorithm, so after implementing dof test case v3d/glsl/tiles was broken. Now generation algorithm is divined into two - for ray tracing and path tracing.
(0067987)
kgv   
2017-07-05 08:03   
There is a regression - see test case v3d/raytrace/bug25221:
http://occt-tests/CR28762-master-KGV-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
http://occt-tests/CR28762-master-KGV-OCCT/Debian70-64/diff-Debian70-64-image.html [^]
(0067988)
kgv   
2017-07-05 10:24   
(edited on: 2017-07-05 10:25)
Dear age,

20 hours ago 	duv	0028762: Visualization, Ray tracing - Implement depth... CR28762_4
12 days ago 	nbv	0028849: [Regression to 7.1.0] Exception in Boolean... IR-2017-06-22

please also never forget rebasing the patch to the current master (there might be unexpected issues within automated regression testing system; this will be protected later).

(0068000)
git   
2017-07-05 11:42   
Branch CR28762_5 has been created by age.

SHA-1: 6a389b6cffc18f0a0edbe6e2409f20a1b94938bf


Detailed log of new commits:

Author: duv
Date: Tue Jun 27 11:22:31 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.
    OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
    OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
(0068001)
age   
2017-07-05 11:47   
Dear kgv,
Please review the patch in branch CR28762_5.

Highlight in path tracing should be handled correctly now.
(0068003)
git   
2017-07-05 12:06   
Branch CR28762_5 has been updated forcibly by kgv.

SHA-1: b9a362f055d598204f555d561d2da7eab7fc8583
(0068004)
kgv   
2017-07-05 12:06   
Please test updated patch.
(0068070)
apv   
2017-07-07 12:27   
Dear BugMaster,

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

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

New warnings have been detected during OCCT component building
on Linux:
http://jenkins-test-09.nnov.opencascade.com/view/CR28762_5-master/view/OCCT%20compile/job/CR28762_5-master-OCCT-Debian70-64-opt-compile/1/warnings21Result/ [^]
on MacOS:
http://jenkins-test-09.nnov.opencascade.com/view/CR28762_5-master/view/OCCT%20compile/job/CR28762_5-master-OCCT-MacOS-opt-compile/1/warnings9Result/ [^]

Regressions/Differences:
Not detected

Testing cases:
v3d raytrace dof_mono - OK
http://occt-tests/CR28762_5-master-OCCT/Debian70-64/v3d/raytrace/dof_mono.html [^]
http://occt-tests/CR28762_5-master-OCCT/Windows-64-VC10/v3d/raytrace/dof_mono.html [^]
v3d raytrace dof_stereo - OK
http://occt-tests/CR28762_5-master-OCCT/Debian70-64/v3d/raytrace/dof_stereo.html [^]
http://occt-tests/CR28762_5-master-OCCT/Windows-64-VC10/v3d/raytrace/dof_stereo.html [^]

Testing on Linux:
Total MEMORY difference: 92342809 / 92184313 [+0.17%]
Total CPU difference: 19253.589999999953 / 18926.030000000348 [+1.73%]

Testing on Windows:
Total MEMORY difference: 58847913 / 58850236 [-0.00%]
Total CPU difference: 17550.98610559868 / 17597.770805498705 [-0.27%]

There are differences in images found by testdiff:
http://occt-tests/CR28762_5-master-OCCT/Debian70-64/diff-Debian70-64-image.html [^]
http://occt-tests/CR28762_5-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
(0068071)
apv   
2017-07-07 12:29   
Dear age,

Branch CR28762_5 has been rejected due to:
- additional warnings
- differences in images
(0068081)
git   
2017-07-07 14:22   
Branch CR28762_6 has been created by age.

SHA-1: 8a1d033d64cc2c8fc31d17d57ec321e4c2179c1b


Detailed log of new commits:

Author: duv
Date: Tue Jun 27 11:22:31 2017 +0300

    0028762: Visualization, Ray tracing - Implement depth-of-field effect
    
    Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
    TKOpenGl - added new ray generation logic to RaytraceBase.fs.
    vrenderparams command - added -focal and -aperture parameters.
    OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
    OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
(0068084)
age   
2017-07-07 14:27   
Dear kgv,
Fixed warnings.

> - differences in images
I can't see any significant differences in images.
(0068086)
kgv   
2017-07-07 14:33   
Please test updated patch.
(0068111)
bugmaster   
2017-07-09 17:59   
Dear MKV,

Please analyze results of testing CR28762_6 in

http://jenkins-test-09.nnov.opencascade.com/view/CR28762_6-master/view/ALL/ [^]
(0068153)
mkv   
2017-07-10 12:49   
Dear BugMaster,
Branch CR28762_6 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 8a1d033d64cc2c8fc31d17d57ec321e4c2179c1b

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1160

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28762_6-master-OCCT/Debian70-64/v3d/raytrace/dof_mono.html [^]
http://occt-tests/CR28762_6-master-OCCT/Windows-64-VC10/v3d/raytrace/dof_mono.html [^]
v3d raytrace dof_mono: OK
http://occt-tests/CR28762_6-master-OCCT/Debian70-64/v3d/raytrace/dof_stereo.html [^]
http://occt-tests/CR28762_6-master-OCCT/Windows-64-VC10/v3d/raytrace/dof_stereo.html [^]
v3d raytrace dof_stereo: OK

Testing on Linux:
occt component :
Total CPU difference: 19118.920000000166 / 19289.600000000315 [-0.88%]
Total MEMORY difference: 92989654 / 91873853 [+1.21%]
products component :
Total CPU difference: 6459.410000000055 / 6487.850000000069 [-0.44%]
Total MEMORY difference: 37701232 / 37650261 [+0.14%]
Testing on Windows:
occt component :
Total CPU difference: 17802.178915798566 / 17787.234019998614 [+0.08%]
Total MEMORY difference: 59028235 / 59031436 [-0.01%]
products component :
Total CPU difference: 6691.506894000054 / 6584.849010300061 [+1.62%]
Total MEMORY difference: 27877065 / 28099545 [-0.79%]

There are no differences in images found by testdiff.
(0068154)
mkv   
2017-07-10 12:50   
Dear BugMaster,
Branch CR28762_6 from occt git-repository is TESTED.
(0068334)
git   
2017-07-17 10:05   
Branch CR28762 has been deleted by kgv.

SHA-1: 6f48fb006ad7e1ea019d9a1337f9b5cde92bf883
(0068335)
git   
2017-07-17 10:05   
Branch CR28762_1 has been deleted by kgv.

SHA-1: 344ba9560c92be7c3c49a347ba8928fd01626257
(0068336)
git   
2017-07-17 10:05   
Branch CR28762_2 has been deleted by kgv.

SHA-1: 0d8fd712ce7e25e4b44ae4e9286b854941d95227
(0068337)
git   
2017-07-17 10:05   
Branch CR28762_3 has been deleted by kgv.

SHA-1: 6f29eaf9efe8eeb536c8a1c83bb8c7c2923a4bc9
(0068338)
git   
2017-07-17 10:05   
Branch CR28762_4 has been deleted by kgv.

SHA-1: 51839482189d55e266075e067e386a85d9a8791e
(0068339)
git   
2017-07-17 10:05   
Branch CR28762_5 has been deleted by kgv.

SHA-1: b9a362f055d598204f555d561d2da7eab7fc8583
(0068340)
git   
2017-07-17 10:05   
Branch CR28762_6 has been deleted by kgv.

SHA-1: 8a1d033d64cc2c8fc31d17d57ec321e4c2179c1b