• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Google Summer of Code: Blender Light Paint using SphericalHarmonics
Jingyuan HuangDavid R. Cheriton School of Computer ScienceUniversity of WaterlooApril 7, 2009
1 Contact Information
Email: jingyuan.huang@gmail.com
IRC: yukishiro
2 Synopsis
Inspired by Illumination Brush[1], this project aims to create an interactive tool for Blender to preview, modify, and create image-based lighting environments specified by HDR light probe images. Artists canchange the HDR light probe by directly painting colours on the models. This tool will be integrated with theexisting image-based rendering routines in Blender in order to help artists determine the final renderings.
3 Benefits to the Blender Community
Blender already has vertex paint and texture paint tools, both of which are very effective tools to modify theappearances of the models. Light paint is different from these tool in the way that it modifies light insteadof surfaces, yet it is similar to the existing tools since it provides an intuitive way for artists to specify thedesired rendering effects. Using this light paint tool, artists can fine tune rendering effects without changingobjects’ material or locating another high dynamic range image to achieve better results.
4 Deliverables
4.1 Workflow Overview
The overall workflow can be described in the following steps (Figure1):1
 
1. The user creates the model.2. The user chooses an HDR light probe image as the lighting environment or starts with a blank lightingenvironment.3. The user previews the lighting results interactively in light paint main area.4. The user modifies the lighting environment by painting colours on the model or dragging shadows.5. The user uses the modified lighting environment for the final rendering. Alternatively, he or she canuse the modification as a light node and mix with other light probe images.Figure 1: Workflow
4.2 UI Design
Similar to vertex paint and texture paint, light paint will be a new mode in the 3D viewer space. It reads theenvironment map specified in Shading
World and energy value in Ambient Occlusion panel to computesthe spherical harmonics coefficients (Figure2). If there is no environment map, light paint will not takeeffect. If Ambient Occlusion is not enabled as the moment, the scaling factor for lighting would default to 1.Figure 2: World Panel for Environment MapWhen the user switches to light paint mode for the first time after creating the model, the tool would computethe Spherical Harmonics coefficients for the model and store it as a part of the blend file. This step can take2
 
some time to complete for complex models so the computation should be a threaded job so that regular UIinteraction is not affected. The progress of the computation should also be indicated. After the coefficientsare computed, the model will then be rendered using these coefficients and the light coefficients. The modelwould be displayed using OpenGL (preferrably GLSL to integrate with Blender’s current 3D view display).The selected light probe image would also be rendered as the background (Figure3).Figure 3: Interactive Rendering with Light Probe BackgroundThere would be a paint panel in editing buttons space. The paint panel has two tools: diffuse brush tooland shadow rotation tool. For diffuse brush tool, the panel has a colour picker (rgb), an intensity button(exponent), a brush size button. A pop-up property window for paint will also be created when the userpresses ‘N’. There is no extra button for shadow drag tool, except that the user needs to use a modifierkey together with mouse motion to drag the shadow. It should be easy to use two tools together to modifylighting smoothly. Figure4shows a mockup of the design.Furthermore, a new type of node would be created: light node. A light node can take a light probe image asinput. The node object contains information about the modifications made to the image. The modificationscan be applied directly to the model, or can be mixed with other light probe images to create a new lightingenvironment (Figure5). Light nodes are used with material nodes to create a render layer.
5 Technical Details
5.1 Spherical Harmonics
Precomputed radiance transfer using Spherical Harmonics was first introduced by Sloan et al. [2]. Spherical Harmonic Lighting: The Gritty Details by Robin Green offers good explanations of the basic concepts[3], however the implementation provided in the tutorial is naive and slow since it aims for explanation ratherthan performance. A faster algorithm was proposed by Ian G. Lisle and S.-L. Tracy Huang[4], and is the base of my implementation.3
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...