Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Best way to render hallway with many lights that need to change?

Discussion in 'VR' started by Beef-Tooth, Aug 21, 2019.

  1. Beef-Tooth

    Beef-Tooth

    Joined:
    Nov 27, 2012
    Posts:
    23
    I'm tasked with a VR experience that simulates hallways with changing lights. Like pulsing running lights in the ceiling that can change colors. The lights are the same size and location of typical florescent fixtures you see in office buildings or hospitals, evenly spaced. It needs to run on the Quest.

    Animating the rectangular light shapes themselves should be easy, using an illuminated texture atlas. And I think I can update reflection probes once every 1/3 second to stay on pace

    Any ideas how to have many lights affect the hallway geometry? I don't think baking is an option since lights constantly change. I'm not sure if light probes would help, with what I know about them it doesn't seem so. Or maybe a couple light cookies with cube maps that span the entire hallway, with circular blobs of white, that I can 'march' down the hallway at proper intervals.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, I don't think you can do this with real lights on the Quest. It will choke. So look for cheaty approaches — for example, precomputing what each hallway section looks like under each light color, putting all those colored textures in an atlas, and updating the UV values to reflect the current color under each section.
     
  3. Beef-Tooth

    Beef-Tooth

    Joined:
    Nov 27, 2012
    Posts:
    23
    Thanks for the tips! Got me thinking, I can probably just swap through each precomputed texture since each light change is a step.. Or maybe combine into atlases. Probably just 3 states per light color to capture the light wave.
     
    JoeStrout likes this.