How do i apply lightMap to glb model?

Here model is exported from Maya. lightMap will be Exported from Unity but i get Wrong UV for lightMap

Here is the link for minimal code you can check there:

Note: wait for a while to load model

The flipY = false line that is commented out is definitely needed, although perhaps something else is wrong as well? Does the model only 1 UV set in Maya, or is there a second that isn’t exported? It seems a bit suspicious to me that the model has many materials and textures, but only a single lightmap — that would usually require two different UV sets.

Thanks for answering…

3d modeler said “I have exported second UV also”, but i couldn’t find it in model

you can see the geometry of particular mesh.

for every material I need a different lightMap right?

Yeah I’m afraid there’s no second UV set in that file.

Usually you don’t need a different lightmap for every material — that’s why the second UV set is used for light maps, so that every mesh can have:

  • 1st UV set designed for different color/normal/metal/rough maps per mesh
  • 2nd UV set designed for shared lightmap or AO map
1 Like