All Projects → laurenth-personal → Lightprobesplacement

laurenth-personal / Lightprobesplacement

Licence: mit
Unity project showing how to use the custom Package LightProbesVolumes for placing lightprobes automatically

Projects that are alternatives of or similar to Lightprobesplacement

Fontainebleaudemo
Fontainebleau demo
Stars: ✭ 524 (+244.74%)
Mutual labels:  unity, lighting
Lightmap Switching Tool
Tool that allows switching different baked lightmap sets on a unity scene at runtime.
Stars: ✭ 381 (+150.66%)
Mutual labels:  unity, lighting
Contactshadows
Experimental implementation of contact shadows for Unity.
Stars: ✭ 219 (+44.08%)
Mutual labels:  unity, lighting
Unitycopylightingsettings
Unity editor extension to copy&paste lighting settings from one scene to another.
Stars: ✭ 25 (-83.55%)
Mutual labels:  unity, lighting
Core
CatLib lightweight dependency injection container
Stars: ✭ 148 (-2.63%)
Mutual labels:  unity
Noiseball3
A Unity example that shows how to use the new implementation of DrawProcedural.
Stars: ✭ 147 (-3.29%)
Mutual labels:  unity
Littlebee
关于帧同步和ECS的实现
Stars: ✭ 145 (-4.61%)
Mutual labels:  unity
Articulations Robot Demo
Stars: ✭ 145 (-4.61%)
Mutual labels:  unity
Unity Curve Utils
A utility that can use 18 kinds of curve algorithm.
Stars: ✭ 151 (-0.66%)
Mutual labels:  unity
Runtimeunittesttoolkit
CLI/GUI Frontend of Unity Test Runner to test on any platform.
Stars: ✭ 150 (-1.32%)
Mutual labels:  unity
Core
React renderer for building user interfaces in Unity UI
Stars: ✭ 133 (-12.5%)
Mutual labels:  unity
Urp toon
A Toon Shader in Unity Universal Render Pipeline.
Stars: ✭ 147 (-3.29%)
Mutual labels:  unity
Unimgpicker
Image picker for Unity iOS/Android
Stars: ✭ 148 (-2.63%)
Mutual labels:  unity
Ugui Super Scrollview Example
Sample project that summarizes usage examples of "UGUI Super ScrollView".
Stars: ✭ 146 (-3.95%)
Mutual labels:  unity
Ecs
ECS for Unity with full game state automatic rollbacks
Stars: ✭ 151 (-0.66%)
Mutual labels:  unity
Rapidgui
Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
Stars: ✭ 144 (-5.26%)
Mutual labels:  unity
Metasprite
A fast, self-contained, highly customizable Aseprite-to-Unity importer.
Stars: ✭ 148 (-2.63%)
Mutual labels:  unity
Klaklasp
An extension for the Klak Wiring system to create audio reactive behaviors.
Stars: ✭ 150 (-1.32%)
Mutual labels:  unity
Repaper
Desktop that changes based on weather & time
Stars: ✭ 148 (-2.63%)
Mutual labels:  unity
Anyrpgcore
Open source Role Playing Game engine for Unity 3D written in C#.
Stars: ✭ 141 (-7.24%)
Mutual labels:  unity

LightProbesPlacement

Unity project that shows how to use the custom Package LightProbesVolumes for placing lightprobes automatically ( now for Unity 2018.1 and above ).

The LightProbesVolumes package allows you to place Lightprobes automatically inside a volume, above static geometry with collisions. If you have a static floor and objects with collisions, it will detect them and place lightprobes above them on a grid with a resolution you can choose. By default it will add 2 layers of probes above the detected meshes, or you can choose to fill the volume completely.

This script will add a "Lighting" menu in Unity and a LightProbesVolume item in the Gameobject / Light menu.

New :

  • now requires 2018.1 or above
  • the scripts are now inside a package. This package is a submodule of this repository, make sure you either update submodule or download is separately here
  • the light probe placement now works correctly with rotated volumes
  • the "follow floor" finally does something : when checked the placement uses raycast against static objects, when disabled it just follows the volume
  • the script will only place lightprobes above static objects, if the script doesn't place any lightprobes, make sure your environment colliders are flagged as static
  • the debug for the "inside geometry check" is now cyan

How to use it :

  • Create / Light / Lightprobe Volume
  • Set the size of the box to the size of the area you want to place lightprobes in ( if you have a ceiling it is recommended to set the vertical bounds lower to the ceiling, or it will spawn probes on top of it).
  • Set the " Light probe volume settings" :
    • vertical and horizontal spacing ( one probe every X meters )
    • offset from floor is at which vertical distance from the collision you want to spawn the first layer of probes
    • number of layers is the number of probes that will be placed vertically above the hit collider
    • fill volume enabled will fill the whole height of the volume instead of just doing X number of layer
    • discard inside geometry will test if your probe is inside an object with collisions. This will only work if the top face of your volume is not itself inside an object with collisions. In order to check this enable "draw Debug" and fill the volume : the green cross at the top has to be located in the air and not inside a geometry.
    • Click the button !
  • When you have several volumes setup in your scene and you want to refresh them all :
    • Go to lighting / Refresh lightprobes volumes. This will place again the probes in all the volumes in the scene.

Improvements I would like to do :

  • Replace the raycast to colliders by raycast to meshrenderers

Troubleshoot :

  • if the script doesn't place any lightprobe, make sure your geometric is marked as static, and that it has a collider. Using colliders isn't ideal but I haven't found a good solution that would work without them.

Contributions :

This was originally based on the script shared by ghostmantis games : http://ghostmantis.com/?p=332

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].