2 puts "0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors"
7 {{0 55 0} { 0 75 0} {20 55 0}}
8 {{0 75 0} { 0 55 20} {20 55 0}}
9 {{0 55 0} { 0 55 20} { 0 75 0}}
10 {{0 55 0} {20 55 0} { 0 55 20}}
13 {{1.0 0.0 0.0} {0.0 1.0 0.0} {0.0 0.0 1.0}}
14 {{1.0 1.0 0.0} {1.0 1.0 1.0} {0.0 1.0 1.0}}
15 {{0.5 0.0 0.0} {0.0 0.0 0.5} {0.0 0.5 0.0}}
16 {{0.5 0.5 0.0} {0.0 0.5 0.5} {0.5 0.0 0.5}}
25 proc genTris {theFrom theTo theColors} {
27 for {set t $theFrom} {$t <= $theTo} {incr t} {
28 for {set n 0} {$n < 3} {incr n} {
29 set aVert [lindex $::aVerts $t]
30 set aCol [lindex $::aColors $t]
31 set aNorm [lindex $::aNormals $t]
32 set aTris "$aTris v [lindex $aVert $n] n $aNorm"
33 if { $theColors == 1 } { set aTris "$aTris c [lindex $aCol $n]" }
39 set aTris1 [genTris 0 3 0]
40 set aTris1c [genTris 0 3 1]
41 set aTris2 [genTris 0 1 0]
42 set aTris2c [genTris 0 1 1]
44 pload MODELING VISUALIZATION
47 vviewparams -scale 10 -proj -0.3 -0.7 0.6 -up 0.013 0.65 0.75 -at 35.4 61.8 31.5
48 vdrawparray t1 triangles {*}$aTris1
49 vdrawparray t1c triangles {*}$aTris1c
50 vdrawparray t2 triangles {*}$aTris2
51 vdrawparray t2c triangles {*}$aTris2c
52 vdrawparray t3 triangles {*}$aTris2
53 vdrawparray t3c triangles {*}$aTris2c
54 vlocation t1 -location 0 0 0
55 vlocation t2 -location 30 0 0
56 vlocation t3 -location 60 0 0
57 vlocation t1c -location 0 0 30
58 vlocation t2c -location 30 0 30
59 vlocation t3c -location 60 0 30
60 vaspects t1 -color GREEN -backfaceColor RED
61 vaspects t2 -color GREEN -backfaceColor RED
62 vaspects t1c -color GREEN -backfaceColor RED
63 vaspects t2c -color GREEN -backfaceColor RED
64 vaspects t3 -color WHITE -backfaceColor WHITE
65 vaspects t3c -color WHITE -backfaceColor WHITE
67 vrenderparams -shadingModel VERT
68 vdump ${imagedir}/${casename}_vert.png
69 vrenderparams -shadingModel PHONG
70 vdump ${imagedir}/${casename}_phong.png
71 vrenderparams -shadingModel FLAT
72 vdump ${imagedir}/${casename}_flat.png
73 vrenderparams -shadingModel UNLIT
74 vdump ${imagedir}/${casename}_unlit.png
75 vrenderparams -shadingModel PBR
76 vdump ${imagedir}/${casename}_pbr.png