Skip to content

candycat1992/LightmapperToy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightmapperToy

This project is a hobby lightmapper completely based on Houdini geometry nodes. Basically it grew out of a re-implementation of Matt's The Baking Lab with some modification. It's my first personal Houdini project (still learning), so there is no magic (no GPU acceleration, no progressive, just brute force) :)

How To Use It

There are only four nodes inside the obj tab:

Lock the viewport with the CAM_MAIN node. Change the environment map inside the ENV_LIGHT node (all HDRI textures are from HDRI Haven).

The SCENE_ROOM node is responsible for setting up the scene geometries (click the "Room Object" menu to change different scenes, toggle the "Enable Light" to enable or hide the area light on the top):

The RENDERER node is responsible for all the calculating. Change the "Shading Method" menu to switch between path tracer and lightmapper. More detail settings are under "Ground Truth" and "Lightmap Baker" tabs:

Results

We compare the lighting results of all the methods. As usual, ground truth goes first.

Path Tracer

Cornell Toy Shaderball Path Tracer
Diffuse & Specular
Diffuse Only
Specular Only

Diffuse Baker

"Diffuse" uses a single RGB value containing the result of applying a standard diffuse BRDF to the incoming lighting, with an albedo of 1.0 (3 floats per point).

Cornell Toy Shaderball Diffuse
Diffuse & Specular
-- -- -- Diffuse Only
No Specular No Specular No Specular Specular Only

Directional Baker

"Directional" bakes irradiance based on Enlighten's directional approach, with 3 floats for color, 3 for lighting main direction information, and 1 float to ensure that the directional term evaluates to 1 when the surface normal aligns with normal used when baking (7 floats per point)

Cornell Toy Shaderball Directional
Diffuse & Specular
Diffuse Only
Specular Only

Half-Life 2 Baker

"Half-Life 2" bakes irradiance projected onto the Half-Life 2 basis, making for a total of 3 sets of RGB coefficients (9 floats per point).

Cornell Toy Shaderball Half-Life 2
Diffuse & Specular
-- -- -- Diffuse Only
No Specular No Specular No Specular Specular Only

SH L1/L2 Baker

"SH" bakes irradiance projected onto L1 SH (12 floats per point) or L2 SH basis (27 floats per point). SH spports 3 diffuse modes and 5 specular modes to shading. There are many possible combinations of diffuse and specular modes (3 x 5), so we just use the default modes (convolution for both diffuse and specular) for the first row. Here we only show SH L2 results.

Cornell Toy Shaderball SH L2
Diffuse & Specular
Diffuse (Convolution)
Diffuse (Geomerics)
Diffuse (AHD)
Specular (Convolution)
Specular (Dominant)
Specular (Punctual)
Specular (Prefiltered)
Specular (AHD)

TODO

  • More baking methods, like H-basis L1/L2, spherical gaussians and spherical harmonics windowed
  • Volumetric lightmap (light probes)
  • Dynamic lights update
  • Performance optimization

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published