GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Simoxus/light-cookie-generator-for-unity: A Unity Editor tool that lets you generate light cookies and simulate shadows... fresh out of the oven (i'm sorry)

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Editor
Editor
 
 
Internal
Internal
 
 
Runtime
Runtime
 
 
Editor.meta
Editor.meta
 
 
Internal.meta
Internal.meta
 
 
LICENSE.md
LICENSE.md
 
 
LICENSE.md.meta
LICENSE.md.meta
 
 
README.md
README.md
 
 
README.md.meta
README.md.meta
 
 
Runtime.meta
Runtime.meta
 
 
package.json
package.json
 
 
package.json.meta
package.json.meta
 
 

Repository files navigation

A Unity Editor tool that lets you generate light cookies and simulate shadows... fresh out of the oven (i'm sorry)


Features

  • Per-light cookie baking
  • Support for Spot, Directional, and Point lights
  • Occluder list system (each with its own settings)
    • Opacity
    • Dilate (grow)
    • Erode (shrink)
  • Multiple blur methods (None, Gaussian, Kawase, Spiral)
  • Shadow opacity & cookie brightness controls
  • Configurable bake camera
  • Automatic naming (name cookies after the light, or after a parent object N levels up)
  • Batch baking (GameObject > Light Cookies > Bake Cookies in Children)
  • Auto-assign to light (freshly baked cookie is assigned automatically)
  • Full Undo support
  • Progress bar
  • Probably some more

  • What does this tool actually do?

Basically, it creates a temporary camera at the light's position, rendering each occluder individually. It then composites the layers together by taking the minimum value across all different layers. After this is done and IF a type of blur was selected, it runs a blur pass over the result. The final texture gets saved, and assigned back to the light. Because each occluder renders separately before compositing, individual controls are also available! The actual concept; rendering each mesh as flat black geometry and then compositing the results, was so much easier than I would've expected.

  • Which render pipelines are supported?

Built-In, Universal, and High Definition are all supported. The tool detects the active pipeline automatically via RenderPipelineInfo and adjusts camera setup accordingly.

  • How do I bake a cookie for a single light?

Add a LightCookieData component to the same GameObject as your Light, set up your occluders in the list, and press the Bake button in the inspector.

  • What happens with Point lights?

Point lights bake all six cubemap faces and save the result as a .cubemap asset instead of a .png.

About

A Unity Editor tool that lets you generate light cookies and simulate shadows... fresh out of the oven (i'm sorry)

Topics

bakedcookiesfreshlyyum

Resources

Readme
MIT license
Activity

Stars

13 stars

Watchers

0 watching

Forks

1 fork
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.