Unreal Mirror & Blur

Classé dans : Non classé | 1
How to Mirror

Apply a mat with Roughtness 0 and specular/metalic 1. Set base color to white. This define the object this material is apply to as reflecting. Then, Unreal will use efficiently multiple capture composant that you have to setup over the level.

  • Screen Space Reflections
    • Use multiple cube map in the scene to capture éléments
    • Render from the cubemap perspective in static way
    • Approximative result but not expensive
  • Planar Reflection
    • Manage a hidden camera and set it as a perfect mirror
    • Perfect render but a camera is doing a second rendu, so it hit performance
    • No way to apply post effect
Own Mirror

To manage our own camera (as Planar Réflection does) we setup a camera at the opposite of the player, looking streight to the mirror. Then we need to crop the render texture to show only what is crossing the mirror.

in Unreal, the mirror camera is a SceneCaptureComponent2D. The Render Texture pass threw a matérial which tile the texture using UV.

Simple « post effect »

We can easily create post effect on mirror using a glass shader.

This is costly as here we are using planar reflection & transparency.

Transparency tips
  • Unlit more complex than Lit
  • In Translucency, change Lighting Mode to Volumetric Per Vertex Non directional. Turn Shader complexity from red to green
Paint a wall with your hands

Make a white room with box camera and a black hands that is the mirror of your hands

Use the box texture as a mask for your painted wall

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *