Rendering issues with Stencils and Path Tracing

hello to all who pass by,

I have an issue when I try to render sequences with Path Tracer when I want to render several passes using stencils.

When I don’t use Path Tracer for rendering, I don’t have this problem.

As you can see from this example, I end up with a result that’s just too messed up to use these passes in my compositing.

Imgur

I’ve tried to digg all I can on this forum and on Google to find an answer, I’ve tried a lot of things but I haven’t been able to find a solution. And before someone ask, I also tried by increasing the Sample Count a looooot.

This white outline corresponds to the white of the material applied to my other stencil. I deliberately made it white to highlight more the issue. With a darker material it’s less obvious but still there and unusable.

Does anyone here know how to get the same quality for a render with the Path Tracer as the render I get when I do a standard render ?

Thank in advance to all who will give some time on this one.

To me that looks like an alpha channel issue.

If I wasn’t snooping around on an Unreal Engine forum I would say with 100% confidence that’s a premultiplied alpha channel vs a straight alpha channel.

Is there zero content behind the rocks? Is it “transparent” or empty in some way? It’s like it’s not antialiased (tried different AA settings?).

Are you compositing offline or trying to do it all in engine? If you’re compositing things elsewhere, you may be able to get away with choking the matte slightly: essentially just “shrinking” the alpha channel by a pixel or 2, and/or softening it a wee bit

First of all, I’d like to thank you for taking the time to react to this post. It’s really not a very reactive forum, so thank you for that.

So, I’ve tried every conceivable setting in the Movie Render queue, from sample count values to anti-aliasing method. If it could make thing change on the quality of the render,it doesn’t help me to fix this issue.

And yes, this seems to be a problem with my alpha channel. “My” alpha channel … I should say “Unreal Engine” alpha channel.

The example I’m sharing in the image is a test, and yes, the white object behind is there precisely to highlight the problem I’m having. If I change the mesh material to a darker value, the problem is less obvious but it’s still there.

I am trying to add CG from undeal in live action footage. And I am using this object as an attempt to create an hold out mesh to occult what is under this. And in the mean time to get shadows and other light informations that I could use in my compositing.

Having said that, I really don’t understand why this problem only appears when I render using Path Tracing. When I use the “Deferred Rendering” module, I don’t have this problem at all.

About the compositing, I do it elsewhere, in Nuke for instance. I’ve tried to figure out how to fix it, and find some work around but it’s not clean. I’ve try to play on the matte, choking it, shrinking it just slightly, but … it’s not working for small details like plants, grass as you can see on my exemple.

I’d really like to find an answer, I can’t figure out if it’s a limitation of path tracing rendering in Unreal or if it’s just me not doing it right. It’s extremely frustrating and I’m running out of steam to finally find an answer so I can move on.

Anyway, thanks for taking the time to reply, and if you have any other ideas, I’d love to hear them.

I’ve also found it hard to get answers on the Forum.

In Nuke, have you tried changing the way it’s interpreting the alpha channel? After Effects is terrible at guessing the proper interpretation - straight vs premultiplied (and you can manually set the color if premultiplied to something else)

Unfortunately I don’t know enough about path tracing to have advice to give on the settings there. I imagine there has to be a solution but… without chatting directly with someone at Epic it’s probably going to take a ton of experimentation! Good luck and I hope you figure it out