Search Unity

Urp, light, realtime/bake problems

Discussion in 'General Graphics' started by mosenco, Aug 21, 2020.

  1. mosenco

    mosenco

    Joined:
    Sep 21, 2018
    Posts:
    7
    Hi guys, i'm creating a roguelike3D using URP. My map is procedural generated at runtime.
    My ideas is to disable the directional light and add a lot of spot light (realtime) around the map to create some dark/dungeon effects.

    I tried and i noticed that in URP in the settings, it limited the numbers of additional lights max 8.
    I can't even bake lightmaps in runtime..

    I noticed that if i turn off URP and using the Default pipeline, i can have a lot of additional lights.

    I'm targeting mobile device.

    What do you suggest me to do?
    1. there is a way to have more than 8 additional lights active in the scene using URP?
    2. there is a way to bake a lightmap at runtime? maybe in the start() function, add a loading screen while in runtime it is baking the scene?
    3. Do you think that using default pipeline or URP is kinda similar? Cause i choose URP over default, because i read somewhere that URP is better for mobile
    4. there is some limit that i should have in mind of the max number of additional lights in the game for mobile device?
    5. any other suggestions?

    thx a lot.
     
  2. daniellye

    daniellye

    Joined:
    Oct 11, 2019
    Posts:
    6
    1. The limit of 8 lights per object is fixed and cannot be circumvented. However, too many real time lighting in a scene will drastically lower your performance anyways, so you might wanna reconsider the way you approach this.

    2. Well, the idea of baking lightmaps is to save computational cost due to it not being done in real time. I don't think it is possible to bake lighting during runtime.

    3. URP and default pipeline is quite different actually. You can use shader graph and vfx graph in URP, and quite a number of settings are different in URP compared to default, as well as some limitations. Default pipeline isn't bad for mobile too.

    4. Not sure what you're trying to know, but aiming for a large number of real time lights for a mobile definitely sounds like a step in the wrong direction already. Definitely research and reconsider the design.

    5. URP is newer, but also more unstable in a way. If some things in the pipeline does not fit you, it's best to make the switch back to default pipeline early. The default pipeline has come a long way and can definitely do wonders in the right hands.