Giter Site home page Giter Site logo

lightmappertoy's Introduction

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

lightmappertoy's People

Contributors

candycat1992 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.