Rotate normals based on camera for better foliage rendering

I happened to stumble over the change log from Unigine where they implemented a cool trick to improve foliage shading.
This helps reducing the harsh shading from low poly cards used for trees or grass.

From what I understood, they are changing the vertex normal? so that it faces the camera.
Does anyone of you guys have an idea of how they are doing this and if it is possible to implement the same technique in Unreal?




Bumping this thread just in-case someone with with knowledge hasn’t seen it.

I can’t see a huge amount of difference in that asset to be honest.

Have a look at this:
https://forums.unrealengine.com/unreal-engine/events/68014-foliage-parallax-occlusion-mapping-techniques-used-in-paragon-live-from-epic-hq?96257-Foliage-amp-Parallax-Occlusion-Mapping-Techniques-used-in-Paragon-Live-from-Epic-HQ=&viewfull=1

Yeah its a bit hard to see it the screenshots I provided, but maybe you can see it better over here using the slider. This definitely helps with reducing the visibility of the cards by consolidating the overall shading of the tree. I can potentially do this by modifying the vertex normals of the cards but the results aren’t always perfect.
https://developer.unigine.com/en/doc…ated_to_camera

Yeah it’s quite subtle. I think the pixel-depth method Epic uses has a much more noticeable effect on giving billboards subtle depth information.

As for this approach, you can rotate the normals towards the camera in the material graph, there may even be a material function for it already.

I use the pixel depth offset for the imposter rendering in order to get detailed shadowing on the billboards yeah. I will check if there is a material function already done for this.

I scrubbed through the livestream and couldn’t find anything on using pixel depth offset. Can someone clear up exactly how you’re using it to achieve better shadowing?

To reference Unigine again, I assume it’s similar to what they’re doing with a “depth texture” on imposter billboards?

Pretty sure the Pixel Depth Offset is only used for foliage billboards to reduce artifacts from DFAO.

More than that, you can do all sort of things with it. The name is explanatory, you can use that for offseting pixels and that will be fed to the depth buffer. This can also be used for calculating screen space shadowing for example. You can also use it with a temporal AA dither to reduce harsh seam transitions between two meshes or landscape etc…

Oh I’m familiar with the uses, I was just mentioning it in regard to the posts above mine questioning Epic’s use of it for foliage.

My bad, I thought you were talking about the general use of it. Epic uses it for reducing DFAO artifacts indeed. I think you can also use to get some extra detail when using contact shadows on the foliage billboards.
This works well with POM materials for example.