Hey guys, my list of issues with modeling goes on and on. This time, I got black spots in UE4, which I am fighting since UDK. To make this short, no Idea why they appear - textures are ".sbsar " files, so no twisted normals, I increased light map resolution from 64 to 256 already, which created new black spots on model.
It pretty much happens on more of my models, but I am not sure if it can be cause by my UV's.
This pillar is a simple object, but I can't afford so much space between other meshes. Although I keep in mind that you have to have free space around unwrapped parts.
What would you suggest ?
Replies
Also, whacking your LM res up to 256 isn't the solution(as you've seen) as doing this on all assets will have a big perf hit.
But I feel your pain. There are times when I set everything up properly for LM, follow all the rules, and no matter what I do I get artifacts.
I always set my sun/skylight to dynamic(moveable) which eliminates the need for lightmap calculations but, this comes at a cost and will depend on the project complexity/amount of lights in the scene.
Mockup of your scene. Sun/Skylight set to dynamic. Point light set to stationary. LM res default 64. LM UVs.
Black spots are still there. The round part is just attached to top and bottom, so it is not welded together. Could it be the reason ?
Having the mesh as multiple unwelded elements is fine.
Could you upload the mesh in .fbx so I can have a mess with it?
http://www.filedropper.com/pillar (max scene)
http://www.filedropper.com/pillar_1 (fbx)
https://files.fm/u/wnev37kj
For the UVs I snapped them to a a 64x64 grid(as this is the LM res) - Note that this isn't always necessary but it ensures that seams don't fall between texels, which can cause artifacts. You'll also notice that I skewed the non-square shells to square corners in order to snap diagonal edges to the grid.
A great workflow to speed up this snapping process is to create a custom checker pattern texture at any res(64x64/32/32/etc) and display that texture in the UV editor. Now if you turn on snap to pixel, your UV shells will auto-snap to your checker pixels. They will even dynamically change shape to respect the snapping.(this also eliminates the need to calculate the grid size and is a far superior approach imo)
The most important thing, as I mentioned above, is to have at LEAST a 2 pixel border between shells and UV 0-1 borders. The UVs above are far from optimised(lots of wasted space) but they are just to serve a purpose for this example.
This is also interesting, and well worth a read:
https://www.reddit.com/r/UE4Devs/comments/246whl/the_most_important_thing_about_lightmaps/
Personally I detest lightmaps, and long for the day when technology eradicates them from the anals of CG. As I said above, you can use fully dynamic lighting to bypass the annoyance of lightmaps but this can limit lighting quality in a lot of cases. And if you're lucky, sometimes you can get away with LM errors when fully textured/shaded.