After following “everything” said about lightmapping in maya I’m still stumbling over those lightmaps that stubbornly refuse to line up properly.
Here is a screenshot of the scene i’m trying to lightmap and the problem:
As you can see, the map is almost right on the floor, but “a little” wacky on the walls and displays.
Any ideas how to fix that?
Note: The whole room is a combined mesh in maya with 3 different materials (glass, furniture&walls, floor), all of which have been assigned the lightmap in a lightmap shader over in unity.
So far i figured out that maya bakes the lightmap in a somewhat distorted way.
In the picture above i had a 4096 x 4096 map. After some manual tweaks in photoshop I ended up adding blank pixels to the map:
4 px left
4 px bottom
4 px top
62 px right
This made the maps line up almost perfectly. The result is pictured below.
yet this is far from perfect as there are still jaggy black artifacts on all edges.
set “UV range” to “normal (0…1)”. As opposed to “full range” which distorts the map eventually in unity as shown above.
Fixing the jagged artifacts at object edges:
In bake settings:
set “fill texture seams” to a value of 3 or greater. This simply adds some padding to all shell textures. In the screenshots above i always had it set to 1.
In UV automatic mapping settings:
set “shell spacing” to 0.1% or greater. Too small a value will make shell textures bleed into each other due to the expanded seams.
I hope this may help sombody else save some time when running into a similar problem.
That’s not shadows. It seems like overlapping UV’s in the bake and/or intersecting geometry and/or a shading-network, that uses normaldirections, but is wrongly setup.
@ Gerold - Te absolvo! I actually had a thread earlier about this, and we came to the same solution, even though it seems weird (why is full range not 0 to 1 per default? LocalSpace vs. WorldSpace). Remember to make a texture bleed in the bake, to remove those jagged edges, which creates a need for not having the UV’s too close together.
I did have this issue earlier, and that was dut to a faulty UV-set. Even though it SEEMED planar, SOME UV’s were rotated, and stretched the bake. I should mention here, that the texture were defined during the same render/bake.
When I deleted the UV-set and did some auto-planar-projection thingy in Maya, baked 0 to 1, it all looked good.