GithubHelp home page GithubHelp logo

avatarchik / ambientprobesunity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from staggartcreations/ambientprobesunity

0.0 1.0 0.0 763 KB

Ambient lighting probe sampling

License: MIT License

C# 100.00%

ambientprobesunity's Introduction

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

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)

ambientprobesunity's People

Contributors

staggartcreations 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.