Giter VIP home page Giter VIP logo

prefab-lighting-baker's Introduction

Prefab Lighting Baker

Tool Overview

Bakes lightmaps right into materials on the selected objects with them being untouched. You can also use this tool to bake lighting on dynamic and animated objects. Just copy object, replace SkinnedMeshRenderer with MeshRenderer, bake the object and put new generated materials on the original object with SkinnedMeshRenderer.

Tested on

Unity version: 2021.3.4f1 Renderer pipeline: Built-in

Guide

  • Download the package.
  • Create Prefab Baker game objects via menu or put it on any object you want.
  • In "Prefabs to bake", place all the objects you need to bake. If its hierarchy, you dont need to assign every object by yourself, just place the root.
  • Select folders where to save new generated materials and copies of your objects.
  • Press "Bake lights on prefabs" to begin baking.
  • If you need to clear all the new generated objects, baked lighting, press "Clear all data".

Process of baking

  1. Creates copies of assigned Game Objects and copies all the meshes in this objects, including child objects.
  2. Changes lighting settings of original Mesh Renderers on suitable for baking.
  3. Starts Unity`s lightmap baking process.
  4. Changes UV2 on copies of meshes.
  5. Creates new materials with lightmaps and assigns them to game objects copies.

Shader overview

  • Copies albedo texture (_MainTex) and color(_Color) from original materials.
  • Supports emissive map and you can change it`s internsity.
  • Supports lightmap textures.
  • As shader doesnt support lighting for obvious reasons, the brightness setting applies to main color, increasing its visibility on scene.

Limitations

  • Doesnt work on mesh renderers with multiple materials.
  • Shader doesnt support spec and bump maps.

prefab-lighting-baker's People

Contributors

burning-ape avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.