Documentation
¶
Overview ¶
Package LightmapGI provides methods for working with LightmapGI object instances.
Index ¶
- type Advanced
- type Any
- type BakeError
- type BakeQuality
- type EnvironmentMode
- type GenerateProbes
- type Instance
- func (self Instance) AsLightmapGI() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) Bias() Float.X
- func (self Instance) BounceIndirectEnergy() Float.X
- func (self Instance) Bounces() int
- func (self Instance) CameraAttributes() [1]gdclass.CameraAttributes
- func (self Instance) DenoiserRange() int
- func (self Instance) DenoiserStrength() Float.X
- func (self Instance) Directional() bool
- func (self Instance) EnvironmentCustomColor() Color.RGBA
- func (self Instance) EnvironmentCustomEnergy() Float.X
- func (self Instance) EnvironmentCustomSky() [1]gdclass.Sky
- func (self Instance) EnvironmentMode() gdclass.LightmapGIEnvironmentMode
- func (self Instance) GenerateProbesSubdiv() gdclass.LightmapGIGenerateProbes
- func (self Instance) Interior() bool
- func (self Instance) LightData() [1]gdclass.LightmapGIData
- func (self Instance) MaxTextureSize() int
- func (self Instance) Quality() gdclass.LightmapGIBakeQuality
- func (self Instance) SetBias(value Float.X)
- func (self Instance) SetBounceIndirectEnergy(value Float.X)
- func (self Instance) SetBounces(value int)
- func (self Instance) SetCameraAttributes(value [1]gdclass.CameraAttributes)
- func (self Instance) SetDenoiserRange(value int)
- func (self Instance) SetDenoiserStrength(value Float.X)
- func (self Instance) SetDirectional(value bool)
- func (self Instance) SetEnvironmentCustomColor(value Color.RGBA)
- func (self Instance) SetEnvironmentCustomEnergy(value Float.X)
- func (self Instance) SetEnvironmentCustomSky(value [1]gdclass.Sky)
- func (self Instance) SetEnvironmentMode(value gdclass.LightmapGIEnvironmentMode)
- func (self Instance) SetGenerateProbesSubdiv(value gdclass.LightmapGIGenerateProbes)
- func (self Instance) SetInterior(value bool)
- func (self Instance) SetLightData(value [1]gdclass.LightmapGIData)
- func (self Instance) SetMaxTextureSize(value int)
- func (self Instance) SetQuality(value gdclass.LightmapGIBakeQuality)
- func (self Instance) SetTexelScale(value Float.X)
- func (self Instance) SetUseDenoiser(value bool)
- func (self Instance) SetUseTextureForBounces(value bool)
- func (self Instance) TexelScale() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UseDenoiser() bool
- func (self Instance) UseTextureForBounces() bool
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type BakeError ¶
type BakeError = gdclass.LightmapGIBakeError //gd:LightmapGI.BakeError
const ( /*Lightmap baking was successful.*/ BakeErrorOk BakeError = 0 /*Lightmap baking failed because the root node for the edited scene could not be accessed.*/ BakeErrorNoSceneRoot BakeError = 1 /*Lightmap baking failed as the lightmap data resource is embedded in a foreign resource.*/ BakeErrorForeignData BakeError = 2 /*Lightmap baking failed as there is no lightmapper available in this Godot build.*/ BakeErrorNoLightmapper BakeError = 3 /*Lightmap baking failed as the [LightmapGIData] save path isn't configured in the resource.*/ BakeErrorNoSavePath BakeError = 4 /*Lightmap baking failed as there are no meshes whose [member GeometryInstance3D.gi_mode] is [constant GeometryInstance3D.GI_MODE_STATIC] and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly.*/ BakeErrorNoMeshes BakeError = 5 /*Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking.*/ BakeErrorMeshesInvalid BakeError = 6 /*Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved.*/ BakeErrorCantCreateImage BakeError = 7 /*The user aborted the lightmap baking operation (typically by clicking the [b]Cancel[/b] button in the progress dialog).*/ BakeErrorUserAborted BakeError = 8 /*Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking.*/ BakeErrorTextureSizeTooSmall BakeError = 9 /*Lightmap baking failed as the lightmap is too small.*/ BakeErrorLightmapTooSmall BakeError = 10 /*Lightmap baking failed as the lightmap was unable to fit into an atlas.*/ BakeErrorAtlasTooSmall BakeError = 11 )
type BakeQuality ¶
type BakeQuality = gdclass.LightmapGIBakeQuality //gd:LightmapGI.BakeQuality
const ( /*Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count].*/ BakeQualityLow BakeQuality = 0 /*Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count].*/ BakeQualityMedium BakeQuality = 1 /*High bake quality (slow bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count].*/ BakeQualityHigh BakeQuality = 2 /*Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count].*/ BakeQualityUltra BakeQuality = 3 )
type EnvironmentMode ¶
type EnvironmentMode = gdclass.LightmapGIEnvironmentMode //gd:LightmapGI.EnvironmentMode
const ( /*Ignore environment lighting when baking lightmaps.*/ EnvironmentModeDisabled EnvironmentMode = 0 /*Use the scene's environment lighting when baking lightmaps. [b]Note:[/b] If baking lightmaps in a scene with no [WorldEnvironment] node, this will act like [constant ENVIRONMENT_MODE_DISABLED]. The editor's preview sky and sun is [i]not[/i] taken into account by [LightmapGI] when baking lightmaps.*/ EnvironmentModeScene EnvironmentMode = 1 /*Use [member environment_custom_sky] as a source of environment lighting when baking lightmaps.*/ EnvironmentModeCustomSky EnvironmentMode = 2 /*Use [member environment_custom_color] multiplied by [member environment_custom_energy] as a constant source of environment lighting when baking lightmaps.*/ EnvironmentModeCustomColor EnvironmentMode = 3 )
type GenerateProbes ¶
type GenerateProbes = gdclass.LightmapGIGenerateProbes //gd:LightmapGI.GenerateProbes
const ( /*Don't generate lightmap probes for lighting dynamic objects.*/ GenerateProbesDisabled GenerateProbes = 0 /*Lowest level of subdivision (fastest bake times, smallest file sizes).*/ GenerateProbesSubdiv4 GenerateProbes = 1 /*Low level of subdivision (fast bake times, small file sizes).*/ GenerateProbesSubdiv8 GenerateProbes = 2 /*High level of subdivision (slow bake times, large file sizes).*/ GenerateProbesSubdiv16 GenerateProbes = 3 /*Highest level of subdivision (slowest bake times, largest file sizes).*/ GenerateProbesSubdiv32 GenerateProbes = 4 )
type Instance ¶
type Instance [1]gdclass.LightmapGI
The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv] to a value other than [constant GENERATE_PROBES_DISABLED]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI]. [b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [LightmapGI] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [VoxelGI] or SDFGI instead (see [member Environment.sdfgi_enabled]). [b]Performance:[/b] [LightmapGI] provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices. [b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again. [b]Note:[/b] Lightmap baking on [CSGShape3D]s and [PrimitiveMesh]es is not supported, as these cannot store UV2 data required for baking. [b]Note:[/b] If no custom lightmappers are installed, [LightmapGI] can only be baked from devices that support the Forward+ or Mobile rendering backends.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsLightmapGI ¶
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) BounceIndirectEnergy ¶
func (Instance) CameraAttributes ¶
func (self Instance) CameraAttributes() [1]gdclass.CameraAttributes
func (Instance) DenoiserRange ¶
func (Instance) DenoiserStrength ¶
func (Instance) Directional ¶
func (Instance) EnvironmentCustomColor ¶
func (Instance) EnvironmentCustomEnergy ¶
func (Instance) EnvironmentCustomSky ¶
func (Instance) EnvironmentMode ¶
func (self Instance) EnvironmentMode() gdclass.LightmapGIEnvironmentMode
func (Instance) GenerateProbesSubdiv ¶
func (self Instance) GenerateProbesSubdiv() gdclass.LightmapGIGenerateProbes
func (Instance) LightData ¶
func (self Instance) LightData() [1]gdclass.LightmapGIData
func (Instance) MaxTextureSize ¶
func (Instance) Quality ¶
func (self Instance) Quality() gdclass.LightmapGIBakeQuality
func (Instance) SetBounceIndirectEnergy ¶
func (Instance) SetBounces ¶
func (Instance) SetCameraAttributes ¶
func (self Instance) SetCameraAttributes(value [1]gdclass.CameraAttributes)
func (Instance) SetDenoiserRange ¶
func (Instance) SetDenoiserStrength ¶
func (Instance) SetDirectional ¶
func (Instance) SetEnvironmentCustomColor ¶
func (Instance) SetEnvironmentCustomEnergy ¶
func (Instance) SetEnvironmentCustomSky ¶
func (Instance) SetEnvironmentMode ¶
func (self Instance) SetEnvironmentMode(value gdclass.LightmapGIEnvironmentMode)
func (Instance) SetGenerateProbesSubdiv ¶
func (self Instance) SetGenerateProbesSubdiv(value gdclass.LightmapGIGenerateProbes)
func (Instance) SetInterior ¶
func (Instance) SetLightData ¶
func (self Instance) SetLightData(value [1]gdclass.LightmapGIData)
func (Instance) SetMaxTextureSize ¶
func (Instance) SetQuality ¶
func (self Instance) SetQuality(value gdclass.LightmapGIBakeQuality)