Luminance Analysis Script.

Forums: Luminance Analysis Script.
Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB

Luminance Analysis Script.

Postby MB » Tue Sep 19, 2023 5:42 pm

MB Tue Sep 19, 2023 5:42 pm
Please find attached a Lua script for analyzing an image in terms of Luminance. It is a first pass at the problem and is
in need of review by those with expertise. There is a post here with details of the math behind it, and some of the issues
that need validation.

viewtopic.php?f=9&t=82147

Light Levels (ftcd).png
RenderTarget output with False Color contours themed by value

Light Levels 2 (ftcd).png.png
RenderTarget output with Sampling Grid themed by value

Image Luminance Analysis.lua
The Script
(149.72 KiB) Downloaded 39 times




Purpose.
The objective of this script is to help a designer determine the light fixtures they should use in a space.
The space can be both artificially and naturally illuminated so that prescribed functional tasks can be comfortably
performed, and various aesthetic requirements are met. To do this they need to measure, ahead of time, the amount
and color of light reflected by various surfaces of interest in a proposed design.

Results are presented overlayed upon the current render target result or, a greyscale image of luminance values or, as a
False Color Thematic Map of Luminance values.

Installation:
Copy the script to Octane's default script location specified under References > Application > Script Directory:
Within Octane, execute Script > Rescan script folder. It should appear as Image Luminance Analysis under the
script dropdown menu.


Setting up the Scene:
Setup the Render Target and Imager as follows:

Kernal.Type = Path Tracing
Kernal.White light spectrum = D65

Imager.Exposure = 1
Imager.Vignetting = 0
Imager.White point = 1,1,1
Imager.Saturation = 1
Imager.Response curve = sRGB
Imager.Gamma = 1


For accurate results it is imperative the scene's lighting characteristics are set up properly.
That means the power, efficienty, and color temperature settings are correct (physically accurate)
on all emmissive objects. Exterior Glazing should be modelled properly with the correct transmission and

Set up all Artificial Lights as follows:
Use an emmissive Material (Diffuse).
For Power to be specified in Lumens;
Set Texture Pin to 1/683 or 0.001464129.
(1 lumen of light output consumes 1/683 of a watt, or 1 watt produces 683 lumens of light.)
Set Power Pin to the Lumen Value of the bulb.
Set Temperature Pin to match the bulb output.

All materials that let light pass through them and into the space, either from adjacent spaces, or from outside
are configured correctly, particularly in terms of transmission and reflection.
The sun is configured correctly and the project's proper location in the world is set.
The space does not let light leak into it. All exterior walls need to be modelled to enclose the space correctly.

Using the application.
The application takes the output directly from the current rendertarget. The user can do one or more of three
things with the data.

Spot Metering.
This is simply labeling either the diffuse or luminance image with the luminance values at arbtrary user logations.
A mouse drag witll report the value under the cursor and a mouse up will label the point. The labeling of points
can be turned on and off.

Grid Sampling.
This function overlays a sampling grid on the image that reports the Luminance at the grid intersections.
The X and Y grid spacing in pixels and the color of the tic and text can be specified under the Settings Tab
There is also an option, on by default, to color the grid's Tic Mark and Text, based on the specified theme.

Thematic Analysis.
This function colors each pixel in the image based on where, in a user specified set of ranges, its value resides.
Under the Settings Tab, the Theme Count slider specifies how many color bands there will be in the final result.
The Lumen Range determines the variation in lumen values that will be included in a single band. The user can
change either one, however they are interconnected, increasing the Lumen Range reduces the Theme Count.
The colors to use are also specified here and are the inputs into a gradient used to color all the pixels
with a Luminance value from 0 to 45645(max lux per the LBNL Radiance equation).

This gradient is visible on the False Color Image tab, if you click on it, it will report the luminance value
represented by the underlying color, the ledgend can be placed on the image so you can generate pictures
suitable for inclusion in a written report. There is also a histogram on this tab which shows the number of
pixels in the image that fall within each band.

Reporting Units.
The user can set which units the above three function are representing, either Lux or Foot Candels.
Windows 11, 2x Intel I9, 64GB Ram, 2x GTX 1080 TI, 1 x RTX 380 TI, Oculus Quest 2
User avatar
MB
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Tue Jan 15, 2013 3:41 am
Location: Washington, D.C.

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 8 guests

Wed May 08, 2024 4:49 am [ UTC ]