pebxcvi's picture
update
ee7329c
Raw
History Blame Contribute Delete
28.9 kB
1.76 Scene .650
1.76.1 Scene.FindEntity .650
1.76.2 Scene.FindScreen .651
1.76.3 Scene.FindTriggerVolume .651
1.76.4 Scene.GetGraphicsEngineParam .652
1.76.5 Scene.Getlnstanceld .653
1.76.6 Scene.GetLaunchParam .653
1.76.7 Scene.GetLayerCollisionDefault .654
1.76.8 Scene.GetListenerObjects .654
1.76.9 Scene.GetMaxSaveDataSize .655
1.76.10 Scene.GetSaveDataPermission .656
1.76.11 Scene. GetStartupInstanceParam .656
1.76.12 Scene.GetStartupValueParam .657
1.76.13 Scene.GetVirtualObject .658
1.76.14 Scene.IsLoading .658
1.76.15 Scene.IsLoadingObjects .659
1.76.16 Scene.IsSaveDataBusy .659
1.76.17 Scene.LoadData .660
1.76.18 Scene.LockPadControls .661
1.76.19 Scene.OverrideAvatarCloseUpCamAspect .661
1.76.20 Scene.OverrideAvatarCloseUpCamFov .662
1.76.21 Scene. OverrideAvatarCloseUpCamZFar .663
1.76.22 Scene.OverrideAvatarCloseUpCamZNear .663
1.76.23 Scene.OverrideAvatarStandardCamAspect .664
1.76.24 Scene.OverrideAvatarStandardCamFov .665
1.76.25 Scene.OverrideAvatarStandardCamZFar .665
1.76.26 Scene.OverrideAvatarStandardCamZNear .666
1.76.27 Scene.ResetAvatarCamOverrides .667
1.76.28 Scene.SaveData .667
1.76.29 Scene.SetGraphicsEngineParam .668
1.76.30 Scene.SetLayerCollisionDefault .669
1.76.31 Scene.SetLightProbeData .669
1.76.32 Scene.SetLightProbeTransform .670
Scene
Scene.FindEntity
Brief
Finds an entity that was created from the scene
Definition
Entity Scene.FindEntity( string name )
Arguments
name - The name of the entity as set in the HDK's Scene Editor application.
Return Values
The entity if it is found and nil otherwise.
Description
Finds an entity that was created from the scene, (i.e. one added to the world as part of the .scene file)
Examples
! anotherDancingMonkey = Scene.FindEntity( "DancingMonkey342" )
i Entity.SetAnim( anotherDancingMonkey, "monkey_excited" )
See Also
Scene.FindScreen
Brief
Finds a screen in the active scene.
Definition
Screen Scene.FindScreen( string name )
Arguments
name - The name of the screen as set in the FIDK's Scene Editor application.
Return Values
The screen matching the specified name or nil if the screen is not found.
Description
Finds a screen in the active scene.
Examples
screen = Scene.FindScreen( "MyVideoScreen" )
if screen ~= nil then
Screen.SetContent( screen, "http://www.example.com/myvideo.mp4" )
end
See Also
� Screen.SetContent
Scene.FindTriggerVolume
Brief
Finds a trigger volume that was created from the scene
Definition
! TriggerVolume Scene.FindTriggerVolume( string name )
Arguments
name - The name of the trigger volume as set in the HDK's Scene Editor application.
Return Values
The trigger volume if it is found and nil otherwise.
Description
Finds a trigger volume that was created from the scene, (i.e. one added to the world as part of the .scene file)
Examples
trigVol = Scene.FindTriggerVolume( "sceneTriggerVolumel" )
TriggerVolume.AddCallback( trigVol, MySceneTriggerVolumeCallback )
See Also
� TriggerVolume.AddCallback
Scene.GetGraphicsEngineParam
Brief
Get the value of a parameter from the graphics engine.
Definition
Scene.GetGraphicsEngineParam(paramName)
Arguments
paramName - a valid graphics engine param name. Valid values are:
GraphicsEngine.ShadowEnable
GraphicsEngine.ShadowQuality
GraphicsEngine.SunlightColor
GraphicsEngine.SunlightDir
GraphicsEngine.ColorBalance
GraphicsEngine.Saturation
GraphicsEngine.Contrast
GraphicsEngine.ShadowPlaneDistance
GraphicsEngine.ShadowPlaneMultiplier
GraphicsEngine.ShadowPlaneCount
GraphicsEngine.ShadowDarkness
GraphicsEngine. AlphaSortEnable
GraphicsEngine. LightProbeTint
GraphicsEngine.GlowType
GraphicsEngine.GlowColor
GraphicsEngine. GlowBlendMode
Return Values
The current value of the graphics engine parameter in question.
Description
For details of the types returned by this function, see Scene.SetGraphicsEngineParam.
Examples
print(Scene.GetGraphicsEngineParam(GraphicsEngine.SunlightColor)) � output is "[1.64, 1.52, 1.08, 0]
i print(Scene.GetGraphicsEngineParam(GraphicsEngine.ShadowEnable)) � output is "true"
See Also
� Scene.SetGraphicsEngineParam
Scene.Getlnstanceld
Brief
Returns a unique id for the scene instance the user is currently in
Definition
! string Scene.GetInstanceld()
Arguments
None.
Return Values
string - The unique scene instance id
Description
Returns a unique id for the scene instance the user is currently in
Examples
! scenelnstaceld = Scene.GetInstanceld()
See Also
None
Scene.GetLaunchParam
Brief
Returns one of the text parameters that may have been passed to PS Plome when launched.
Definition
! string Scene.GetLaunchParam( number index = 1 )
Arguments
index - index of the parameter to fetch (1-16).
Return Values
The indexed string that PS Home was launched with, or "none" if none.
Description
This function allows your script to query optional values passed to Home through a configuration file either set up by SCE regional teams or
generated from a game launched by Home. This allows you to gamelaunch from Home into your external title, then when the user selects to
return to PS Home they are directed to different spaces depending on whether they won or lost (for instance). Note that these values are only
valid in the first scene the user enters after returning to Home. See external documentation for more details on setting up this system.
Examples
param = Scene.GetLaunchParam( 1 )
if ( param ~= "none" ) then
if ( param == "winner" ) then � custom string passed to PS Home by title
print("You won!")
else
print("You lost.")
end
end
See Also
None
Scene.GetLayerCollisionDefault
Brief
Query the default enabledness of collision detection between collision of the specified layers.
Definition
boolean Scene.GetLayerCollisionDefault( enum layerA, enum layerB )
Arguments
layerA - The first layer.layerB - The second layer.
Return Values
true if collision detection is enabled by default, false otherwise.
Description
Query the default enabledness of collision detection between collision of the specified layers.
Examples
! print( Scene.GetLayerCollisionDefault( CollisionLayer.Userl, CollisionLayer.FurniturePlacement ) )
See Also
� Scene.SetLayerCollisionDefault
Scene.GetListenerObjects
Brief
Returns an array of scene objects that are listening for data.
Definition
Object[] Scene.GetListenerObjects( number startIndex = 1, number maxCount = -1 )
Arguments
startlndex - The position to start from. Previous indices are not added to the results.maxCount - The maximum size the results array can be.
Return Values
A table of Object instances.
Description
Returns an array of scene objects that are listening for data.
Examples
sceneListenerObjects = Scene.GetListenerObjects()
t = { letters={ "a", "b", "c" }, type="letter_message" }
for i, sceneListenerObject in ipairs( sceneListenerObjects ) do
resultl, result2, result3 = Object.SendListenerData( sceneListenerObject, t )
end
See Also
None
Scene.GetMaxSaveDataSize
Brief
Indicates the maximum size in bytes of the available save data storage area.
Definition
! number Scene.GetMaxSaveDataSize()
Arguments
None
Return Values
The maximum size in bytes of the save data storage area.
Description
This function will return the maximum size in bytes of the available save data storage area. This number will never decrease. The number is valid
only if the scene has save data access.
Examples
local access = Scene.GetSaveDataPermission()
i if access == SaveDataPermission.ReadWrite and not Scene.IsSaveDataBusy() then
me = MemoryContainer.Create( Scene.GetMaxSaveDataSize() )
� modify container here
Scene.SaveData( me )
j end
L_I
See Also
None
Scene.GetSaveDataPermission
Brief
Obtain the level of save data access available to the current user in this scene.
Definition
SaveDataPermission Scene.GetSaveDataPermission()
Arguments
None
Return Values
A permission level (see details).
Description
Some scenes (currently personal spaces and clubhouses) provide the ability for a script to save data. Public scenes will not provide this ability.
Only the owner or club leader is currently able to read or write the save data, so the Readonly permission level below is not yet available. This
function will return the save data access level for the current user in the current scene, from the following values:
SaveDataPermission.None
SaveDataPermission. Readonly
SaveDataPermission. ReadWrite
For convenience these values can also be compared in the expected order (see example). Note that the save data system may also temporarily
be busy, even if the user has permission. This can be checked with the IsSaveDataBusy function.
Examples
local access = Scene.GetSaveDataPermission()
if (access > SaveDataPermission.None and not Scene.IsSaveDataBusy()) then
Scene.LoadData(memContainer)
end
See Also
� Scene.IsSaveDataBusy
Scene.GetStartupInstanceParam
Brief
Returns the Instance parameter that was passed to the scene when it was initialised
Definition
number Scene.GetStartupInstanceParam()
Arguments
None.
Return Values
number - The Instance parameter that the scene was started with
Description
When the user is relocated to a new scene (either by using a relocate region placed in another scene, or by the Local Player. Relocate function),
an optional 'instance' parameter can be passed. The instance parameter is used to create different instances of the scene, and can then be
queried by the destination scene's scene script to change the behaviour in this new instance of the scene. For example, you might have a 'lobby'
scene and a 'game-room' scene connected to it. When the user chooses to move from the lobby to the game-room, the lobby's script might decide
(for instance), to send all European users to game-room instance 1, and all US users to game-room instance 2. European users would all appear
in one set of instances of the game-room, US users would all appear in another set of instances of the game-room. The game-room script could
then use this function to determine if the current instance is a European or US one and change behaviour appropriately.
Examples
param = Scene.GetStartupInstanceParam()
See Also
Scene.GetStartupValueParam
Brief
Returns the value parameter that was passed to the scene when it was initialised
Definition
number Scene.GetStartupValueParam()
Arguments
None.
Return Values
number - The value parameter that the scene was started with
Description
The value parameter is usually derived from relocation regions in the scene editor, e.g. You might have one scene that has 2 doorways leading to
copies of the same scene When placing the relocation region for the doorways, you add the name of the scene the doorways lead to and
(optionally) a value and text parameter. Hence, the first doorway could lead to space B with value parameter 1, and the second doorway could
lead to space B with value parameter 2. The scene script in space B could then use this function to, for instance, set different screen content
depending on which doorway the user came through. Note that users entering the same scene will see other users in that scene, even though
they might have entered with a different value parameter To create separate instances of the scene controlled by parameter, see
Scene.GetStartuplnstanceParam()
Examples
param = Scene.GetStartupValueParam()
See Also
Scene.GetVirtualObject
Brief
Returns the current scene's virtual Object and nil if not present.
Definition
Object Scene.GetVirtualObject()
Arguments
None
Return Values
the current scene's virtual Object and nil if not present.
Description
Returns the current scene's virtual Object and nil if not present.
Examples
sceneObject = Scene.GetVirtualObject()
t = { letters={ "a", "b", "c" }, type="letter_message" }
results = Object.SendListenerData( sceneObject, t )
See Also
None
Scene.IsLoading
Brief
Indicates if current scene is currently loading.
Definition
boolean Scene.IsLoading()
Arguments
None
Return Values
True if a scene is currently loading or false if fully loaded.
Description
A scene is considered loaded once the scene itself and all objects marked as load before spawn are loaded, and the local player is spawned.
Object and scene scripts will start to run before a scene is fully loaded, this is by design as it allows background loading to continue where
necessary. If a script wishes to disable certain functionality while the scene is still loading, this function can be used to identify this state. Note that
scene objects not marked as load before spawn will continue to load after this function returns true; to detect this state use
Scene. IsLoadingObjects.
Examples
if (Scene.IsLoading()) then
g_canStartGame = false � disallow playing a game until scene is loaded
end
See Also
� Scene. IsLoadingObjects
Scene.IsLoadingObjects
Brief
Indicates if current scene is currently loading scene objects.
Definition
boolean Scene.IsLoadingObjects()
Arguments
None
Return Values
True if a scene is currently loading scene objects or false if all scene objects are loaded.
Description
A scene is considered loaded once the scene itself and all objects marked as load before spawn are loaded, and the local player is spawned.
Scene objects not marked as load before spawn will however continue to be downloaded after this point. This function will return true while there
are still scene objects downloading and loading in the scene, and will only return false when all scene objects are loaded and active. If you only
wish to detect when the scene and local player and all load before spawn objects are loaded, use Scene.IsLoading.
Examples
if (g_isLoading and not Scene.IsLoadingObjects()) then
g_isLoading = false
SendListenerDataToAllObjects() � user function
end
See Also
� Scene.IsLoading
Scene.lsSaveDataBusy
Brief
Returns true if the save data system is currently busy indicating a save data request would fail.
Definition
boolean Scene.IsSaveDataBusy()
Arguments
None
Return Values
true if the save data system is busy and false otherwise.
Description
This function is only useful if the user has save data access (see GetSaveDataPermission). If this function returns true, any attempt to use the
save data system will cause a Lua error.
Examples
local access = Scene.GetSaveDataPermission()
if access == SaveDataPermission.ReadWrite and not Scene.IsSaveDataBusy() then
me = MemoryContainer.Create( Scene.GetMaxSaveDataSize() )
� modify container here
Scene.SaveData( me )
end
See Also
� Scene.GetSaveDataPermission
Scene.LoadData
Brief
Copies the scene's save data (if available) into the supplied memory container.
Definition
void Scene.LoadData( MemoryContainer memContainer, int size = Scene.GetMaxSaveDataSize( ), int offset
= 0 )
Arguments
memContainer - The memory container to load into.size - Number of bytes to obtain.offset - Offset in bytes into the memory container at which to
store the data.
Return Values
None.
Description
All scenes which allow saving (clubhouses and personal space), have an allocated save data area which allow embedded objects and
scenescripts to save data about the scene. Note that nothing should rely on specific data being present in the save data (as the user may delete
their Home save data at any time) and thus actives should be able to recognise and handle the case where no save data is present. When a
scene is accessed for the first time, all of its save data is set to zero.
Examples
local access = Scene.GetSaveDataPermission()
if access > SaveDataPermission.None and not Scene.IsSaveDataBusy() then
local memContainer = MemoryContainer.Create( Scene.GetMaxSaveDataSize( ) )
Scene.LoadData(memContainer)
if (memContainer:GetUintl6(0) == 48879) then -- OxBEEF
print('Save data is valid: found the beef')
g_mySize = memContainer:GetFloat32(4)
end
end
See Also
� Scene.SaveData
� Scene.GetSaveDataPermission
� Scene.IsSaveDataBusy
Scene.LockPadControls
Brief
Locks the pad controls.
Definition
Scene.LockPadControls(boolean val)
Arguments
val - true or false to lock or unlock the pad controls respectively.
Return Values
Description
Locks the input pad controls, bar the SELECT button (for the Safe Screen). The developer is advised to use this with care, and to interact with the
user appropriately during the time the controls are locked. If it's not obvious why the controls are locked, the user should be informed.
Examples
! Scene.LockPadControls(true)
See Also
None
Scene.OverrideAvatarCloseUpCamAspect
Brief
Set the aspect for the standard close-up camera that follows the Avatar.
Definition
Scene.OverrideAvatarCloseUpCamAspect(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarCloseUpCamAspect(true, 16.0 / 9.0)
! Scene.OverrideAvatarCloseUpCamAspect(false)
See Also
� Scene.OverrideAvatarClosellpCamFov
� Scene.OverrideAvatarClosellpCamZNear
� Scene.OverrideAvatarStandardCamAspect
� Scene.OverrideAvatarStandardCamZNear
� Scene.OverrideAvatarStandardCamZFar
Scene.OverrideAvatarCloseUpCamFov
Brief
Set the Field Of View for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarCloseUpCamFov(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarCloseUpCamFov(true, 60)
! Scene.OverrideAvatarCloseUpCamFov(false)
See Also
Scene.OverrideAvatarCloseUpCamAspect
� Scene.OverrideAvatarClosellpCamZNear
� Scene.OverrideAvatarStandardCamAspect
� Scene. OverrideAvatarStandardCamZNear
� Scene. OverrideAvatarStandardCamZFar
Scene. OverrideAvatarCloseUpCamZFar
Brief
Set the far clipping for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarCloseUpCamZFar(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarCloseUpCamZFar(true, 1000)
1 Scene.OverrideAvatarCloseUpCamZFar(false)
See Also
� Scene. OverrideAvatarClosellpCamFov
� Scene. OverrideAvatarClosellpCamAspect
� Scene.OverrideAvatarStandardCamAspect
� Scene.OverrideAvatarStandardCamZNear
� Scene.OverrideAvatarStandardCamZFar
Scene.OverrideAvatarCloseUpCamZNear
Brief
Set the near clipping for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarCloseUpCamZNear(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
1 Scene.OverrideAvatarCloseUpCamZNear(true, 0.1)
! Scene.OverrideAvatarCloseUpCamZNear(false)
See Also
� Scene.OverrideAvatarClosellpCamFov
� Scene.OverrideAvatarClosellpCamAspect
� Scene.OverrideAvatarStandardCamAspect
� Scene.OverrideAvatarStandardCamZNear
� Scene.OverrideAvatarStandardCamZFar
Scene.OverrideAvatarStandardCamAspect
Brief
Set the aspect for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarStandardCamAspect(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarStandardCamAspect(true, 16.0 / 9.0)
! Scene.OverrideAvatarStandardCamAspect(false)
See Also
� Scene. OverrideAvatarStandardCam Fov
� Scene.OverrideAvatarStandardCamZNear
� Scene.OverrideAvatarClosellpCamAspect
� Scene. OverrideAvatarClosellpCamZNear
� Scene. OverrideAvatarClosellpCamZFar
Scene.OverrideAvatarStandardCamFov
Brief
Set the Field Of View for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarStandardCamFov(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarStandardCamFov(true, 60)
! Scene.OverrideAvatarStandardCamFov(false)
See Also
� Scene. OverrideAvatarStandardCamAspect
� Scene. OverrideAvatarStandardCamZNear
� Scene. OverrideAvatarClosellpCamAspect
� Scene.OverrideAvatarClosellpCamZNear
� Scene.OverrideAvatarClosellpCamZFar
Scene.OverrideAvatarStandardCamZFar
Brief
Set the far clipping for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarStandardCamZFar(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarStandardCamZFar(true, 1000)
! Scene.OverrideAvatarStandardCamZFar(false)
See Also
� Scene.OverrideAvatarStandardCamFov
� Scene.OverrideAvatarStandardCamAspect
� Scene.OverrideAvatarClosellpCamAspect
� Scene. OverrideAvatarClosellpCamZNear
� Scene. OverrideAvatarClosellpCamZFar
Scene. OverrideAvatarStandardCamZNear
Brief
Set the Far clipping for the standard close-up camera that follows the Avatar.
Definition
! Scene.OverrideAvatarStandardCamZNear(boolean isOverride, number value)
Arguments
isOverride - whether or not to override the default setting.value - the value to set.
Return Values
None.
Description
Examples
! Scene.OverrideAvatarStandardCamZNear(true, 0.1)
! Scene.OverrideAvatarStandardCamZNear(false)
See Also
� Scene.OverrideAvatarStandardCamFov
� Scene.OverrideAvatarStandardCamAspect
� Scene. OverrideAvatarClosellpCamAspect
� Scene.OverrideAvatarClosellpCamZNear
� Scene.OverrideAvatarClosellpCamZFar
Scene. ResetAvatarCamOverrides
Brief
Resets all previously set Avatar Camera overrides.
Definition
! Scene.ResetAvatarCamOverrides()
Arguments
None
Return Values
None.
Description
Examples
! Scene.ResetAvatarCamOverrides()
See Also
� Scene. OverrideAvatarStandardCamFov
� Scene.OverrideAvatarStandardCamAspect
� Scene.OverrideAvatarStandardCamZNear
� Scene. OverrideAvatarClosellpCamAspect
� Scene.OverrideAvatarClosellpCamZNear
� Scene.OverrideAvatarClosellpCamZFar
Scene.SaveData
Brief
Copies the data from the supplied memory container into the scene's save data area and requests it to save.
Definition
! Scene.SaveData( MemoryContainer memContainer, number size = Scene.GetMaxSaveDataSize( ), int offset =
I 0 )
Arguments
memContainer - The memory container to read data from.size - Number of bytes to obtain.offset - Offset in bytes into the memory container at
which to start reading the data to save.
Return Values
None.
Description
All scenes which allow saving (clubhouses and personal spaces), have an allocated save data area which allow embedded objects and scene
scripts to save data about the scene. Note that nothing should rely on specific data being present in the save data (as the user may delete their
Home save data at any time) and thus a script should be able to recognise and handle the case where no or invalid save data is present. When a
scene is accessed for the first time, all of its save data is set to zero. Note: If size is not specified and your memory container is bigger than the
maximum save data size an error will occur to catch accidental data truncation.
Examples
local access = Scene.GetSaveDataPermission()
if (access == SaveDataPermission.ReadWrite and not Scene.IsSaveDataBusy()) then
local memContainer = MemoryContainer.Create( 8 )
memContainer:SetUint16(0, 48879) � OxBEEF, tags our data as valid
memContainer:SetFloat32(4, mySize) � save our current size so we can keep growing next time
Scene.SaveData(memContainer, 8)
end
See Also
� Scene. Load Data
� Scene.GetSaveDataPermission
� Scene. IsSaveDataBusy
Scene.SetGraphicsEngineParam
Brief
Set the value of a parameter in the graphics engine.
Definition
! Scene.SetGraphicsEngineParam(paramName, value)
Arguments
paramName - a valid graphics engine param name. Valid values are:
GraphicsEngine.ShadowEnable boolean - enable or disable shadows, defaults to true)
GraphiceEngine.ShadowQuality set the sun shadow quality. Should be one of:
ShadowQuality.Low
ShadowQuality.Medium
ShadowQuality.High
GraphicsEngine.SunlightColor Vector4 - set the color/brightness of the sun, w component is ignored. Each channel range is 0=>3
GraphicsEngine.SunlightDir Vector4 - set the direction of the sun. The value does not need to be normalized
GraphicsEngine.ColorBalance Vector4 - set the post-process color balance, components should be in the range -1 =>1, defaults to (0,0,0)
GraphicsEngine.Saturation scalar - set the post-process saturation, should be in the range -2=>2, defaults to 1
GraphicsEngine.Contrast scalar - set the post-process contrast, should be in the range -1 =>1, defaults to 0
GraphicsEngine.ShadowPlaneDistance scalar - distance to the first shadow plane in metres, defaults to 2.0
GraphicsEngine.ShadowPlaneMultiplier scalar - value to muliply each shadow plane distance by to get the distance to the next plane, defaults to
3.0 and must be greater than 1.0
GraphicsEngine.ShadowPlaneCount scalar - number of shadow planes to render, should be in the range 0=>4, defaults to 4
GraphicsEngine.ShadowDarkness scalar - set the darkness of indoor shadows (has no effect in sunlit scenes), should be in the range 0=>1,
defaults to 0.2
GraphicsEngine.AlphaSortEnable boolean - enable or disable sorting of semitransparent meshes, for scenes exported with HDK1.40 onwards,
this defaults to true.
GraphicsEngine.LightProbeTint Vector4 - set a global tint colour for the light probes, defaults to (1,1,1)
GraphicsEngine.GlowType set the type of glow. Should be one of:
GlowType.Disabled
GlowType.Small
GlowType.Default
GlowType.Large
GlowType. ExtraLarge
GlowType. Horizontal
GlowType.Vertical
GraphicsEngine.GlowColor Vector4 - set the tint colour for the glow
GraphicsEngine.GlowBlendMode set the blend type for the glow, should be one of:
GlowBlend.Default
GlowBlend.Add - add the glow buffer to the framebuffer
GlowBlend.Squared - square the glow buffer and add it to the framebuffer
GraphicsEngine.EnvironmentMap Set the current environment map for dynamic objects.
The argument should be the name of a texture resource, or the resource itselfvalue - the value to set.
Return Values
None.
Description
Examples
Scene.SetGraphicsEngineParam(GraphicsEngine.SunlightColor, Vector4.Create(2, 2,0)) � set the sun color
to bright yellow
Scene.SetGraphicsEngineParam(GraphicsEngine.ShadowEnable, false) � disable shadows in this scene
See Also
None
Scene.SetLayerCollisionDefault
Brief
Set the default enabledness of collision detection between collision of the specified layers.
Definition
! Scene.SetLayerCollisionDefault( enum layerA, enum layerB, boolean enabled )
Arguments
layerA - The first layer; must be a "user layer".layerB - The second layer.enabled - true to enable collision detection by default, false otherwise.
Return Values
None.
Description
Set the default enabledness of collision detection between collision of the specified layers.
Examples
! Scene.SetLayerCollisionDefault( CollisionLayer.Userl, CollisionLayer.FurniturePlacement, false )
See Also
� Scene.GetLayerCollisionDefault
Scene.SetLightProbeData
Brief
Set the light probe data for the scene
Definition
Scene.SetLightProbeData(string resourcename, number slotlndex, bool updateSun=false)
Scene.SetLightProbeData(Resource resource, number slotlndex, bool updateSun=false)
Arguments
resource - The probe data file resource, or resource name, or nil to clear the slot
This resource can not be released whilst it is in use on a slot. Set the slot to another resource or nil before
attempting to release it.slotlndex - The light probe volume index to set. There are 9 slots (numbered 0-8) available.updateSun - If this is true,
update the sun parameters based on the values from the given probe data
Return Values
none
Description
Sets the light probe volume at the given index to the given data. If this volume overlaps an existing volume, then the one with the lowest slot
number will have precedence. Note, there is no way to query the light probe slots once assigned.
Examples
� load in new scene geometry �
entity = Entity.Create ()
entity:SetModel( "my_new_scene_geometry.mdl" )
� load corresponding lighting data �
Scene.SetLightProbeData( "mylighting.probe", 1 )
� clear old lighting �
Scene.SetLightProbeData( nil, 0 )
See Also
� Scene.SetLightProbeTransform
Scene.SetLightProbeTransform
Brief
Set the transform for the light probe volume in the given slot
Definition
Scene.SetLightProbeTransform(Matrix44 transform, number slotlndex)
Arguments
transform - The transform to apply to the light probe volume in the given slotslotlndex - The light probe volume index to set. There are 9 slots
(numbered 0-8) available.
Return Values
none
Description
Sets the transform for the light probe volume at the given index
Examples
� load in new scene geometry �
entity = Entity.Create ()
entity:SetModel( "my_new_scene_geometry.mdl" )
� load corresponding lighting data �
Scene.SetLightProbeData( "mylighting.probe", 1 )
� reposition model and probes �
pos = Vector4.Create(10, 10, 0)
entity:SetPosition( pos )
Scene.SetLightProbeTransform( Matrix44.Create( Quaternion.Create (), pos ), 1 )
See Also
� Scene.SetLightProbeData