We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bda9fb6 commit 691f0b4Copy full SHA for 691f0b4
mitsuba-blender/io/exporter/lights.py
@@ -1,6 +1,7 @@
1
from mathutils import Matrix
2
import numpy as np
3
from .export_context import Files
4
+import bpy
5
6
def convert_area_light(b_light, export_ctx):
7
params = {}
@@ -43,8 +44,11 @@ def convert_area_light(b_light, export_ctx):
43
44
emitter = {
45
'type': 'area'
46
}
- # Conversion factor used in Cycles, to convert to irradiance (don't ask me why)
47
- conv_fac = 1.0 / (area * 4.0)
+ # Conversion factor used in Cycles
48
+ if bpy.app.version < (4, 0, 0):
49
+ conv_fac = 1.0 / (area * 4.0)
50
+ else:
51
+ conv_fac = 1.0 / (area * np.pi)
52
emitter['radiance'] = export_ctx.spectrum(conv_fac * b_light.data.energy * b_light.data.color)
53
params['emitter'] = emitter
54
0 commit comments