LightmapGI

package
v0.0.0-...-80877a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package LightmapGI provides methods for working with LightmapGI object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsLightmapGI() Instance
}

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 New

func New() Instance

func (Instance) AsLightmapGI

func (self Instance) AsLightmapGI() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) Bias

func (self Instance) Bias() Float.X

func (Instance) BounceIndirectEnergy

func (self Instance) BounceIndirectEnergy() Float.X

func (Instance) Bounces

func (self Instance) Bounces() int

func (Instance) CameraAttributes

func (self Instance) CameraAttributes() [1]gdclass.CameraAttributes

func (Instance) DenoiserRange

func (self Instance) DenoiserRange() int

func (Instance) DenoiserStrength

func (self Instance) DenoiserStrength() Float.X

func (Instance) Directional

func (self Instance) Directional() bool

func (Instance) EnvironmentCustomColor

func (self Instance) EnvironmentCustomColor() Color.RGBA

func (Instance) EnvironmentCustomEnergy

func (self Instance) EnvironmentCustomEnergy() Float.X

func (Instance) EnvironmentCustomSky

func (self Instance) EnvironmentCustomSky() [1]gdclass.Sky

func (Instance) EnvironmentMode

func (self Instance) EnvironmentMode() gdclass.LightmapGIEnvironmentMode

func (Instance) GenerateProbesSubdiv

func (self Instance) GenerateProbesSubdiv() gdclass.LightmapGIGenerateProbes

func (Instance) Interior

func (self Instance) Interior() bool

func (Instance) LightData

func (self Instance) LightData() [1]gdclass.LightmapGIData

func (Instance) MaxTextureSize

func (self Instance) MaxTextureSize() int

func (Instance) Quality

func (self Instance) Quality() gdclass.LightmapGIBakeQuality

func (Instance) SetBias

func (self Instance) SetBias(value Float.X)

func (Instance) SetBounceIndirectEnergy

func (self Instance) SetBounceIndirectEnergy(value Float.X)

func (Instance) SetBounces

func (self Instance) SetBounces(value int)

func (Instance) SetCameraAttributes

func (self Instance) SetCameraAttributes(value [1]gdclass.CameraAttributes)

func (Instance) SetDenoiserRange

func (self Instance) SetDenoiserRange(value int)

func (Instance) SetDenoiserStrength

func (self Instance) SetDenoiserStrength(value Float.X)

func (Instance) SetDirectional

func (self Instance) SetDirectional(value bool)

func (Instance) SetEnvironmentCustomColor

func (self Instance) SetEnvironmentCustomColor(value Color.RGBA)

func (Instance) SetEnvironmentCustomEnergy

func (self Instance) SetEnvironmentCustomEnergy(value Float.X)

func (Instance) SetEnvironmentCustomSky

func (self Instance) SetEnvironmentCustomSky(value [1]gdclass.Sky)

func (Instance) SetEnvironmentMode

func (self Instance) SetEnvironmentMode(value gdclass.LightmapGIEnvironmentMode)

func (Instance) SetGenerateProbesSubdiv

func (self Instance) SetGenerateProbesSubdiv(value gdclass.LightmapGIGenerateProbes)

func (Instance) SetInterior

func (self Instance) SetInterior(value bool)

func (Instance) SetLightData

func (self Instance) SetLightData(value [1]gdclass.LightmapGIData)

func (Instance) SetMaxTextureSize

func (self Instance) SetMaxTextureSize(value int)

func (Instance) SetQuality

func (self Instance) SetQuality(value gdclass.LightmapGIBakeQuality)

func (Instance) SetTexelScale

func (self Instance) SetTexelScale(value Float.X)

func (Instance) SetUseDenoiser

func (self Instance) SetUseDenoiser(value bool)

func (Instance) SetUseTextureForBounces

func (self Instance) SetUseTextureForBounces(value bool)

func (Instance) TexelScale

func (self Instance) TexelScale() Float.X

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UseDenoiser

func (self Instance) UseDenoiser() bool

func (Instance) UseTextureForBounces

func (self Instance) UseTextureForBounces() bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL