Download

[Free][Open Source] Plugin for loading meshes and textures during runtime

Hello everyone,

I recently implemented a plugin for loading 3D-meshes during runtime as well as the corresponding textures for my game. It is built upon the RuntimeMeshLoader plugin, which, however, seems to be abandoned and does not work anymore with current Unreal Engine versions. Therefore, I thought, the community might be interested in such a plugin as well.

It is open-source and free under the MIT-license and includes an example map introducing the inteded use of it.

It relies on the Assimp version 5 tool for most of the import stuff.

Let me know if you are interested in it and, if yes, how you like it. If interest is high, I might consider publishing it as a free Plugin in the Unreal Marketplace.

Download: https://github.com/Chrizey91/RuntimeMeshLoader

Greetings

Update:
Now also tested for UE5 (Early Access)!!

5 Likes

Hi Thanks for the continuing this plugin… i’m using UE4.26 unfortunately when copy to this version it would not compile… error say… engine modules cannot be compiled at runtime please build through your IDE

That’s not a problem with the plugin. It sounds like you don’t have a compiler set up

what that even mean?.. i only do 3D visual dont have programing background

i’m gonna try this

getting this error…
C:\UNREAL\Epic Games\UE_4.26\Engine\Build\BatchFiles>RunUAT.bat BuildPlugin -plugin=“C:\DEV\RuntimeMeshLoader\RuntimeMeshLoader.uplugin” -package=“C:\DEV\RuntimeMeshLoader426”
Running AutomationTool…
Parsing command line: BuildPlugin -plugin=C:\DEV\RuntimeMeshLoader\RuntimeMeshLoader.uplugin -package=C:\DEV\RuntimeMeshLoader426
Copying 127 file(s) using max 64 thread(s)
Reading plugin from C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\RuntimeMeshLoader.uplugin…
Building plugin for host platforms: Win64
Running: C:\UNREAL\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Editor Win64 Development -Project=C:\DEV\RuntimeMeshLoader426\HostProject\HostProject.uproject -plugin=C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\RuntimeMeshLoader.uplugin -iwyu -noubtmakefiles -manifest=C:\DEV\RuntimeMeshLoader426\HostProject\Saved\Manifest-UE4Editor-Win64-Development.xml -nohotreload -log=“C:\Users\jack\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UNREAL+Epic+Games+UE_4.26\UBT-UE4Editor-Win64-Development.txt”
Parsing headers for UE4Editor
Running UnrealHeaderTool “C:\DEV\RuntimeMeshLoader426\HostProject\HostProject.uproject” “C:\DEV\RuntimeMeshLoader426\HostProject\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\jack\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UNREAL+Epic+Games+UE_4.26\UHT-UE4Editor-Win64-Development.txt” -installed
Reflection code generated for UE4Editor in 21.8229745 seconds
Writing manifest to C:\DEV\RuntimeMeshLoader426\HostProject\Saved\Manifest-UE4Editor-Win64-Development.xml
Building UE4Editor…
Using Visual Studio 2019 14.28.29915 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Building 7 actions with 12 processes…
[1/7] Default.rc2
[2/7] SharedPCH.Engine.ShadowErrors.cpp
[3/7] Module.RuntimeMeshLoader.gen.cpp
[4/7] Module.RuntimeMeshLoader.cpp
[5/7] UE4Editor-RuntimeMeshLoader.lib
Creating library C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\Intermediate\Build\Win64\UE4Editor\Development\RuntimeMeshLoader\UE4Editor-RuntimeMeshLoader.lib and object C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\Intermediate\Build\Win64\UE4Editor\Development\RuntimeMeshLoader\UE4Editor-RuntimeMeshLoader.exp
[6/7] UE4Editor-RuntimeMeshLoader.dll
Creating library C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\Intermediate\Build\Win64\UE4Editor\Development\RuntimeMeshLoader\UE4Editor-RuntimeMeshLoader.suppressed.lib and object C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\Intermediate\Build\Win64\UE4Editor\Development\RuntimeMeshLoader\UE4Editor-RuntimeMeshLoader.suppressed.exp
[7/7] UE4Editor.target
Total time in Parallel executor: 30.50 seconds
Total execution time: 106.83 seconds
Took 106.9446387s to run UnrealBuildTool.exe, ExitCode=0
Building plugin for target platforms: Android, IOS, Win64, Win32
Running: C:\UNREAL\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Android Development -Project=C:\DEV\RuntimeMeshLoader426\HostProject\HostProject.uproject -plugin=C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\RuntimeMeshLoader.uplugin -iwyu -noubtmakefiles -manifest=C:\DEV\RuntimeMeshLoader426\HostProject\Saved\Manifest-UE4Game-Android-Development.xml -nohotreload -architectures=armv7+arm64 -2017 -log=“C:\Users\jack\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UNREAL+Epic+Games+UE_4.26\UBT-UE4Game-Android-Development.txt”
ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
Took 0.3485869s to run UnrealBuildTool.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\Users\jack\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UNREAL+Epic+Games+UE_4.26\UBT-UE4Game-Android-Development.txt)
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED

UBT-UE4Game-Android-Development.txt below…

AndroidPlatformFactory.RegisterBuildPlatforms: UnrealBuildTool.AndroidPlatformSDK has no valid SDK
IOSPlatformFactory.RegisterBuildPlatforms: UnrealBuildTool.IOSPlatformSDK using manually installed SDK
WindowsPlatformFactory.RegisterBuildPlatforms: UnrealBuildTool.WindowsPlatformSDK using manually installed SDK
BuildMode.Execute: Command line: “C:\UNREAL\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe” UE4Game Android Development -Project=C:\DEV\RuntimeMeshLoader426\HostProject\HostProject.uproject -plugin=C:\DEV\RuntimeMeshLoader426\HostProject\Plugins\RuntimeMeshLoader\RuntimeMeshLoader.uplugin -iwyu -noubtmakefiles -manifest=C:\DEV\RuntimeMeshLoader426\HostProject\Saved\Manifest-UE4Game-Android-Development.xml -nohotreload -architectures=armv7+arm64 -2017 -log=“C:\Users\jack\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UNREAL+Epic+Games+UE_4.26\UBT-UE4Game-Android-Development.txt”
UnrealBuildTool.Main: ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
UnrealBuildTool.Main: BuildException: Platform Android is not a valid platform to build. Check that the SDK is installed properly.
UnrealBuildTool.Main: at UnrealBuildTool.UEBuildTarget.Create(TargetDescriptor Descriptor, Boolean bSkipRulesCompile, Boolean bUsePrecompiled) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 693
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 598
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, Boolean bSkipPreBuildTargets) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 257
UnrealBuildTool.Main: at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 226
UnrealBuildTool.Main: at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 550
Timeline.Print: Timeline:
Timeline.Print:
Timeline.Print: [ 0.000]
Timeline.Print: 0.019 FileMetadataPrefetch.QueueEngineDirectory()
Timeline.Print: 0.023 XmlConfig.ReadConfigFiles()
Timeline.Print: 0.160 SingleInstanceMutex.Acquire()
Timeline.Print: 0.160 UEBuildPlatform.RegisterPlatforms()
Timeline.Print: 0.161 0.001 Initializing InstalledPlatformInfo
Timeline.Print: 0.199 0.039 Querying types
Timeline.Print: 0.201 0.041 MacPlatformFactory
Timeline.Print: 0.203 0.043 TVOSPlatformFactory
Timeline.Print: 0.204 0.043 AndroidPlatformFactory
Timeline.Print: 0.220 0.060 HoloLensPlatformFactory
Timeline.Print: 0.220 0.060 IOSPlatformFactory
Timeline.Print: 0.224 0.064 LinuxPlatformFactory
Timeline.Print: 0.225 0.064 LuminPlatformFactory
Timeline.Print: 0.225 0.065 WindowsPlatformFactory
Timeline.Print: 0.232 TargetDescriptor.ParseCommandLine()
Timeline.Print: 0.250 UEBuildTarget.Create()
Timeline.Print: 0.254
Timeline.Print: 0.286 FileMetadataPrefetch.Stop()
Timeline.Print: [ 0.289]

Hi @jackkhor ,
am I right to assume you are trying to compile your game with the RuntimeMeshLoader-Plugin for Android?

If that is the case, I, unfortunately, have to inform you, that this is currently not supported. For now, Windows 64Bit is the only supported platform.

I want to add Android (and Mac and Linux) in the future, but right now, this is not a priority, sorry. :frowning:

Greetings

Hi @Chrisss50
your github version is UE4.25 i’m trying to recompile to UE4.26 but i dont know how

Hi @jackkhor ,
as I mentioned earlier, based on you provided error-message, you seem to try building for Android!

This is currently not supported.

Greetings

Hi @Chrisss50
i’m NOT trying to built for android, im trying to compile the plugin to be used in UE4.26 could u guide me how to compile the plugin?

the log file above is from this…
RunUAT.bat BuildPlugin -plugin=“C:\DEV\RuntimeMeshLoader\RuntimeMeshLoader.uplugin” -package=“C:\DEV\RuntimeMeshLoader426”
following this youtube tutorial

Hi @jackkhor ,
I was finally able to reproduce your problem, which seemingly only appears with version 4.26. Building with UE 5 worked fine.

However, I fixed it now, so if you simply re-download from GitHub, you should be able to build the plugin now for UE 4.26 as well.

Let me know if it works for you.

Greetings

1 Like

Hi @Chrisss50 ,
I’m trying out the plugin under Ubuntu 20, with UE 4.26. After some minor changes to the Build.cs to build for linux and adding libassimp.so, I managed to compile and run it successfully.

The demo level requires to fix some BP.
However, RML_PlayerController uses a Toggle Menu function that I can’t find.
Nevertheless, setting up a separate level and using the example as guide, it was quite easy to load meshes into the scene.

There’s still a few things I need to check and fix, but I thought it could be useful to know it seems to work fine with Ubuntu 20 and UE 4.26 without too much effort.

Hi @cconti-rr ,
this is in fact exciting!
Would it be possible to tell me what exactly what you had to change in the Blueprints to make it work under Linux? Under Windows no changes in the Blueprint are necessary!
The ToggleMenu-function is defined in RML_UserWidget.

If possible I would be happy to accept any Pull-Requests regarding the libassimp.so and the necessary changes (probably the .Target.cs-file) to the source-files. :slight_smile:

Greetings

Hi @Chrisss50 ,

sorry for not getting back at you earlier.
Please see the PR.

I can also confirm that for me it works with UE 4.27 (on Ubuntu 20) as well.

any one can help?

Hi @DieAlshoja3, could you specify what exactly it is you need help with?

Greetings

Hi @cconti-rr, this is very much appreciated!
I tested your PR with Windows and everything still works fine. Hence, I accepted your PR. :slight_smile:

Greetings


This hapen when i try to install assassins creed from epic games

Hey @DieAlshoja3,
this thread is only about the RuntimeMeshLoader plugin for Unreal Engine. If you have general problems with the Epic Games Store, please contact Epic Games directly.

Thanks