Interface: ViewportSSB
NOTE:
This Core Interface is not available by default in 3ds Max 2012 and higher because the Viewports are set to use the Nitrous Graphics System.
You must switch the Viewports to Direct3D graphics for this interface to become available!
The ViewportSSB Core Interface available in 3ds Max 2010 and higher when using Direct3D viewport graphics exposes some properties and methods related to the viewport Soft Shadows effect.
Properties:
ViewportSSB.CubeBias : float : Read|Write
Get/Set the Cube MapBias value used when blurring the Shadow Map.
Default is 0.5.
ViewportSSB.ShadowMapSize : Integer : Read|Write
Get/Set the Shadow Map Size value used to calculate the Viewport Shadows.
Default is 512.
EXAMPLES:
|
|
vss = maxops.getViewportShadingSettings() --get control <IObject>
vss.ActivateViewportShading = true --turn on hardware shading
vss.ShadowsActive = true --enable shadows
vss.ShadowMode = #Soft --enable soft shadows
ViewportSSB.AreaShadows = false --disable area shadows
ViewportSSB.ShadowMapSize = 512 --default shadow map size
|
|
|
|
ViewportSSB.ShadowMapSize = 256
|
ViewportSSB.ShadowMapSize = 128
|
ViewportSSB.ShadowMapSize = 64
|
ViewportSSB.ShadowMapSize = 32
|
ViewportSSB.EVSMConfig : point3by value: Read|Write
Get/set a Point3 value that can be used to control light "bleeding" in the Shadows.
Default is [10,5,0.01].
ViewportSSB.AreaShadow : Boolean : Read|Write
Turn on/off Area Shadow preview of Area Lights.
Only works if Shadows are set to #Soft, otherwise #Hard shadows will be calculated
regardless.
When set to true, Area Lights will cast Area Shadows.
When set to false, Area Lights will cast Soft Shadows.
Default is false.
EXAMPLES:
|
vss = maxops.getViewportShadingSettings() --get control <IObject>
vss.ActivateViewportShading = true --turn on hardware shading
vss.ShadowsActive = true --enable shadows
|
vss.ShadowMode = #Hard --enable soft shadows
ViewportSSB.AreaShadow = true --disable area shadows
--As you can see, Area Shadows are NOT displayed in Hard Shadows mode.
|
|
vss.ShadowMode = #Soft --enable soft shadows
ViewportSSB.AreaShadow = false --disable area shadows
--Area Shadows are disabled, so we get Soft shadows display
|
|
vss.ShadowMode = #Soft --enable soft shadows
ViewportSSB.AreaShadow = true --enable areashadows
--Both Soft and Area Shadows are enabled, so we get Area Shadows
--in the viewports:
|
|
ViewportSSB.TransAreaShadow : Boolean : Read|Write
Turn on/off transparency support for Area Shadow.
Default is false.
EXAMPLES:
|
vss = maxops.getViewportShadingSettings() --get control <IObject>
vss.ActivateViewportShading = true --turn on hardware shading
vss.ShadowsActive = true --enable shadows
vss.ShadowMode = #Soft --enable soft shadows
ViewportSSB.AreaShadows = false --disable area shadows
|
|
ViewportSSB.AreaShadows = true --enablearea shadows
ViewportSSB.TransAreaShadow = false --disable transparent area shadows
|
|
ViewportSSB.AreaShadows = true --enable area shadows
ViewportSSB.TransAreaShadow = true --enable transparent area shadows
|
|
Methods:
<String>ViewportSSB.GetVideoMemoryUsed()
Returns the video memory used by the effect as a string.
FOR EXAMPLE:
|
ViewportSSB.GetVideoMemoryUsed()
--> "23.50 (19.50 + 4.00)MB"
|