Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Day/Night Cycle on a mobile device.

Discussion in 'Global Illumination' started by namdao1227, Oct 6, 2023.

  1. namdao1227

    namdao1227

    Joined:
    May 10, 2020
    Posts:
    6
    I want to research how to create a Day/Night Cycle system on a mobile device for a large map. However, I don't know how to calculate lighting or optimize shaders for mobile devices. I'm planning to use baked lighting to handle it, but I'm encountering an issue—I don't know how to smoothly transition between day and night, and I'm unsure about the performance implications of using baked lighting.

    I hope to learn more about different approaches and solutions to this problem.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
    I think Unity's alpha is working on lighting transitions with AVP.
    But in general for large maps, realtime lighting goes a long way. If you have 1 cascade for sharp closeup and another for further away (more cascades for higher setting) and use mobile/simple lit/custom lighting shaders you can go a long way.
     
  3. Sapper_Studios

    Sapper_Studios

    Joined:
    Feb 22, 2023
    Posts:
    5
    Use Adaptive Probe value for the scene
     
  4. namdao1227

    namdao1227

    Joined:
    May 10, 2020
    Posts:
    6
    Thank you for your suggestions; I have one more question. Have you tried using AVP and assessing its performance on mobile devices
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,394
    Nope. The per vertex lighting seems to be alright for performance while still looking good