I'm trying to render a mesh from script. All good, except the lights. The output rendered mesh is very dark and turning it becomes completely black. How to set them?


Again, you can see all the properties equivalents in Python by hovering over the light properties fields you want to change via Python scripting.

For example,

lamp = bpy.data.lamps['Lamp']
lamp.energy = 10  # 10 is the max value for energy
lamp.type = 'POINT'  # in ['POINT', 'SUN', 'SPOT', 'HEMI', 'AREA']
lamp.distance = 100

The simpler is to first change their values by hand, before to find the values you need and set them via Python.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.