1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00
This commit is contained in:
inv
2022-11-04 12:48:03 +03:00
parent 4213cad6ed
commit bad68e8523
1508 changed files with 44084 additions and 44084 deletions

View File

@@ -1,57 +1,57 @@
puts "========"
puts "OCC24130 Implementing ray tracing visualization core"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.577 -0.577 -0.577
vfit
# activate ray-tracing
vrenderparams -raytrace
set aModeNum 0
foreach aFSAAMode {off on} {
foreach aReflMode {off on} {
foreach aShadMode {off on} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
vtextureenv on 5
foreach aFSAAMode {off on} {
foreach aShadMode {off on} {
vrenderparams -shadows $aShadMode -reflections -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
vsettransparency s2 0.5
for { set aDepth 2 } { $aDepth <= 5 } { incr aDepth } {
foreach aFSAAMode {off on} {
vrenderparams -raydepth $aDepth -shadows off -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
puts "========"
puts "OCC24130 Implementing ray tracing visualization core"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.577 -0.577 -0.577
vfit
# activate ray-tracing
vrenderparams -raytrace
set aModeNum 0
foreach aFSAAMode {off on} {
foreach aReflMode {off on} {
foreach aShadMode {off on} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
vtextureenv on 5
foreach aFSAAMode {off on} {
foreach aShadMode {off on} {
vrenderparams -shadows $aShadMode -reflections -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
vsettransparency s2 0.5
for { set aDepth 2 } { $aDepth <= 5 } { incr aDepth } {
foreach aFSAAMode {off on} {
vrenderparams -raydepth $aDepth -shadows off -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}

View File

@@ -1,74 +1,74 @@
puts "========"
puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
puts "========"
pload MODELING VISUALIZATION
vfont add [locate_data_file DejaVuSans.ttf] SansFont
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
# boxes
box b1 1 1 1
vdisplay b1
vsetlocation b1 0 0 0.001
vsetmaterial b1 Silver
vsettransparency b1 0.5
box b2 3 2 2 1 2 1
vdisplay b2
vsetmaterial b2 Pewter
vsettransparency b2 0.8
# brep text
text2brep t "text" -font "SansFont" -height 8
vdisplay t
# overlay objects
vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40 -font SansFont
# markers
vpoint p 1 1 1
vdisplay p
vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
# 3d text
vdrawtext text0 3D_Text -pos 1 2 2 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 20 -aspect regular -font SansFont
vlight -change 0 -dir 0.577 -0.577 -0.577
vfit
# trihedron
vzbufftrihedron
# activate ray-tracing
vrenderparams -raytrace
# orthogonal projection
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
# perspective projection
vcamera -persp
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
puts "========"
puts "OCC24819: TKOpenGl - extend the ray-tracing core by visualization of lines, text and point sprites"
puts "========"
pload MODELING VISUALIZATION
vfont add [locate_data_file DejaVuSans.ttf] SansFont
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
# boxes
box b1 1 1 1
vdisplay b1
vsetlocation b1 0 0 0.001
vsetmaterial b1 Silver
vsettransparency b1 0.5
box b2 3 2 2 1 2 1
vdisplay b2
vsetmaterial b2 Pewter
vsettransparency b2 0.8
# brep text
text2brep t "text" -font "SansFont" -height 8
vdisplay t
# overlay objects
vdrawtext t1 "Overlay text!" -2d -perspos -1 1 -pos 200 -440 0 -height 40 -font SansFont
# markers
vpoint p 1 1 1
vdisplay p
vmarkerstest mTest 7 -3 0 PointsOnSide=5 MarkerType=5
# 3d text
vdrawtext text0 3D_Text -pos 1 2 2 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 20 -aspect regular -font SansFont
vlight -change 0 -dir 0.577 -0.577 -0.577
vfit
# trihedron
vzbufftrihedron
# activate ray-tracing
vrenderparams -raytrace
# orthogonal projection
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
# perspective projection
vcamera -persp
set aModeNum 0
foreach aFSAAMode {on off} {
foreach aReflMode {on off} {
foreach aShadMode {on off} {
vrenderparams -shadows $aShadMode -reflections $aReflMode -fsaa $aFSAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}

View File

@@ -1,53 +1,53 @@
puts "========"
puts "OCC25201: Visualization - Implementing soft shadows and ambient occlusion in OCCT ray-tracing core"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vtextureenv on 4
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Gold
vsetmaterial s2 Silver
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.667 -0.667 -0.333 -smoothAngle 6 -intensity 100
vturnview 3.0 -1.2 -0.1
vfit
# activate path tracing
vrenderparams -raytrace
vrenderparams -gi
vrenderparams -rayDepth 12
set aModeNum 0
vbsdf s1 roughness 6400
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
vsetmaterial s1 glass
vbsdf s1 absorpcoeff 1.0
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
vsetmaterial s2 plaster
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
puts "========"
puts "OCC25201: Visualization - Implementing soft shadows and ambient occlusion in OCCT ray-tracing core"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vtextureenv on 4
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Gold
vsetmaterial s2 Silver
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.667 -0.667 -0.333 -smoothAngle 6 -intensity 100
vturnview 3.0 -1.2 -0.1
vfit
# activate path tracing
vrenderparams -raytrace
vrenderparams -gi
vrenderparams -rayDepth 12
set aModeNum 0
vbsdf s1 roughness 6400
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
vsetmaterial s1 glass
vbsdf s1 absorpcoeff 1.0
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
vsetmaterial s2 plaster
vfps 200
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum

View File

@@ -1,70 +1,70 @@
puts "========"
puts "OCC25221: Visualization - Depth test errors in ray-tracing scene containing face outlines"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vsetdispmode 1
restore $aShape s
vdisplay s
vfit
# activate ray-tracing
vrenderparams -raytrace
# highlight the shape
vmoveto 200 200
vdump $imagedir/${casename}_lines_closeup.png
vzoom 0.5
vdump $imagedir/${casename}_lines_far.png
vfit
# change camera to perspective
vcamera -persp
# change highlight display mode
vdisplay s -highMode 1
# highlight the shape again
vmoveto 0 0
vmoveto 200 200
vdump $imagedir/${casename}_faces_closeup.png
# apply transformation
vlocation s -reset -translate -30 0 0 -rotate 0 0 0 0 0 1 10
vmoveto 0 0
vmoveto 200 200
vdump $imagedir/${casename}_faces_closeup_rotated.png
vlocation s -reset
vmoveto 0 0
vmoveto 200 200
vzoom 0.5
vdump $imagedir/${casename}_faces_far.png
# enable Path tracing
vrenderparams -gi
vfit
vfps 100
vdump $imagedir/${casename}_faces_pt.png
# rotate camera
vrotate 0 0.2 0
vfps 100
vdump $imagedir/${casename}_faces_pt_rot.png
puts "========"
puts "OCC25221: Visualization - Depth test errors in ray-tracing scene containing face outlines"
puts "========"
pload MODELING VISUALIZATION
# custom shapes
set aShape [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vsetdispmode 1
restore $aShape s
vdisplay s
vfit
# activate ray-tracing
vrenderparams -raytrace
# highlight the shape
vmoveto 200 200
vdump $imagedir/${casename}_lines_closeup.png
vzoom 0.5
vdump $imagedir/${casename}_lines_far.png
vfit
# change camera to perspective
vcamera -persp
# change highlight display mode
vdisplay s -highMode 1
# highlight the shape again
vmoveto 0 0
vmoveto 200 200
vdump $imagedir/${casename}_faces_closeup.png
# apply transformation
vlocation s -reset -translate -30 0 0 -rotate 0 0 0 0 0 1 10
vmoveto 0 0
vmoveto 200 200
vdump $imagedir/${casename}_faces_closeup_rotated.png
vlocation s -reset
vmoveto 0 0
vmoveto 200 200
vzoom 0.5
vdump $imagedir/${casename}_faces_far.png
# enable Path tracing
vrenderparams -gi
vfit
vfps 100
vdump $imagedir/${casename}_faces_pt.png
# rotate camera
vrotate 0 0.2 0
vfps 100
vdump $imagedir/${casename}_faces_pt_rot.png

View File

@@ -1,46 +1,46 @@
puts "========"
puts "OCC25833: Visualization, Ray Tracing - fix problems with the backside of triangles"
puts "========"
puts ""
pload MODELING VISUALIZATION
box b1 100 100 100
explode b1 Fa
box b2 10 10 -20 10 10 10
vinit View1
vdisplay -dispMode 1 b1_5 b1_6 b2
vsetmaterial b1_5 steel
vsetmaterial b1_6 steel
vfit
# Problem 1: b1_5 (grey) becomes semi-transparent after the next line,
# compare it with b1_6 visible from the frontside
vrenderparams -rayTrace
vdump ${imagedir}/${casename}_1.png
checkcolor 100 300 0.37647059559822083 0.3803921639919281 0.40392157435417175
if { ${stat} != 1 } {
puts "Error : bad color (case 1)"
}
# Problem 2: The small box shows through b1_5
vrenderparams -reflections
vdump ${imagedir}/${casename}_2.png
checkcolor 190 250 0.37647059559822083 0.3803921639919281 0.40392157435417175
if { ${stat} != 1 } {
puts "Error : bad color (case 2)"
}
ttranslate b2 30 30 30
# Problem 3: The small box is not reflected from the backface of b1_5
vdisplay -dispMode 1 b2
vdump ${imagedir}/${casename}_3.png
checkcolor 190 260 0.79607844352722168 0.60784316062927246 0.21960784494876862
if { ${stat} != 1 } {
puts "Error : bad color (case 3)"
}
checkcolor 190 310 0.61960786581039429 0.56078433990478516 0.43529412150382996
if { ${stat} != 1 } {
puts "Error : bad color (case 4)"
}
puts "========"
puts "OCC25833: Visualization, Ray Tracing - fix problems with the backside of triangles"
puts "========"
puts ""
pload MODELING VISUALIZATION
box b1 100 100 100
explode b1 Fa
box b2 10 10 -20 10 10 10
vinit View1
vdisplay -dispMode 1 b1_5 b1_6 b2
vsetmaterial b1_5 steel
vsetmaterial b1_6 steel
vfit
# Problem 1: b1_5 (grey) becomes semi-transparent after the next line,
# compare it with b1_6 visible from the frontside
vrenderparams -rayTrace
vdump ${imagedir}/${casename}_1.png
checkcolor 100 300 0.37647059559822083 0.3803921639919281 0.40392157435417175
if { ${stat} != 1 } {
puts "Error : bad color (case 1)"
}
# Problem 2: The small box shows through b1_5
vrenderparams -reflections
vdump ${imagedir}/${casename}_2.png
checkcolor 190 250 0.37647059559822083 0.3803921639919281 0.40392157435417175
if { ${stat} != 1 } {
puts "Error : bad color (case 2)"
}
ttranslate b2 30 30 30
# Problem 3: The small box is not reflected from the backface of b1_5
vdisplay -dispMode 1 b2
vdump ${imagedir}/${casename}_3.png
checkcolor 190 260 0.79607844352722168 0.60784316062927246 0.21960784494876862
if { ${stat} != 1 } {
puts "Error : bad color (case 3)"
}
checkcolor 190 310 0.61960786581039429 0.56078433990478516 0.43529412150382996
if { ${stat} != 1 } {
puts "Error : bad color (case 4)"
}

View File

@@ -1,69 +1,69 @@
puts "============"
puts "OCC26070: Ray tracing with reflections is poor on rotated presentation"
puts "============"
puts ""
pload MODELING VISUALIZATION
#source samples/tcl/cad.tc
# make base
box b0 0 0 0 12 7 6
explode b0 e
blend b01 b0 1 b0_8
blend b02 b01 1 b0_6
# make cut at bottom
box b1 3 -1 0 2 9 1.5
bcut b2 b02 b1
explode b2 e
blend b3 b2 1 b2_27
blend b4 b3 1 b2_30
# make central cut
box h1 3 -1 2.5 2 9 0.5
box h2 3 -1 3 2 9 2
plane p 4 -1 3 0 1 0
pcylinder c p 1 9
bcommon h3 h2 c
bcut b5 b4 h1
bcut b6 b5 h3
# make side cut
box b7 9 -1 1 2 9 4
explode b7 e
blend b71 b7 1 b7_6
blend b72 b71 1 b7_8
bcut b8 b6 b72
# make box for inner cylindrical cut
box bc1 -1 0 2 9 1 4
box bc2 2 -1 2 4 3 3
bcut bc3 bc1 bc2
explode bc3 e
blend bc4 bc3 1 bc3_20
blend bc5 bc4 1 bc3_23
blend bc6 bc5 1.99 bc3_21
blend bc7 bc6 1.99 bc3_22
# make inner cylindrical cut
explode bc7 f
revol r bc7_1 -1 0 6 1 0 0 100
bcut b9 b8 r
# make outer cylindrical cut
plane p2 -1 0 6 1 0 0
pcylinder c2 p2 6 15
bcommon res b9 c2
# show result
trotate res 0 0 0 0 0 1 90
vinit View1
vdisplay res
vsetdispmode 1
#vaspects res -setFaceBoundaryDraw 1 -setFaceBoundaryColor WHITE
vfit
vrenderparams -rayTrace -reflections
vlocation res -rotate 0 0 0 0 0 1 180
vfit
vdump ${imagedir}/${casename}.png
puts "============"
puts "OCC26070: Ray tracing with reflections is poor on rotated presentation"
puts "============"
puts ""
pload MODELING VISUALIZATION
#source samples/tcl/cad.tc
# make base
box b0 0 0 0 12 7 6
explode b0 e
blend b01 b0 1 b0_8
blend b02 b01 1 b0_6
# make cut at bottom
box b1 3 -1 0 2 9 1.5
bcut b2 b02 b1
explode b2 e
blend b3 b2 1 b2_27
blend b4 b3 1 b2_30
# make central cut
box h1 3 -1 2.5 2 9 0.5
box h2 3 -1 3 2 9 2
plane p 4 -1 3 0 1 0
pcylinder c p 1 9
bcommon h3 h2 c
bcut b5 b4 h1
bcut b6 b5 h3
# make side cut
box b7 9 -1 1 2 9 4
explode b7 e
blend b71 b7 1 b7_6
blend b72 b71 1 b7_8
bcut b8 b6 b72
# make box for inner cylindrical cut
box bc1 -1 0 2 9 1 4
box bc2 2 -1 2 4 3 3
bcut bc3 bc1 bc2
explode bc3 e
blend bc4 bc3 1 bc3_20
blend bc5 bc4 1 bc3_23
blend bc6 bc5 1.99 bc3_21
blend bc7 bc6 1.99 bc3_22
# make inner cylindrical cut
explode bc7 f
revol r bc7_1 -1 0 6 1 0 0 100
bcut b9 b8 r
# make outer cylindrical cut
plane p2 -1 0 6 1 0 0
pcylinder c2 p2 6 15
bcommon res b9 c2
# show result
trotate res 0 0 0 0 0 1 90
vinit View1
vdisplay res
vsetdispmode 1
#vaspects res -setFaceBoundaryDraw 1 -setFaceBoundaryColor WHITE
vfit
vrenderparams -rayTrace -reflections
vlocation res -rotate 0 0 0 0 0 1 180
vfit
vdump ${imagedir}/${casename}.png

View File

@@ -1,30 +1,30 @@
puts "========"
puts "OCC26404: Visualization, Ray Tracing - use solid background color when gradient color is disabled"
puts "========"
puts ""
pload MODELING VISUALIZATION
box b 1 2 3
vinit View1
if { [string match "OpenGL ES 2.0*" [vglinfo VERSION]] || [string match "OpenGL ES 3.0*" [vglinfo VERSION]] } {
puts "Skipping test case: OpenGL ES 3.2+ is required"
return
}
vclear
vaxo
vsetdispmode 1
vbackground -color GRAY4
vdisplay b
vfit
vraytrace 1
set bug_info_1 [vreadpixel 50 50 rgb name]
if {$bug_info_1 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #1)."
}
vbackground -gradient RED BLUE -gradientMode HORIZONTAL
vbackground -gradient RED BLUE -gradientMode NONE
set bug_info_2 [vreadpixel 50 50 rgb name]
if {$bug_info_2 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #2)."
}
puts "========"
puts "OCC26404: Visualization, Ray Tracing - use solid background color when gradient color is disabled"
puts "========"
puts ""
pload MODELING VISUALIZATION
box b 1 2 3
vinit View1
if { [string match "OpenGL ES 2.0*" [vglinfo VERSION]] || [string match "OpenGL ES 3.0*" [vglinfo VERSION]] } {
puts "Skipping test case: OpenGL ES 3.2+ is required"
return
}
vclear
vaxo
vsetdispmode 1
vbackground -color GRAY4
vdisplay b
vfit
vraytrace 1
set bug_info_1 [vreadpixel 50 50 rgb name]
if {$bug_info_1 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #1)."
}
vbackground -gradient RED BLUE -gradientMode HORIZONTAL
vbackground -gradient RED BLUE -gradientMode NONE
set bug_info_2 [vreadpixel 50 50 rgb name]
if {$bug_info_2 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #2)."
}

View File

@@ -1,38 +1,38 @@
puts "============"
puts "CR26617: Visualization, Ray Tracing - adopt progressive rendering Path Tracing for rendering stereoscopic pair"
puts "============"
puts ""
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.577 -0.577 -0.577
# activate ray-tracing
vrenderparams -raytrace
vtextureenv on 5
vrenderparams -reflections -gi
# activate stereo
vstereo on
vstereo -mode anaglyph
vcamera -iod 0.1
vfit
vfps 200
vdump ${imagedir}/${casename}.png -stereo blend
puts "============"
puts "CR26617: Visualization, Ray Tracing - adopt progressive rendering Path Tracing for rendering stereoscopic pair"
puts "============"
puts ""
pload MODELING VISUALIZATION
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vsetlocation s1 0.0 0.1 0.0
vlight -change 0 -dir 0.577 -0.577 -0.577
# activate ray-tracing
vrenderparams -raytrace
vtextureenv on 5
vrenderparams -reflections -gi
# activate stereo
vstereo on
vstereo -mode anaglyph
vcamera -iod 0.1
vfit
vfps 200
vdump ${imagedir}/${casename}.png -stereo blend

View File

@@ -1,28 +1,28 @@
puts "============"
puts "0026676: Visualization, Ray Tracing - correct rendering if stereo pair"
puts "============"
puts ""
pload MODELING VISUALIZATION
vinit View1 w=400 h=400
vclear
box b 1 2 50
vraytrace 0
vaxo
vsetdispmode 1
vdisplay b
vcamera -persp
vfit
vrotate 0 -1.2 0
vzoom 1.2
vstereo -anaglyph redCyan
vcamera -iod
vcamera -iod 0.3
vraytrace 1
vselect 200 350
vdump ${imagedir}/${casename}.png -stereo blend
puts "============"
puts "0026676: Visualization, Ray Tracing - correct rendering if stereo pair"
puts "============"
puts ""
pload MODELING VISUALIZATION
vinit View1 w=400 h=400
vclear
box b 1 2 50
vraytrace 0
vaxo
vsetdispmode 1
vdisplay b
vcamera -persp
vfit
vrotate 0 -1.2 0
vzoom 1.2
vstereo -anaglyph redCyan
vcamera -iod
vcamera -iod 0.3
vraytrace 1
vselect 200 350
vdump ${imagedir}/${casename}.png -stereo blend

View File

@@ -1,19 +1,19 @@
puts "============"
puts "CR26975: Visualization, TKOpenGl - handle triangle strips correctly within Ray-Tracing core"
puts "============"
puts ""
pload MODELING VISUALIZATION
vclear
vinit View1
vraytrace 0
vdrawparray s trianglestrips v 0 0 0 n 0 0 1 v 0 2 0 n 0 0 1 v 2 0 0 n 0 0 1 v 2 2 0 n 0 0 1
vfit
vdump $imagedir/${casename}_rt_off.png
vraytrace 1
vdump $imagedir/${casename}_rt_on.png
set color [vreadpixel 250 250 rgb name]
puts $color
if { $color == "BLACK" } { puts "ERROR: CR26975 is reproduced. Triangle strips incorrect within Ray-Tracing core." }
puts "============"
puts "CR26975: Visualization, TKOpenGl - handle triangle strips correctly within Ray-Tracing core"
puts "============"
puts ""
pload MODELING VISUALIZATION
vclear
vinit View1
vraytrace 0
vdrawparray s trianglestrips v 0 0 0 n 0 0 1 v 0 2 0 n 0 0 1 v 2 0 0 n 0 0 1 v 2 2 0 n 0 0 1
vfit
vdump $imagedir/${casename}_rt_off.png
vraytrace 1
vdump $imagedir/${casename}_rt_on.png
set color [vreadpixel 250 250 rgb name]
puts $color
if { $color == "BLACK" } { puts "ERROR: CR26975 is reproduced. Triangle strips incorrect within Ray-Tracing core." }

View File

@@ -1,18 +1,18 @@
puts "========"
puts "0027083: Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on"
puts "========"
puts ""
pload VISUALIZATION MODELING
box b 1 1 1
vclear
vinit View1
vdisplay -noupdate -dispMode 1 b
vfit
vaspects b -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryWidth 3
vraytrace 1
if {[vreadpixel 295 255 -rgb -name] != "DARKGOLDENROD"} { puts "ERROR: the box with boundary aspect set is not shown in ray-tracing mode!" }
if {[vreadpixel 105 58 -rgb -name] != "RED"} { puts "ERROR: the box's boundaries are not shown in ray-tracing mode!" }
vdump $imagedir/${casename}.png
puts "========"
puts "0027083: Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on"
puts "========"
puts ""
pload VISUALIZATION MODELING
box b 1 1 1
vclear
vinit View1
vdisplay -noupdate -dispMode 1 b
vfit
vaspects b -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryWidth 3
vraytrace 1
if {[vreadpixel 295 255 -rgb -name] != "DARKGOLDENROD"} { puts "ERROR: the box with boundary aspect set is not shown in ray-tracing mode!" }
if {[vreadpixel 105 58 -rgb -name] != "RED"} { puts "ERROR: the box's boundaries are not shown in ray-tracing mode!" }
vdump $imagedir/${casename}.png

View File

@@ -1,16 +1,16 @@
puts "============"
puts "0027130: Visualization, Ray tracing - skip structures with transformation persistence flag"
puts "============"
puts ""
pload VISUALIZATION MODELING
vinit View1
vsetdispmode 1
restore [locate_data_file face1.brep] f
vdisplay f
box b1 25 25 25
vdisplay b1 -trsfPers zoom -trsfPersPos 0 0 0
vraytrace 1
vfit
vdump ${imagedir}/${casename}.png
puts "============"
puts "0027130: Visualization, Ray tracing - skip structures with transformation persistence flag"
puts "============"
puts ""
pload VISUALIZATION MODELING
vinit View1
vsetdispmode 1
restore [locate_data_file face1.brep] f
vdisplay f
box b1 25 25 25
vdisplay b1 -trsfPers zoom -trsfPersPos 0 0 0
vraytrace 1
vfit
vdump ${imagedir}/${casename}.png

View File

@@ -1,18 +1,18 @@
puts "================"
puts "0027337: \[Regression vs. 6.9.1\] Selection highlight is poor in ray traced mode with FSAA"
puts "================"
pload MODELING VISUALIZATION
box b 10 10 10
vdisplay b
vsetdispmode 1
vfit
vrenderparams -rayTrace -fsaa
vmoveto 200 200
puts "Check result by color in the middle of the top face:"
puts "should be color of shading and not of highlight (blue)"
checkcolor 205 100 0.64 0.56 0.08
puts "Check result by image: selection highlight should show only visible edges"
vdump ${imagedir}/${casename}.png
puts "================"
puts "0027337: \[Regression vs. 6.9.1\] Selection highlight is poor in ray traced mode with FSAA"
puts "================"
pload MODELING VISUALIZATION
box b 10 10 10
vdisplay b
vsetdispmode 1
vfit
vrenderparams -rayTrace -fsaa
vmoveto 200 200
puts "Check result by color in the middle of the top face:"
puts "should be color of shading and not of highlight (blue)"
checkcolor 205 100 0.64 0.56 0.08
puts "Check result by image: selection highlight should show only visible edges"
vdump ${imagedir}/${casename}.png

View File

@@ -1,23 +1,23 @@
puts "=================="
puts "0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing"
puts "=================="
puts ""
pload VISUALIZATION
# Rectangular Grid
vclear
vinit View1
vraytrace 0
vgrid -type rectangular
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5
vclose
# Circular Grid
vclear
vinit View1
vraytrace 0
vgrid -type circular
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5
puts "=================="
puts "0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing"
puts "=================="
puts ""
pload VISUALIZATION
# Rectangular Grid
vclear
vinit View1
vraytrace 0
vgrid -type rectangular
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5
vclose
# Circular Grid
vclear
vinit View1
vraytrace 0
vgrid -type circular
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5

View File

@@ -1,18 +1,18 @@
puts "============"
puts "0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/raytrace.tcl
vrenderparams -env
vcamera -persp
vviewparams -scale 1.3 -proj 0.57 -0.57 0.57 -up -0.4 0.4 0.8 -at -62 -111 -15
vtextureenv on 1
if { [vreadpixel 100 100 rgb name] == "BLACK" } { puts "ERROR: background is misplaced" }
vcamera -persp
vdump $imagedir/${casename}_persp.png
vcamera -ortho
vdump $imagedir/${casename}_ortho.png
puts "============"
puts "0031279: Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/raytrace.tcl
vrenderparams -env
vcamera -persp
vviewparams -scale 1.3 -proj 0.57 -0.57 0.57 -up -0.4 0.4 0.8 -at -62 -111 -15
vtextureenv on 1
if { [vreadpixel 100 100 rgb name] == "BLACK" } { puts "ERROR: background is misplaced" }
vcamera -persp
vdump $imagedir/${casename}_persp.png
vcamera -ortho
vdump $imagedir/${casename}_ortho.png

View File

@@ -1,33 +1,33 @@
puts "========"
puts "Ray Tracing - check rendering of multi-connected structures"
puts "========"
pload MODELING VISUALIZATION
# create boxes
box b1 0 0 0 1 2 3
box b2 3 0 0 3 2 1
# draw box
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vaxo
vconnect b1c -3 0 0 b1 b2
vfit
vrotate 0.2 0.0 0.0
vfit
vclear
vconnect b1c -3 0 0 b1 b2
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
# turn on ray tracing
vrenderparams -raytrace
vdump $::imagedir/${::casename}_rt1.png
vclear
vconnect b1c -3 0 0 b1 b2
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check rendering of multi-connected structures"
puts "========"
pload MODELING VISUALIZATION
# create boxes
box b1 0 0 0 1 2 3
box b2 3 0 0 3 2 1
# draw box
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vaxo
vconnect b1c -3 0 0 b1 b2
vfit
vrotate 0.2 0.0 0.0
vfit
vclear
vconnect b1c -3 0 0 b1 b2
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
# turn on ray tracing
vrenderparams -raytrace
vdump $::imagedir/${::casename}_rt1.png
vclear
vconnect b1c -3 0 0 b1 b2
vdump ${imagedir}/${casename}.png

View File

@@ -1,10 +1,10 @@
puts "========"
puts "Ray Tracing - check depth-of-field"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -aperture 0.1 -focal 2.0
vfps 200
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check depth-of-field"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -aperture 0.1 -focal 2.0
vfps 200
vdump ${imagedir}/${casename}.png

View File

@@ -1,16 +1,16 @@
puts "========"
puts "Ray Tracing - check depth-of-field"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -aperture 0.1 -focal 2.0
# activate stereo
vstereo on
vstereo -mode anaglyph
vcamera -iod 0.1
vfit
vfps 200
vdump ${imagedir}/${casename}.png -stereo blend
puts "========"
puts "Ray Tracing - check depth-of-field"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -aperture 0.1 -focal 2.0
# activate stereo
vstereo on
vstereo -mode anaglyph
vcamera -iod 0.1
vfit
vfps 200
vdump ${imagedir}/${casename}.png -stereo blend

View File

@@ -1,25 +1,25 @@
puts "========"
puts "0031096: Visualization, TKOpenGl - support metallic-roughness texture mapping"
puts "========"
pload XDE OCAF MODELING VISUALIZATION
Close D -silent
ReadGltf D [locate_data_file bug30691_DamagedHelmet.gltf]
vclear
vinit View1
XDisplay -dispMode 1 D
vaxo
vcamera -persp
vviewparams -scale 0.412548 -proj 0.54479 -0.790649 0.279424 -up -0.248339 0.166151 0.954317 -at -27.3419 382.603 -233.934
vtextureenv on 2
vlight -change 0 -intensity 2.5
vlight -change 1 -intensity 0.3
vrenderparams -shadingModel PBR
vdump ${imagedir}/${casename}_pbr.png
vrenderparams -ray -gi -rayDepth 10
vfps 200
vdump ${imagedir}/${casename}_pt.png
puts "========"
puts "0031096: Visualization, TKOpenGl - support metallic-roughness texture mapping"
puts "========"
pload XDE OCAF MODELING VISUALIZATION
Close D -silent
ReadGltf D [locate_data_file bug30691_DamagedHelmet.gltf]
vclear
vinit View1
XDisplay -dispMode 1 D
vaxo
vcamera -persp
vviewparams -scale 0.412548 -proj 0.54479 -0.790649 0.279424 -up -0.248339 0.166151 0.954317 -at -27.3419 382.603 -233.934
vtextureenv on 2
vlight -change 0 -intensity 2.5
vlight -change 1 -intensity 0.3
vrenderparams -shadingModel PBR
vdump ${imagedir}/${casename}_pbr.png
vrenderparams -ray -gi -rayDepth 10
vfps 200
vdump ${imagedir}/${casename}_pt.png

View File

@@ -1,27 +1,27 @@
puts "========"
puts "Multisampling FBOs"
puts "========"
pload MODELING VISUALIZATION
box b 2 3 1
vclear
vclose ALL
vinit View1 w=512 h=512
vraytrace 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vsetdispmode 0
vdisplay -dispMode 1 b
vfit
vrotate 0.5 0 0
vzbufftrihedron
vrenderparams -msaa 8
vdump $::imagedir/${::casename}_512x512_msaa8.png
vdump $::imagedir/${::casename}_1920x1080_msaa8.png -width 1920 -height 1080
vdump $::imagedir/${::casename}_2560x1440_msaa8.png -width 2560 -height 1440
# check dump with stereo
vstereo anaglyph
vdump $::imagedir/${::casename}_512x512_msaa8stereo.png -stereo blend
vdump $::imagedir/${::casename}_1920x1080_msaa8stereo.png -width 1920 -height 1080 -stereo blend
vdump $::imagedir/${::casename}_2560x1440_msaa8stereo.png -width 2560 -height 1440 -stereo blend
puts "========"
puts "Multisampling FBOs"
puts "========"
pload MODELING VISUALIZATION
box b 2 3 1
vclear
vclose ALL
vinit View1 w=512 h=512
vraytrace 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vsetdispmode 0
vdisplay -dispMode 1 b
vfit
vrotate 0.5 0 0
vzbufftrihedron
vrenderparams -msaa 8
vdump $::imagedir/${::casename}_512x512_msaa8.png
vdump $::imagedir/${::casename}_1920x1080_msaa8.png -width 1920 -height 1080
vdump $::imagedir/${::casename}_2560x1440_msaa8.png -width 2560 -height 1440
# check dump with stereo
vstereo anaglyph
vdump $::imagedir/${::casename}_512x512_msaa8stereo.png -stereo blend
vdump $::imagedir/${::casename}_1920x1080_msaa8stereo.png -width 1920 -height 1080 -stereo blend
vdump $::imagedir/${::casename}_2560x1440_msaa8stereo.png -width 2560 -height 1440 -stereo blend

View File

@@ -1,34 +1,34 @@
puts "========"
puts "0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing"
puts "========"
pload XDE OCAF MODELING VISUALIZATION
Close D -silent
ReadGltf D [locate_data_file bug31275_SphereWithNormalMap.glb]
vclear
vinit v -w 1024 -h 1024
vbackground -cubemap [locate_data_file Circus_CubeMap_V.png]
vcamera -persp
vlight -clear
vlight -add ambient
XDisplay -dispmode 1 D
vback
vfit
vrenderparams -ignoreNormalMap on
vrenderparams -ray -gi -rayDepth 10
vfps 200
vdump ${imagedir}/${casename}_without_normal_map.png
vrenderparams -ignoreNormalMap off
vfps 200
vdump ${imagedir}/${casename}_with_normal_map_back.png
vfront
vfps 200
vdump ${imagedir}/${casename}_with_normal_map_front.png
vlight -add positional -pos 0 0 0 -head 1 -intensity 10
vfps 200
vdump ${imagedir}/${casename}_point_light.png
puts "========"
puts "0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing"
puts "========"
pload XDE OCAF MODELING VISUALIZATION
Close D -silent
ReadGltf D [locate_data_file bug31275_SphereWithNormalMap.glb]
vclear
vinit v -w 1024 -h 1024
vbackground -cubemap [locate_data_file Circus_CubeMap_V.png]
vcamera -persp
vlight -clear
vlight -add ambient
XDisplay -dispmode 1 D
vback
vfit
vrenderparams -ignoreNormalMap on
vrenderparams -ray -gi -rayDepth 10
vfps 200
vdump ${imagedir}/${casename}_without_normal_map.png
vrenderparams -ignoreNormalMap off
vfps 200
vdump ${imagedir}/${casename}_with_normal_map_back.png
vfront
vfps 200
vdump ${imagedir}/${casename}_with_normal_map_front.png
vlight -add positional -pos 0 0 0 -head 1 -intensity 10
vfps 200
vdump ${imagedir}/${casename}_point_light.png

View File

@@ -1,43 +1,43 @@
puts "========"
puts "0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing"
puts "Spheres grid with different roughness values"
puts "========"
cpulimit 600
pload MODELING VISUALIZATION
vclear
vclose ALL
source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl
vrenderparams -ray -gi -rayDepth 10
vcamera -ortho
vfit
vlight -change 1 -intensity 0.0001
vfps 200
vdump $::imagedir/${::casename}_ortho0.png
vlight -change 1 -intensity 0.3
vfps 200
vdump $::imagedir/${::casename}_ortho30.png
vcamera -persp
vfit
vlight -change 1 -intensity 0.0001
vfps 200
vdump $::imagedir/${::casename}_persp0.png
vlight -change 1 -intensity 0.3
vfps 200
vdump $::imagedir/${::casename}_persp30.png
set aCubeMap [locate_data_file Circus_CubeMap_V.png]
vlight -change 1 -intensity 1
vbackground -cubemap $aCubeMap
vcamera -ortho
vfps 200
vdump $::imagedir/${::casename}_orthoenv.png
vcamera -persp
vfps 200
vdump $::imagedir/${::casename}_perspenv.png
puts "========"
puts "0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing"
puts "Spheres grid with different roughness values"
puts "========"
cpulimit 600
pload MODELING VISUALIZATION
vclear
vclose ALL
source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl
vrenderparams -ray -gi -rayDepth 10
vcamera -ortho
vfit
vlight -change 1 -intensity 0.0001
vfps 200
vdump $::imagedir/${::casename}_ortho0.png
vlight -change 1 -intensity 0.3
vfps 200
vdump $::imagedir/${::casename}_ortho30.png
vcamera -persp
vfit
vlight -change 1 -intensity 0.0001
vfps 200
vdump $::imagedir/${::casename}_persp0.png
vlight -change 1 -intensity 0.3
vfps 200
vdump $::imagedir/${::casename}_persp30.png
set aCubeMap [locate_data_file Circus_CubeMap_V.png]
vlight -change 1 -intensity 1
vbackground -cubemap $aCubeMap
vcamera -ortho
vfps 200
vdump $::imagedir/${::casename}_orthoenv.png
vcamera -persp
vfps 200
vdump $::imagedir/${::casename}_perspenv.png

View File

@@ -1,36 +1,36 @@
puts "========"
puts "Ray Tracing - check lighting on Plastic material"
puts "========"
pload MODELING VISUALIZATION
# create box
box b 1 2 3
# draw box
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vaxo
vdisplay b
vsetmaterial b PLASTIC
vsetcolor b GREEN
vfit
vrotate 0.2 0.0 0.0
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
puts "Error: wrong color (fixed pipeline)!"
}
vrenderparams -raytrace
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
#if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
# puts "Error: wrong color (Ray Tracing)!"
#}
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check lighting on Plastic material"
puts "========"
pload MODELING VISUALIZATION
# create box
box b 1 2 3
# draw box
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vaxo
vdisplay b
vsetmaterial b PLASTIC
vsetcolor b GREEN
vfit
vrotate 0.2 0.0 0.0
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
puts "Error: wrong color (fixed pipeline)!"
}
vrenderparams -raytrace
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
#if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
# puts "Error: wrong color (Ray Tracing)!"
#}
vdump ${imagedir}/${casename}.png

View File

@@ -1,77 +1,77 @@
puts "========"
puts "Ray Tracing - check refraction"
puts "========"
pload MODELING VISUALIZATION
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
box wall1 1 8 8
box wall2 1 8 8
box wall3 16 8 1
psphere S1 1.5
psphere S2 1.5
psphere S3 1.5
box B1 -1.5 -1.5 -1.5 2.5 2 3
box B2 -1.5 -1.5 -1.5 2.5 2 3
box B3 -1.5 -1.5 -1.5 2.5 2 3
vdisplay S1
vdisplay S2
vdisplay S3
vdisplay B1
vdisplay B2
vdisplay B3
vdisplay wall1
vdisplay wall2
vdisplay wall3
vsetlocation S1 2 2 4
vsetlocation S2 -2 2 4
vsetlocation S3 -6 2 4
vsetlocation B1 2 6 4
vsetlocation B2 -2 6 4
vsetlocation B3 -6 6 4
vsetlocation wall1 -10 0 0
vsetlocation wall2 5 0 0
vsetlocation wall3 -10 0 -1
vsetmaterial S1 water
vsetmaterial S2 glass
vsetmaterial S3 diamond
vsetmaterial B1 water
vsetmaterial B2 glass
vsetmaterial B3 diamond
vsetmaterial wall1 stone
vsetmaterial wall2 stone
vsetmaterial wall3 pewter
vsetcolor wall1 red
vsetcolor wall2 green
vsettransparency S1 0.8
vsettransparency S2 0.8
vsettransparency S3 0.8
vsettransparency B1 0.8
vsettransparency B2 0.8
vsettransparency B3 0.8
vfront
vturnview 0 -0.3 0
vfit
vlight -change 0 -dir -0.577 -0.577 -0.577
vlight dirlight -type directional
vrenderparams -raytrace -raydepth 5 -shadows off -reflections -fsaa
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check refraction"
puts "========"
pload MODELING VISUALIZATION
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
box wall1 1 8 8
box wall2 1 8 8
box wall3 16 8 1
psphere S1 1.5
psphere S2 1.5
psphere S3 1.5
box B1 -1.5 -1.5 -1.5 2.5 2 3
box B2 -1.5 -1.5 -1.5 2.5 2 3
box B3 -1.5 -1.5 -1.5 2.5 2 3
vdisplay S1
vdisplay S2
vdisplay S3
vdisplay B1
vdisplay B2
vdisplay B3
vdisplay wall1
vdisplay wall2
vdisplay wall3
vsetlocation S1 2 2 4
vsetlocation S2 -2 2 4
vsetlocation S3 -6 2 4
vsetlocation B1 2 6 4
vsetlocation B2 -2 6 4
vsetlocation B3 -6 6 4
vsetlocation wall1 -10 0 0
vsetlocation wall2 5 0 0
vsetlocation wall3 -10 0 -1
vsetmaterial S1 water
vsetmaterial S2 glass
vsetmaterial S3 diamond
vsetmaterial B1 water
vsetmaterial B2 glass
vsetmaterial B3 diamond
vsetmaterial wall1 stone
vsetmaterial wall2 stone
vsetmaterial wall3 pewter
vsetcolor wall1 red
vsetcolor wall2 green
vsettransparency S1 0.8
vsettransparency S2 0.8
vsettransparency S3 0.8
vsettransparency B1 0.8
vsettransparency B2 0.8
vsettransparency B3 0.8
vfront
vturnview 0 -0.3 0
vfit
vlight -change 0 -dir -0.577 -0.577 -0.577
vlight dirlight -type directional
vrenderparams -raytrace -raydepth 5 -shadows off -reflections -fsaa
vdump ${imagedir}/${casename}.png

View File

@@ -1,7 +1,7 @@
puts "============"
puts "Visualization - Path Tracing, Ball sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vdump $imagedir/${casename}_zoom.png
puts "============"
puts "Visualization - Path Tracing, Ball sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vdump $imagedir/${casename}_zoom.png

View File

@@ -1,13 +1,13 @@
puts "============"
puts "Visualization - Path Tracing, Ball sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vtexture ball 21 -scale 0.1 0.1
vsetmaterial ball plaster
vbsdf ball -coatFresnel Constant 0.0
vfps 100
vdump $imagedir/${casename}_zoom.png
puts "============"
puts "Visualization - Path Tracing, Ball sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vtexture ball 21 -scale 0.1 0.1
vsetmaterial ball plaster
vbsdf ball -coatFresnel Constant 0.0
vfps 100
vdump $imagedir/${casename}_zoom.png

View File

@@ -1,20 +1,20 @@
puts "============"
puts "Visualization - Path Tracing, Ball sample (ISS mode)"
puts "============"
puts ""
cpulimit 1000
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vrenderparams -iss -nbtiles 64
vfps 1024
vdump $imagedir/${casename}_iss_64.png
vrenderparams -iss -nbtiles 256
vfps 256
vdump $imagedir/${casename}_iss_256.png
vrenderparams -iss -nbtiles 1024
vfps 64
vdump $imagedir/${casename}_iss_1024.png
puts "============"
puts "Visualization - Path Tracing, Ball sample (ISS mode)"
puts "============"
puts ""
cpulimit 1000
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vrenderparams -iss -nbtiles 64
vfps 1024
vdump $imagedir/${casename}_iss_64.png
vrenderparams -iss -nbtiles 256
vfps 256
vdump $imagedir/${casename}_iss_256.png
vrenderparams -iss -nbtiles 1024
vfps 64
vdump $imagedir/${casename}_iss_1024.png

View File

@@ -1,13 +1,13 @@
puts "============"
puts "0031135: Visualization, TKOpenGl - texture sRGB -> linear conversion is applied twice by Path Tracer"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vtexture ball 11 -scale 0.1 0.1
vsetmaterial ball plaster
vbsdf ball -coatFresnel Constant 0.0
vfps 100
vdump $imagedir/${casename}_zoom.png
puts "============"
puts "0031135: Visualization, TKOpenGl - texture sRGB -> linear conversion is applied twice by Path Tracer"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl
vtexture ball 11 -scale 0.1 0.1
vsetmaterial ball plaster
vbsdf ball -coatFresnel Constant 0.0
vfps 100
vdump $imagedir/${casename}_zoom.png

View File

@@ -1,8 +1,8 @@
puts "============"
puts "Visualization - Path Tracing, Cube sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vfps 200
vdump ${imagedir}/${casename}.png
puts "============"
puts "Visualization - Path Tracing, Cube sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vfps 200
vdump ${imagedir}/${casename}.png

View File

@@ -1,22 +1,22 @@
puts "============"
puts "Visualization - Path Tracing, Cube sample with radiance clamping"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -maxrad 1.0
vfps 100
vdump $imagedir/${casename}_1.png
vrenderparams -maxrad 2.0
vfps 100
vdump $imagedir/${casename}_2.png
vrenderparams -maxrad 10.0
vfps 100
vdump $imagedir/${casename}_10.png
vrenderparams -maxrad 100.0
vfps 100
vdump $imagedir/${casename}_100.png
puts "============"
puts "Visualization - Path Tracing, Cube sample with radiance clamping"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -maxrad 1.0
vfps 100
vdump $imagedir/${casename}_1.png
vrenderparams -maxrad 2.0
vfps 100
vdump $imagedir/${casename}_2.png
vrenderparams -maxrad 10.0
vfps 100
vdump $imagedir/${casename}_10.png
vrenderparams -maxrad 100.0
vfps 100
vdump $imagedir/${casename}_100.png

View File

@@ -1,19 +1,19 @@
puts "============"
puts "Visualization - Path Tracing, Cube sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vaxo
vfit
vfps 100
# Dump image produced with one-sided BSDFs
vdump $imagedir/${casename}_onesided.png
vrenderparams -twoside
vfps 100
# Dump image produced with two-sided BSDFs
vdump $imagedir/${casename}_twosided.png
puts "============"
puts "Visualization - Path Tracing, Cube sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vaxo
vfit
vfps 100
# Dump image produced with one-sided BSDFs
vdump $imagedir/${casename}_onesided.png
vrenderparams -twoside
vfps 100
# Dump image produced with two-sided BSDFs
vdump $imagedir/${casename}_twosided.png

View File

@@ -1,7 +1,7 @@
puts "============"
puts "Visualization - Path Tracing, Materials sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_materials.tcl
vdump $imagedir/${casename}_materials.png
puts "============"
puts "Visualization - Path Tracing, Materials sample"
puts "============"
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_materials.tcl
vdump $imagedir/${casename}_materials.png

View File

@@ -1,80 +1,80 @@
puts "========"
puts "Ray Tracing - check refraction"
puts "========"
pload MODELING VISUALIZATION
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
box wall1 1 8 8
box wall2 1 8 8
box wall3 16 8 1
psphere S1 1.5
psphere S2 1.5
psphere S3 1.5
box B1 -1.5 -1.5 -1.5 2.5 2 3
box B2 -1.5 -1.5 -1.5 2.5 2 3
box B3 -1.5 -1.5 -1.5 2.5 2 3
vdisplay S1
vdisplay S2
vdisplay S3
vdisplay B1
vdisplay B2
vdisplay B3
vdisplay wall1
vdisplay wall2
vdisplay wall3
vtexture S1 8
vtexture S2 2
vtexture S3 3
vtexture B1 4
vtexture B2 5
vtexture B3 6
vsetlocation S1 2 2 4
vsetlocation S2 -2 2 4
vsetlocation S3 -6 2 4
vsetlocation B1 2 6 4
vsetlocation B2 -2 6 4
vsetlocation B3 -6 6 4
vsetlocation wall1 -10 0 0
vsetlocation wall2 5 0 0
vsetlocation wall3 -10 0 -1
vsetmaterial S1 gold
vsetmaterial S2 silver
vsetmaterial S3 copper
vsetmaterial B1 steel
vsetmaterial B2 pewter
vsetmaterial B3 chrome
vsetmaterial wall1 stone
vsetmaterial wall2 stone
vsetmaterial wall3 pewter
vsetcolor wall1 red
vsetcolor wall2 green
vfront
vturnview 0 -0.3 0
vfit
vlight -clear
vlight -add ambient
vlight -add directional -dir -0.577 -0.577 -0.577 -head 1
vlight -add directional -dir 0.577 0.577 0.577 -head 0
vrenderparams -raytrace -raydepth 3 -shadows on -reflections -fsaa
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check refraction"
puts "========"
pload MODELING VISUALIZATION
vinit View1
vclear
vrenderparams -rasterization
vsetdispmode 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
box wall1 1 8 8
box wall2 1 8 8
box wall3 16 8 1
psphere S1 1.5
psphere S2 1.5
psphere S3 1.5
box B1 -1.5 -1.5 -1.5 2.5 2 3
box B2 -1.5 -1.5 -1.5 2.5 2 3
box B3 -1.5 -1.5 -1.5 2.5 2 3
vdisplay S1
vdisplay S2
vdisplay S3
vdisplay B1
vdisplay B2
vdisplay B3
vdisplay wall1
vdisplay wall2
vdisplay wall3
vtexture S1 8
vtexture S2 2
vtexture S3 3
vtexture B1 4
vtexture B2 5
vtexture B3 6
vsetlocation S1 2 2 4
vsetlocation S2 -2 2 4
vsetlocation S3 -6 2 4
vsetlocation B1 2 6 4
vsetlocation B2 -2 6 4
vsetlocation B3 -6 6 4
vsetlocation wall1 -10 0 0
vsetlocation wall2 5 0 0
vsetlocation wall3 -10 0 -1
vsetmaterial S1 gold
vsetmaterial S2 silver
vsetmaterial S3 copper
vsetmaterial B1 steel
vsetmaterial B2 pewter
vsetmaterial B3 chrome
vsetmaterial wall1 stone
vsetmaterial wall2 stone
vsetmaterial wall3 pewter
vsetcolor wall1 red
vsetcolor wall2 green
vfront
vturnview 0 -0.3 0
vfit
vlight -clear
vlight -add ambient
vlight -add directional -dir -0.577 -0.577 -0.577 -head 1
vlight -add directional -dir 0.577 0.577 0.577 -head 0
vrenderparams -raytrace -raydepth 3 -shadows on -reflections -fsaa
vdump ${imagedir}/${casename}.png

View File

@@ -1,83 +1,83 @@
puts "========"
puts "Tiled image dump"
puts "========"
set aFontFile ""
catch { set aFontFile [locate_data_file DejaVuSans.ttf] }
pload MODELING VISUALIZATION
box b 2 3 1
box b2 50 20 30
set aLabelFont "Arial"
if { "$aFontFile" != "" } {
vfont add "$aFontFile" SansFont
set aLabelFont "SansFont"
}
vclear
vclose ALL
vinit View1
vraytrace 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vsetdispmode 0
vdisplay -dispMode 1 b
vfit
vrotate 0.5 0 0
vzbufftrihedron
catch { vzlayer del 1 }
set aLayerId [vzlayer add]
vzlayer $aLayerId -enable depthClear -disable rayTracing
vtrihedron trh
vdisplay -noupdate trh -layer $aLayerId -trihedron topRight 100 100
text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0
vdisplay -noupdate tcc -2d center -layer $aLayerId -dispMode 1
polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
vdisplay -noupdate lcc -2d center -layer $aLayerId
vsetwidth -noupdate lcc 2
text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5
vdisplay -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1
polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
vdisplay -noupdate lbl -2d bottomLeft -layer $aLayerId
vsetwidth -noupdate lbl 2
text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
vdisplay -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1
polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
vdisplay -noupdate ltl -2d topLeft -layer $aLayerId
vsetwidth -noupdate ltl 2
text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0
vdisplay -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1
polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
vdisplay -noupdate ltr -2d topRight -layer $aLayerId
vsetwidth -noupdate ltr 2
text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0
vdisplay -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1
polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
vdisplay -noupdate lbr -2d bottomRight -layer $aLayerId
vsetwidth -noupdate lbr 2
vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont
vdisplay b2 -trsfPers zoom -trsfPersPos 1 0 1
vdump $::imagedir/${::casename}_409x409_rttile0.png
vdump $::imagedir/${::casename}_409x409_rttile128.png
vdump $::imagedir/${::casename}_409x409_rttile1024.png
vdump $::imagedir/${::casename}_1920x1080_rttile0.png -width 1920 -height 1920
vdump $::imagedir/${::casename}_1920x1080_rttile128.png -width 1920 -height 1920 -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_rttile1024.png -width 1920 -height 1920 -tileSize 1024
# check dump with stereo
vstereo anaglyph
vdump $::imagedir/${::casename}_409x409_stereotile0.png -stereo blend
vdump $::imagedir/${::casename}_409x409_stereotile128.png -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_409x409_stereotile1024.png -stereo blend -tileSize 1024
vdump $::imagedir/${::casename}_1920x1080_stereotile0.png -width 1920 -height 1920 -stereo blend
vdump $::imagedir/${::casename}_1920x1080_stereotile128.png -width 1920 -height 1920 -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_stereotile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024
puts "========"
puts "Tiled image dump"
puts "========"
set aFontFile ""
catch { set aFontFile [locate_data_file DejaVuSans.ttf] }
pload MODELING VISUALIZATION
box b 2 3 1
box b2 50 20 30
set aLabelFont "Arial"
if { "$aFontFile" != "" } {
vfont add "$aFontFile" SansFont
set aLabelFont "SansFont"
}
vclear
vclose ALL
vinit View1
vraytrace 1
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
vsetdispmode 0
vdisplay -dispMode 1 b
vfit
vrotate 0.5 0 0
vzbufftrihedron
catch { vzlayer del 1 }
set aLayerId [vzlayer add]
vzlayer $aLayerId -enable depthClear -disable rayTracing
vtrihedron trh
vdisplay -noupdate trh -layer $aLayerId -trihedron topRight 100 100
text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0
vdisplay -noupdate tcc -2d center -layer $aLayerId -dispMode 1
polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
vdisplay -noupdate lcc -2d center -layer $aLayerId
vsetwidth -noupdate lcc 2
text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5
vdisplay -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1
polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
vdisplay -noupdate lbl -2d bottomLeft -layer $aLayerId
vsetwidth -noupdate lbl 2
text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
vdisplay -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1
polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
vdisplay -noupdate ltl -2d topLeft -layer $aLayerId
vsetwidth -noupdate ltl 2
text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0
vdisplay -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1
polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
vdisplay -noupdate ltr -2d topRight -layer $aLayerId
vsetwidth -noupdate ltr 2
text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0
vdisplay -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1
polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
vdisplay -noupdate lbr -2d bottomRight -layer $aLayerId
vsetwidth -noupdate lbr 2
vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont
vdisplay b2 -trsfPers zoom -trsfPersPos 1 0 1
vdump $::imagedir/${::casename}_409x409_rttile0.png
vdump $::imagedir/${::casename}_409x409_rttile128.png
vdump $::imagedir/${::casename}_409x409_rttile1024.png
vdump $::imagedir/${::casename}_1920x1080_rttile0.png -width 1920 -height 1920
vdump $::imagedir/${::casename}_1920x1080_rttile128.png -width 1920 -height 1920 -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_rttile1024.png -width 1920 -height 1920 -tileSize 1024
# check dump with stereo
vstereo anaglyph
vdump $::imagedir/${::casename}_409x409_stereotile0.png -stereo blend
vdump $::imagedir/${::casename}_409x409_stereotile128.png -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_409x409_stereotile1024.png -stereo blend -tileSize 1024
vdump $::imagedir/${::casename}_1920x1080_stereotile0.png -width 1920 -height 1920 -stereo blend
vdump $::imagedir/${::casename}_1920x1080_stereotile128.png -width 1920 -height 1920 -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_stereotile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024

View File

@@ -1,14 +1,14 @@
puts "========"
puts "Ray Tracing - check tone mapping"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -tonemapping filmic
vrenderparams -exposure -1.0
vrenderparams -whitepoint 7.0
vfit
vfps 200
vdump ${imagedir}/${casename}.png
puts "========"
puts "Ray Tracing - check tone mapping"
puts "========"
source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl
vrenderparams -ray -gi -rayDepth 10 -iss
vrenderparams -tonemapping filmic
vrenderparams -exposure -1.0
vrenderparams -whitepoint 7.0
vfit
vfps 200
vdump ${imagedir}/${casename}.png