Announcement

Collapse
No announcement yet.

Render mesh in front of any other actor as is.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Render mesh in front of any other actor as is.

    Hello, i've been trying to achieve an effect to render an object in front of any other actor, keeping it's material in place without translucency artifacts (photo below) or simple solid color overlay/outline. An appropiate example still remains the rendering choice used in Mirror's Edge Catalyst, where body movement and parts of Inverse Kinematics can be literally achieved with a simple cheat. There are several moments during parkour (the glorious Baby Hands) where rendering your own Skeletal Mesh as the top layer could prevent your hands and feet to penetrate the wall or floor.

    - First thing i've played with is the ''Disable Depth Test'' on my Skeletal Mesh's translucent skin material which results in half of the desired effect, because it causes inverted normals (i think) of the same Skeletal Mesh, to allow other parts of the same mesh to be visible (example below).

    Translucent skin material
    Click image for larger version  Name:	Translucent-skin-material.jpg Views:	1 Size:	389.1 KB ID:	1514424

    Opaque skin material
    Click image for larger version  Name:	Opaque-skin-material.jpg Views:	1 Size:	390.9 KB ID:	1514425


    - Other method i tried to use was a post process material which checks for meshes with ''Render CustomDepth Pass'' enabled and tries to render that masked part in front of other actors with the option turned off. This results only in a solid color of choice (example below).

    Skeletal mesh with Custom Depth
    Click image for larger version  Name:	Skeletal-mesh-with-Custom-Depth.jpg Views:	1 Size:	199.3 KB ID:	1514426

    Skeletal mesh without Custom Depth
    Click image for larger version  Name:	Skeletal-mesh-without-Custom-Depth.jpg Views:	1 Size:	195.2 KB ID:	1514427

    Post Process Material
    Click image for larger version  Name:	PPMat.png Views:	1 Size:	192.7 KB ID:	1514428

    Desired effect (skel mesh doesn't penetrate the wall)
    Click image for larger version  Name:	Desired-Effect.jpg Views:	1 Size:	211.5 KB ID:	1514429

    Examples from Mirror's Edge Catalyst:

    Feature off
    Click image for larger version  Name:	Mirror's-Edge-Catalyst--Hands-feature-off.jpg Views:	1 Size:	128.7 KB ID:	1514430

    Feature on
    Click image for larger version  Name:	Mirror's-Edge-Catalyst--Hands-feature-on.jpg Views:	1 Size:	134.7 KB ID:	1514431


    I would be glad if i could receive an official response from Epic whether this is even possible in UE4 so i can move on and enjoy life But any workaround is really appreciated. Looking forward to your reply!

    Alex.
    Last edited by Xanadron; 08-12-2018, 08:27 AM.
Working...
X