]> OCCT Git - occt-copy.git/commit
0028218: Visualization, Path Tracing - Redesign path tracing materials to support...
authordbp <dbp@opencascade.org>
Fri, 18 Nov 2016 14:53:10 +0000 (17:53 +0300)
committerkgv <kgv@opencascade.com>
Sat, 17 Mar 2018 09:54:08 +0000 (12:54 +0300)
commit3f864175802c5f4083ee29e3872e610b8a4795a8
treeea876a3e33d7c70380ccc0b5e3d026b670498a8d
parentca9c3e9ad55e6e3b3fd1c402efac443051efadf7
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
15 files changed:
.gitattributes
samples/tcl/pathtrace_cube.tcl
samples/tcl/pathtrace_materials.tcl [new file with mode: 0644]
src/Graphic3d/Graphic3d_BSDF.cxx
src/Graphic3d/Graphic3d_BSDF.hxx
src/Graphic3d/Graphic3d_MaterialAspect.cxx
src/OpenGl/OpenGl_SceneGeometry.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/Shaders/PathtraceBase.fs
src/Shaders/RaytraceBase.fs
src/Shaders/Shaders_PathtraceBase_fs.pxx
src/Shaders/Shaders_RaytraceBase_fs.pxx
src/ViewerTest/ViewerTest.cxx
tests/v3d/raytrace/sample_ball_alpha
tests/v3d/raytrace/sample_materials [new file with mode: 0644]