1. The space forums use a separate registration system from the main virtual world. To comment on these forums, you need to create a separate forum account.
    Dismiss Notice
  2. Hey there, we have two Skype groups for space early users - if you're creating content, or need help, feel free to join in either the the beginners or advanced users groups.
    Dismiss Notice

WebGL Issues: Currently fixable or something to wait for?

Discussion in 'General' started by ghaelen, Mar 6, 2017.

  1. ghaelen

    ghaelen Member

    I am trying to create regions (and other items) specific to WebGL, which I know is waiting for a major upgrade. I've had several people visit and join that way, and when it works it is wonderful! At the same time, it is limiting (as we all know) in graphics, runtime elements, and size of region.

    My first and greatest issue is that I can't always tell if my current issue is due to the current state of WebGL, the browser I'm using, something related to my build, or the processing of my build in Space. So I thought I would document my issues and the solutions (if any) here.

    I'm hoping to compile an at-a-glance list of what can be solved now and what we just have to wait to solve. The actual questions follow in subsequent posts and the short version of the answers will be here as I figure out how to word them.

    WebGL Player memory (ways around running out of it)

    Stuff not to add to webgl regions (yet)

    Lighting - real time, mixed, baking (which to use)

    Terrain heightmap resolution (how it affects resource use/memory)

    Avatars (number of them, attachments, etc)

    Media elements/objects (presenters, streaming music, etc)
     
    Last edited: Mar 6, 2017
  2. ghaelen

    ghaelen Member

    The first (latest) issue I have has come up when I've used an alt avie and tried to go into my own small region through the Firefox browser. Logging in requires me to first arrive at the Welcome Center. I get there, all is well, I then try to go to my own region and I'm told I'm out of memory and if I'm the developer I should "allocate more memory to the webgl build in the webgl player settings."

    (I AM able to get in through Chrome on the desktop, but not the laptop, so I'm telling people to use Firefox. I find the graphics are also a bit better in Firefox.)

    Investigating Firefox cache, I see that its full so I clear it. I try again and get the same message. I google the issue and now understand that something else (related to Unity) doesn't clear when I clear the Firefox cache. So I use CC cleaner and clean out all the comp areas I know of. Still get the out of memory message.

    Since I don't understand the deep storage technical issue, I will just ask some questions on behalf of my visitors who are not going to investigate the deep storage technical issue - they're just going to stop trying to come in. Let's assume - for the sake of argument - that downloading the desktop browser isn't an option. I need to understand some of the backend of this. I also need to understand what to tell people while we all wait for the webgl upgrade. I believe in being honest with them, and since we WANT them to come in it is incumbent on us (Space) to make it as smooth for them as possible. I know some folks who won't go through more than the one step to join so I'm waiting to invite them in until webgl goes through the upgrade. But - I've already been told 'I'll only come in through the browser and only invite my friends in if they can come in through the browser'. I'm listening, and we all should be.

    So - If I first enter the region through the desktop I see that my region is 64mb. If I go to the Welcome Center my cache is now around 114mb. That doesn't seem like a large amount but it is about 10mb larger than the last time my alt came to my region.

    1. Am I correct in deducing that there is a size limit for visiting regions in Webgl? If so, what is it?

    2. CAN I allocate more memory to the WebGL player - am I correct in thinking that's somewhere in the Unity Export settings? I see the 'suggested memory' of 512 in all the platforms, is that related to this particular issue? I think it is something else.

    3. If I can't allocate more memory to webgl, is it mandatory that all web browser logins go first to the Welcome Center? If I give them a link directly to my public region, shouldn't they be able to come directly there? If there is a size limit, and the Welcome Center takes half of that, it would make sense to allow us to bypass it once we've given access to someone. Let's assume I will take care of teaching them how to move and get clothes and such.

    4. Is it possible to let them login to a preliminary page where they can see places they are allowed to go and/or that are public?

    5. Finally - IS there a path I can follow to clear the Firefox 'out of memory' issue? I realize this is a Firefox issue, but I can't follow the discussions well enough to resolve it.

    I DO have a workaround that some people might be willing to go through so they can visit. I went in through Chrome (if I could get in at all) then logged out still in my region. When I log back in through Firefox I do go straight into my region.
     
    Last edited: Mar 6, 2017
  3. Adam

    Adam Developer Staff Member Moderator

    Yes - it's dependent a bit on the browser and setup; generally speaking, around 250mb is the largest that works in WebGL, and I generally recommend under 128mb for most reliability. WebAssembly is releasing in Chrome on March 14th, and Unity support is available on March 31st, so we'll be upgrading in April; that'll increase the maximum memory allocation to around 4GB; which should (pending testing!) bring it closer to the desktop clients.

    You can - the recommended memory allows you to change the preallocated memory amount. Keep in mind - the higher you set this, the less likely WebGL will be to work. We have to allocate memory upfront (but not after WebAssembly) - so we request as much as we think we will need; however that can be denied by the browser; if it's denied - you won't be able to get in.

    Switching a region will release all the memory it was using back. Loading another region (in theory) shouldn't have any impact on session usage - but no, if you link directly to a region, they should arrive there. Let us know if that's not happening.

    The explore window will block regions which are > 512MB (anything larger than that is guarunteed not to work in WebGL)

    Usually restarting the browser works, it's not ideal - but it does tend to work for me.

    Hm - that sounds a bit weird. That's re: the URL direct logins - I'll get Allen to take a quick look, it should always log you in if the URL is the http:// sine.space /world/enter/<REGIONAME> style URLs
     
  4. Adam

    Adam Developer Staff Member Moderator

    We generally disable the stuff we know causes problems (e.g. Cloth Physics), but high-end shaders and a few other things tend to be no-gos. We fallback to OpenGLES 2 on WebGL currently - when we upgrade to WebGL2 (same time as our webassembly release - although we're already testing it in-house), that'll go to OpenGLES3-level shaders which is substantially improved lighting/etc.

    Terrains can be a hog - but you can calculate the memory use they'll impose by doing basically =6xNxNx4 bytes for a rough approximation (where N is the resolution). 512/1024 resolution terrains should be OK though.

    Depending on the weight of the avatar, avatars add between 2 and 10mb to a region (typically 3-5mb). So if we go with the ~256mb-safe limit mentioned above, and your region is 128mb, you should be able to comfortably fit 25 avatars in before you start getting problems.

    Browser surfaces are unsupported - most others will work, or will work after the next release (we've just added streaming music support in our internal builds). VOIP does not work.
     
  5. ghaelen

    ghaelen Member

    Adam, thank you for the thorough response to so many questions! I will just point people to the third post (yours) for now :)
     

Share This Page