View Issue Details

IDProjectCategoryView StatusLast Update
0028126Open CASCADEOCCT:Visualizationpublic2017-09-29 16:31
ReporterdbpAssigned Toapn  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models
DescriptionBy default, all non-transmissive scattering models (BSDF) in OCCT are one-sided (they absorb all light that is received on the interior-facing side of any associated surfaces). Holes and visible back-facing parts are thus exposed as black regions. While usually it is a preferred mode (since it will reveal modeling issues early on), sometimes it is necessary to deal with improperly closed geometry (e.g. shell or imported 3D meshes), where the one-sided behavior is bothersome.

It is proposed to to provide ability to switch from one-sided scattering models into their two-sided versions.
Steps To Reproducevrenderparams -twoside [on|off]

Also, please see test case:
v3d raytrace sample_cube_twosided
Additional information
and documentation updates
New rendering parameter was added into Graphic3d_RenderingParams structure:
Standard_Boolean TwoSidedBsdfModels; //!< forces path tracing to use two-sided versions of original one-sided scattering models

By default, it is disabled (Standard_False). This parameter can be also controled via vrenderparams DRAW command:

vrenderparams -twoside [on|off]
TagsNo tags attached.
Test case numberv3d raytrace sample_cube_twosided

Attached Files

  • sample_cube_twosided_onesided.png (97,712 bytes)
  • sample_cube_twosided_twosided.png (140,916 bytes)

Relationships

parent of 0028241 closedapn Visualization, Path tracing - shader compilation error on Radeon 290 

Activities

dbp

2016-11-18 11:07

developer   ~0060513

New test case was added:
v3d raytrace sample_cube_twosided

See images attached for the reference result.

dbp

2016-11-18 11:07

developer  

sample_cube_twosided_onesided.png (97,712 bytes)

dbp

2016-11-18 11:07

developer  

sample_cube_twosided_twosided.png (140,916 bytes)

git

2016-11-18 11:13

administrator   ~0060514

Branch CR28126 has been created by dbp.

SHA-1: 3277cf927db0fc5b055e571facfc80414d0e1a92


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 11:13:29 2016 +0300

    0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models

dbp

2016-11-18 11:14

developer   ~0060516

Dear kgv,

Could you please review the patch in branch CR28126?

kgv

2016-11-27 12:23

developer   ~0060787

Please add test case for new option.

dbp

2016-11-28 10:06

developer   ~0060792

Dear kgv,

The test case is already presented. Please check
v3d raytrace sample_cube_twosided

git

2016-11-30 11:12

administrator   ~0060889

Branch CR28126_1 has been created by dbp.

SHA-1: 1da0a01dc4398c387856ce9d1ff4195b7ba67878


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 11:13:29 2016 +0300

    0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models

dbp

2016-11-30 11:12

developer   ~0060890

Dear kgv,

Please review the patch in branch CR28126_1.

kgv

2016-11-30 11:25

developer   ~0060891

Please test the patch and check that generated resource files (src/Shaders/Shaders_PathtraceBase_fs.pxx) are up-to-date before integration.

mkv

2016-12-01 19:13

tester   ~0060995

Dear BugMaster,
Branch CR28126_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: 1da0a01dc4398c387856ce9d1ff4195b7ba67878

Number of compiler warnings:

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

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1135

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28126_1-master-OCCT/Debian70-64/v3d/raytrace/sample_cube_twosided.html
http://occt-tests/CR28126_1-master-OCCT/Windows-64-VC10/v3d/raytrace/sample_cube_twosided.html
v3d raytrace sample_cube_twosided: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91682492 / 91448949 [+0.26%]
Total CPU difference: 21926.34000000026 / 21816.830000000187 [+0.50%]
products component :
Total MEMORY difference: 29967870 / 29990998 [-0.08%]
Total CPU difference: 5309.239999999975 / 5317.709999999961 [-0.16%]

Testing on Windows:
occt component :
Total MEMORY difference: 56941296 / 56948258 [-0.01%]
Total CPU difference: 20342.920402498537 / 20501.8074209986 [-0.77%]
products component :
Total MEMORY difference: 20842013 / 20808844 [+0.16%]
Total CPU difference: 5271.398590799977 / 5254.222880699978 [+0.33%]

There are no differences in images found by testdiff.

mkv

2016-12-01 19:14

tester   ~0060996

Dear BugMaster,
Branch CR28126_1 is TESTED.

git

2016-12-18 10:53

administrator   ~0061793

Branch CR28126 has been deleted by kgv.

SHA-1: 3277cf927db0fc5b055e571facfc80414d0e1a92

git

2016-12-18 10:53

administrator   ~0061794

Branch CR28126_1 has been deleted by kgv.

SHA-1: 1da0a01dc4398c387856ce9d1ff4195b7ba67878

Related Changesets

occt: master b4327ba8

2016-11-18 08:13:29

dbp


Committer: apn Details Diff
0028126: Visualization, Path tracing - Provide ability to use two-sided scattering models Affected Issues
0028126
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/Shaders_PathtraceBase_fs.pxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
add - tests/v3d/raytrace/sample_cube_twosided Diff File

Issue History

Date Modified Username Field Change
2016-11-18 11:06 dbp New Issue
2016-11-18 11:06 dbp Assigned To => dbp
2016-11-18 11:07 dbp Note Added: 0060513
2016-11-18 11:07 dbp File Added: sample_cube_twosided_onesided.png
2016-11-18 11:07 dbp File Added: sample_cube_twosided_twosided.png
2016-11-18 11:09 dbp Additional Information Updated
2016-11-18 11:13 git Note Added: 0060514
2016-11-18 11:14 dbp Note Added: 0060516
2016-11-18 11:14 dbp Assigned To dbp => kgv
2016-11-18 11:14 dbp Status new => resolved
2016-11-18 11:14 dbp Steps to Reproduce Updated
2016-11-27 12:23 kgv Note Added: 0060787
2016-11-27 12:23 kgv Assigned To kgv => dbp
2016-11-27 12:23 kgv Severity minor => feature
2016-11-27 12:23 kgv Status resolved => assigned
2016-11-28 10:06 dbp Note Added: 0060792
2016-11-28 10:06 dbp Assigned To dbp => kgv
2016-11-28 10:06 dbp Status assigned => resolved
2016-11-28 15:24 kgv Assigned To kgv => dbp
2016-11-28 15:24 kgv Status resolved => assigned
2016-11-30 11:12 git Note Added: 0060889
2016-11-30 11:12 dbp Note Added: 0060890
2016-11-30 11:13 dbp Assigned To dbp => kgv
2016-11-30 11:13 dbp Status assigned => resolved
2016-11-30 11:25 kgv Note Added: 0060891
2016-11-30 11:25 kgv Assigned To kgv => bugmaster
2016-11-30 11:25 kgv Status resolved => reviewed
2016-11-30 12:11 mkv Assigned To bugmaster => mkv
2016-12-01 19:13 mkv Note Added: 0060995
2016-12-01 19:14 mkv Note Added: 0060996
2016-12-01 19:14 mkv Assigned To mkv => bugmaster
2016-12-01 19:14 mkv Status reviewed => tested
2016-12-01 19:14 mkv Test case number => v3d raytrace sample_cube_twosided
2016-12-09 16:46 apn Changeset attached => occt master b4327ba8
2016-12-09 16:46 apn Assigned To bugmaster => apn
2016-12-09 16:46 apn Status tested => verified
2016-12-09 16:46 apn Resolution open => fixed
2016-12-18 10:53 git Note Added: 0061793
2016-12-18 10:53 git Note Added: 0061794
2016-12-18 21:59 kgv Relationship added parent of 0028241
2017-09-29 16:21 aiv Fixed in Version => 7.2.0
2017-09-29 16:31 aiv Status verified => closed