Improve and clarify light units #109404

Closed
opened 2023-06-27 11:57:03 +02:00 by Brecht Van Lommel · 2 comments
  • Fix wrong conversion from power to radiance of area lights #109153
  • Cycles: replace spot light disk sampling with sphere sampling #109329
  • Cycles/EEVEE: change point light to double-sided sphere light #108506
  • Cycles: Change sun lamp to have uniform intensity at high angles #108996
  • USD: improve light units conversion #109795
Normalized To PRMan To Karma Non-Normalized To PRMan To Karma
Point Light W N/A 1/(4pi) Wsr^{-1} N/A 1/4 (?)
Sphere Light W 1/pi 1/pi Wm^{-2}sr^{-1} 1/pi 1/pi
Spot Light W 1/pi 1/pi Wm^{-2}sr^{-1} 1/pi 1/pi
Rectangular Area Light W 1/pi 1/pi Wm^{-2}sr^{-1} 1/pi 1/pi
Disk Area Light W 1/pi 1/pi Wm^{-2}sr^{-1} 1/pi 1/pi
Distant Light W/m^2 (4/pi) * 1/(2*(1-cos(0.53*180/pi/2))) 1/4 (?) Wm^{-2}sr^{-1} TBD TBD
  • There is no point light in PRMan, only lights with some area. In Karma there is a discontinuity between normalized for a point light and a very small sphere light. Unclear how to handle this.
  • The normalized distant light in Renderman strangely uses the default sun angle of 0.53°. The Karma units are unclear to me. The Cycles non-normalized units are probably wrong.

Note this table assumes #109153 and #109795 to be included.

* Fix wrong conversion from power to radiance of area lights #109153 * Cycles: replace spot light disk sampling with sphere sampling #109329 * Cycles/EEVEE: change point light to double-sided sphere light #108506 * Cycles: Change sun lamp to have uniform intensity at high angles #108996 * USD: improve light units conversion #109795 | | Normalized | To PRMan | To Karma | Non-Normalized | To PRMan | To Karma | |---|---|---|---|---|--|--| | Point Light | \(W\) | N/A | \(1/(4pi)\) | \(Wsr^{-1}\) | N/A | \(1/4\) (?) | | Sphere Light | \(W\) | \(1/pi\) | \(1/pi\) | \(Wm^{-2}sr^{-1}\) | \(1/pi\) | \(1/pi\) | | Spot Light | \(W\) | \(1/pi\) | \(1/pi\) | \(Wm^{-2}sr^{-1}\) | \(1/pi\) | \(1/pi\) | | Rectangular Area Light | \(W\) | \(1/pi\) | \(1/pi\) | \(Wm^{-2}sr^{-1}\) | \(1/pi\) | \(1/pi\) | | Disk Area Light | \(W\) | \(1/pi\) | \(1/pi\) | \(Wm^{-2}sr^{-1}\) | \(1/pi\) | \(1/pi\) | | Distant Light | \(W/m^2\) | \((4/pi) * 1/(2*(1-cos(0.53*180/pi/2)))\) | \(1/4\) (?) | \(Wm^{-2}sr^{-1}\) | TBD | TBD | * There is no point light in PRMan, only lights with some area. In Karma there is a discontinuity between normalized for a point light and a very small sphere light. Unclear how to handle this. * The normalized distant light in Renderman strangely [uses the default sun angle of 0.53°](https://www.sidefx.com/forum/topic/73880/?page=1#post-312206). The Karma units are unclear to me. The Cycles non-normalized units are probably wrong. Note this table assumes #109153 and #109795 to be included.
Brecht Van Lommel added the
Type
To Do
label 2023-06-27 11:57:03 +02:00
Member

Point Light third column should be radiant intensity? It is divide by the solid angle of a sphere so (Wsr^{-1})

float eval_fac = (radius > 0) ? invarea * M_1_PI_F : 0.25f * M_1_PI_F;

/* Convert radiant flux to radiance or radiant intensity. */
float eval_fac = (radius > 0) ? invarea * M_1_PI_F : 0.25f * M_1_PI_F;
Point Light third column should be radiant intensity? It is divide by the solid angle of a sphere so \(Wsr^{-1}\) https://projects.blender.org/blender/blender/src/commit/016d80ff6f780b597e6ec5df65ce650aeb6a5a44/intern/cycles/scene/light.cpp#L1221 ``` /* Convert radiant flux to radiance or radiant intensity. */ float eval_fac = (radius > 0) ? invarea * M_1_PI_F : 0.25f * M_1_PI_F; ```
Brecht Van Lommel added the
Interest
Render & Cycles
label 2023-07-03 14:49:05 +02:00
Author
Owner

@weizhen I updated the table now.

@Sebastian-Herholz from talking last week I understand the USD units might be different than this. The above table was created based on comparing to Renderman which may not be the same as USD. On the other hand, I could not find any light unit conversion in the USD Renderman plug-in:
https://github.com/PixarAnimationStudios/OpenUSD/tree/release/third_party/renderman-24

@weizhen I updated the table now. @Sebastian-Herholz from talking last week I understand the USD units might be different than this. The above table was created based on comparing to Renderman which may not be the same as USD. On the other hand, I could not find any light unit conversion in the USD Renderman plug-in: https://github.com/PixarAnimationStudios/OpenUSD/tree/release/third_party/renderman-24
Brecht Van Lommel added
Module
Render & Cycles
and removed
Interest
Render & Cycles
labels 2023-07-03 14:51:06 +02:00
Brecht Van Lommel added this to the Render & Cycles project 2023-07-03 14:51:10 +02:00
Blender Bot added the
Status
Archived
label 2023-07-07 18:31:42 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109404
No description provided.