View Issue Details

IDProjectCategoryView StatusLast Update
0026437Open CASCADEOCCT:Visualizationpublic2016-04-20 15:49
ReporterdbpAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product VersionUnscheduled 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026437: Visualization - Improve path tracing rendering engine
DescriptionCurrent version of path tracing does not handle light sources correctly (e.g. implicit light paths), and thus some effects are not computed (e.g. caustics). Another point is relatively low performance, which can be increased using such techniques as coherent path tracing.
Steps To ReproduceSee samples/tcl/pathtrace.tcl
Additional information
and documentation updates
This patch optimizes path tracing rendering engine and resolves some problems with light source processing (which lead to incorrect rendering of caustics).

On 'Cornel Box' test scene performance was improved in 4 times on NVIDIA GTX770: 7.8 fps --> 35 fps. The same increase is observed on other scenes.

This patch introduces new rendering mode, which can be activated using '-blockrng' or '-brng' option of 'vrenderparams' command. In this mode, render engine uses the same RNG seed for 16x16 image blocks, so the coherence becomes better and performance increases in additional 3 times (e.g. 108 fps on 'Cornel Box' scene). The main problem with this mode is structured noise patterns, and thus intermediate images look unattractive. So, this mode is useful for final rendering, while for interactive modes it is better to use default behavior.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • cornelbox.png (134,494 bytes)

Relationships

parent of 0027250 closedabv Samples - define proper file header for pathtrace.tcl 

Activities

git

2015-07-15 10:54

administrator   ~0043037

Branch CR26437 has been created by dbp.

SHA-1: fe0ac98d95f0ccc791b3cf382a5e1ea71229978a


Detailed log of new commits:

Author: dbp
Date: Wed Jul 15 10:53:37 2015 +0300

    0026437: Visualization - Improve path tracing rendering engine

git

2015-07-15 10:55

administrator   ~0043038

Branch CR26437 has been updated by dbp.

SHA-1: dea4afe2ec8ba28df5d0b5c2d7ae537e9f2401da


Detailed log of new commits:

Author: dbp
Date: Wed Jul 15 10:54:38 2015 +0300

    Add missing file.

dbp

2015-07-15 11:11

developer  

cornelbox.png (134,494 bytes)

dbp

2015-07-15 11:12

developer   ~0043041

Attached image demonstrates correct handling of caustics via indirect light paths.

git

2015-07-15 13:05

administrator   ~0043055

Branch CR26437 has been updated by dbp.

SHA-1: efac1d8a90b1eabd2911a22474a08e6345fc316e


Detailed log of new commits:

Author: dbp
Date: Wed Jul 15 13:04:59 2015 +0300

    Update.

git

2015-07-15 17:52

administrator   ~0043084

Branch CR26437 has been updated by dbp.

SHA-1: 1d2f0195488a76836ab81dae5e0e81f3321bfcc4


Detailed log of new commits:

Author: dbp
Date: Wed Jul 15 17:51:54 2015 +0300

    Update.

git

2015-07-16 11:45

administrator   ~0043108

Branch CR26437_1 has been created by dbp.

SHA-1: fca53b95cddbbc67899aec2222342cec987c7f0e


Detailed log of new commits:

Author: dbp
Date: Thu Jul 16 10:22:21 2015 +0300

    0026437: Visualization - Improve path tracing rendering engine

dbp

2015-07-16 11:47

developer   ~0043109

Dear duv,

please review the patch in branch CR26437_1.

duv

2015-07-23 11:46

developer   ~0043330

Dear bugmaster,

Please test the patch.

git

2015-07-24 16:20

administrator   ~0043423

Branch CR26437_1 has been updated forcibly by apv.

SHA-1: 086fbb0699a13613c84861c74976b807714b0f8e

apv

2015-07-24 16:21

tester   ~0043424

Branch CR26437_1 has been rebased on the current master

apv

2015-07-27 14:42

tester   ~0043575

Dear BugMaster,

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

Number of compiler warnings:
occt component:
   Linux: 18 (15 on master)
   Windows: 1 (0 on master)
products component:
   Linux: 42 (39 on master)
   Windows: 0 (0 on master)
There are new additional warnings
on Linux:
1. Graphic3d_RenderingParams.hxx:49, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here [-Wreorder]
2. Graphic3d_RenderingParams.hxx:87, GNU C Compiler 4 (gcc), Priority: Normal
'Standard_Boolean Graphic3d_RenderingParams::UseEnvironmentMapBackground' [-Wreorder]
3. Graphic3d_RenderingParams.hxx:88, GNU C Compiler 4 (gcc), Priority: Normal
'Graphic3d_RenderingParams::CoherentPathTracingMode' will be initialized after [-Wreorder]
on Windows:
1. ViewerTest_ViewerCommands.cxx:5275, MSBuild, Priority: Normal
'initializing' : conversion from 'const Standard_Real' to 'const Standard_ShortReal', possible loss of data

Regressions/Differences:
Not detected

git

2015-07-27 18:11

administrator   ~0043601

Branch CR26437_1 has been updated by dbp.

SHA-1: 5446e60412f12f9b941551e715a70bcb8976704f


Detailed log of new commits:

Author: dbp
Date: Mon Jul 27 18:11:07 2015 +0300

    Fix compile warnings.

dbp

2015-07-27 18:12

developer   ~0043602

Dear bugmaster,

please re-test the patch in branch CR26437_1.

apn

2015-07-28 15:12

administrator   ~0043639

Dear BugMaster,

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

Number of compiler warnings:
occt component:
   Linux: 15 (15 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 39 (39 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 100257509 / 99931788 [+0.33%]
Total CPU difference: 17464.23999999952 / 17422.529999999442 [+0.24%]

Testing on Windows:
Total MEMORY difference: 57579294 / 58559165 [-1.67%]
Total CPU difference: 15921.664861298994 / 16891.725879599293 [-5.74%]

There is CPU difference on following test cases:
v3d raytrace bug25833: 0.7644049 / 0.1404009 [+444.44%]
bugs vis buc60632_1: 0.7176046 / 0.1716011 [+318.18%]
bugs vis buc60632_2: 0.8424054 / 0.1248008 [+575.00%]

dbp

2015-07-30 10:12

developer   ~0043690

Dear bugmaster,

The following test results are not related to the patch:

There is CPU difference on following test cases:
v3d raytrace bug25833: 0.7644049 / 0.1404009 [+444.44%]
bugs vis buc60632_1: 0.7176046 / 0.1716011 [+318.18%]
bugs vis buc60632_2: 0.8424054 / 0.1248008 [+575.00%]

They probably caused by some background processes on test machine.

Could you please re-check it and integrate the patch?

git

2015-08-14 10:53

administrator   ~0044150

Branch CR26437_1 has been deleted by inv.

SHA-1: 5446e60412f12f9b941551e715a70bcb8976704f

git

2015-08-14 10:55

administrator   ~0044184

Branch CR26437 has been deleted by inv.

SHA-1: 1d2f0195488a76836ab81dae5e0e81f3321bfcc4

Related Changesets

occt: master 8c820969

2015-07-30 09:49:43

dbp


Committer: bugmaster Details Diff
0026437: Visualization - Improve path tracing rendering engine

Fix compile warnings.
Affected Issues
0026437
add - samples/tcl/pathtrace.tcl Diff File
mod - src/Graphic3d/Graphic3d_RenderingParams.hxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Raytrace.cxx 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

Issue History

Date Modified Username Field Change
2015-07-15 10:52 dbp New Issue
2015-07-15 10:52 dbp Assigned To => dbp
2015-07-15 10:54 git Note Added: 0043037
2015-07-15 10:55 git Note Added: 0043038
2015-07-15 11:11 dbp File Added: cornelbox.png
2015-07-15 11:12 dbp Note Added: 0043041
2015-07-15 13:05 git Note Added: 0043055
2015-07-15 17:52 git Note Added: 0043084
2015-07-16 11:45 git Note Added: 0043108
2015-07-16 11:47 dbp Note Added: 0043109
2015-07-16 11:47 dbp Assigned To dbp => duv
2015-07-16 11:47 dbp Status new => resolved
2015-07-16 11:47 dbp Steps to Reproduce Updated
2015-07-16 11:55 dbp Additional Information Updated
2015-07-16 11:56 dbp Additional Information Updated
2015-07-16 11:57 dbp Additional Information Updated
2015-07-23 11:46 duv Note Added: 0043330
2015-07-23 11:46 duv Assigned To duv => bugmaster
2015-07-23 11:46 duv Status resolved => reviewed
2015-07-24 16:20 git Note Added: 0043423
2015-07-24 16:21 apv Note Added: 0043424
2015-07-24 16:21 apv Assigned To bugmaster => apv
2015-07-27 14:42 apv Note Added: 0043575
2015-07-27 14:42 apv Assigned To apv => dbp
2015-07-27 14:42 apv Status reviewed => assigned
2015-07-27 18:11 git Note Added: 0043601
2015-07-27 18:11 dbp Status assigned => resolved
2015-07-27 18:12 dbp Note Added: 0043602
2015-07-27 18:12 dbp Assigned To dbp => bugmaster
2015-07-27 18:12 dbp Status resolved => reviewed
2015-07-27 18:15 apn Assigned To bugmaster => apn
2015-07-28 15:12 apn Note Added: 0043639
2015-07-28 15:20 apn Test case number => Not needed
2015-07-28 15:20 apn Assigned To apn => dbp
2015-07-28 15:20 apn Status reviewed => assigned
2015-07-30 10:09 dbp Assigned To dbp => kgv
2015-07-30 10:09 dbp Status assigned => resolved
2015-07-30 10:12 dbp Note Added: 0043690
2015-07-30 10:12 dbp Assigned To kgv => bugmaster
2015-07-30 10:12 dbp Status resolved => reviewed
2015-07-30 11:24 bugmaster Status reviewed => tested
2015-07-31 12:31 bugmaster Changeset attached => occt master 8c820969
2015-07-31 12:31 bugmaster Status tested => verified
2015-07-31 12:31 bugmaster Resolution open => fixed
2015-08-14 10:53 git Note Added: 0044150
2015-08-14 10:55 git Note Added: 0044184
2016-03-11 11:33 kgv Relationship added parent of 0027250
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:49 aiv Status verified => closed