0024887: Visualization - revise and extend Raytracing controls
[occt.git] / tests / v3d / raytrace / bug24130
CommitLineData
e276548b 1puts "========"
2puts "OCC24130 Implementing ray tracing visualization core"
3puts "========"
4
5# custom shapes
6set aShape1 [locate_data_file occ/Top.brep]
7set aShape2 [locate_data_file occ/Bottom.brep]
8
9# setup 3D viewer content
10vinit name=View1 w=512 h=512
11vglinfo
12
13vvbo 0
14vsetdispmode 1
15vsetgradientbg 180 200 255 180 180 180 2
16restore $aShape1 s1
17restore $aShape2 s2
18vdisplay s1 s2
19vsetmaterial s1 Silver
20vsetmaterial s2 Pewter
bc8c79bb 21vsetlocation s1 0.0 0.1 0.0
265d4508 22vlight change 0 pos -1 1 1
e276548b 23vfit
24
25# activate ray-tracing
bc8c79bb 26vrenderparams -raytrace
e276548b 27
28set aModeNum 0
bc8c79bb 29foreach 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
39vtextureenv on 5
bc8c79bb 40foreach 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
48vsettransparency s2 0.5
49for { 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}