LGUI (Lex GUI) - True 3D UI System, Event Framework, Prefab Workflow, Tween Animation

Found 2 problems:

1: UISprite does not show custom UIMaterials correctly, they appear stretched out in UE renderer and just black in LGUI renderer.
2: UITexture actor created from blueprint shows no material at all but does when created manually (but still looks weird). This is probably a problem in your mesh code. The UVs or Normals are wrong.

They do this in containers (tried in both scrollview and grid)

Also it would be great if drag/drop were included in the actual plugin rather than in the sample level.

Hi,

I’ve noticed that If I make a change to Blur Strength during play in editor that messes up the blur effect of the UBackgroundBlurActor. Basically the blur will disappear and a normal clean unblurred image is shown instead. Why that?

Looks like the parameter doesn’t go through the MakeRenderStateDirty and therefore is not passed from the component to the render proxy, am I correct? I really would like for the blur strength to be changed dynamically even during PIE and ses the blur effect change in real time.

Thanks in advance

Side note:

I traked down the issue and I found out that as soon as I make variate Blur Strength during PIE,
the method OnRenderPostProcess_RenderThread will not be called anymore! So no blur will be applied.

Further analysis revelead that everytime you make a change to Blur Strength during PIE LGUI will call RemoveFromLGUIRenderer() (it calls the OnUnregister method that contains that call) on the post process component thereby removing it from the list of the hudPrimitives array that get rendered from the LGUIRenderer that’s why the blur will not render anymore.
Is it this intented to work like this? To me it seems a bug. I could try to fix it overriding the OnUnregister to let the background blur ro have and empty OnUnregister version of the virtual method but I’m not sure that it will be the correct solution. The call stack doesn’t tell me who call the OnUnregister. The only thing I know is it gets called as soon as I change the value of Blur Strength in the details panel of the backgroundblur actor in editor.

Can you provide the crash log please?

  1. UISprite is the type that render an small area of a big atlas texture, so the uv value is not full range 0-1.
  2. Default UI element won’t have normal and tangent, so material that affect by lighting will show wrong, but you can check the AdditionalShaderChannel property in LGUICanvas, so normal and tangent will fill in generated mesh.

I just tryed what you said, you are right it is a bug. You can change some code to fix it:
Find Core/ActorComponent/UIPostProcessRenderable.cpp, in the OnUnregister function change it like this:

void UUIPostProcessRenderable::OnUnregister()
{
	Super::OnUnregister();
	if (RenderCanvas.IsValid() && drawcall.IsValid())
	{
		RenderCanvas->RemoveUIRenderable(this);
	}
}

That should fix it.
Thanks for your feedback!

Thanks for your prompt response. I’ve tried your fix and it doesn’t work anyway, the problem persists.

This is the original code:

void UUIPostProcessRenderable::OnUnregister()
{
Super::OnUnregister();
if (RenderProxy.IsValid())
{
RenderProxy->RemoveFromLGUIRenderer();
}
}

sorry my mistake. I forgot to replace RemoveFromLGUIRenderer(); with RemoveUIRenderable().

Your fix works perfectly!

Thanks for the help!

I ended up using a different solution. I can create my own actor and use AttachActorToComponent on a ui element and it works great.

Great project!! It is necessary and everyone should be using this in their game (especially if it is VR). I can’t imagine why Epic didn’t implement this strategy earlier. Slate/UMG was extremely outdated many versions ago. Good for you though, capitalizing on it!!

I’m trying to use LGUI to make a curved UI, similar to how you can set Geometry Mode to Cylinder on a Widget Component in UE4 UMG. Can you do this in LGUI? If so how can you do it and have it apply that curved angle all of the the children UI elements?

Sorry, LGUI haven’t implement curved UI for now.
But I won’t say it’s not possible, because LGUI have a render mode that can render UI into a RenderTarget, that RenderTarget can use as a texture and assign to a geometry (Just like UMG in 3d widget), so the missing part would be an interaction component, which is not present.
I will mark it as a feature for futher update.

When I try to package my project or play standalone I get errors and a crash.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000cc8

UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_LGUI!LGUIUtils::EditorNotification() [D:\build++Portal\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\LGUI\Source\LGUI\Private\LGUIUtils.cpp:188]
UE4Editor_LGUI!ULGUIEventSystem::BeginPlay() [D:\build++Portal\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\LGUI\Source\LGUI\Private\Event\LGUIEventSystem.cpp:66]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Thats weird, never seen this error before. What platform you use? What UE version and LGUI version?

Windows 10, UE 4.27, latest LGUI

Hello, do you have multiple “LGUIEventSystem” in one world? That will cause some issue.

no

Will LGUI be compatible with Unreal Engine 5? If so can you tell us what your timeline will be to release a 5.0 plugin?

This is very important for my organization to know if we can rely on this plugin for future releases. Thank you.

Of cause I will make it work with UE5, I’m alreay working on it. But the main problem is, UE market place not allow developers to submit a UE5 compatible plugin, which is reasonable I think, because UE5 is still under development.

Thank you for the reply. Just one follow up question. Will we be able to transfer over prefabs made in UE 4.26 over to the UE5 version of the plugin when it is released? Or will we have to make them again from the beginning?