Download

Please help - Foliage lighting incorrectly after Building Lights.

Some of my branches are rendering almost completely black.

I’ve tried editing the vertex normal as per this link. http://www.polycount.com/forum/showthread.php?t=125920

I’ve also posted this else where with pics, however I will attach pics again.

My Settings:

I used production quality light build. 4 res lightmaps.

I am using the stock lighting set up found in the Third Person template.

I am using the new 2 sided foliage shader built into UE4.

For some reason my mesh looks good before I do a light build and looks great in the Static mesh editor Previewer, but lights Incorrectly after doing a lighting build.

My vertex normal are not pointing down or anything strange. I’m really at a loss here, if anyone can help that would be great.

More pictures here: http://www.polycount.com/forum/showthread.php?t=150591

Combining these two comments makes it seem to me like your lightmap resolution is too low. Make sure the UV islands for the different branches do not share lightmap texels or you’ll get artifacts such as this.

Lightmap resolution of 4 is really low for a standalone mesh. If using the foliage tool to place this mesh then 4 would be OK, but this would be set in the foliage tool settings not the static mesh editor settings.

When you have not built lighting and in the static mesh editor these both use Dynamic lighting. This is the reason for the difference.

When you build lighting the shadow information is being baked to a texture that is applied to the static mesh.

Can you post a screenshot of your material setup here if the lightmap resolution increase doesn’t help?

Thanks!

Tim

Hello Tim. Thanks for responding to help.

I have gotten better results by jacking up the lightmap resolution. The polygons are no longer rendering black.

But there is still something wrong with the Shader or Vertex normals.

I’ll attach pics of both.

It looks like the Shader is getting confused as to which polygons are facing the light and which polygons are not, as you can see in the pic. The subsurface color is showing on polygons facing the sun and polygons facing away, which is wrong. As far as I know the new foliage shader is only supposed to have the subsurface color showing on the polygons facing away.

See pics.

Note: I let Unreal generate my lightmap channel for this tree canopy as it’s fairly simple. Do you think this could cause the shader to misbehave?

Thanks a lot! Looking forward to having sweet renderings of trees in my project.

It looks like I may have solved it.

A user over at Polycount suggested I add a Twosided sign node to multiply with the Alpha.

Tim: If you could take a look at these screens and confirm I am using the new foliage shader as intended that would be a huge help.

It appears to have worked well, the only small issue is the Subsurface color appears to render less saturated after adding the node. I’ll attach the two comparisons as well is the new render.

Thanks!

why are you only using the Opacity Masked slot?