Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
LightmapGIData¶
继承: Resource < RefCounted < Object
包含用于 LightmapGI 的烘焙光照贴图和动态对象探测数据。
描述¶
LightmapGIData 包含用于 LightmapGI 的烘焙光照贴图和动态对象探测数据。在 LightmapGI 中每当光照贴图被烘焙时都会替换它。
属性¶
|
方法¶
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) |
属性说明¶
TextureLayered light_texture 🔗
void set_light_texture(value: TextureLayered)
TextureLayered get_light_texture()
已弃用: The lightmap atlas can now contain multiple textures. See lightmap_textures.
由光照贴图器生成的光照贴图图集纹理。
Array[TextureLayered] lightmap_textures = [] 🔗
void set_lightmap_textures(value: Array[TextureLayered])
Array[TextureLayered] get_lightmap_textures()
由光照贴图器生成的光照贴图图集纹理。
方法说明¶
void add_user(path: NodePath, uv_scale: Rect2, slice_index: int, sub_instance: int) 🔗
添加一个在该 LightmapGIData 中被视为已烘焙的对象。
void clear_users() 🔗
清除在该 LightmapGIData 中被视为已烘焙的所有对象。
返回在该 LightmapGIData 中被视为烘焙的对象的数量。
NodePath get_user_path(user_idx: int) const 🔗
返回索引 user_idx 处烘焙对象的 NodePath。
bool is_using_spherical_harmonics() const 🔗
如果为 true,则光照贴图使用定向信息烘焙。另请参阅 LightmapGI.directional。
void set_uses_spherical_harmonics(uses_spherical_harmonics: bool) 🔗
如果 uses_spherical_harmonics 为 true,则告诉引擎将光照贴图数据视为使用了定向信息烘焙的。
注意:在已烘焙的光照贴图上更改此值不会导致再次烘焙它们。这意味着在再次烘焙光照贴图之前,材质外观将看起来不正确,在这种情况下,此处设置的值将被丢弃,因为整个 LightmapGIData 资源被光照贴图器替换。