Is it possible to have Ambient Occlusion on an Unlit Material

In the game I’m currently working on, one of my members used lighting and post processing effects to give the feel of being underwater. The team wants to have a 3D HUD though, and as such it would clip through other meshes (without Ambient Occlusion set up). So either I need a method:

  1. To prevent a Lit object from being affected by the post processing and lighting
  2. I need an unlit object to have Ambient Occlusion

I noticed that I might be able to use Subsurface objects, but I’m not familiar with those at the moment. If that’s a valid alternative I’d like to know, or even if my goal is possible. The final alternative I considered, is to take a screen shot of the 3D HUD and make it a 2D component drawn to the HUD so it just looks 3D but maintains it’s colors.

oh I neglected to mention, we’re using Unreal 4.2.1 for this project. Which might limit our options to resolve this.

I dont understand why ambient occlusion matters for this situation. You could instead use a translucent unlit material and then fade the meshes with DepthFade when they get close enough to clip through other meshes.

oh sorry I misunderstood the way the material works, still fairly new to Unreal (I asked the question because my other member didn’t seem so inclined).

ok so material and depthfade are 2 different things, DepthFade is a mesh application while the material is just the material? It seemed like when I swapped the materials it stopped working

DepthFade is a function in the material editor. You use it for opacity and it fades the mesh out as the distance between the mesh and the clipping mesh reach the distance you set for depthfade.

DepthFade is a function(another node) in the material editor, and you use it for opacity. It fades the mesh out when the distance between two meshes reach the value you set for depthfade.

Is there any reason that a post process or lighting effect would be affected “unlit” objects as well? I went to try and apply what you mentioned but after some changes to our lighting last night all of the unlit materials are being affected as well

Post process affects unlit materials but i’m not sure i understand the problem you are having. Can you post some screenshots please?

I found the reason the unlit things were being affected (and why I thought they normally weren’t). There’s the Vignette color and Scene color, but for this post process volume, Scene color was on (turning it off removed the post effects from unlit materials).

The problem I was asking about initially is due to our gauges being affected by the post and caustics which makes our HUD difficult to read at times. Normal coloration of the HUD:

This is the way we’d like it to look, but, dropped in the post processing, because they are lit materials (my assumption). They end up looking:

So I asked the first question because after changing them to unlit materials they lost their DepthFade because I didn’t understand that existed / how it worked. Also just for comparison’s sake, I also included a screenshot of the HUD with the Scene color active:

I realize I probably should have structured my first post with a better flow of information and screenshots. Would have made things easier but I didn’t know what I (or others) might be looking for.

Now i see what you dont want the pp to affect the HUD. :slight_smile: But, i’m not sure if you can somehow exclude the HUD from color grading. There may be a way with render custom depth option using a post process material but i’m not that so good at advanced pp materials so you may want to ask about it in the Rendering section of the forums.

Thanks for the screenshots, btw, and dont forget to put them in your fprum post as well!