mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
Graphic3d_CLight is now defined as a class inheriting Standard_Transient, so that it's fields now should be accessed through methods. Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere. Confusing alias OpenGl_Light has been removed. Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed since it contradicts to OpenGL specs and does not make sense. Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer. When defined, it overrides light sources defined for View/Viewer. New class Graphic3d_LightSet has been defined to define a set of light sources. V3d_Light - removed obsolete interface for debug drawing lights sources. V3d_Light is now an alias to Graphic3d_CLight. V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
puts "========"
|
|
puts "OCC24130 Implementing ray tracing visualization core"
|
|
puts "========"
|
|
|
|
# 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
|
|
vsetgradientbg 180 200 255 180 180 180 2
|
|
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
|
|
}
|
|
}
|