1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

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
This commit is contained in:
dbp
2016-11-18 17:53:10 +03:00
committed by bugmaster
parent dc858f4c5a
commit 05aa616d6d
15 changed files with 1045 additions and 656 deletions

View File

@@ -51,8 +51,8 @@ psphere s 0.2
vdisplay -noupdate s
vlocation -noupdate s -setLocation 0.21 0.3 0.2
vsetmaterial -noupdate s glass
vbsdf s -absorpcolor 0.8 0.8 1.0
vbsdf s -absorpcoeff 6
vbsdf s -absorpColor 0.8 0.8 1.0
vbsdf s -absorpCoeff 6
# setup first inner box
box c 0.3 0.3 0.2
@@ -68,15 +68,15 @@ vdisplay -noupdate g
vlocation -noupdate g -setLocation 0.7 0.25 0.2
vlocation -noupdate g -rotate 0 0 0 0 0 1 10
vsetmaterial -noupdate g glass
vbsdf g -absorpcolor 0.8 1.0 0.8
vbsdf g -absorpcoeff 6
vbsdf g -absorpColor 0.8 1.0 0.8
vbsdf g -absorpCoeff 6
# setup second inner sphere
psphere r 0.1
vdisplay -noupdate r
vsetmaterial -noupdate r plastic
vbsdf r -kd 0.5 0.9 0.3 -ks 0.0 -kr 0.3 -n
vbsdf r -fresnel Constant 1.0
vbsdf r -kd 0.5 0.9 0.3 -ks 0.3 -baseRoughness 0.0 -n
vbsdf r -baseFresnel Constant 1.0
vlocation r -setLocation 0.5 0.65 0.1
puts "Trying path tracing mode..."