0028762: Visualization, Ray tracing - Implement depth-of-field effect
[occt.git] / tests / v3d / raytrace / dof_mono
CommitLineData
b27ab03d 1puts "========"
2puts "Ray Tracing - check depth-of-field"
3puts "========"
4
5pload MODELING VISUALIZATION
6
7vclear
8vinit View1
9
10vlight add positional head 0 pos 0.5 0.5 0.85
11vlight change 0 sm 0.06
12vlight change 0 int 25.0
13
14vsetdispmode 1
15vcamera -persp
16
17box b 1 1 1
18explode b FACE
19vdisplay -noupdate b_1 b_2 b_3 b_5 b_6
20vlocation -noupdate b_1 -setLocation 1 0 0
21vlocation -noupdate b_2 -setLocation -1 0 0
22vlocation -noupdate b_3 -setLocation 0 1 0
23vlocation -noupdate b_5 -setLocation 0 0 1
24vlocation -noupdate b_6 -setLocation 0 0 -1
25
26vsetmaterial -noupdate b_1 plastic
27vsetmaterial -noupdate b_2 plastic
28vsetmaterial -noupdate b_3 plastic
29vsetmaterial -noupdate b_5 plastic
30vsetmaterial -noupdate b_6 plastic
31vbsdf b_1 -kd 1 0.3 0.3 -ks 0
32vbsdf b_2 -kd 0.3 0.5 1 -ks 0
33vbsdf b_3 -kd 1 -ks 0
34vbsdf b_5 -kd 1 -ks 0
35vbsdf b_6 -kd 1 -ks 0
36
37vfront
38vfit
39
40psphere s 0.2
41vdisplay -noupdate s
42vlocation -noupdate s -setLocation 0.21 0.3 0.2
43vsetmaterial -noupdate s glass
44vbsdf s -absorpColor 0.8 0.8 1.0
45vbsdf s -absorpCoeff 6
46
47box c 0.3 0.3 0.2
48vdisplay -noupdate c
49vlocation -noupdate c -setLocation 0.55 0.3 0.0
50vlocation -noupdate c -rotate 0 0 0 0 0 1 -30
51vsetmaterial -noupdate c plastic
52vbsdf c -kd 1.0 0.8 0.2 -ks 0.3 -n
53
54box g 0.15 0.15 0.3
55vdisplay -noupdate g
56vlocation -noupdate g -setLocation 0.7 0.25 0.2
57vlocation -noupdate g -rotate 0 0 0 0 0 1 10
58vsetmaterial -noupdate g glass
59vbsdf g -absorpColor 0.8 1.0 0.8
60vbsdf g -absorpCoeff 6
61
62psphere r 0.1
63vdisplay -noupdate r
64vsetmaterial -noupdate r plastic
65vbsdf r -kd 0.5 0.9 0.3 -ks 0.3 -baseRoughness 0.0 -n
66vbsdf r -baseFresnel Constant 1.0
67vlocation r -setLocation 0.5 0.65 0.1
68
69vrenderparams -ray -gi -rayDepth 10 -iss
70vrenderparams -aperture 0.1 -focal 2.0