44c7c33e |
1 | puts "========" |
f2b42160 |
2 | puts "0024855: Revision of parameters of standard materials" |
44c7c33e |
3 | puts "========" |
4 | |
ba562b2b |
5 | # Ray-Tracing doesn't work with Compatible Profile on macOS |
6 | if { $::tcl_platform(os) == "Darwin" } { vcaps -core } |
7 | |
44c7c33e |
8 | # custom shapes |
9 | set aShape [locate_data_file occ/Top.brep] |
10 | |
11 | # setup 3D viewer content |
12 | vinit View1 w=768 h=768 |
13 | vglinfo |
14 | |
aaf8d6a9 |
15 | vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL |
44c7c33e |
16 | |
17 | # display shape |
992ed6b3 |
18 | vlight -change 0 -dir 0.577 -0.577 -0.577 |
44c7c33e |
19 | restore $aShape s |
f2b42160 |
20 | vdisplay -dispMode 1 s |
44c7c33e |
21 | vfit |
22 | |
23 | proc testmat {dirname filename} { |
24 | foreach {aMatIter} {brass bronze copper gold jade neon_phc pewter obsidian plaster plastic satin silver steel stone chrome aluminium charcoal} { |
25 | vsetmaterial -noredraw s $aMatIter |
26 | vdump $dirname/${filename}_${aMatIter}.png |
27 | } |
28 | } |
29 | |
f2b42160 |
30 | # material screenshots, Gouraud shading model (rasterization) |
31 | vrenderparams -shadingModel GOURAUD |
44c7c33e |
32 | testmat $imagedir $casename |
33 | |
f2b42160 |
34 | # material screenshots, Phong shading model (rasterization) |
35 | vrenderparams -shadingModel PHONG |
44c7c33e |
36 | testmat $imagedir ${casename}_phong |
37 | |
f2b42160 |
38 | # material screenshots, Ray-Tracing |
bc8c79bb |
39 | vrenderparams -raytrace -reflections -fsaa |
44c7c33e |
40 | vtextureenv on 5 |
44c7c33e |
41 | testmat $imagedir ${casename}_rt |