a blog of links related to computer animation and production technology Sponsored by ReelMatters.com

Convert between light exposure and intensity

,
import math,sys

def Exposure2Intensity(exposure): 
    exp = float(exposure)
    result = math.pow(2,exp)
    print(result)

Exposure2Intensity(0)

def Intensity2Exposure(intensity):
    inarg = float(intensity)
    
    if inarg == 0:
        print("Exposure of zero intensity is undefined.")
        return
    
    if inarg < 1e-323:
        inarg = max(inarg, 1e-323)
        print("Exposure of negative intensities is undefined. Clamping to a very small value instead (1e-323)")
    
    result = math.log(inarg, 2)
    print(result)

Intensity2Exposure(0.1)



Popular Searches unreal | pipeline | virtual production | free | learn | photoshop | 360 | macro | google | nvidia | resolution | open source | hdri | real-time | photography basics | nuke