Giter Club home page Giter Club logo

shadowmask's Introduction

Shadowmask Tutorial

Demonstrating how new Shadowmask feature works in Unity

Light Modes Tutorial: Shadowmask

This project includes the tutorial files for Shadowmask tutorial. In Unity 5.6, new light modes are introduced for blending baked and realtime shadows. This modes include Baked Indirect, Distance Shadowmask, Shadowmask and Subtractive. This tutorial goes through the details of authoring a scene for switching between Distance Shadowmask and Shadowmask modes.

In Unity 2017.1, Shadowmask option is moved to Quality Settings so users can change the mode at runtime. This tutorial explains how to change the mode through API as well as setting up light probes, reflection probes, lighting parameters, lighting settings and light types. These concepts can be applied to a realistic use case and this is essentially what the tutorial covers by using baked shadowmasks for in-door (while retaining shadowmaps of playable character) and shadowmaps for outdoor (including the static objects).

The project includes two scenes. The first one provides the basic version of the scene without any lighting setup. Scene (assets, props, particles, animated character) is prepared and the tutorial explains step by step how to author the lighting and post-processing. Second scene shows the completed version of the tutorial.

The tutorial only goes through Shadowmask mode. Baked Indirect and Subtractive modes are not covered in this tutorial.

Tutorial can be found here

What is Shadowmask?

In Shadowmask mode, static objects receive shadows from other static objects via the precomputed Shadowmask texture, regardless of the shadow distance. In Distance Shadowmask mode, both dynamic and static objects are using realtime shadows within the shadow distance. That is the reason why drawcall amount is higher in Distance Shadowmask. Beyond the shadow distance, static objects receive high quality shadows from other static objects via the precomputed Shadowmask.

Unlike subtractive mode, shadowmask feature allows users to blend between baked and realtime shadows with all mixed light types (directional, point and spotlight). In old versions of Unity, this was the main constraint. It was only possible to use one mixed directional light to avoid double shadowing and overbrightness.

Credits

  • Keijiro Takahashi for sIBL HDR cubemap, camera and movement scripts
  • ThreeDScans for 3D sculpture of Plato
  • R&D Content Team at Unity for Standard Assets and Labs Scene

shadowmask's People

Contributors

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