e276548b |
1 | puts "========" |
2 | puts "OCC24130 Implementing ray tracing visualization core" |
3 | puts "========" |
4 | |
5 | # custom shapes |
6 | set aShape1 [locate_data_file occ/Top.brep] |
7 | set aShape2 [locate_data_file occ/Bottom.brep] |
8 | |
9 | # setup 3D viewer content |
10 | vinit name=View1 w=512 h=512 |
11 | vglinfo |
12 | |
13 | vvbo 0 |
14 | vsetdispmode 1 |
15 | vsetgradientbg 180 200 255 180 180 180 2 |
16 | restore $aShape1 s1 |
17 | restore $aShape2 s2 |
18 | vdisplay s1 s2 |
19 | vsetmaterial s1 Silver |
20 | vsetmaterial s2 Pewter |
bc8c79bb |
21 | vsetlocation s1 0.0 0.1 0.0 |
265d4508 |
22 | vlight change 0 pos -1 1 1 |
e276548b |
23 | vfit |
24 | |
25 | # activate ray-tracing |
bc8c79bb |
26 | vrenderparams -raytrace |
e276548b |
27 | |
28 | set aModeNum 0 |
bc8c79bb |
29 | foreach aFSAAMode {off on} { |
30 | foreach aReflMode {off on} { |
31 | foreach aShadMode {off on} { |
32 | vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode |
e276548b |
33 | vdump $imagedir/${casename}_${aModeNum}.png |
34 | incr aModeNum |
35 | } |
36 | } |
37 | } |
38 | |
39 | vtextureenv on 5 |
bc8c79bb |
40 | foreach aFSAAMode {off on} { |
41 | foreach aShadMode {off on} { |
42 | vrenderparams -shadows $aShadMode -reflections -fsaa $aFSAAMode |
43 | vdump $imagedir/${casename}_${aModeNum}.png |
44 | incr aModeNum |
45 | } |
46 | } |
47 | |
48 | vsettransparency s2 0.5 |
49 | for { set aDepth 2 } { $aDepth <= 5 } { incr aDepth } { |
50 | foreach aFSAAMode {off on} { |
51 | vrenderparams -raydepth $aDepth -shadows off -fsaa $aFSAAMode |
e276548b |
52 | vdump $imagedir/${casename}_${aModeNum}.png |
53 | incr aModeNum |
54 | } |
55 | } |