Spaces:
Running on Zero
Running on Zero
Move auto kinematics lighting to upper hemisphere
Browse files
scripts/render_auto_kinematics_blender.py
CHANGED
|
@@ -181,7 +181,7 @@ def init_lighting() -> None:
|
|
| 181 |
if direction.length == 0:
|
| 182 |
return
|
| 183 |
direction.normalize()
|
| 184 |
-
up = Vector((0.0, 0.0,
|
| 185 |
if abs(direction.dot(up)) > 0.999:
|
| 186 |
up = Vector((0.0, 1.0, 0.0))
|
| 187 |
right = direction.cross(up)
|
|
@@ -204,20 +204,19 @@ def init_lighting() -> None:
|
|
| 204 |
)
|
| 205 |
bpy.context.collection.objects.link(top_light)
|
| 206 |
top_light.data.energy = 1500
|
| 207 |
-
top_light.location = (0.0, 0.0,
|
| 208 |
top_light.data.size = 3.0
|
| 209 |
-
top_light
|
| 210 |
-
top_light.rotation_euler = (0.0, 0.0, 0.0)
|
| 211 |
|
| 212 |
light_distance = 5.0
|
| 213 |
light_height = 3.0
|
| 214 |
light_energy_base = 1200.0
|
| 215 |
light_size = 2.0
|
| 216 |
side_specs = (
|
| 217 |
-
("Light_X_Pos", (light_distance, 0.0,
|
| 218 |
-
("Light_X_Neg", (-light_distance, 0.0,
|
| 219 |
-
("Light_Y_Pos", (0.0, light_distance,
|
| 220 |
-
("Light_Y_Neg", (0.0, -light_distance,
|
| 221 |
)
|
| 222 |
for name, location, energy in side_specs:
|
| 223 |
light = bpy.data.objects.new(name, bpy.data.lights.new(name, type="AREA"))
|
|
|
|
| 181 |
if direction.length == 0:
|
| 182 |
return
|
| 183 |
direction.normalize()
|
| 184 |
+
up = Vector((0.0, 0.0, 1.0))
|
| 185 |
if abs(direction.dot(up)) > 0.999:
|
| 186 |
up = Vector((0.0, 1.0, 0.0))
|
| 187 |
right = direction.cross(up)
|
|
|
|
| 204 |
)
|
| 205 |
bpy.context.collection.objects.link(top_light)
|
| 206 |
top_light.data.energy = 1500
|
| 207 |
+
top_light.location = (0.0, 0.0, 8.0)
|
| 208 |
top_light.data.size = 3.0
|
| 209 |
+
look_at_origin(top_light)
|
|
|
|
| 210 |
|
| 211 |
light_distance = 5.0
|
| 212 |
light_height = 3.0
|
| 213 |
light_energy_base = 1200.0
|
| 214 |
light_size = 2.0
|
| 215 |
side_specs = (
|
| 216 |
+
("Light_X_Pos", (light_distance, 0.0, light_height), light_energy_base * 0.6),
|
| 217 |
+
("Light_X_Neg", (-light_distance, 0.0, light_height), light_energy_base * 1.4),
|
| 218 |
+
("Light_Y_Pos", (0.0, light_distance, light_height), light_energy_base),
|
| 219 |
+
("Light_Y_Neg", (0.0, -light_distance, light_height), light_energy_base),
|
| 220 |
)
|
| 221 |
for name, location, energy in side_specs:
|
| 222 |
light = bpy.data.objects.new(name, bpy.data.lights.new(name, type="AREA"))
|