What to do after packaging for html 5


I’ve packaged my architectural visualisation to html 5, all of the .gz files created. I’m not sure what to do now though…are there any step by step video tutorials that anyone can recommend to test this locally and also succesfully deploy to webspace (I have 1and1)?

Also if I run the HTML5LaunchHelper I just get a screen which says:

Name: -Browser = -
Name: -ServerRoot = ./
Name: -ServerPort = 8000
Name: - BrowserCommandLine =
Name: -UseAllPrefixes = FALSE
Starting Server at http://Localhost:8000/
Press any key to quit server.

Double clicking the html file just takes me to my browser, which shows the following error:

Starting downloads

Starting download Utility.js.gz

Starting download IceHouse.data.js.gz

Starting download UE4Game-HTML5-Shipping.js.gz

Download failed

Any help would be greatly appreciated.


Ok I finally got this working. Here are the problems I faced and how I fixed them.

created the architectrual walk through using 4.9.2 and then opened in 4.10 as a copy. In 4.10 I then tried to package for html5 using in the packaging options:

Build configuration : Shipping
Full rebuild: ticked
use pak file: ticked
Include prerequisites: ticked
cook everything in the project content directory: ticked

Supported platforms (left menu of project settings window)

Windows: ticked
Html5: ticked

Everything else default.

Problems encountered during packaging:

warning: Unable to generate long package name.

Resolution was to close unreal, duplicate the entire project folder in windows, rename it, and also rename the project file. Re-open editor and re-package. This resolved this issue…must have been caused by opening a 9.2 project as a copy in 9.10

Packaging problem 2:

Unable to find various assets. On looking at the path, it sempt that the packaging process was looking for assets in a previous content browser layout (i dont know why) so I right clicked on all the top level folders in the content browser within unity and then clicked on fix up redirectors in folder…i’m not entirely sure what this does…but it worked.

Html5 packaging was now succesful. But I was unsure how to test locally using the html5launchhelper. So for anyone completely new to this (like me) run the html5launcherhelper and then go to your browser (must be the 64 bit version) and type in http://localhost:8000//ProjectName.html

At this point I got errors in the browser:

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 536870912, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

I scoured the internet for hours trying to figure out what this meant and how to solve it, trying various things such as increasing the html 5 heap size in the project settings, platforms, html5 and changing heap size (mb) to higher than the largest reading in memreport…didnt work.

I then tried installing the various things on this page: Sharing and Releasing Projects for Unreal Engine | Unreal Engine 5.2 Documentation (please note that the instructions on this page arent very clear) once you’ve installed the two programs your HTML5Engine.ini file should (i beleive) look like this:

Windows=“C:/Program Files/Emscripten/emscripten/1.35.0 (this number will vary depending on which version you have)”

Incidentally the file can be found at: C:\Program Files\Epic Games\4.10\Engine\Config\HTML5 (or wherever you installed to)

This still didnt solve the problem…and i’m not entirely sure what these programs do and i’m also not sure whether they’re necessary for the packaging process, or whether this is an outdated requirement…either way it didnt work, but again, I cant say for sure whether or not it was necessary.

Eventually, I reverted back to 4.92 re-packaged, ran the html5launchhelper.exe, opened up chrome 64 bit, entered the localhost address followed by the generated html file…and finally it worked without error, well…without error messages at least.

The problems I face now are…

My media textures (which are launched using blueprint at level start) dont seem to work…I dont know why…perhaps html5 doesnt support blueprints, or maybe doesnt support media textures?
lighting/exposure seems very dim compared to the version I packaged for windows.
Reflections seem almost non existant (they’re just about visible in 100% reflective surfaces such as mirrors, chrome etc)
effects such as bloom dont work
Some of the uv’s are completely messed up both on textures and also on the lightmaps (not sure why, everything is fine in the editor and in the version packaged for windows).

So questions I need to find answers for at the moment are:

can quality settings be defined at any point which may be affecting lighting/reflections ( i’m using static lighting only by the way)
are lightmass importance and post process volumes ignored in html5? this would explain the lack of bloom and possibly the exposure problems.
do blueprints work in html5
should media textures work in html5
Why would uvs of certain textures/lighmaps be messed up only in html5?

I hope some of this might be helpful for other newbs…and if anyone can help me answer the above questions and also maybe explain what part of my process actually made a difference (and why), that would be much appreciated.


***warning: Unable to generate long package name. ***
Try changing your project name to a simpler one. Do not use space or any other characters than A-Z0-9 in project name.

Also, Windows has a limit when it comes to using names. If your project name is too long, or nested inside a lot of folders, emscripten will have problems with given compiler locations. Try to keep the project in a simple place, like D:\Unreal\SomethingProj\

Be sure that your maps are defined in project settings -> packaging (click the arrow in Packaging part, at the bottom, and add your maps to “List of maps to include” part). HTML packaging (in my experience) needs this to set correctly.

can quality settings be defined at any point which may be affecting lighting/reflections ( i’m using static lighting only by the way)
No, they mostly cannot be improved. There are some tutorials for HTML lighting but they are basic. You can try some settings (click the arrow button near the build icon to see them). Keep track of what you are changing, write the defaults to somewhere or you might get lost.

are lightmass importance and post process volumes ignored in html5? this would explain the lack of bloom and possibly the exposure problems.
Post process is not ignored, I’m using most of the settings. Exposure is working a little wrong but it can be solved from the post process. What you see in editor might not be same. Bloom does not work, if you enable it, mostly messes with your view. Check out the “mobile demo” of Unreal Engine (SunTemple project). You can see that there is a cheat for bloom effects, a sphere with a simple gradient material on those fires. Also check out the materials. If you are using box/sphere reflections correctly like Epic did in this sample, reflections can be achieved (however they will not be as good as a desktop version).

I have not tried lightmass importance by myself, but in Suntemple it seems to work fine.

do blueprints work in html5
Yes they work perfectly.

should media textures work in html5
If you mean playing videos in materials, they don’t. The media player for html is in the todo list of Epic, but no timeframe.

Why would uvs of certain textures/lighmaps be messed up only in html5?
If you are using landscape for example, and a landscape material with multiple sub-textures, you’ll not be able export the material. Unreal engine is not good (yet) on exporting complicated textures. UVs, I’ve not seen any problems with those.

Heap size problem is correlated with the bit version of the browser.

If you are using a 32bit browser, you might see the memory array problems. UE4 needs a large memory, tries to create it. If the browser is 32bit, it tries a smaller one.

If you change the heap size in UE preferences, this also changes the memory registered for UE4. For heap size errors, you must decrease it, not increase. Default is a really good value (1024 mb).

ALLOW_MEMORY_GROWTH is an emscripten compiler setting. You can change the defaults in
C:\Program Files\Epic Games\4.10\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.30.0\src\settings.js
But UE overrides most of these, so no guaranties there.

With 4.10 you do not need HTML5Engine.ini. UE comes with everything it needs.
For prev versions, yes you must set those.

HTML5 quality is somewhat similar to mobile. 4.10 has a lot of improvements over 4.9 when it comes to HTML and mobile. I recommend using 4.10 and solving the problems there.
If you do not like what you are seeing in HTML, you might want to try to change your current renderer:

This will change the renderer options and you’ll see that most of what you want are not correct. If you need to export to HTML, create a copy of the project and change your settings (materials, textures, etc) accordingly.

How about hosting this stuff from web? Any success?

Hey, I made a video about it. The sound is not the best but maybe it helps someone :wink:

Have a nice time

In Firefox and Chrome … :frowning:
What is the configuration of the .htaccess file?