TinyLabGo - Simple Mesh Widget

Video Tutorials: https://youtu.be/CzjDl0cq6D0 (For any questions, feel free to leave a comment below. I'm always happy to help!)

The Simple Mesh Widget plugin is a lightweight and efficient solution for rendering StaticMesh, SkeletalMesh, and Blueprints containing StaticMeshComponent or SkeletalMeshComponent directly into UI. Designed for simplicity and performance, this plugin allows you to seamlessly integrate 3D models into your UI without the need for SceneCapture or complex render targets.

Key Features:

  • Render StaticMesh and SkeletalMesh in UI: Easily render static and skeletal meshes directly into UI, perfect for inventory systems, character previews, and more.

  • Blueprint Support: Render Blueprints that include StaticMeshComponent or SkeletalMeshComponent directly in your UI.

  • Lightweight and Efficient: Avoid the performance overhead of SceneCapture or render targets, ensuring smooth integration into your project.

Limitations:

  • Material Type Restriction: Only UserInterface material types are supported due to Slate UI Widget rendering.

  • Mesh Complexity Restriction: Since UserInterface materials lack depth information, the plugin performs CPU-side triangle culling and sorting. As a result, meshes with highly complex or internal intersecting triangles may not render correctly.

Usage:

  1. Add Simple Mesh Widget to UI

    • Drag and drop a Simple Mesh Widget from the palette into your UI Designer. This creates a widget that can render 3D meshes within the UI.

  2. Select Mesh Resource

    • Choose a StaticMesh, SkeletalMesh, or a Blueprint containing a StaticMeshComponent or SkeletalMeshComponent.

    • Ensure the AllowCPUAccess property of the mesh is set to true. This is required for the plugin to access and render the mesh in the UI.

    • Assign the selected resource to the ResourceObject property.

  3. Set User Interface Materials

    • Assign User Interface materials to the Materials property for each material slot of the mesh. This ensures the mesh is rendered correctly within the UI context.

  4. Adjust World Position and Rotation

    • Use the World Position Root Transform to adjust the mesh's position and rotation in 3D camera space.

      • The camera is assumed to be at (0, 0, 0) and facing (1, 0, 0).

      • For orthographic projection, typically only adjust the Rotation.

      • For perspective projection, adjust the Location (especially the X-axis) to position the mesh correctly.

  5. Control Mesh Pivot and Render Size

    • Use the Mesh Pivot and Mesh Render Size properties to fine-tune the mesh's position and scale within the widget.

    • Click the FitMeshToWidget button to automatically calculate an initial size and position that fits the mesh within the widget.

Demo path: WidgetBlueprint'/SimpleMeshWidget/Demo/DemoUI.DemoUI'

Important Note:

  • Ensure the AllowCPUAccess property of the mesh is enabled (true) in the mesh settings. This is necessary for the plugin to access the mesh data and render it in the UI.

Hi, I bought this plugin, How can I create dynamic SimpleMeshWidget at runtime? I try it, but it didn’t work, I used a Character Blueprint as “Resources Ojbect “

Sorry for the slow response, the fab forum notification wasn’t very obvious.

When Unreal Engine packages the game, blueprints only retain their GeneratedClass during runtime, not the Blueprint asset itself. In the Designer, when you set a Blueprint as the ResourceObject, it actually references the GeneratedClass. The current runtime SetResourceObject logic doesn’t handle this case properly, which is why it’s not working.

For the current version, if you need to create dynamic SimpleMeshWidget at runtime, you can directly use your character’s UStaticMesh or USkeletalMesh assets as the Resource Object instead of the Blueprint. And you can set up animations through the SetSkeletalAnimation function in SimpleMeshWidget.

Additionally, if you can use C++, you can call SetResourceObject by passing the Blueprint’s GeneratedClass instead of the asset itself to achieve dynamic creation.

I’ll prioritize fixing this in the upcoming update and optimize the relevant interfaces for dynamic runtime widget creation in Blueprints.

Hello, in the latest version, I’ve added a new Blueprint interface called SetResourceObjectClass. You can now call this function directly to set the Blueprint Class, which allows you to create the SimpleMeshWidget dynamically at runtime using a Blueprint as the ResourceObject.

Thanks for response, But now there is a another strange question:

The braid and the wing should be behind the model, but this display is wrong.

Below are the screenshots about display and bone hierarchy

And the discord link has been expired.

Thank you very much for your response, or maybe leave a email address, I can sent the model to you.

It’s a very awesome plugin.

I have solved the problem above.
Different materials are painted in different layers in UMG.
So I just reorder painting the materials when a model has serveral materials.
You can contact me sir if you want, and I will share my solution.

Nice day, Happy new year!

(post deleted by author)

Thanks for your feedback. Since UI elements don’t have depth, multiple materials on a mesh essentially act like separate UI layers, and their rendering order is determined by the order of the material slots. You can adjust the draw order simply by rearranging the material slots.

Also, we now have a Discord server! https://discord.gg/HvXDQCFkya

Feel free to join for quicker support and more updates on our plugins.

If you prefer, you can also reach out to us via email at e376817512@gmail.com for assistance.