mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
242 lines
14 KiB
ReStructuredText
242 lines
14 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_LightmapGIData:
|
|
|
|
LightmapGIData
|
|
==============
|
|
|
|
**Eredita:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Contiene dati di lightmap elaborati e dati di sonda di oggetti dinamici per :ref:`LightmapGI<class_LightmapGI>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
**LightmapGIData** contiene dati lightmap precalcolati e dati di sonda di oggetti dinamici per :ref:`LightmapGI<class_LightmapGI>`. Viene sostituito ogni volta che i lightmap vengono precalcolati in :ref:`LightmapGI<class_LightmapGI>`.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà
|
|
------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+
|
|
| :ref:`TextureLayered<class_TextureLayered>` | :ref:`light_texture<class_LightmapGIData_property_light_texture>` | |
|
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+
|
|
| :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] | :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>` | ``[]`` |
|
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+
|
|
| :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] | :ref:`shadowmask_textures<class_LightmapGIData_property_shadowmask_textures>` | ``[]`` |
|
|
+--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Metodi
|
|
------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`add_user<class_LightmapGIData_method_add_user>`\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clear_users<class_LightmapGIData_method_clear_users>`\ (\ ) |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_user_count<class_LightmapGIData_method_get_user_count>`\ (\ ) |const| |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`get_user_path<class_LightmapGIData_method_get_user_path>`\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_using_spherical_harmonics<class_LightmapGIData_method_is_using_spherical_harmonics>`\ (\ ) |const| |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_uses_spherical_harmonics<class_LightmapGIData_method_set_uses_spherical_harmonics>`\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) |
|
|
+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerazioni
|
|
------------------------
|
|
|
|
.. _enum_LightmapGIData_ShadowmaskMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **ShadowmaskMode**: :ref:`🔗<enum_LightmapGIData_ShadowmaskMode>`
|
|
|
|
.. _class_LightmapGIData_constant_SHADOWMASK_MODE_NONE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ShadowmaskMode<enum_LightmapGIData_ShadowmaskMode>` **SHADOWMASK_MODE_NONE** = ``0``
|
|
|
|
Lo shadowmasking è disattivato. Non verrà creata alcuna texture di shadowmask durante la preparazione delle lightmap. Le texture di shadowmask esistenti verranno rimosse durante la preparazione.
|
|
|
|
.. _class_LightmapGIData_constant_SHADOWMASK_MODE_REPLACE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ShadowmaskMode<enum_LightmapGIData_ShadowmaskMode>` **SHADOWMASK_MODE_REPLACE** = ``1``
|
|
|
|
Lo shadowmasking è abilitato. Le ombre direzionali che si trovano al di fuori di :ref:`DirectionalLight3D.directional_shadow_max_distance<class_DirectionalLight3D_property_directional_shadow_max_distance>` saranno renderizzate utilizzando la texture di shadowmask. Le ombre che si trovano all'interno dell'intervallo saranno renderizzate esclusivamente utilizzando ombre in tempo reale. Questa modalità rende le ombre in tempo reale più precise da vicino, senza il potenziale effetto "smearing" che può verificarsi usando le lightmap con dimensioni elevate di texel . Lo svantaggio è che quando la telecamera si muove rapidamente, la transizione tra la luce in tempo reale e la shadowmask può essere evidente. Inoltre, gli oggetti che hanno solo ombre integrate nella shadowmask (e nessuna ombra in tempo reale) non mostreranno alcuna ombra da vicino.
|
|
|
|
.. _class_LightmapGIData_constant_SHADOWMASK_MODE_OVERLAY:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ShadowmaskMode<enum_LightmapGIData_ShadowmaskMode>` **SHADOWMASK_MODE_OVERLAY** = ``2``
|
|
|
|
Lo shadowmasking è abilitato. Le ombre direzionali saranno renderizzate con ombre in tempo reale sovrapposte alla texture di shadowmask. Questa modalità consente transizioni più fluide delle ombre quando la telecamera si muove velocemente, a scapito di un potenziale effetto di sbavatura per le ombre direzionali da vicino (a causa di ombre in tempo reale combinate con una shadowmask a bassa risoluzione). Gli oggetti che hanno solo ombre integrate nella shadowmask (e nessuna ombra in tempo reale) manterranno le loro ombre da vicino.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà
|
|
------------------------------------------------------
|
|
|
|
.. _class_LightmapGIData_property_light_texture:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`TextureLayered<class_TextureLayered>` **light_texture** :ref:`🔗<class_LightmapGIData_property_light_texture>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_light_texture**\ (\ value\: :ref:`TextureLayered<class_TextureLayered>`\ )
|
|
- :ref:`TextureLayered<class_TextureLayered>` **get_light_texture**\ (\ )
|
|
|
|
**Deprecato:** The lightmap atlas can now contain multiple textures. See :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>`.
|
|
|
|
La texture dell'atlante della lightmap generata dal lightmapper.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_property_lightmap_textures:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **lightmap_textures** = ``[]`` :ref:`🔗<class_LightmapGIData_property_lightmap_textures>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_lightmap_textures**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\]\ )
|
|
- :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **get_lightmap_textures**\ (\ )
|
|
|
|
Le texture dell'atlante della lightmap generate dal lightmapper.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_property_shadowmask_textures:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **shadowmask_textures** = ``[]`` :ref:`🔗<class_LightmapGIData_property_shadowmask_textures>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_shadowmask_textures**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\]\ )
|
|
- :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **get_shadowmask_textures**\ (\ )
|
|
|
|
Le texture dell'atlante della shadowmask generate dal lightmapper.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni dei metodi
|
|
--------------------------------------------
|
|
|
|
.. _class_LightmapGIData_method_add_user:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **add_user**\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LightmapGIData_method_add_user>`
|
|
|
|
Aggiunge un oggetto che è considerato precalcolato all'interno di questo **LightmapGIData**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_method_clear_users:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clear_users**\ (\ ) :ref:`🔗<class_LightmapGIData_method_clear_users>`
|
|
|
|
Cancella tutti gli oggetti considerati precalcolati in questo **LightmapGIData**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_method_get_user_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_user_count**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_count>`
|
|
|
|
Restituisce il numero di oggetti considerati precalcolati all'interno di questo **LightmapGIData**.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_method_get_user_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`NodePath<class_NodePath>` **get_user_path**\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_path>`
|
|
|
|
Restituisce il :ref:`NodePath<class_NodePath>` dell'oggetto precalcolato all'indice ``user_idx``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_method_is_using_spherical_harmonics:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_using_spherical_harmonics**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_is_using_spherical_harmonics>`
|
|
|
|
Se ``true``, le lightmap sono state elaborate con informazioni direzionali. Vedi anche :ref:`LightmapGI.directional<class_LightmapGI_property_directional>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_LightmapGIData_method_set_uses_spherical_harmonics:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_uses_spherical_harmonics**\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_LightmapGIData_method_set_uses_spherical_harmonics>`
|
|
|
|
Se ``uses_spherical_harmonics`` è ``true``, indica al motore di trattare i dati lightmap come se fossero stati precalcolati con informazioni direzionali.
|
|
|
|
\ **Nota:** Modificare questo valore su lightmap già precalcolate non le precalcolerà di nuovo. Ciò significa che l'aspetto del materiale apparirà sbagliato finché le lightmap non saranno precalcolate di nuovo, nel qual caso il valore impostato qui viene scartato poiché l'intera risorsa **LightmapGIData** viene sostituita dal lightmapper.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
|
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
|
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|