Search Unity

Is there any plan to support none-GameObject lights

Discussion in 'Entity Component System' started by Ashkan_gc, Jul 6, 2020.

  1. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    Our project has many lights, We want to have say 1000 lights in the scene for fireworks and ... and currently the mainthread work of syncing the entities to their GameObjects takes a good deal of time.

    Is there any plans to support lights in entities with a Light component or something similar? And if yes is it in next 2-3 months
     
    SamOld likes this.
  2. Nothke

    Nothke

    Joined:
    Dec 2, 2012
    Posts:
    112
    Hybrid Renderer V2 already has support for that. It attaches a light component to the entity, you still need to apply the results in the main thread but it bypasses the old removed GameObject syncing method. Or are you talking about that?
     
    cultureulterior likes this.
  3. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    Weird, Hybrid V2 doesn't render additional lights for me. AFAIK it is not yet supported in Universal Render Pipeline.
     
  4. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @Nothke I only used v1 and assumed v2 is the same based on release notes.
    Does it support it in universal render pipeline or not since I'm not doing HDRP because we need to run the game on hardware which doesn't support it as well.
     
  5. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    1000 lights might not play nice with forward rendering, especially on less powerful hardware (URP is forward only). Deferred rendering scales linearly with the number of lights, so is a much better fit. The classic Unity renderer lets you choose deferred rendering, but you need to use Hybrid v1 instead of v2.
     
  6. Nothke

    Nothke

    Joined:
    Dec 2, 2012
    Posts:
    112
    Ah, yes, I only tried it in HDRP, which works with lights, so can't say if it works or not in URP.
     
    Ashkan_gc likes this.
  7. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @burningmime I did not know URP is forward only! I never used it before. Wanted to use it because we don't need HDRP and hybrid v2 doesn't support built-in renderer! I'm kinda stock to less lights (not possible when fireworks are one of the main things in the game) or HDRP. I should look into URP to see what can be done
     
  8. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
  9. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    333
    I'm also hoping this comes along. I've come across a number of situations where I would like to be able to deal with many simultaneous lights, create and destroy them at the rate we can with entities, and process their data efficiently in Burst jobs. Some of this can be achieved with the managed lights as hybrid components by using cumbersome pooling techniques, but it's not a good experience, and they can never be processed in jobs.
     
  10. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,124
    @SebastianAaltonen Can we hope that we'll have at least a version of the URP with deferred rendering support in the current year. I'm not saying like a production version, just something to try which we can show our pre-production to our publisher with?
     
    charleshendry likes this.