Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make UnrealEngine-HTML5-ES3 Support WebAssembly 64 bit? And run normally under multithreading. #165

Open
freebirdxxc opened this issue Jun 13, 2024 · 55 comments

Comments

@freebirdxxc
Copy link

How to make https://github.com/SpeculativeCoder/UnrealEngine-HTML5-ES3 Support WebAssembly 64 bit? And run normally under multithreading.
I forgot my password for my previous Github account and registered a new one, but I am unable to access the Github. com/SpeculativeCoder/repository (my previous account was fine, but the new one is not).
So, I can only send the question here. Please ask experts who are proficient in this area to provide answers. Thank you!
Regarding 64 bit and multithreading, it is currently a major bottleneck that restricts us from using UE to package HTML5. We have been studying it for a long time, but we have not been able to find a good solution.

@wapollo86
Copy link

I also have the same problem

@kevinclv
Copy link

This 64 bit is still a bit difficult, it is said that emscripten.org has not fully supported it yet

@honeymarkery
Copy link

Is the 4GB memory in the browser not enough? Why do we need 64 bit? @freebirdxxc

@freebirdxxc
Copy link
Author

Is the 4GB memory in the browser not enough? Why do we need 64 bit? @freebirdxxc

For some applications of digital twin visualization and metaverse, 64 bit is necessary, otherwise it cannot truly be commercialized. Because these applications typically require 8-15GB of memory.

@david1010xu
Copy link

This 64 bit is still a bit difficult, it is said that emscripten.org has not fully supported it yet

As long as some code in WebAssembly is modified, it can support 64bit very well. I have already implemented this and also achieved stable 64 bit operation under multithreading

@david1010xu
Copy link

david1010xu commented Jun 15, 2024

Your problem has also troubled me for a long time. After several months of unremitting efforts, I have solved the two problems you mentioned and also supported the WebGPU interface. Currently, I am porting code to UE5.4 and believe it will be completed soon.
UE4.27.2 packaging HTML5 now fully supports WebAssembly 64 bit and runs very stably under multithreading. I have supported both WebGL2 and WebGPU.
1.WebAssembly 64 bit, which allows packaged HTML5 programs to break through the limitations of browser 4G. It can support up to 16GB of memory access, which is sufficient for browser programs.
2.The management of Wasm in multithreading is relatively complex. To save space, I won't go into too much detail here. I have written the code as a batch executable program.
3.Regarding the support for WebGPU, it is currently possible to achieve the normal operation of various shaders in SM5, and the running effect is almost the same as the packaged Windows version
This Setup program contains the diff file of the source code and hundreds of related modified .h/.cpp files.
At the same time, I also included some of the 64bit compiled code in this batch executable program.
We encountered many problems in the process of researching UE packaging HTML5, and the reason is actually that the authors of SpeculativeCoder provided pure source code without many automated update operations, which led to a bad initial experience for us and many people giving up. In order to avoid this situation from happening again, I decided to package all the tedious configuration work into batch executable program. Of course, I still provide you with the all source code, but you don't need to perform complex configuration operations.
For the convenience of everyone, I have compressed the code from the GitHub repository along with the program I am currently creating and setup.bat into UnrealEngine4.27-html5-64bit-Md-WebGPU.zip,
The next steps are:
1.Preparation: Install Visual Studio 2022 and Windows SDK 22621 (if not this version, compilation errors may occur!)
2.Extract UnrealEngine4.27-html5-64bit-Md-WebGPU.zip.
3.Execute Setup.bat under the root directory inside,Run Setup.bat with a super administrator (must be super administrator! )
4.Setup.bat will wait for a period of time based on your computer configuration,After 5-10 minutes, the code in UnrealEngine4.27-html5-64bit-Md-WebGPU.zip will be updated, and the 64 bit and multi-threaded code that was modified for me has been merged.
5.After starting GenerateProjectFiles.bat, the solution project file for UE4 will be generated
6.Next, start running Engine\Platforms\HTML5\HTML5Setup.sh, which will automatically download emsdk3.1.60 and compile all third-party libraries for 32-bit and 64 bit. This process may take 4-6 hours depending on your computer's configuration
7.Open UE4.sln in the root directory using Visual Studio 2022, set UE4 as the active project in the opened solution directory, right-click on the project, select Build from the pop-up menu, and start the lengthy compilation process
8.Compile Programs
9.Create a new third person game project to start packaging. In the packaging project settings, please select the HTML5 tab, check WebAssembly 64Bit Support, check Multithreaded Support, check WebGL2 or WebGPU
10.Chrome browser is recommended and currently supports running packaged programs without adding startup parameters, as I have automatically corrected the startup environment of Chrome in EXE.
If you encounter any problems during the configuration process, please send me an email. I hope it can be helpful to you. Thank you!
My email: [email protected]

@freebirdxxc
Copy link
Author

@david1010xu
Well done! I have sent you an email and hope to receive the zip file as soon as possible. Thank you!

@david1010xu
Copy link

UnrealEngine4.27-html5-64bit-Md-WebGPU.zip has been sent to your email. If you have any questions, please leave a message in the post @freebirdxxc

@freebirdxxc
Copy link
Author

UnrealEngine4.27-html5-64bit-Md-WebGPU.zip has been sent to your email. If you have any questions, please leave a message in the post @freebirdxxc

I have received your email and it is currently undergoing a lengthy compilation process. I look forward to everything going smoothly. Thank you for your work!

@wapollo86
Copy link

I have also sent you an email. Can you send me a zip file? My job currently requires this very much, thank you! @david1010xu

@freebirdxxc
Copy link
Author

@david1010xu After a long compilation, it finally started running and the WebGPU supports great results! I also tested that it can support 15.8GB of memory in 64 bit and multi-threaded scenarios!
Thank you very much for solving my major work problem. I don't know how to give you a reward. Thank you for your hard and productive work over the past few days

@ufna
Copy link

ufna commented Jun 17, 2024

Hi @david1010xu , sent you e-mail. Sounds very interesting!

@david1010xu
Copy link

I have also sent you an email. Can you send me a zip file? My job currently requires this very much, thank you! @david1010xu

I just sent you an email, please check it, thank you!

@david1010xu
Copy link

Hi @david1010xu , sent you e-mail. Sounds very interesting!

I have been busy and have replied to your email. Thank you for your support!

@CloudyShadow
Copy link

CloudyShadow commented Jun 18, 2024

Hi @david1010xu
I also hope to have a chance to learn it. It's amazing. I have sent you an email.
My email: [email protected]

@david1010xu
Copy link

Hi @david1010xu, I also hope to have a chance to learn it. It's amazing. I have sent you an email. My email: [email protected]

The email has been sent. Thank you for following us

@david1010xu
Copy link

I have also sent you an email. Can you send me a zip file? My job currently requires this very much, thank you! @david1010xu

The email has been sent. Thank you for following us

@kevinclv
Copy link

This 64 bit is still a bit difficult, it is said that emscripten.org has not fully supported it yet

As long as some code in WebAssembly is modified, it can support 64bit very well. I have already implemented this and also achieved stable 64 bit operation under multithreading

Oh, I see. Thank you for your answer. Could you please send me your UnrealEngine 4.27-html5-64bit-Md-WebGPU.zip so that I can study and research it? Thank you very much!

@kevinclv
Copy link

@david1010xu How can I solve the following error when installing batch processing?

`E:\UnrealEngine4.27-html5-64bit-Md-WebGPU\Engine\Source\ThirdParty\PhysX3\PhysX_3.4\Source\LowLevelDynamics\src\DySolverContact4.h:103:1: error: 'PxCompileTimeAssert_Dummy' declared as an array with a negat
103 | PX_COMPILE_TIME_ASSERT(sizeof(SolverContactHeader4) == 208);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Source/ThirdParty/PhysX3/PxShared/include\foundation/PxPreprocessor.h:476:76: note: expanded from macro 'PX_COMPILE_TIME_ASSERT'
476 | #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1]
| ^~~~~~~~~~~~~~
1 error generated.
physx_bin\CMakeFiles\LowLevelDynamics.dir\build.make:210: recipe for target 'physx_bin/CMakeFiles/LowLevelDynamics.dir/d9ec3e256bcd83b85c6f932cb3fa218a/PhysX3/PhysX_3.4/Source/LowLevelDynamics/src/D.cpp.o' failed
mingw32-make.exe[2]: *** [physx_bin/CMakeFiles/LowLevelDynamics.dir/d9ec3e256bcd83b85c6f932cb3fa218a/PhysX3/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrep.cpp.o] Error 1
mingw32-make.exe[2]: Leaving directory 'E:/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Platforms/HTML5/Intermediate/3.1.60-up-mt/PhysX3/_BUILD/BUILD_O3/APEX'
CMakeFiles\Makefile2:482: recipe for target 'physx_bin/CMakeFiles/LowLevelDynamics.dir/all' failed
mingw32-make.exe[1]: *** [physx_bin/CMakeFiles/LowLevelDynamics.dir/all] Error 2
mingw32-make.exe[1]: Leaving directory 'E:/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Platforms/HTML5/Intermediate/3.1.60-up-mt/PhysX3/_BUILD/BUILD_O3/APEX'
Makefile:89: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2

  • cd ..
  • '[' 0 == 1 ']'
  • '[' 3 == z ']'
  • cd PhysX
  • find . -type f -name '*.a' -exec cp '{}' /e/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Platforms/HTML5/Build/BatchFiles/../../Source/ThirdParty/PhysX3/PhysX_3.4/lib-3.1.60-up-mt/. ';'
  • cd ../APEX
  • find . -type f -name '*.a' -exec cp '{}' /e/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Platforms/HTML5/Build/BatchFiles/../../Source/ThirdParty/PhysX3/PhysX_3.4/lib-3.1.60-up-mt/. ';'
  • '[' 0 == 1 ']'
  • cd ..
  • cd ../..
  • ls -l /e/UnrealEngine4.27-html5-64bit-Md-WebGPU/Engine/Platforms/HTML5/Build/BatchFiles/../../Source/ThirdParty/PhysX3/PhysX_3.4/lib-3.1.60-up-mt
    total 1424
    `

@freebirdxxc
Copy link
Author

@kevinclv Batch processing went smoothly on my end. Have you ever modified any code on your end? After zip decompression, do not modify anything and let it batch process on its own.

@kevinclv
Copy link

Yes, I made some modifications to the configuration myself, redone it, and now it's resolved. @freebirdxxc Thank you!

@yuxueliyuxl
Copy link

Hi, @david1010xu ,Great Work!
I have sent you an email,
Can you send me zip file, Thank You!
My Email: [email protected]

@david1010xu
Copy link

Hi, @david1010xu ,Great Work! I have sent you an email, Can you send me zip file, Thank You! My Email: [email protected]

I have already sent you an email, thank you for your attention and support!

@freebirdxxc
Copy link
Author

I will now share the performance of HTML5 in the packaged UE5.3 project.
Select the Hillside architectural visualization project in the Unreal Mall and create a new project for UE5.3 version. After the project is opened, use the downgrade tool to downgrade it to UE4.27 version and then merge it into the BattleRoyalIsland project. Finally, package the project as an HTML5 version using tools that support WebGPU through UE4.27.
screenshot11
screenshot22
screenshot33

@ranxie604
Copy link

Hi @freebirdxxc @david1010xu
Great work!
this is what I need. I have been trying to solve the thread problem under wasm64 bit, but unfortunately I have never succeeded. Can you send me a package? Looking forward to your reply, thank you so much.
My email is [email protected]

@LiuYanHong1993
Copy link

Hi @david1010xu ,sent you e-mail. This looks pretty interesting!

@freebirdxxc
Copy link
Author

Hi @david1010xu,
Thank you very much for the help you provided me before. Do you have the latest version? Can UnrealEngine 5 be supported? We are currently in great need of version 5.4.

@david1010xu
Copy link

I am currently debugging the functionality of UnrealEngine 5.4 to port HTML5 WebGPU, and I can share it with everyone soon. @freebirdxxc

@warvstar
Copy link

warvstar commented Jul 9, 2024

For those who need 5.4 support today with WebGPU, multi threading, SIMD and memory64. Check out SimplyStream, we now have an always free tier. We also have so much more than just WebGPU, like an automatic project optimizer, free hosting, webm playback, binary optimizations that can trim the size of your project to under 7mb compressed. There are many components that go into making large graphically rich unreal experiences in the browser possible and webgpu is just one part of that.

Here's a recent post in unreal slackers
https://discord.com/channels/187217643009212416/375022315391549442/1260054870535176232

Register for the platform extension plugin here https://simplystream.com/preview?product=ue5.4-plugin-preview

We're looking forward to your feedback, if you run into any bugs please send an email to [email protected]

@david1010xu
Copy link

The multiple links you provided either cannot be registered, invited, or accessed.

For those who need 5.4 support today with WebGPU, multi threading, SIMD and memory64. Check out SimplyStream, we now have an always free tier. We also have so much more than just WebGPU, like an automatic project optimizer, free hosting, webm playback, binary optimizations that can trim the size of your project to under 7mb compressed. There are many components that go into making large graphically rich unreal experiences in the browser possible and webgpu is just one part of that.

Here's a recent post in unreal slackers https://discord.com/channels/187217643009212416/375022315391549442/1260054870535176232

Register for the platform extension plugin here https://simplystream.com/preview?product=ue5.4-plugin-preview

We're looking forward to your feedback, if you run into any bugs please send an email to [email protected]

Unable to access the link you provided!The multiple links you provided either cannot be registered, invited, or accessed!!!

@astlouis44
Copy link

astlouis44 commented Jul 11, 2024

@david1010xu Those links should work fine, perhaps there is geo-blocking happening if you are in a certain region..?

For anyone interested, to follow up @warvstar's post, our team has worked hard to build a complete platform for deploying compute-intensive applications to the web, and we're excited to hear everyone's feedback. Below is a link to the UE5 Lyra sample project running in the browser.

Twitter: https://x.com/AlexStLouis10/status/1810514325632659742

Lyra demo: https://lyra.tiwsamples.com/

@warvstar
Copy link

The multiple links you provided either cannot be registered, invited, or accessed.

For those who need 5.4 support today with WebGPU, multi threading, SIMD and memory64. Check out SimplyStream, we now have an always free tier. We also have so much more than just WebGPU, like an automatic project optimizer, free hosting, webm playback, binary optimizations that can trim the size of your project to under 7mb compressed. There are many components that go into making large graphically rich unreal experiences in the browser possible and webgpu is just one part of that.

Here's a recent post in unreal slackers https://discord.com/channels/187217643009212416/375022315391549442/1260054870535176232

Register for the platform extension plugin here https://simplystream.com/preview?product=ue5.4-plugin-preview

We're looking forward to your feedback, if you run into any bugs please send an email to [email protected]

Unable to access the link you provided!The multiple links you provided either cannot be registered, invited, or accessed!!!

Are you behind a corporate firewall? If you have an actual error message you can provide, I'll do my best to help you out. I do see your email is registered for the preview already, so you should receive an email in the next few days.

@ollyestn
Copy link

Hi, @david1010xu ,Great Work!
I have sent you an email also
Can you send me zip file, Thank You!
My Email: [email protected]

@yuxueliyuxl
Copy link

For those who need 5.4 support today with WebGPU, multi threading, SIMD and memory64. Check out SimplyStream, we now have an always free tier. We also have so much more than just WebGPU, like an automatic project optimizer, free hosting, webm playback, binary optimizations that can trim the size of your project to under 7mb compressed. There are many components that go into making large graphically rich unreal experiences in the browser possible and webgpu is just one part of that.

Here's a recent post in unreal slackers https://discord.com/channels/187217643009212416/375022315391549442/1260054870535176232

Register for the platform extension plugin here https://simplystream.com/preview?product=ue5.4-plugin-preview

We're looking forward to your feedback, if you run into any bugs please send an email to [email protected]

@warvstar ,Looking forward to it, when can it be released?

@ollyestn
Copy link

How to make https://github.com/SpeculativeCoder/UnrealEngine-HTML5-ES3 Support WebAssembly 64 bit? And run normally under multithreading. I forgot my password for my previous Github account and registered a new one, but I am unable to access the Github. com/SpeculativeCoder/repository (my previous account was fine, but the new one is not). So, I can only send the question here. Please ask experts who are proficient in this area to provide answers. Thank you! Regarding 64 bit and multithreading, it is currently a major bottleneck that restricts us from using UE to package HTML5. We have been studying it for a long time, but we have not been able to find a good solution.

hi, would you like to send me the zip file to me? my email: [email protected]. thank you!

@AlexanderSky23
Copy link

Hi @david1010xu, sent you e-mail. Sounds very interesting!

@david1010xu
Copy link

@AlexanderSky23 , I have already replied to your email, nice to meet you!

@crimsonstrife
Copy link

Your problem has also troubled me for a long time. After several months of unremitting efforts, I have solved the two problems you mentioned and also supported the WebGPU interface. Currently, I am porting code to UE5.4 and believe it will be completed soon. UE4.27.2 packaging HTML5 now fully supports WebAssembly 64 bit and runs very stably under multithreading. I have supported both WebGL2 and WebGPU. 1.WebAssembly 64 bit, which allows packaged HTML5 programs to break through the limitations of browser 4G. It can support up to 16GB of memory access, which is sufficient for browser programs. 2.The management of Wasm in multithreading is relatively complex. To save space, I won't go into too much detail here. I have written the code as a batch executable program. 3.Regarding the support for WebGPU, it is currently possible to achieve the normal operation of various shaders in SM5, and the running effect is almost the same as the packaged Windows version This Setup program contains the diff file of the source code and hundreds of related modified .h/.cpp files. At the same time, I also included some of the 64bit compiled code in this batch executable program. We encountered many problems in the process of researching UE packaging HTML5, and the reason is actually that the authors of SpeculativeCoder provided pure source code without many automated update operations, which led to a bad initial experience for us and many people giving up. In order to avoid this situation from happening again, I decided to package all the tedious configuration work into batch executable program. Of course, I still provide you with the all source code, but you don't need to perform complex configuration operations. For the convenience of everyone, I have compressed the code from the GitHub repository along with the program I am currently creating and setup.bat into UnrealEngine4.27-html5-64bit-Md-WebGPU.zip, The next steps are: 1.Preparation: Install Visual Studio 2022 and Windows SDK 22621 (if not this version, compilation errors may occur!) 2.Extract UnrealEngine4.27-html5-64bit-Md-WebGPU.zip. 3.Execute Setup.bat under the root directory inside,Run Setup.bat with a super administrator (must be super administrator! ) 4.Setup.bat will wait for a period of time based on your computer configuration,After 5-10 minutes, the code in UnrealEngine4.27-html5-64bit-Md-WebGPU.zip will be updated, and the 64 bit and multi-threaded code that was modified for me has been merged. 5.After starting GenerateProjectFiles.bat, the solution project file for UE4 will be generated 6.Next, start running Engine\Platforms\HTML5\HTML5Setup.sh, which will automatically download emsdk3.1.60 and compile all third-party libraries for 32-bit and 64 bit. This process may take 4-6 hours depending on your computer's configuration 7.Open UE4.sln in the root directory using Visual Studio 2022, set UE4 as the active project in the opened solution directory, right-click on the project, select Build from the pop-up menu, and start the lengthy compilation process 8.Compile Programs 9.Create a new third person game project to start packaging. In the packaging project settings, please select the HTML5 tab, check WebAssembly 64Bit Support, check Multithreaded Support, check WebGL2 or WebGPU 10.Chrome browser is recommended and currently supports running packaged programs without adding startup parameters, as I have automatically corrected the startup environment of Chrome in EXE. If you encounter any problems during the configuration process, please send me an email. I hope it can be helpful to you. Thank you! My email: [email protected]

Can I get that zip file please?
email: [email protected]

Thanks!

@bugcrusher07
Copy link

@david1010xu Sent you the email.
myEmail - [email protected]

@9000miles
Copy link

@david1010xu Can you send me a copy? I have already sent an email to you. [email protected]

@david1010xu
Copy link

@crimsonstrife @9000miles @bugcrusher07 I have received your email. I have been busy with the project recently and have not had time to reply to it. I apologize.
Additionally, I am finalizing the web GPU version of UnrealEngine 5.4, please stay tuned.

@bugcrusher07
Copy link

bugcrusher07 commented Sep 1, 2024 via email

@Oooocean
Copy link

Oooocean commented Sep 9, 2024

@david1010xu Sent you the email. My mail: [email protected]
Thank you for what you do, it's amazing!

@catdoc
Copy link

catdoc commented Sep 9, 2024

@david1010xu Sent you the email. My email: [email protected]. Thank you very much for your help!

@susu506
Copy link

susu506 commented Sep 26, 2024

@david1010xu I'm interested in your work. Can you send me a copy? My email: [email protected]

@UnrealXu
Copy link

Hi @david1010xu @freebirdxxc I want to get a compressed package for more in-depth research.Thank you, my email is [email protected]

@SIJEYUSES
Copy link

@david1010xu I hope I can learn from you and do further research. Thank you. My email is [email protected]

@vhenwie
Copy link

vhenwie commented Nov 19, 2024

Hello @david1010xu I had sent an email requesting access. Thank you for all the hard work! I'm excited to see more progress on this, the current webgl2 doesn't support compute shaders, webgpu would definitely even the field.

@vhenwie
Copy link

vhenwie commented Nov 22, 2024

Your problem has also troubled me for a long time. After several months of unremitting efforts, I have solved the two problems you mentioned and also supported the WebGPU interface. Currently, I am porting code to UE5.4 and believe it will be completed soon. UE4.27.2 packaging HTML5 now fully supports WebAssembly 64 bit and runs very stably under multithreading. I have supported both WebGL2 and WebGPU. 1.WebAssembly 64 bit, which allows packaged HTML5 programs to break through the limitations of browser 4G. It can support up to 16GB of memory access, which is sufficient for browser programs. 2.The management of Wasm in multithreading is relatively complex. To save space, I won't go into too much detail here. I have written the code as a batch executable program. 3.Regarding the support for WebGPU, it is currently possible to achieve the normal operation of various shaders in SM5, and the running effect is almost the same as the packaged Windows version This Setup program contains the diff file of the source code and hundreds of related modified .h/.cpp files. At the same time, I also included some of the 64bit compiled code in this batch executable program. We encountered many problems in the process of researching UE packaging HTML5, and the reason is actually that the authors of SpeculativeCoder provided pure source code without many automated update operations, which led to a bad initial experience for us and many people giving up. In order to avoid this situation from happening again, I decided to package all the tedious configuration work into batch executable program. Of course, I still provide you with the all source code, but you don't need to perform complex configuration operations. For the convenience of everyone, I have compressed the code from the GitHub repository along with the program I am currently creating and setup.bat into UnrealEngine4.27-html5-64bit-Md-WebGPU.zip, The next steps are: 1.Preparation: Install Visual Studio 2022 and Windows SDK 22621 (if not this version, compilation errors may occur!) 2.Extract UnrealEngine4.27-html5-64bit-Md-WebGPU.zip. 3.Execute Setup.bat under the root directory inside,Run Setup.bat with a super administrator (must be super administrator! ) 4.Setup.bat will wait for a period of time based on your computer configuration,After 5-10 minutes, the code in UnrealEngine4.27-html5-64bit-Md-WebGPU.zip will be updated, and the 64 bit and multi-threaded code that was modified for me has been merged. 5.After starting GenerateProjectFiles.bat, the solution project file for UE4 will be generated 6.Next, start running Engine\Platforms\HTML5\HTML5Setup.sh, which will automatically download emsdk3.1.60 and compile all third-party libraries for 32-bit and 64 bit. This process may take 4-6 hours depending on your computer's configuration 7.Open UE4.sln in the root directory using Visual Studio 2022, set UE4 as the active project in the opened solution directory, right-click on the project, select Build from the pop-up menu, and start the lengthy compilation process 8.Compile Programs 9.Create a new third person game project to start packaging. In the packaging project settings, please select the HTML5 tab, check WebAssembly 64Bit Support, check Multithreaded Support, check WebGL2 or WebGPU 10.Chrome browser is recommended and currently supports running packaged programs without adding startup parameters, as I have automatically corrected the startup environment of Chrome in EXE. If you encounter any problems during the configuration process, please send me an email. I hope it can be helpful to you. Thank you! My email: [email protected]

Is there any chance of this to be upstreamed like SpeculativeCoder's fork? Also, was the PhysX source also patched during build? I tried compiling SpeculativeCoder's fork with wasm64, went ok on my end but when it came to packaging a test project, I've seen PhysX issues.

@alingkumo
Copy link

Your problem has also troubled me for a long time. After several months of unremitting efforts, I have solved the two problems you mentioned and also supported the WebGPU interface. Currently, I am porting code to UE5.4 and believe it will be completed soon. UE4.27.2 packaging HTML5 now fully supports WebAssembly 64 bit and runs very stably under multithreading. I have supported both WebGL2 and WebGPU. 1.WebAssembly 64 bit, which allows packaged HTML5 programs to break through the limitations of browser 4G. It can support up to 16GB of memory access, which is sufficient for browser programs. 2.The management of Wasm in multithreading is relatively complex. To save space, I won't go into too much detail here. I have written the code as a batch executable program. 3.Regarding the support for WebGPU, it is currently possible to achieve the normal operation of various shaders in SM5, and the running effect is almost the same as the packaged Windows version This Setup program contains the diff file of the source code and hundreds of related modified .h/.cpp files. At the same time, I also included some of the 64bit compiled code in this batch executable program. We encountered many problems in the process of researching UE packaging HTML5, and the reason is actually that the authors of SpeculativeCoder provided pure source code without many automated update operations, which led to a bad initial experience for us and many people giving up. In order to avoid this situation from happening again, I decided to package all the tedious configuration work into batch executable program. Of course, I still provide you with the all source code, but you don't need to perform complex configuration operations. For the convenience of everyone, I have compressed the code from the GitHub repository along with the program I am currently creating and setup.bat into UnrealEngine4.27-html5-64bit-Md-WebGPU.zip, The next steps are: 1.Preparation: Install Visual Studio 2022 and Windows SDK 22621 (if not this version, compilation errors may occur!) 2.Extract UnrealEngine4.27-html5-64bit-Md-WebGPU.zip. 3.Execute Setup.bat under the root directory inside,Run Setup.bat with a super administrator (must be super administrator! ) 4.Setup.bat will wait for a period of time based on your computer configuration,After 5-10 minutes, the code in UnrealEngine4.27-html5-64bit-Md-WebGPU.zip will be updated, and the 64 bit and multi-threaded code that was modified for me has been merged. 5.After starting GenerateProjectFiles.bat, the solution project file for UE4 will be generated 6.Next, start running Engine\Platforms\HTML5\HTML5Setup.sh, which will automatically download emsdk3.1.60 and compile all third-party libraries for 32-bit and 64 bit. This process may take 4-6 hours depending on your computer's configuration 7.Open UE4.sln in the root directory using Visual Studio 2022, set UE4 as the active project in the opened solution directory, right-click on the project, select Build from the pop-up menu, and start the lengthy compilation process 8.Compile Programs 9.Create a new third person game project to start packaging. In the packaging project settings, please select the HTML5 tab, check WebAssembly 64Bit Support, check Multithreaded Support, check WebGL2 or WebGPU 10.Chrome browser is recommended and currently supports running packaged programs without adding startup parameters, as I have automatically corrected the startup environment of Chrome in EXE. If you encounter any problems during the configuration process, please send me an email. I hope it can be helpful to you. Thank you! My email: [email protected]

Sent you the email. My email is [email protected]. Thank you!

@david1010xu
Copy link

I have received and read everyone's emails, which have kept you waiting for a long time. Next, I will take some time to send emails to everyone one by one. Thank you for your attention to my work.

@wenlong125
Copy link

Hope to receive the zip file as soon as possible. Thank you!

@ufna
Copy link

ufna commented Dec 24, 2024

@david1010xu we're working on https://wardawgs.io , I'll be glad to test WebGPU for our case, as we're also moving to support multithreading :)

@MercySmile
Copy link

@david1010xu
I sent you an email and what you are saying sounds great,I would like to get the zip file you are talking about,thank you very much. My email: [email protected]

@Hawkpool
Copy link

@david1010xu Can you send me a zip file? This looks very interesting, thank you! My email: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests