MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028218Open CASCADE[OCCT] OCCT:Visualizationpublic2016-12-13 21:042017-09-29 16:24
Reporterdbp 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.2.0Fixed in Version[OCCT] 7.2.0 
Summary0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
DescriptionCurrently, OCCT path tracing engine uses very simple additive material (BSDF) model, so it is possible to reproduce behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry materials like car paint or ceramic could not be modeled well. OCCT BSDF can be significantly improved by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with currently supported scattering model.
Steps To ReproducePlease check new sample:
samples\tcl\pathtrace_materials.tcl
TagsNo tags attached.
Test case numberv3d raytrace sample_materials
Attached Filespng file icon test.png (186,913 bytes) 2017-01-17 23:10
png file icon bmw_1.png (4,913,501 bytes) 2017-01-17 23:10
png file icon bmw_2.png (4,878,460 bytes) 2017-01-17 23:11

- Relationships

-  Notes
(0061639)
git (administrator)
2016-12-13 21:17

Branch CR28218 has been created by dbp.

SHA-1: 6dea9b6c933c870a8b090e20f274e51aab2fb9d4


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
(0062150)
git (administrator)
2016-12-26 22:11

Branch CR28218_1 has been created by duv.

SHA-1: 5178055cda63cf11fa1c6f9f7b015a4f96cf96a5


Detailed log of new commits:

Author: duv
Date: Mon Dec 26 22:10:50 2016 +0300

    Fixes for cadrays
(0062718)
git (administrator)
2017-01-17 23:01

Branch CR28218_2 has been created by dbp.

SHA-1: cb33178e445275d150d9c932b6cca3c3f88f918d


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
    
    Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
    behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
    materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
    by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
    layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
    transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
    different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
    supported scattering model. All new parameters are available via 'vbsdf' command.
    
    Please check new sample for few material examples:
    samples\tcl\pathtrace_materials.tcl
(0062719)
dbp (developer)
2017-01-17 23:02

Dear kgv,

Could you please review the path in branch CR28218_2?
(0062720)
git (administrator)
2017-01-17 23:03

Branch CR28218_2 has been updated forcibly by dbp.

SHA-1: d752086d8e69d80507e75fa28e7151c514b83581
(0062721)
dbp (developer)
2017-01-17 23:07

New test case was added:
test v3d raytrace sample_materials

(Reference image attached)
(0062722)
kgv (developer)
2017-01-17 23:08

> (Reference image attached)
nope...
(0062723)
dbp (developer)
2017-01-17 23:14

An example of real-life material usage is given in images bmw_1.png and bmw_2.png. The model was taken from:
https://github.com/GPUOpen-LibrariesAndSDKs/RadeonRays_SDK/tree/master/Resources/bmw [^]

License:
https://github.com/GPUOpen-LibrariesAndSDKs/RadeonRays_SDK/blob/master/LICENSE.txt [^]
(0062727)
abv (manager)
2017-01-18 10:12

I still believe that support of bump textures would allow providing more realistic display of materials in many more situations than fine-tuned scattering model of material.
(0062728)
dbp (developer)
2017-01-18 10:25

Dear abv,

You are absolutely right, support of bump mapping is important and will be added in next patches. But, it is just an additional feature not affecting actual material model. In frames of this patch, the fundamental scattering model was improved to support wide range of materials.

As for bump mapping, it should be considered in frames of multi-texturing support. In this way, we will be able to assign several textures for each object: diffuse map, specular map, normal map (for bum mapping), etc.
(0062733)
git (administrator)
2017-01-18 10:54

Branch CR28218_2 has been updated forcibly by dbp.

SHA-1: a20b6fd2015949f8825d1ca9720b4fe4a3e33829
(0062759)
git (administrator)
2017-01-18 15:45

Branch CR28218_2 has been updated forcibly by dbp.

SHA-1: 4e706b5f182f470b61e58fd1c9fab880d51fee3a
(0062768)
git (administrator)
2017-01-18 17:16

Branch CR28218_cadrays has been created by dbp.

SHA-1: 9bddc3a11dcc65eec56bec7c4b39e869a9e1cc37


Detailed log of new commits:

Author: dbp
Date: Wed Jan 18 17:13:43 2017 +0300

    Cosmetics.

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028129: Visualization, Path Tracing - Improve interactivity in "steady" rendering mode

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
    
    Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
    behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
    materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
    by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
    layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
    transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
    different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
    supported scattering model. All new parameters are available via 'vbsdf' command.
    
    Please check new sample for few material examples:
    samples\tcl\pathtrace_materials.tcl

Author: dbp
Date: Wed Jan 18 14:24:13 2017 +0300

    0028369: Visualization, Path Tracing - Expose radiance clamping setting in path tracing mode
    
    New parameter was added in the vrenderparams command:
    vrenderparams -maxrad <value>
(0062770)
git (administrator)
2017-01-18 17:53

Branch CR28218_cadrays has been updated by dbp.

SHA-1: 489adedec4a80d69a1a7ef3e50224178b44fc316


Detailed log of new commits:

Author: dbp
Date: Wed Jan 18 17:53:18 2017 +0300

    Shader fix.

(0062798)
git (administrator)
2017-01-19 14:04

Branch CR28218_cadrays has been updated by dbp.

SHA-1: 4fddba634f9ea4bb3e2d1bffa99de6e44df4c9b2


Detailed log of new commits:

Author: dbp
Date: Thu Jan 19 14:03:55 2017 +0300

    Fix for ISS.

(0062995)
kgv (developer)
2017-01-25 12:04
edited on: 2017-01-27 15:55

Could you please re-base patch on top of current master?

(0063763)
git (administrator)
2017-02-12 18:38

Branch CR28218_3 has been created by dbp.

SHA-1: 288b0a585e13c2fab1d04ca57ad5855b1562a6aa


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
    
    Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
    behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
    materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
    by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
    layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
    transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
    different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
    supported scattering model. All new parameters are available via 'vbsdf' command.
    
    Please check new sample for few material examples:
    samples\tcl\pathtrace_materials.tcl
(0063764)
dbp (developer)
2017-02-12 18:39

Dear kgv,

Please find rebased patch in branch CR28218_3.
(0063769)
kgv (developer)
2017-02-13 10:34

Please test the patch.
(0063821)
apv (tester)
2017-02-15 15:32

Dear BugMaster,

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

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: 1192

Regressions/Differences:
http://occt-tests/CR28218_3-master-OCCT/Debian70-64/summary.html [^]
http://occt-tests/CR28218_3-master-OCCT/Windows-64-VC10/summary.html [^]
v3d raytrace sample_ball_alpha

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

Testing on Linux:
Total MEMORY difference: 92678837 / 93176052 [-0.53%]
Total CPU difference: 20035.64000000014 / 19783.280000000217 [+1.28%]

Testing on Windows:
Total MEMORY difference: 57831867 / 57829936 [+0.00%]
Total CPU difference: 18418.24246489846 / 18793.846072598604 [-2.00%]

There are differences in images found by testdiff:
http://occt-tests/CR28218_3-master-OCCT/Debian70-64/diff-Debian70-64.html [^]
http://occt-tests/CR28218_3-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
v3d raytrace sample_ball
v3d raytrace sample_ball_alpha
(0063822)
apv (tester)
2017-02-15 15:34

Dear Denis,

Branch CR28218_3 has been rejected due to:
- regressions/differences/improvements
- differences in images
(0063838)
git (administrator)
2017-02-16 13:29

Branch CR28218_5 has been created by dbp.

SHA-1: 673176116c6bc895c1733e457dc34e325ec83c4a


Detailed log of new commits:

Author: dbp
Date: Fri Nov 18 17:53:10 2016 +0300

    0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model
    
    Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
    behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
    materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
    by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
    layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
    transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
    different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
    supported scattering model. All new parameters are available via 'vbsdf' command.
    
    Please check new sample for few material examples:
    samples\tcl\pathtrace_materials.tcl
(0063839)
dbp (developer)
2017-02-16 13:31
edited on: 2017-02-16 15:53

Dear bugmaster,

All changes except of sample_ball_alpha are OK. The regression was fixed in branch CR28218_4. Please retest the patch.

(0063846)
git (administrator)
2017-02-16 15:52

Branch CR28218_4 has been created by dbp.

SHA-1: 6b36050814002ea4b3d409efcd20b2a3c61a1dd7


Detailed log of new commits:

Author: dbp
Date: Thu Feb 16 15:50:26 2017 +0300

    Fix shader compilation issue.
(0063851)
git (administrator)
2017-02-16 16:32

Branch CR28218_4 has been updated forcibly by dbp.

SHA-1: d5bb144a3089b4afa70c1d987eedc6fb617012c2
(0063852)
git (administrator)
2017-02-16 16:35

Branch CR28218_4 has been updated forcibly by dbp.

SHA-1: de27504878fa6fc1b052b6379a29bf62ecd16f23
(0063876)
apv (tester)
2017-02-17 12:55

Dear BugMaster,

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

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: 1202

Regressions/Differences:
http://occt-tests/CR28218_4-master-OCCT/Debian70-64/summary.html [^]
http://occt-tests/CR28218_4-master-OCCT/Windows-64-VC10/summary.html [^]
v3d raytrace sample_ball_alpha

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

Testing on Linux:
Total MEMORY difference: 92994090 / 93164309 [-0.18%]
Total CPU difference: 20050.330000000165 / 19783.010000000217 [+1.35%]

Testing on Windows:
Total MEMORY difference: 57831922 / 57829936 [+0.00%]
Total CPU difference: 18313.487793398555 / 18793.846072598604 [-2.56%]
(0063877)
apv (tester)
2017-02-17 12:56

Dear Denis,

Branch CR28218_4 has been rejected due to:
- regressions/differences/improvements
(0063881)
git (administrator)
2017-02-17 13:23

Branch CR28218_4 has been updated by dbp.

SHA-1: 2b794805074e64a3d74632ee843c878c0c38650a


Detailed log of new commits:

Author: dbp
Date: Fri Feb 17 13:23:03 2017 +0300

    Fix test case sample_ball_alpha.

(0063882)
dbp (developer)
2017-02-17 13:24

Dear apv,

Please find fix for test case in the separate commit in branch CR28218_4.
(0063890)
apv (tester)
2017-02-17 15:56

Test case v3d raytrace sample_ball_alpha has been verified:
http://occt-tests/CR28218_4-master-OCCT/Debian70-64/v3d/raytrace/sample_ball_alpha.html [^]
http://occt-tests/CR28218_4-master-OCCT/Windows-64-VC10/v3d/raytrace/sample_ball_alpha.html [^]
(0064478)
git (administrator)
2017-03-20 14:34

Branch CR28218_4 has been deleted by inv.

SHA-1: 2b794805074e64a3d74632ee843c878c0c38650a
(0064484)
git (administrator)
2017-03-20 14:34

Branch CR28218_5 has been deleted by inv.

SHA-1: 673176116c6bc895c1733e457dc34e325ec83c4a
(0064491)
git (administrator)
2017-03-20 14:35

Branch CR28218_3 has been deleted by inv.

SHA-1: 288b0a585e13c2fab1d04ca57ad5855b1562a6aa
(0064516)
git (administrator)
2017-03-20 14:36

Branch CR28218_cadrays has been deleted by inv.

SHA-1: 4fddba634f9ea4bb3e2d1bffa99de6e44df4c9b2
(0064517)
git (administrator)
2017-03-20 14:36

Branch CR28218_2 has been deleted by inv.

SHA-1: 4e706b5f182f470b61e58fd1c9fab880d51fee3a
(0064525)
git (administrator)
2017-03-20 14:37

Branch CR28218_1 has been deleted by inv.

SHA-1: 5178055cda63cf11fa1c6f9f7b015a4f96cf96a5
(0064527)
git (administrator)
2017-03-20 14:37

Branch CR28218 has been deleted by inv.

SHA-1: 6dea9b6c933c870a8b090e20f274e51aab2fb9d4

- Related Changesets
occt: master 05aa616d
Timestamp: 2016-11-18 14:53:10
Author: dbp
Committer: bugmaster
Details ] Diff ]
0028218: Visualization, Path Tracing - Redesign path tracing materials to support two-layered model

Existing OCCT path tracing engine used very simple additive material (BSDF) model, so it was possible to reproduce
behavior only of very basic materials such as metal, glass, or plastic. However, some important in CAD industry
materials like car paint or ceramic could not be modeled well. In this patch, OCCT BSDF was significantly improved
by replacing additive model with two-layered scattering model. Therefore, we have base diffuse, glossy, or transmissive
layer, covered by one glossy/specular coat. The layers themselves have no thickness; they can simply reflect light or
transmits it to the layer under it. Balancing different combinations of layer properties can produce a wide range of
different effects. At the same time, disabling the first (coat) layer allows to keep full compatibility with previously
supported scattering model. All new parameters are available via 'vbsdf' command.

Location of new sample for few material examples:
samples\tcl\pathtrace_materials.tcl

Fix shader compilation issue.

Fix test case sample_ball_alpha.

Shaders_PathtraceBase_fs.pxx - regenerate resource from origin
mod - .gitattributes Diff ] File ]
mod - samples/tcl/pathtrace_cube.tcl Diff ] File ]
add - samples/tcl/pathtrace_materials.tcl Diff ] File ]
mod - src/Graphic3d/Graphic3d_BSDF.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_BSDF.hxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_MaterialAspect.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_SceneGeometry.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/Shaders_PathtraceBase_fs.pxx Diff ] File ]
mod - src/Shaders/Shaders_RaytraceBase_fs.pxx Diff ] File ]
mod - src/ViewerTest/ViewerTest.cxx Diff ] File ]
mod - tests/v3d/raytrace/sample_ball_alpha Diff ] File ]
add - tests/v3d/raytrace/sample_materials Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-12-13 21:04 dbp New Issue
2016-12-13 21:04 dbp Assigned To => dbp
2016-12-13 21:17 git Note Added: 0061639
2016-12-26 22:11 git Note Added: 0062150
2017-01-17 23:01 git Note Added: 0062718
2017-01-17 23:02 dbp Note Added: 0062719
2017-01-17 23:02 dbp Assigned To dbp => kgv
2017-01-17 23:02 dbp Status new => resolved
2017-01-17 23:02 dbp Steps to Reproduce Updated View Revisions
2017-01-17 23:03 git Note Added: 0062720
2017-01-17 23:07 dbp Note Added: 0062721
2017-01-17 23:08 kgv Note Added: 0062722
2017-01-17 23:10 dbp File Added: test.png
2017-01-17 23:10 dbp File Added: bmw_1.png
2017-01-17 23:11 dbp File Added: bmw_2.png
2017-01-17 23:14 dbp Note Added: 0062723
2017-01-18 10:12 abv Note Added: 0062727
2017-01-18 10:25 dbp Note Added: 0062728
2017-01-18 10:54 git Note Added: 0062733
2017-01-18 15:45 git Note Added: 0062759
2017-01-18 17:16 git Note Added: 0062768
2017-01-18 17:53 git Note Added: 0062770
2017-01-19 14:04 git Note Added: 0062798
2017-01-25 12:04 kgv Note Added: 0062995
2017-01-25 12:04 kgv Assigned To kgv => dbp
2017-01-25 12:04 kgv Status resolved => assigned
2017-01-27 15:55 kgv Note Edited: 0062995 View Revisions
2017-02-12 18:38 git Note Added: 0063763
2017-02-12 18:39 dbp Note Added: 0063764
2017-02-12 18:39 dbp Assigned To dbp => kgv
2017-02-12 18:39 dbp Status assigned => resolved
2017-02-13 10:34 kgv Note Added: 0063769
2017-02-13 10:34 kgv Assigned To kgv => bugmaster
2017-02-13 10:34 kgv Status resolved => reviewed
2017-02-13 11:49 apv Assigned To bugmaster => apv
2017-02-15 15:32 apv Note Added: 0063821
2017-02-15 15:32 apv Assigned To apv => dbp
2017-02-15 15:32 apv Status reviewed => assigned
2017-02-15 15:34 apv Note Added: 0063822
2017-02-15 15:34 apv Test case number => v3d raytrace sample_materials
2017-02-16 13:29 git Note Added: 0063838
2017-02-16 13:31 dbp Note Added: 0063839
2017-02-16 13:31 dbp Assigned To dbp => bugmaster
2017-02-16 13:31 dbp Status assigned => resolved
2017-02-16 13:32 dbp Status resolved => reviewed
2017-02-16 15:52 git Note Added: 0063846
2017-02-16 15:53 dbp Note Edited: 0063839 View Revisions
2017-02-16 16:32 git Note Added: 0063851
2017-02-16 16:35 git Note Added: 0063852
2017-02-16 19:20 apv Assigned To bugmaster => apv
2017-02-17 12:55 apv Note Added: 0063876
2017-02-17 12:55 apv Assigned To apv => dbp
2017-02-17 12:55 apv Status reviewed => assigned
2017-02-17 12:56 apv Note Added: 0063877
2017-02-17 13:23 git Note Added: 0063881
2017-02-17 13:23 dbp Status assigned => resolved
2017-02-17 13:24 dbp Note Added: 0063882
2017-02-17 13:24 dbp Assigned To dbp => apv
2017-02-17 13:24 dbp Status resolved => reviewed
2017-02-17 15:56 apv Note Added: 0063890
2017-02-17 15:56 apv Assigned To apv => bugmaster
2017-02-17 15:56 apv Status reviewed => tested
2017-03-03 16:25 bugmaster Changeset attached => occt master 05aa616d
2017-03-03 16:25 bugmaster Status tested => verified
2017-03-03 16:25 bugmaster Resolution open => fixed
2017-03-20 14:34 git Note Added: 0064478
2017-03-20 14:34 git Note Added: 0064484
2017-03-20 14:35 git Note Added: 0064491
2017-03-20 14:36 git Note Added: 0064516
2017-03-20 14:36 git Note Added: 0064517
2017-03-20 14:37 git Note Added: 0064525
2017-03-20 14:37 git Note Added: 0064527
2017-09-29 16:20 aiv Fixed in Version => 7.2.0
2017-09-29 16:24 aiv Status verified => closed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker