Skip to main content

TOOLS

Tool : Auto HDRI Light Gen V1.0
Download Link : File 1File 2 
Tutorial Movie Clip Link : Movie


*This tool only works for Windows OS



Fig 1. Overview Of Auto HDRI Light Generator

             I was inspired by lighting pipeline of Digital Domain and ILM. So I decided to challenge myself by creating my own pipeline tool. After couple of months, I finally came up with working solution and it's called "Auto HDRI Light Gen v1.0". It's semi-automatic light generator and uses input HDRI . Before I start explain about my tool, I want to address the limitations of Image Based Lighting system.
­             
             Image Based Lighting(IBL) is common lighting technique in CG industry. Especially in VFX field, IBL becomes essential technique. Current IBL method does create very convincing and realistic result in short amount of time and effort. However there are several limitations with it. IBL system such as ENV sphere lighting is not distance based light; it's ambient light. Thus all of objects in 3D scene will have same amount of light intensity, color, and shadow. If you are interesting in 3D lighting, you should know these two properties of physical light; first manmade artificial light have distance based falloff in light intensity; second distance and size of light source directly affect length and softness of shadow. ENV sphere light is not distance based light and it often results flat unpleasing render. Thus I'm going to write about recent industry tips and my method to overcome limitations of current IBL system. 

             Digital Domain and ILM already tried to solve the limitations with different way. If you take a close look at below images, you'll be able to see glimpse of their lighting pipeline. Both effect houses use simple solution; creating bunch of lights based on HDRI. It is very simple and effective and does solve all of limitations; only caveat is longer render time.
Fig 2. Digital Domain VFX breakdown of "Curious Case Of Benjamin Button"
Fig 3. ILM Lighting Tool : "The Environments Browser"
Fig 4. ILM Lighting Tool : "The area light extraction/light rig creation tool"








­




            


             Now I'm going to discuss my tool, "Auto HDRI Light Gen". I'm try to make the tool as user friendly as possible. I started using Nuke Python module because everyone is familiar with Nuke and it's easy to use. And later on, I added PyQt GUI to my auto light tool. Below images are what I came up with after several months. Here is link to "How to Use" move clip  Link
Fig 5. "Auto HDRI Light Gen" Tool in Nuke


Fig 6. IBL List Window (PyQt4)
 Fig 7. Loaded IBL setup in Maya
             The most difficult part was this: How to convert 2D data (x and y coordinates of illumination part from input HDRI) to 3D (x, y, and z coordinates of each light). Luckily I gain big help from talented Pipeline TD, Henry Van Der Beek. And here is part of my code that covers conversion side. The equation is modified version of "Parametric Sphere Equation" .


        #This is part of conversion formula
        U = imgCenX/imgWid
        V = imgCenY/imgHig
        L = m.radians(360.0*(U))
        theta = m.radians(180.0*(V-0.5))
        #x,y,z coordinates for each light
        xcoor = ra*m.cos(theta)*m.cos(L)
        ycoor = ra*m.sin(theta)
        zcoor = ra*m.cos(theta)*m.sin(L)

             Here are two slightly different images for comparison purpose. First one is with my auto light and second one is with only ENV sphere light. There is falloff in light intensity from first image, but not the second one. Also first one reveals more predominant shadow; it is more accurate than second picture.
Fig 8. With Auto IBL
Fig 9. With Env Sphere Light












*Here are links to my full code; I commented most of part, so anyone should be able to interpret easily  >> Part 1Part 2
*You can download "Auto HDRI Light Gen v1.0" follow link and make sure to read "README.txt" for installation instruction.  >> File 1, File 2



Refrence
1. SIGGRAPH 2010 Course: Physically-Based Shading Models in Film and Game Production / Title : Terminators and Iron Men: Image-Based Lighting and Physical Shading at ILM (Ben Snow)  /
  
http://renderwonk.com/publications/s2010-shading-course/