1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/v3d/raytrace/dof_mono
duv b27ab03d09 0028762: Visualization, Ray tracing - Implement depth-of-field effect
Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
TKOpenGl - added new ray generation logic to RaytraceBase.fs.
vrenderparams command - added -focal and -aperture parameters.
OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
2017-07-13 12:23:09 +03:00

71 lines
1.7 KiB
Plaintext

puts "========"
puts "Ray Tracing - check depth-of-field"
puts "========"
pload MODELING VISUALIZATION
vclear
vinit View1
vlight add positional head 0 pos 0.5 0.5 0.85
vlight change 0 sm 0.06
vlight change 0 int 25.0
vsetdispmode 1
vcamera -persp
box b 1 1 1
explode b FACE
vdisplay -noupdate b_1 b_2 b_3 b_5 b_6
vlocation -noupdate b_1 -setLocation 1 0 0
vlocation -noupdate b_2 -setLocation -1 0 0
vlocation -noupdate b_3 -setLocation 0 1 0
vlocation -noupdate b_5 -setLocation 0 0 1
vlocation -noupdate b_6 -setLocation 0 0 -1
vsetmaterial -noupdate b_1 plastic
vsetmaterial -noupdate b_2 plastic
vsetmaterial -noupdate b_3 plastic
vsetmaterial -noupdate b_5 plastic
vsetmaterial -noupdate b_6 plastic
vbsdf b_1 -kd 1 0.3 0.3 -ks 0
vbsdf b_2 -kd 0.3 0.5 1 -ks 0
vbsdf b_3 -kd 1 -ks 0
vbsdf b_5 -kd 1 -ks 0
vbsdf b_6 -kd 1 -ks 0
vfront
vfit
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
box c 0.3 0.3 0.2
vdisplay -noupdate c
vlocation -noupdate c -setLocation 0.55 0.3 0.0
vlocation -noupdate c -rotate 0 0 0 0 0 1 -30
vsetmaterial -noupdate c plastic
vbsdf c -kd 1.0 0.8 0.2 -ks 0.3 -n
box g 0.15 0.15 0.3
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
psphere r 0.1
vdisplay -noupdate r
vsetmaterial -noupdate r plastic
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
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -aperture 0.1 -focal 2.0