Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Baked light (lightmapping) for unity webGL

Discussion in 'Web' started by nahidma008, Jun 22, 2023.

  1. nahidma008

    nahidma008

    Joined:
    Jun 21, 2023
    Posts:
    12
    Does baked ligting increase build size, runtime memory usage and storage space?. I am planning to create a webGL website so runtime memory usage and build size is a concern.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,467
    Compared to no baked lighting? Yes, of course. But ... realtime lighting isn't a viable alternative on WebGL because of the loss in performance and visual quality.

    In any case you can tweak the lightmap baking to minimize texture usage but the resulting look will be more blurry, possibly even "blocky".
     
  3. nahidma008

    nahidma008

    Joined:
    Jun 21, 2023
    Posts:
    12
    Oh thank you. Runtime memory usage is one of the major concern for me as I am targeting devices with minimum 4GB RAM
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,467
    Keep in mind that browsers restrict the maximum memory usage. For example, Safari on iOS will close tabs that consume too much memory, about 500 MB seems to be the most you can use. Desktop browsers provide at most 2 GB to a single tab.
     
  5. nahidma008

    nahidma008

    Joined:
    Jun 21, 2023
    Posts:
    12
    Oh is it. Is that same for google chrome also. Because I saw the website decentraland which is a popular metaverse website. When I analysed that website in system monitor, I saw the RAM usage was taking more 3.5GB. But the most interesting thing for me was that It could destroy the models depending on user position and thus able to keep the RAM usage steady.