Home
  • English
  • 中文
Home
  • English
  • 中文
  • Get Started

    • Install
    • Hello LGUI
    • Custom Button
    • Use custom font
    • Prefab workflow
    • Interaction
    • Button from scratch
  • Sample Projects

    • Sample Projects
  • Prefab Workflow

    • LGUI Prefab
    • PrefabEditor
    • LGUILifeCycleBehaviour
    • LGUIPrefabInterface
  • Rendering

    • LGUICanvas
    • Screen Space Overlay
    • World Space - UE Renderer
    • World Space - LGUI Renderer
    • LGUI render flow
    • UICanvasGroup
  • Visual Components

    • UIText
    • UIEffect
    • TextAnimation
    • UIBackgroundBlur
    • UIBackgroundPixelate
  • Events

    • LGUIEventDelegate
    • LGUIEventSystem
  • Interaction Components

    • UISelectable component
  • Layout

    • Basic Layout
    • Auto Layout
  • Tween Animation

    • LTween
    • Use LTween for UI element
  • Performance

    • LGUI Stat
  • ReleaseNotes

    • LGUI 3.x
    • LGUI 2.x
  • FAQ

    • Why use prefab?
    • Update project from LGUI2 to LGUI3
    • Project 3d world position to LGUI's screen 2d position
    • Deproject LGUI's screen position to world
    • Use custom material for UI elements
    • Disable interaction component
    • Find Child by DisplayName
    • Get actor or component inside prefab
    • Anti-aliasing

World Space - UE Renderer

World Space - UE Renderer use engine's default render pipeline to render UI elements. By default UI elements will be treated as transparent meshes, so the UI will be affected by post-process.

Create

Select "LGUI Editor Tools"->"Basic Setup"->"World Space - UE Renderer":

Then a "WorldSpaceUIRoot_UERenderer" will be created:

Use lighting and normalmap

Prepare a normal map:

Drag the normal map to content folder:

Delete "Frame" and "Info" actor, right click the down arrow button and choose "Create UI Element"->"UISprite", and name it "NormalMapUI":

Create a new material, name it "NormalMapUIMat", make it a very simple material like this: UISprite take texcoord0 as packed atlas uv, so we use texcoord1 as uv input.
UISprite will use the atlas texture and set to MainTexture parameter in material.

Select "NormalMapUI" actor, find "Custom Material" property, and drag the "NormalMapUIMat" to "Custom Material":

Create a light in the level if these is no one present:

The "NormalMapUI" looks not correct in the viewport. Because by default, LGUI only set the first texcoord and no normal or tangent data, so we need to tell LGUICanvas to provide more data, by check the "Additional Shader Channels" flags:

Now adjust light angle and position, see the bumped surface on UI:

Check SampleProject on github, you will find more infomation about lighing on 3D UI:

Last Updated:
Contributors: lf2007hf
Prev
Screen Space Overlay
Next
World Space - LGUI Renderer