Home Unity

Dynamic lighting; light occlusion/bleeding problems

copenhagenjazz
polycounter lvl 14
Offline / Send Message
copenhagenjazz polycounter lvl 14
Hi

I am working on a small topdown shooter project and I am experiencing some fairly harsh limitations of the unity lighting system that I am wondering wether can be circumvented or not.

Currently my only option is to Work in forward rendering as I am using Shader Forge for my shaders and unfortunately Shader Forge does not currently support shader creation for deferred rendering.

This issue is this;
The game view is top down and the game setting is an appartment complex with many different appartments and rooms. This means tight corridors and many rooms rubbing against each other. The camera is zoomed fairly far out so the player can see many rooms at the same time.
I want to have a minimum of one light per room but currently I have found no way of preventing the light spilling from one room into another which both looks bad but also breaks some of the shaders as you hit the Unity forward rendering limitation of maximum 3 lights hitting any object.
Is there any way to control the occlusion of dynamic lights? I would love to be able to define a volume in which a light is restricted.

I have tried working with layers with some (and quite limited) success. As layer Count is limited this hard Locks the max size of a specific level and more seriously there is also a max cap for the number of layers a light can add as culling masks (4).

Another option is of course to switch to lightmaps but I would like my light to be dynamic + I hope to avoid the Whole baking process.

I hope I have explained myself well and I would be much appreciative of any suggestions :)

Thanks

Replies

  • copenhagenjazz
    Offline / Send Message
    copenhagenjazz polycounter lvl 14
    Gah! And now I figured it out :) In forward rendering there is no limitation on the number of culling mask layers for a light. So you basically have 32 layers to fiddle around with.

    Incredible what a nights sleep can do :D Was going nuts yesterday trying to figure this out. Oh well...
  • Farfarer
    It's probably cheaper and better looking to use light probes if most of your lights are in fixed positions.
  • copenhagenjazz
    Offline / Send Message
    copenhagenjazz polycounter lvl 14
    Thanks James :) However I am trying to avoid light baking for multiple reasons. I want the light to be quite dynamic + lamps destructible. I also want to avoid long baking times and furthermore I want the design process to be art independent. Of course the visual fidelity will take a hit (baked lighting of course looks better) but on a grander scale I think dynamic lights will add more to the game.

    Thanks again for your continued support
  • Mattlarry
    Yes with the help of the dynamic lights the game looks more attractive and highlighted. In the game the most important thing that must be considered is the lights and also the visual effects.
Sign In or Register to comment.