0025777: the standard views are defined incorrectly and mismatch the old display.
[occt.git] / samples / tcl / pathtrace.tcl
1 #########################################################################
2 # 26437: Visualization - Improve path tracing rendering engine
3 #########################################################################
4
5 pload ALL
6
7 # setup 3D viewer content
8 vinit name=View1 w=512 h=512
9 vglinfo
10
11 vvbo 0
12 vsetdispmode 1
13 vcamera -persp
14
15 box b 1 1 1 
16 explode b FACE 
17 vdisplay b_1 b_2 b_3 b_5 b_6
18
19 vfront
20 vfit
21
22 vsetmaterial b_1 plastic
23 vsetmaterial b_2 plastic
24 vsetmaterial b_3 plastic
25 vsetmaterial b_5 plastic
26 vsetmaterial b_6 plastic
27
28 vbsdf b_1 -kd 1 -ks 0
29 vbsdf b_2 -kd 1 -ks 0
30 vbsdf b_3 -kd 1 -ks 0
31 vbsdf b_5 -kd 1 -ks 0
32 vbsdf b_6 -kd 1 -ks 0
33
34 vbsdf b_2 -kd 0.3 0.5 1
35 vbsdf b_1 -kd 1 0.3 0.3
36
37 vsetlocation b_1  1  0  0
38 vsetlocation b_2 -1  0  0
39 vsetlocation b_5  0  0  1
40 vsetlocation b_6  0  0 -1
41 vsetlocation b_3  0  1  0
42
43 vlight del 0
44 vlight del 1
45 vlight add positional head 0 pos 0.5 0.5 0.85
46 vlight change 0 sm 0.06
47 vlight change 0 int 60.0
48
49 psphere s 0.2
50 vdisplay s
51 vsetlocation s 0.21 0.3 0.2
52 vsetmaterial s glass
53 vbsdf s -absorpcolor 0.8 0.8 1.0
54 vbsdf s -absorpcoeff 6
55
56 box c 0.3 0.3 0.2
57 vdisplay c
58 vsetlocation c 0.55 0.3 0.0
59 vlocrotate c 0 0 0 0 0 1 -30
60 vsetmaterial c plastic
61 vbsdf c -kd 1.0 0.8 0.2 -ks 0.3 -n
62
63 box g 0.15 0.15 0.3
64 vdisplay g
65 vsetlocation g 0.7 0.25 0.2
66 vlocrotate g 0 0 0 0 0 1 10
67 vsetmaterial g glass
68 vbsdf g -absorpcolor 0.8 1.0 0.8
69 vbsdf g -absorpcoeff 6
70
71 psphere r 0.1
72 vdisplay r
73 vsetmaterial r plastic
74 vbsdf r -kd 0.5 0.9 0.3 -ks 0.0 -kr 0.3 -n
75 vbsdf r -fresnel Constant 1.0
76 vsetlocation r 0.5 0.65 0.1
77
78 vrenderparams -ray -gi -rayDepth 8