SunLight(Light)

base classes — bpy_struct, ID, Light

class bpy.types.SunLight.SunLight(Light)

Constant direction parallel ray Light

angle

Angular diameter of the Sun as seen from the Earth

Type

float in [0, 3.14159], default 0.00918043

contact_shadow_bias

Bias to avoid self shadowing

Type

float in [0.001, 9999], default 0.03

contact_shadow_distance

World space distance in which to search for screen space occluder

Type

float in [0, 9999], default 0.2

contact_shadow_thickness

Pixel thickness used to detect occlusion

Type

float in [0, 9999], default 0.2

energy

Sunlight strength in watts per meter squared (W/m^2)

Type

float in [-inf, inf], default 10.0

shadow_buffer_bias

Bias for reducing self shadowing

Type

float in [0, inf], default 1.0

shadow_buffer_clip_start

Shadow map clip start, below which objects will not generate shadows

Type

float in [1e-06, inf], default 0.05

shadow_buffer_samples

Number of shadow buffer samples

Type

int in [1, 16], default 3

shadow_buffer_size

Resolution of the shadow buffer, higher values give crisper shadows but use more memory

Type

int in [128, 10240], default 512

shadow_cascade_count

Number of texture used by the cascaded shadow map

Type

int in [1, 4], default 4

shadow_cascade_exponent

Higher value increase resolution towards the viewpoint

Type

float in [0, 1], default 0.8

shadow_cascade_fade

How smooth is the transition between each cascade

Type

float in [0, 1], default 0.1

shadow_cascade_max_distance

End distance of the cascaded shadow map (only in perspective view)

Type

float in [0, inf], default 200.0

shadow_color

Color of shadows cast by the light

Type

float array of 3 items in [0, inf], default (0.0, 0.0, 0.0)

shadow_soft_size

Light size for ray shadow sampling (Raytraced shadows)

Type

float in [0, inf], default 0.25

use_contact_shadow

Use screen space raytracing to have correct shadowing near occluder, or for small features that does not appear in shadow maps

Type

boolean, default False

use_shadow
Type

boolean, default True

classmethod bl_rna_get_subclass(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The RNA type or default when not found.

Return type

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The class or default when not found.

Return type

type

Inherited Properties

  • bpy_struct.id_data

  • ID.name

  • ID.name_full

  • ID.is_evaluated

  • ID.original

  • ID.users

  • ID.use_fake_user

  • ID.is_embedded_data

  • ID.tag

  • ID.is_library_indirect

  • ID.library

  • ID.override_library

  • ID.preview

  • Light.type

  • Light.distance

  • Light.color

  • Light.specular_factor

  • Light.use_custom_distance

  • Light.cutoff_distance

  • Light.node_tree

  • Light.use_nodes

  • Light.animation_data

  • Light.cycles

Inherited Functions

  • bpy_struct.as_pointer

  • bpy_struct.driver_add

  • bpy_struct.driver_remove

  • bpy_struct.get

  • bpy_struct.is_property_hidden

  • bpy_struct.is_property_overridable_library

  • bpy_struct.is_property_readonly

  • bpy_struct.is_property_set

  • bpy_struct.items

  • bpy_struct.keyframe_delete

  • bpy_struct.keyframe_insert

  • bpy_struct.keys

  • bpy_struct.path_from_id

  • bpy_struct.path_resolve

  • bpy_struct.pop

  • bpy_struct.property_overridable_library_set

  • bpy_struct.property_unset

  • bpy_struct.type_recast

  • bpy_struct.values

  • ID.evaluated_get

  • ID.copy

  • ID.override_create

  • ID.user_clear

  • ID.user_remap

  • ID.make_local

  • ID.user_of_id

  • ID.animation_data_create

  • ID.animation_data_clear

  • ID.update_tag

  • ID.bl_rna_get_subclass

  • ID.bl_rna_get_subclass_py

  • Light.bl_rna_get_subclass

  • Light.bl_rna_get_subclass_py