Hello,I am trying to make meshes in blender and import them to ue4,and some of them end up with weird shadow bleed,I am kinda new to modeling so i probably done something wrong,the thing is,that i saw many videos\posts on this subject and i yet to find a proper answer for my problem,its even harder when most of the detailed tutorials are for Maya,and although i saw them,didn’t help me as much as i thought.
Anyway,here are the pictures of the mesh inside Ue4(before and after build):
Seeing the image looks like a bleed problem. I got this problem one time and increasing the lightmap resolution solved.
Did you try increasing the lightmap to a very high valeu just to see if
I can see in your uv all faces are separated as islands… You should try to merge some islands. Like the main branch of the tree. Theres no reason to have 1 uv island for each face.
I would say that maybe the normals of some faces are twisted… When the face are full dark…
Besides the lightmap and uv issue, I dont know what that could be…
setting the resolution to a very high value did make the bleed disappear,though the shadow itself still looks twisted,and its probably wont be performance wise to use the resolution in that amount.
ill try to decrease the amount of islands.
you don’t have to physically separate the meshes or split them into separate objects, i meant you should treat each of those parts as separate uv islands.
blender’s lightmap pack will break every face into individual islands, which means each face will need to waste extra space on padding.
instead of lightmap pack, try using smart uv project with an angle between 60 and 80, with island margin of 1. if that still doesn’t give great results, mark edges with seams and manually unwrap, so that you can make better use of the texture space.
if you are still getting problems after all of that, increase the padding between islands, or increase the lightmap resolution of the mesh in ue4.
but if you did want to break the model into separate meshes, it might help you create more variety. with separate meshes for a trunk, a branch, and a sphere, you could make a blueprint with a construction script that uses random numbers to add variation to the orientation and scale of spawned instanceStaticMeshes. basically, you would be making a simple version of speed tree in ue4.
or, if you wanted to skip the coding part, you could just place those tree parts in the level, and when you build a tree you want to reuse, you can convert those meshes into a blueprint, which you can reuse anywhere.
for some reason the shadow itself is still twisted,and i have no idea why,it happens with different meshes too (even the engine defaults ones).
i really liked the idea that you can create a verity of trees with multiple meshes,i think i will try it too,and i will try to create uvs as you said, im starting to understand the uv packing much better with your information!
if there is still a small amount of bleed, and its visible from your in game view, you can increase the uv padding in blender, by using PackIslands with a larger margin.
the twisted bumpy shadows on the floor is a different problem, caused by the lightmap resolution of the floor mesh. if you increase the lightmap resolution of the floor, it should solve that problem. lightmap resolution affects how well an object receives shadows, but doesn’t affect how an object casts shadows. each of those bumps in the floor shadow is actually the size of a single pixel in the lightmap of that floor mesh.