Skip to content

Commit 581b73f

Browse files
committed
[usdLux] normalized lights divide by surfaceArea expressed in meters^2
This allows normalized lights to compose correctly into stages with a different metersPerUnit setting, at a backwards-compatibility cost of a change in luminance of normalized lights before this, in layers with metersPerUnit != 1
1 parent 823057d commit 581b73f

File tree

3 files changed

+63
-15
lines changed

3 files changed

+63
-15
lines changed

pxr/usd/usdLux/generatedSchema.usda

+21-5
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class "LightAPI" (
167167
displayName = "Normalize Power"
168168
doc = """Normalizes the emission such that the power of the light
169169
remains constant while altering the size of the light, by dividing the
170-
luminance by the world-space surface area of the light.
170+
luminance by the world-space surface area of the light, in meters².
171171

172172
This makes it easier to independently adjust the brightness and size
173173
of the light, by causing the total illumination provided by a light to
@@ -196,18 +196,34 @@ class "LightAPI" (
196196
### Area Lights:
197197

198198
For an area light, the `sizeFactor` is the surface area (in world
199-
space) of the shape of the light, including any scaling applied to the
200-
light by its transform stack. This includes the boundable light types
199+
space, expressed in meters²) of the shape of the light, including any
200+
scaling applied to the light by its transform stack. The area should
201+
then be multiplied by the scene's `metersPerUnit^2` to convert the
202+
surface area into meters². Area lights include the boundable light types
201203
which have a calculable surface area:
202204

203205
- MeshLightAPI
204206
- DiskLight
205207
- RectLight
206208
- SphereLight
207-
- CylinderLight
209+
- CylinderLight with treatAsLine == false
208210

209211
<center><b>
210-
sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light)
212+
sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light) * metersPerUnit²
213+
</b></center>
214+
215+
### Line Lights:
216+
217+
Lights that simulate 1-dimensional emissive \"lines\" have a `sizeFactor`
218+
equal to the length (in world space, expressed in meters) of the shape
219+
of the light, including any scaling applied to the light by its
220+
transform stack. The area should then be multiplied by the scene's
221+
`metersPerUnit` to convert the length into meters. Line lights include:
222+
223+
- CylinderLight with length != 0 and treatAsLine == True
224+
225+
<center><b>
226+
sizeFactor<sub>line</sub> = worldSpaceLength(light) * metersPerUnit
211227
</b></center>
212228

213229
### DistantLight:

pxr/usd/usdLux/lightAPI.h

+21-5
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class UsdLuxLightAPI : public UsdAPISchemaBase
424424
// --------------------------------------------------------------------- //
425425
/// Normalizes the emission such that the power of the light
426426
/// remains constant while altering the size of the light, by dividing the
427-
/// luminance by the world-space surface area of the light.
427+
/// luminance by the world-space surface area of the light, in meters².
428428
///
429429
/// This makes it easier to independently adjust the brightness and size
430430
/// of the light, by causing the total illumination provided by a light to
@@ -453,18 +453,34 @@ class UsdLuxLightAPI : public UsdAPISchemaBase
453453
/// ### Area Lights:
454454
///
455455
/// For an area light, the `sizeFactor` is the surface area (in world
456-
/// space) of the shape of the light, including any scaling applied to the
457-
/// light by its transform stack. This includes the boundable light types
456+
/// space, expressed in meters²) of the shape of the light, including any
457+
/// scaling applied to the light by its transform stack. The area should
458+
/// then be multiplied by the scene's `metersPerUnit^2` to convert the
459+
/// surface area into meters². Area lights include the boundable light types
458460
/// which have a calculable surface area:
459461
///
460462
/// - MeshLightAPI
461463
/// - DiskLight
462464
/// - RectLight
463465
/// - SphereLight
464-
/// - CylinderLight
466+
/// - CylinderLight with treatAsLine == false
465467
///
466468
/// <center><b>
467-
/// sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light)
469+
/// sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light) * metersPerUnit²
470+
/// </b></center>
471+
///
472+
/// ### Line Lights:
473+
///
474+
/// Lights that simulate 1-dimensional emissive "lines" have a `sizeFactor`
475+
/// equal to the length (in world space, expressed in meters) of the shape
476+
/// of the light, including any scaling applied to the light by its
477+
/// transform stack. The area should then be multiplied by the scene's
478+
/// `metersPerUnit` to convert the length into meters. Line lights include:
479+
///
480+
/// - CylinderLight with length != 0 and treatAsLine == True
481+
///
482+
/// <center><b>
483+
/// sizeFactor<sub>line</sub> = worldSpaceLength(light) * metersPerUnit
468484
/// </b></center>
469485
///
470486
/// ### DistantLight:

pxr/usd/usdLux/schema.usda

+21-5
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class "LightAPI" (
252252
displayName = "Normalize Power"
253253
doc = """Normalizes the emission such that the power of the light
254254
remains constant while altering the size of the light, by dividing the
255-
luminance by the world-space surface area of the light.
255+
luminance by the world-space surface area of the light, in meters².
256256

257257
This makes it easier to independently adjust the brightness and size
258258
of the light, by causing the total illumination provided by a light to
@@ -281,18 +281,34 @@ class "LightAPI" (
281281
### Area Lights:
282282

283283
For an area light, the `sizeFactor` is the surface area (in world
284-
space) of the shape of the light, including any scaling applied to the
285-
light by its transform stack. This includes the boundable light types
284+
space, expressed in meters²) of the shape of the light, including any
285+
scaling applied to the light by its transform stack. The area should
286+
then be multiplied by the scene's `metersPerUnit^2` to convert the
287+
surface area into meters². Area lights include the boundable light types
286288
which have a calculable surface area:
287289

288290
- MeshLightAPI
289291
- DiskLight
290292
- RectLight
291293
- SphereLight
292-
- CylinderLight
294+
- CylinderLight with treatAsLine == false
293295

294296
<center><b>
295-
sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light)
297+
sizeFactor<sub>area</sub> = worldSpaceSurfaceArea(light) * metersPerUnit²
298+
</b></center>
299+
300+
### Line Lights:
301+
302+
Lights that simulate 1-dimensional emissive "lines" have a `sizeFactor`
303+
equal to the length (in world space, expressed in meters) of the shape
304+
of the light, including any scaling applied to the light by its
305+
transform stack. The area should then be multiplied by the scene's
306+
`metersPerUnit` to convert the length into meters. Line lights include:
307+
308+
- CylinderLight with length != 0 and treatAsLine == True
309+
310+
<center><b>
311+
sizeFactor<sub>line</sub> = worldSpaceLength(light) * metersPerUnit
296312
</b></center>
297313

298314
### DistantLight:

0 commit comments

Comments
 (0)