Maya lightmaps not lining up properly

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.

Would you be in to uploading the files? Alternatively send them to me at

remedydub at gmail.com

(no spaces)

AC

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.

Finally its solved.

Fixing the distortet lightmap:
In bake settings:

  • 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.

Thanks for sharing

While we’re talking lightmapping, I wonder if anyone knows whats happeninng here? I keep getting hard triangular shadows. Any ideas?

Cheers
AC

61614--2252--$picture_26_121.png

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.

Hey :stuck_out_tongue:

I dont think thats the case, Both sets are planar-this is the landscape around Anzac Cove-a couple of topdowns.

I’ve just enrolled for another year of study, which rocks, I’ll have a lot of time and cpu to really flesh out issues like this out…

I’m also doing a programming course which a few forum dudes will be pleased to hear…you know who you are! Thanks for getting me off the ground!

Cheers
AaronC

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.

Thanks entity, I’ll go through those steps. This will happen in a few weeks though.

Cheers
AaronC