Agisoft De-Lighter is a free stand-alone tool designed to remove shadows from model textures. The tool is targeted at removing cast shadows and ambient occlusion from 3D models. It requires user input in a form of rough brush strokes marking lit and shadowed areas. All input can be provided within Agisoft De-Lighter without the need for any extra data such as ambient occlusion maps. The de-lighting algorithm is optimized for 8-bit JPEG compressed textures and does not require specific image formats with higher color depth.

Contents of this article:




Workflow


Import model 


Using the respective toolbar button or through Import Model... command available from the File menu or context dialog in Workspace pane. 



Please note that only textured models are supported. 



User input


De-Lighter uses rough illumination maps to perform binary classification of texture pixels into lit and shadowed groups. To specify the illumination map, select brush tool on the toolbar and make rough brush strokes using Shadow color and Lit color in the respective areas of the model. Color selection buttons are available on the toolbar as well as brush size adjustment, areas and other tools.


A good markup implies spatially uniform strokes, one stroke per material which is undoubtedly lit/shadowed. Precise shadow border indication is not needed.     



Processing 


There are two processing options available. Preview button runs the algorithm on 4x downscaled texture to quickly evaluate illumination markup and parameters. Process button runs the algorithm on full-size texture. 


Example: Yogini with a Jar, early 10th century (original model by Jerry Fisher): 

In the case of highly non-uniform shadows (e.g. ambient occlusion overlapping with cast shadow), some of them may remain after processing. To remove them you can reset the shadow part of the illumination mask by clicking Clear Shadow toolbar button and selecting the remaining shadowed regions. You can also specify more lit samples, specifically those which became lit after the first iteration.

   

On finishing the processing a new model with de-lit texture will be generated. 


Please note that the algorithm is applied to currently active model (the one which is displayed in the model view). If you want to reprocess original model, select it in Workspace pane before running de-lighting algorithm.



Processing options


Artifacts suppression parameters


In some cases, artifacts caused by brightness variation or complex material changes may occur. They usually appear as too bright areas or color leaks. Two adjustable parameters, Highlights suppression and Color artifacts suppression are designed to reduce these kinds of artifacts.    



Regions exclusion 


If some dark texture is present on lit part of the model, it can potentially be misclassified as shadowed and removed. You can specify region to exclude from processing to preserve such textures by adding a new Shadow Scale Map through model context menu and marking the region of interest using Extra brush color. 


Advanced options


Shadow scale maps


De-lighting algorithm uses a heuristic that the edge of a shadow does not coincide with the borderline between different materials. When this condition is not fulfilled, color leaks may occur. In some cases such artifacts may be suppressed with the help of processing parameters, in other cases, shadow scale maps are recommended used. With a shadow scale map, you can specify particular shadow color and intensity and apply it to a particular region of the model. To manually specify shadow scale for a part of the surface do the following:        

  1. Find a shadow/lit pair. This must be a pair of regions with the same material but different shadow/lit property      
  2. Add a new Shadow Scale Map through the model context menu       
  3. Specify shadow/lit material pair using Shadow color and Lit color        
  4. Specify areas with the same shadow color and intensity (materials can differ) using Extra color. Penumbra regions (transition from shadow to light) can also be marked to ensure a smooth transition



Remove Shading and Ambient Occlusion (AO):


When no cast shadows are present on the texture, brightness of the surface mainly depends on its normal. This fact can be used to separate shading from diffuse color automatically, without essential user input. To use this feature run Remove Shading command available in the Controls Pane.

 

Processing options

  1. Locality: higher locality levels help to remove shading in scenes with higher lighting intensity variations in exchange for color diversity loss to some extent
  2. Remove AO: allows algorithm to compensate Ambient Occlusion using internally generated map
  3. AO removal strength: controls force of AO compensation

 

You can also specify mask in a new Shadow Scale Map layer using Extra brush color to specify region with highly specific color and normal, often it is ground in case of outdoor scans.

 


Export  


Processed models can be exported in various formats or saved as a project in .dlz format. In the latter case, all additional maps will be preserved along with the models. You also can upload processed model to Sketchfab using File > Upload Model... action. Examples:

Yogini with a Jar, early 10th century (original model by Jerry Fisher):

  • Original model  
  • Original model with shadow markup  
  • Delit model     
  • Delit model with additional shadow markup       
  • Final delit model



Rocky Surface 1 (original model by Paul Dickinson):
  • Original model   
  • Original model with shadow markup     
  • Delit model      
  • Delit model with additional shadow markup       
  • Exclusion mask to focus on particular point        
  • Final delit model



Architectural Salvage from a Shrine Temple (original model by Jerry Fisher):

  • Original model
  • Original model with shadow markup
  • Delit model



Crucifixion, circa 1180 (original model by Jerry Fisher):

  • Original model  
  • Original model with shadow markup  
  • Delit model   
  • Delit model with additional shadow markup 
  • Final delit model



Stone Wall Nr.1 (original model by 3DandVR):

  • Original model
  • Original model with shadow markup
  • Original model with exclusion mask to prevent dark regions from being classified as shadow
  • Original model with scale map for local shadow scale fix
  • Delit model 
  • Delit model with additional shadow markup     
  • Delit model with exclusion mask    
  • Final delit model



Forum discussion


Discuss the functionality of Texture De-Lighter and share your workflows and results in the dedicated board of our forum!