Description
Import and export of static mesh data at runtime. Can be used in conjunction with ProceduralMeshComponent or RuntimeMeshComponent. Both, import and export is possible synchrounous and asynchrounous. The plugin uses Assimp library to achieve this (Assimp). Using Assimp library also means huge list of supported file formats for import as well as export.
The Plugin makes use of v5.0 of Assimp (Assimp Github). Means there is no custom build of Assimp used in the Plugin which allows you to freely create your own Assimp build or Update to a newer version.
This plugin started from RuntimeMeshLoader Github and was hugely modified, improved and added async support.
Features
- Sync and Async import and export
- Thanks to Assimp the plugin supports lots of formats
- Useable via Blueprint and C++
- Normalize the import (crunch the imported scene into 100cm cube)
- Combine meshes and/or sections on import
- Debug and Release Binaries
- Import of Material data (see below)
Media Unreal Plugin RuntimeMeshImportExport Export Teaser - YouTube
Download RuntimeMeshImportExport on Marketplace](RuntimeMeshImportExport in Code Plugins - UE Marketplace)
Material DATA Import
-Material DATA import is supported since version 1.3
- Strong dependency on exporting application, file format support and what assimp imports from the file
-Texture files are supported as separate files and embedded
- Embedded: Must be an embedded format (jpg, png, …)! Raw pixel data is not supported at the moment
- Separate: The texture must be relative to the mesh file (best case is within the same folder)
-Supported Texture formats: Everything the ImageWrapper module of Unreal supports
- PNG, JPEG, JPG, GrayscaleJPEG, BMP, ICO, EXR, ICNS
- NOTE: Yes, Unreal is able to handle TGA files, but ONLY IN EDITOR! Thus not supported with the plugin.
-Materials are only imported as parameters. You must provide a Material that accepts these parameters (#40](RuntimeMeshImportExport - Import and Export runtime created static meshes using Assimp library - #42 by AronBaron - Marketplace - Unreal Engine Forums)). A function is provided to create a loggable string representation of the imported material data.
[SPOILER]
Example output of function MaterialInfoToLogString
-------------------- MaterialInfo -------------------
Material Name: phong4
bWireframe: false
bTwoSided: false
ShadingModel: Blinn, as int: 3
BlendMode: , as int: -1
ScalarParameter
Opacity: 1.000000
Transparency: 1.000000
Reflectivity: 0.500000
VectorParameter
TextureParameter
TexDiffuse: width: 312510, height: 0, byteDescription: jpg, byteCount: 312510
TexNormal: width: 266491, height: 0, byteDescription: jpg, byteCount: 266491
-----------------------------------------------------
[/SPOILER]
- ScalarParam:
[SPOILER]
Opacity
Transparency
BumpScaling
Shininess
ShininessStrength
Reflectivity
Refraction
[/SPOILER]
- VectorParam:
[SPOILER]
Diffuse
Specular
Emissive
Transparent
Reflective
[/SPOILER]
- TextureParam:
[SPOILER]
TexDiffuse
TexSpecular
TexEmissive
TexHeight
TexNormal
TexShininess
TexOpacity
TexDisplacement
TexLightmap
TexReflection
TexBaseColor
TexNormalCamera
TexEmissive
TexMetallic
TexRoughness
TexAmbientOcclusion
[/SPOILER]
- Successful Test Object: https://free3d.com/3d-model/tooth-pa…del-81794.html (Note: OBJ-Import: NormalMap is imported as TexHeight)
Using the Plugin on a platform other than Win32/64
The plugin itself does not include any platform specific code and sticks to Unreals functions (which are multi platform). However the plugin comes only with Win32/64 binaries for Assimp.
That means you need to compile Assimp on your own and add it to the Plugin in RuntimeMeshImportExport/Source/Thirdparty/assimp/…
That also includes modifying
RuntimeMeshImportExport.uplugin
and
FRuntimeMeshImportExportModule::StartupModule() in RuntimeMeshImportExport.cpp
**to load the correct binaries.
FAQ**
[SPOILER]
Does the plugin support creation of StaticMeshes from the imported data?
-No, and there is no intention of trying to add that functionality.
Can we Import Animations/SkeletalMeshes?
-No, and there is no intention of trying to add that functionality. Though Assimp supports that, if tyou want to implement it on your own.
Will you add support for other platforms than Win32/64?
-No, and there is no itention to do that.
[/SPOILER]
Changes
[SPOILER]
Version 1.11
-Import parameters were collapsed into a structure for easier handling
-Import parameters now contain mesh Post Process flags for assimp
-Converted a crash to a log: Import of faces with less then 3 indices
Version 1.10
-Export is now possible with no VertexColor (interface function GetMeshData). In that case the plugin will set all vertex colors to white.
Version 1.9
-Fixed transform of ImportScene node was not applied to the imported scene
-Fixed seperate texture files for material data import did not support unicode characters
Version 1.8
-Fixed up transform mess that was created with update 1.6
Version 1.7
-Changed how Normals are treated regarding scaling. Previously these were not affected, now they seem to fit.
-When using negative scale on the object on import, triangle winding order is flipped for 1 and 3 negative values (x,y,z). This will prevent inside out models.
-TexAmbient (TextureParameter) and Ambient (VectorParameter) are not imported for materials anymore as they seem to be a duplicate of TexDiffuse/Diffuse.
Version 1.6
-Changed progress update. Instead of a string, an enum and the progress numbers are returned. This allows for custom text that can also be translated as part of the application.
-Async import now also returnes progress
-Progress is expanded to contain progress of Assimp import and export process.
Version 1.5
-Fixed weird crash with name given to the DynamicMaterial create from MaterialData
Version 1.4
-Fixed Vector parameter import not working for MaterialData import
Version 1.3
-Added support for MaterialData on import
Version 1.2
-Fixed: Export can’t create directory trees
Version 1.1
-Refactored the import result. Instead of returning a mess, meshes are now seperated, return their name and their material sections. Each material section now also contains its material name.
-ImportMethode is now split up into Mesh and Section
-Mesh: Keep, Merge
-Section: Keep, Merge, MergeSameMaterial
-Some smaller code cleanups (API did change a bit)
Version 1.0
-Release
[/SPOILER]
Examples