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 Light Baking and project size on WebGL

Discussion in 'Web' started by MaorDany, Oct 16, 2022.

  1. MaorDany

    MaorDany

    Joined:
    Dec 31, 2017
    Posts:
    106
    I have to do light baking to get good performance because I have a huge map, but my problem is that I am building a game for WebGL And the Light Baking makes my project bigger by another 80MB.
    Does anyone have any ideas? How can you shrink the size and still remain with reasonable quality.
    upload_2022-10-16_15-33-14.png
     
    FrankSenbeans likes this.
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,583
    Check the Lighting tab. Primarily try to reduce the lightmap resolution / texture size.

    A better option may be to bake the lighting of individual static objects into their textures. This only works with static lighting and static objects (ie don't move or rotate).

    But generally, don't expect WebGL to get anywhere near mobile graphics quality. Maybe you're aware but I keep mentioning that because so many devs have false expectations as to what's realistically possible with WebGL. It's qualitatively a time-warp back to the 2010-ish era of mobile graphics.
     
    wetcircuit likes this.
  3. MaorDany

    MaorDany

    Joined:
    Dec 31, 2017
    Posts:
    106
    Thanks!!!
    waiting for WEBGPU :)
     
    FrankSenbeans likes this.
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,583
    That made me think of "Waiting for Godot" ... :D
     
  5. MaorDany

    MaorDany

    Joined:
    Dec 31, 2017
    Posts:
    106
    Unity start to work on it.
     
    FrankSenbeans likes this.
  6. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,583
    Haha, that was a good one! :D
     
    FrankSenbeans likes this.
  7. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,583
    Anyhow, the problem with WebGPU or any Web standard is that it usually takes 3+ years for a standard from "first draft" to "v1.0" and while browser developers have been trying to follow or even lead these developments, supporting them to some degree even in draft stages in their browsers, these features usually either remain disabled by default or are severely lacking and in any case show huge differences in implementation maturity, completeness, stability and performance between browsers and across platforms.

    Case in point: Safari on iOS finally started supporting WebGL 2.0 somewhere between 1-2 years ago, whereas the WebGL 2.0 standard was released almost 6 years ago.
     
    FrankSenbeans likes this.