Git Product home page Git Product logo

unity-layeredobjectcullingsystem's Introduction

Layered Object Culling System

A simple Unity3D culling system that takes advantage of layered culling API available in newer Unity versions.

About

The LayeredObjectCulling system takes advantage of API that was added in unity recently, but was not implemented into the engine as a standalone feature. It allows for culling objects and shadowcasting independently and based on renderlayers, regardless of the LOD System culling.

This technique is great for optimization of scenes that have lots of detail objects that should not render and/or cast shadows until close enough to the camera.

How to use

  1. Add the Culling System prefab to the scene (Alternatively add the LayeredObjectCulling component to one of the scene's objects)
  2. Add the LayeredObjectCullingCamera component to all of the cameras that should be affected by culling
  3. Add the LayeredObjectCullingLight component to all of the shadow casting lights whose shadows should be affected by culling
  4. Set up the layers to be used for the system in the layers panel of your project
  5. Add the layers to the LayeredObjectCulling component and set the desired render distances. Values of 0 mean default culling.

! Only one Culling System can be used at once (by design). Having more than one Culling System will lead to undefined behavior.

! Support for Odin Inspector plugin included (and recommended)

Inspired by Unity's Book of the Dead tech demo:

https://blogs.unity3d.com/2018/06/29/book-of-the-dead-quixel-wind-scene-building-and-content-optimization-tricks/

unity-layeredobjectcullingsystem's People

Contributors

raulmgs avatar

Stargazers

 avatar  avatar  avatar

Watchers

Arie Leo avatar

Forkers

hengle

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.