maya into unity uv map assignment??

Hi i’m new to unity but not to maya, i have recently watched and read LOTS of tutorials on importing maya files and what not but they were no help

now what i’m concerned about is lightmapping

i created a simple test scene in maya and uv mapped it saved the .mb file and fbx in the asset folder, i made my light and baked the scene and the lightmaps that were baked out were not uv’d like the ones that i created in maya. i don’t know if unity created these uv on it’s own or what

i read that unity does not assign textures on it’s own but nothing has ever said anything about an objects uv map.
when meshes have been imported into unity does the uv map made in maya automatically assign to it? if not how do i assign it to a certain object? and is it possible to view the current uv map in use?

this is the uv map i made in maya of a simple cube

but when i baked it in unity it came out like this

every uv map that i made in maya came out completely different in unity

i really need help i don’t know what the problem is:face_with_spiral_eyes:

I think I see what’s going on here; first, a little background. A common way of doing lightmapping in Unity is to import your file with the ‘generate lightmap uvs’ option checked, so that Unity makes a second UV set on its own and uses that for baking. That way you can UV the objects for your textures however you want, even with overlapping parts, and you won’t have any issues. Usually you’ll have many different objects in a scene, so when baking, Unity will use all these second UV sets and pack them together so that, if there’s enough space, it’ll use one texture for as many objects as possible. If you did have that option checked, then what you’re seeing is that second UV set.

However, if you did not have that checked, then my guess would be that what you’re seeing is only the re-packing part of the process, only it’s doing it with each of the objects’ one and only UV set. They still look right in the scene because Unity will do that and then modify the tiling, offset, and lightmap index values on the object to match. Are those walls and cubes all one object? If they’re not, Unity will always re-pack each of their UVs to fit in the way it sees as the most efficient. The only way to prevent that is, I believe, by checking the ‘Lock Atlas’ option on the baking menu, or by combining the walls and cube all into one object.

Quick edit: I should add that, unless you have a specific reason for wanting the lightmap UVs to match exactly with your regular color texture UVs, Unity doing this shouldn’t have any negative effect on your workflow. You can still apply a color texture that uses the same UVs that you made in Maya, the lightmap is just being drawn over the top.

thanks for the reply!

yes i do have generate lightmap uv option check , and each object in my scene is a separate object, i tried unchecking the generate lightmap uv option and it changed the uv’s again but i can’t check to see if it’s the right uv set because i don’t know how to export the lightmap .exr files out of unity i wish i could change them to jpg, png, or bmp

Photoshop can open .exr files; I’m sure there’s other programs that can as well.

If your objects in the scene are separated, the lightmapper will always pack their UVs into the lightmap however it sees fit. Again, that is a completely intentional thing Unity is doing, not a bug. If you make a color texture/normal map, etc, you can still make it using the same UVs you created in Maya, apply it to the object in Unity, and it will display correctly alongside the lighting in the lightmaps, regardless of how Unity decides to lay those out.