be86ba90 |
1 | puts "========" |
2 | puts "OCC25221" |
3 | puts "========" |
4 | ########################################## |
5 | ## Visualization - Depth test errors in ray-tracing scene containing face outlines |
6 | ########################################## |
7 | |
8 | # custom shapes |
9 | set aShape [locate_data_file occ/Bottom.brep] |
10 | |
11 | # setup 3D viewer content |
12 | vinit name=View1 w=512 h=512 |
13 | |
14 | vsetdispmode 1 |
15 | restore $aShape s |
16 | vdisplay s |
17 | vfit |
18 | |
19 | # activate ray-tracing |
20 | vrenderparams -raytrace |
21 | |
22 | # highlight the shape |
23 | vmoveto 200 200 |
24 | |
25 | vdump $imagedir/${casename}_lines_closeup.png |
26 | |
27 | vzoom 0.5 |
28 | |
29 | vdump $imagedir/${casename}_lines_far.png |
30 | |
31 | vfit |
32 | |
33 | # change camera to perspective |
34 | vcamera -persp |
35 | |
36 | # change highlight display mode |
37 | vdisplay s -highMode 1 |
38 | |
39 | # highlight the shape again |
40 | vmoveto 0 0 |
41 | vmoveto 200 200 |
42 | |
43 | vdump $imagedir/${casename}_faces_closeup.png |
44 | |
45 | # apply transformation |
30f5e1a7 |
46 | vlocation s -rotate 0 0 0 0 0 1 10 |
47 | vlocation s -translate -30 0 0 |
be86ba90 |
48 | vmoveto 0 0 |
49 | vmoveto 200 200 |
50 | |
51 | vdump $imagedir/${casename}_faces_closeup_rotated.png |
52 | |
30f5e1a7 |
53 | vlocation s -reset |
be86ba90 |
54 | vmoveto 0 0 |
55 | vmoveto 200 200 |
56 | |
57 | vzoom 0.5 |
58 | |
59 | vdump $imagedir/${casename}_faces_far.png |
60 | |
61 | # enable Path tracing |
62 | vrenderparams -gi |
63 | vfit |
64 | vfps 100 |
65 | |
66 | vdump $imagedir/${casename}_faces_pt.png |
67 | |
68 | # rotate camera |
69 | vrotate 0 0.2 0 |
70 | vfps 100 |
71 | |
72 | vdump $imagedir/${casename}_faces_pt_rot.png |