Hi, im a designer but making project in unity. it is sort of like character customization stuff. the game is for web browser . the thing is it take a long time to load like 5 to 6 mins because the models and data is like 5-6 GB. I was thinking, if i make a separate server for data and when the user clicks on something like shirt or pants and it downloads that specific part only instead of loading all models at once when you open the game. But i have no idea how to make it happen? Can someone guide me what to even look for? i want to reduce the loading time at start from 6-10 mins to 1 min for like 10 gbs of data. thanks in advance.
How many models and textures do you have in the game? It sounds like it would be better to reduce the size of the assets rather than load assets from a remote location!
Then, unless you reduces that 10Gb of data into something much much lower, you’ll need something equivalent to a Gigabit ethernet connection between your server and your client, because anything slower isnt going to be fast enough.
(A raw transfer of 6Gbytes of data over a 100Mbit/s connection should theoretically take about 6-7 minutes, so that makes me suspect that you’re bound by that as being the lowest bandwidth point in your network.)
Solutions are : increasing bandwidth, compressing the data, or delivering the data on demand instead of all at once. The latter, as you indicate, is probably the best solution. Unity way used to be AssetBundles, now its Addressables, I believe. Both support content which can be loaded on demand, but stored remote from the client.
You could look at asset bundles or loading model files at runtime, but for a browser game you really shouldn’t have anywhere near that size of content. A lot of people are on metered internet. A standalone build would be more appropriate, so at least they are only downloading the content once.
…why the hell is your model and other data that huge? That’s absolutely ridiculous for a browser game.
upload images of your model wireframes and texture files (just need to know how many materials per model and size) and can advise why your models are probably way heavier than they need to be.
thanks all for the reply. the data and models consist of alembic animations and clothes mostly .
Good god, why are you using alembics in a web browser app? Thats seriously way too heavy for something like that. You need to look at converting your alembic animations to something else. You shouldnt really be using alembics for anything that is limited on resources, such as a web browser.
Its a good idea to research what a platform can handle before making assets, so you dont end up doing what youve done and spend time on an asset that is not feasible for said target platform.
As other have specified, with that size in data, it might be close to an impossible feat to be able to make it work efficiently in a web browser.
As a first thing, you need to establish a proper layer of how things would be layered out.
You’ll have to stream in the data with a proper system to manage what to download & load and what to ignore.
For example, what’s the minimum size of whatever character you’re displaying in that web based app?
Unless the project is totally not ready or even designed for WebGL, a fully clothed character shouldn’t take more than 25 MB in file sizes and that includes all the textures on every material rendered on him. Texture compression & appropriate texture resolution is a must with WebGL.
If you got 10GB that includes thousands of clothes pieces with their textures and stuff, it’s totally feasible.
If you got 10GB that includes hundreds of clothes with 8-10 4K textures per materials, you got to optimize on that level a lot.
Remember that you should never aim at anything higher (at most) than 1.2 GB of memory usage from a browser, in today’s age. Many browser are limited their memory allocation per Tab (per page) to 2GB at most and that’s only if active/focused (Some drop it at 100MB when not focused) and that exclude all plugin & stuff like adblock, Ghostery and other plugin that people uses for their own convenience. The reserved 0.8GB of memory is for those tools that are out of your control when someone visits your web page with the webGL content.
Also, it’s extremely important, in your case, to not includes most of the 10GB in files directly into your build. Ideally, you should look up/search for a way to store the file separately from which the actual WebGL build page can download from.