Please note this is for UDK, not UE4 or UE5. Once again I am unable to post in the Legacy/UDK Content Creation section because I am “not permitted to view the requested resource.” Somehow it seems that every newbie with a UE4 question can post down there where it doesn’t belong, but for some reason I can’t, so I have to post up here where my question doesn’t belong. Sorry.
I’m making some tree static meshes. I’m going for a pixelated, low-poly, cartoonish look. The tree meshes look fine, but you can see the sharp differences in lighting where the leaf planes intersect.
I exported my fbx files with face smoothing instead of edge smoothing, and that seems to have helped a bit. I also tried creating custom normals, using Blender’s DataTransfer modifier to map a sphere’s normals onto the planes’ face corner data. That did not seem to make any difference in the game.
Eventually, for some of my meshes, I had to just make the material nondirectional. That’s not ideal, but I’m not sure what else to try. Anyone have tips for hiding the sharp corners in foliage planes?
With these smaller meshes that have leaves in low-contrast reduced palettes, the sharp corners are very visible and I had to make their material nondirectional.
With larger meshes where I use high-contrast palettes on the leaves, the corners aren’t as noticeable and they can have directional lighting and color transmission.
This Correct vertex normals for foliage? — polycount thread on UDK foliage looks to be running into the same problem. It is old but multiple times it mentions the normals being overwritten on import.
Thanks! I had found some discussions at Polycount, but hadn’t seen that thread. Someone had fixed the issue by extruding the faces to give each triangle a backface manually. I tried that, and I found a solution that worked, at least in most cases:
Extrude the leaf mesh’s faces along the normal and click to complete the action without moving the newly extruded faces. Delete all of the zero-surface-area polygons that get created along the edges. Select every triangle in the leaf mesh and mark all of their edges as sharp. Transfer a sphere’s normals onto the leaf mesh. Export the fbx with edge smoothing. If you export with face smoothing or if the leaf mesh isn’t set as sharp, then the vertex normals get overwritten.
My procedure works for meshes where the leaves are relatively small compared to the sphere. If the leafy part of the mesh is too big, and packed too close to the center of the sphere, then the vertex normals are pointing too far in different directions, and the effect doesn’t really work.
… instead of extrding select all. Go to the vertex menu. Hit normal. Select the recalculate from point option.
Ot the from sphere option which is better for a tree canopy…
Then hit the visualizer, go down to where you enable the normals. Turn on the vertex (violet i think) ones to verify that the mesh appears to have correct normals.
On here you will find similar issues and blender solutions related to grass and it not lighting correctly to match the landscape.
Same issue. Same solution…