Getting gbuffer from within a composure custom material pass

Hey, I have a situation where it would be very helpful to be able to get normal and depth information out of the gbuffer for compositing purposes, but this information doesn’t seem to be available from within a custom material pass used on a composure element–SceneTexture just gives a blank frame. Any ideas?

Fairly new to UE,… Wondering the same thing… would be awesome to be able to export layer elements of a comp with all its gbuffers in multichannel exr xD

So far I’ve only been able to output the comp result as an RGBA exr,…

I guess the best way to do it would be with the custom render passes and manually hidding layers to create the desired result…

Not quite the same issue actually–when I’m referring to compositing, I meant real-time compositing using a post-process material. I’m not looking to write anything out to disk.

I am wondering the same, I have a composure setup where due to camera and actor movement I can’t just comp the cg_layers with over, because at some point objects that were previously in the back should be rendered in front.
For this case it would be great to have cg_layers that are masked by objects that are in front of them. Because using the over node would always render the objects in the same order,
ignoring scene depth and occluding geometry, which only works if objects never switch places, thus changing which actors will be occluded by others.
Also this is especially problematic if there are objects that are in front of the other layers actors as well as in the back of it.

So I was thinking simply comparing the depth information of the cg_layers against each other should do the trick, but I’m seriously at a loss how to get the depth information to accomplish that.
I found out that there is a composure depth element if you expand ‘all classes’ while adding a new composure layer, this should deliver the depth information for the included actors, but either it is broken or I’m configuring it the wrong way.

If anybody knows how to get this to work please share.

Hi Chris,

Do you have any new thoughts about this topic?
I found that when I change material parameter “Density” to 0.003 and disable color grading override, depth_element in composure will have some different depth in four corners but the accuracy is bad.

here is a good demo I think exactly what I want, but the author does not give any information about how to get depth buffer except “use the depth pass of the a scene capture as a mask”