https://github.com/staggartcreations/AmbientProbesUnity
Ambient lighting probe sampling
https://github.com/staggartcreations/AmbientProbesUnity
Last synced: 3 days ago
JSON representation
Ambient lighting probe sampling
- Host: GitHub
- URL: https://github.com/staggartcreations/AmbientProbesUnity
- Owner: staggartcreations
- License: mit
- Created: 2020-05-19T13:52:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T14:19:49.000Z (over 5 years ago)
- Last Synced: 2024-06-06T22:49:10.065Z (over 1 year ago)
- Language: C#
- Size: 745 KB
- Stars: 41
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- anything_about_game - AmbientProbesUnity
README
# Ambient probes for Unity
Similar to light probes, but samples a flat ambient color and does not require any baking. This can be benefitial to specify ambient light for dynamic objects in specific locations.
[Example video](https://gfycat.com/mixedethicalindianglassfish)
Instructions
------------
Create an empty object and `Add Component->Rendering->Ambient Probes->Group`. Click "Edit Probes" to create a first probe, from this point on you can duplicate the select probes to create more. It's important to surround an area by probes that are set to "Global", this is so it's possible to transition to whatever ambient light color the scene uses.
On any object, go to `Add Component->Rendering->Ambient Probes->Sampler`. And assign any renderers that should be affected.
The `Property Name` field represents the color parameter that's being set on the materials. By default this will use _Color, but the system requires a shader with a custom lighting model so ambient light can be overridden.
Limitations
-------
- Sampling is done based on the sampler's position, meaning the renderers are affected as a whole, not just parts
- Sampling can only happen between 2 probes (source and destination). Doing so for multiple probes requires fetching all nearby probes and sorting them by distance, this requires some form of space partitioning for performance.
- Probe positions do not move with the probe group
License
-------
MIT License (see [LICENSE](LICENSE.md))