LightmapGIData
Hereda: Resource < RefCounted < Object
Contiene datos de lightmaps procesados y sondas de objetos dinámicos para LightmapGI.
Descripción
LightmapGIData contiene datos de lightmaps procesados y sondas de objetos dinámicos para LightmapGI. Se reemplaza cada vez que se procesan los lightmaps en LightmapGI.
Propiedades
|
||
|
Métodos
void |
add_user(path: NodePath, uv_scale: Rect2, slice_index: int, sub_instance: int) |
void |
|
get_user_count() const |
|
get_user_path(user_idx: int) const |
|
is_using_spherical_harmonics() const |
|
void |
set_uses_spherical_harmonics(uses_spherical_harmonics: bool) |
Enumeraciones
enum ShadowmaskMode: 🔗
ShadowmaskMode SHADOWMASK_MODE_NONE = 0
El enmascaramiento de sombras está desactivado. No se creará ninguna textura de máscara de sombra al procesar lightmaps. Las texturas de máscara de sombra existentes se eliminarán durante el procesado.
ShadowmaskMode SHADOWMASK_MODE_REPLACE = 1
Shadowmasking is enabled. Directional shadows that are outside the DirectionalLight3D.directional_shadow_max_distance will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close.
ShadowmaskMode SHADOWMASK_MODE_OVERLAY = 2
Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close.
Descripciones de Propiedades
TextureLayered light_texture 🔗
void set_light_texture(value: TextureLayered)
TextureLayered get_light_texture()
Obsoleto: The lightmap atlas can now contain multiple textures. See lightmap_textures.
La textura del atlas del lightmap generada por el lightmapper.
Array[TextureLayered] lightmap_textures = [] 🔗
void set_lightmap_textures(value: Array[TextureLayered])
Array[TextureLayered] get_lightmap_textures()
Las texturas del atlas de lightmaps generadas por el lightmapper.
Array[TextureLayered] shadowmask_textures = [] 🔗
void set_shadowmask_textures(value: Array[TextureLayered])
Array[TextureLayered] get_shadowmask_textures()
Las texturas del atlas de máscaras de sombra generadas por el lightmapper.
Descripciones de Métodos
void add_user(path: NodePath, uv_scale: Rect2, slice_index: int, sub_instance: int) 🔗
Añade un objeto que se considera procesado dentro de este LightmapGIData.
void clear_users() 🔗
Borra todos los objetos que se consideran procesados dentro de este LightmapGIData.
Devuelve el número de objetos que se consideran procesados dentro de este LightmapGIData.
NodePath get_user_path(user_idx: int) const 🔗
Devuelve el NodePath del objeto procesado en el índice user_idx.
bool is_using_spherical_harmonics() const 🔗
Si es true, los lightmaps se procesaron con información direccional. Véase también LightmapGI.directional.
void set_uses_spherical_harmonics(uses_spherical_harmonics: bool) 🔗
Si uses_spherical_harmonics es true, le dice al motor que trate los datos del lightmap como si se hubieran procesado con información direccional.
Nota: Cambiar este valor en lightmaps ya procesados no hará que se procesen de nuevo. Esto significa que la apariencia del material se verá incorrecta hasta que los lightmaps se procesen de nuevo, en cuyo caso el valor establecido aquí se descarta ya que todo el recurso LightmapGIData es reemplazado por el lightmapper.