mirror of
https://github.com/godotengine/godot-blender-exporter.git
synced 2026-01-05 18:10:04 +03:00
Implement basic cycles light handling. (#164)
Cycles lights are implemented using the node tree, and this patch
doesn't attempt to handle all the possibilities that enables.
However, it does succeed in exporting the basic options you can tweak
in the light settings panel, including:
- RGB Color (no alpha)
- Energy
- Negative Light (for strength < 0)
- Shadows enabled/disabled
This also removes the use_sphere check as cycles lights do not support
limited distance or use_sphere.
Fixes #150.
(cherry picked from commit b57cee82f3)
This commit is contained in:
77
tests/reference_exports/light/cycles_lights.escn
Normal file
77
tests/reference_exports/light/cycles_lights.escn
Normal file
File diff suppressed because one or more lines are too long
@@ -268,12 +268,11 @@ surfaces/0 = {
|
||||
|
||||
[node name="Point" type="DirectionalLight" parent="."]
|
||||
|
||||
light_specular = 1.0
|
||||
light_energy = 1.0
|
||||
light_color = Color(1.0, 1.0, 1.0, 1.0)
|
||||
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
|
||||
transform = Transform(0.701062, -0.562597, -0.438174, 0.452107, -0.124517, 0.88323, -0.551463, -0.8173, 0.16706, -2.09735, 4.28268, -0.137035)
|
||||
shadow_enabled = true
|
||||
light_negative = false
|
||||
|
||||
[node name="object_with_uv" type="MeshInstance" parent="."]
|
||||
|
||||
|
||||
@@ -1699,27 +1699,25 @@ material/0 = SubResource(39)
|
||||
|
||||
[node name="Spot001" type="SpotLight" parent="."]
|
||||
|
||||
light_specular = 1.0
|
||||
light_energy = 1.0
|
||||
light_color = Color(1.0, 1.0, 1.0, 1.0)
|
||||
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
|
||||
spot_angle = 17.4
|
||||
spot_angle_attenuation = 1.25
|
||||
spot_range = 25.0
|
||||
transform = Transform(0.629608, 0.0765798, 0.77313, -0.776913, 0.06206, 0.626542, 0.0, -0.99513, 0.0985693, 5.32508, 4.74617, 0.487329)
|
||||
shadow_enabled = true
|
||||
light_negative = false
|
||||
|
||||
[node name="Spot" type="SpotLight" parent="."]
|
||||
|
||||
light_specular = 1.0
|
||||
light_energy = 1.0
|
||||
light_color = Color(1.0, 1.0, 1.0, 1.0)
|
||||
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
|
||||
spot_angle = 24.3
|
||||
spot_angle_attenuation = 1.25
|
||||
spot_range = 25.0
|
||||
transform = Transform(0.633641, 0.273452, -0.723687, 0.117184, 0.890727, 0.439173, 0.764701, -0.363082, 0.532357, -4.6068, 2.54209, 4.80618)
|
||||
shadow_enabled = true
|
||||
light_negative = false
|
||||
|
||||
[node name="Plane" type="MeshInstance" parent="."]
|
||||
|
||||
|
||||
@@ -844,12 +844,11 @@ material/0 = SubResource(12)
|
||||
|
||||
[node name="Lamp" type="DirectionalLight" parent="."]
|
||||
|
||||
light_specular = 1.0
|
||||
light_energy = 1.0
|
||||
light_energy = 0.04
|
||||
light_color = Color(1.0, 1.0, 1.0, 1.0)
|
||||
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
|
||||
transform = Transform(-0.404791, -0.439839, 0.801677, 0.221124, 0.803611, 0.552553, -0.88727, 0.400938, -0.228035, 4.07625, 1.70784, -1.00545)
|
||||
shadow_enabled = true
|
||||
light_negative = false
|
||||
|
||||
[node name="test_displacement" type="MeshInstance" parent="."]
|
||||
|
||||
|
||||
BIN
tests/test_scenes/light/cycles_lights.blend
Normal file
BIN
tests/test_scenes/light/cycles_lights.blend
Normal file
Binary file not shown.
Reference in New Issue
Block a user