How many types of Lightmaps are there to use & how to link them in Maya so that those LightMaps should come Properly in .Babylon or .gltf?

Need some help from experts.
I am basically working on an Architectural scene file trying to get realistic effect as much as possible. I am using Maya for modeling, texturing and Lighting. I am baking ambient occlusion ( using Render to Texture tool in Maya Arnold ) and linking the AO maps in Stingray material nodes ( which is PBR Material from Maya).
And getting couple of issues:

  1. How many different types of LightMaps to be used in babylon to get lighting effects? and how to generate them in Maya

  2. Where to link the LightMaps in Stingray (PBR) material node so that it comes properly in sandbox.babaylon

  3. Linking AO maps to one mesh is getting combined with roughness and metalic map when exported to GLTF / Babylon. Actually i was using tiling - U and V repetitions i.e, U scale, V Scale values to spread multiple tile effects on the floor / walls etc. how should i control AO and other texture values separately.

Let me add our in house awesome artist @PatrickRyan to the thread as he will have way more ideas than me about it :slight_smile:

@AD_Kar, let me answer your questions as best as I can while asking you a couple of clarifying questions. First, I am not sure if you are coming out of Maya to glTF or to a Babylon scene. Right now, there is nothing in the glTF 2.0 spec about light maps so exporting to glTF will not accommodate the light map. Historically, we used stingray materials as a way to export PBR textures to glTF, so we would not have added capacity to handle light maps due to the lack of support in the format.

@drigax and I chatted about this briefly and we will need to design the UX around how we export lightmaps using PBR materials because we will need to split the functionality between glTF and babylon formats. But for now, there are things you can do and I will talk about that in the answers to your questions:

  1. Light maps need to be saved into a separate UV set so that lights and shadow can be baked into an atlas. You can bake out lights to a texture or only shadow to the texture and control which type of map you are baking through this setting in the PBR material settings.. There are a few ways to bake out the map, but this is a simple on that does not require a specific renderer.
  2. There isn’t a place to link the light map to stingray, but you can add it in the sandbox. If you open your model in the sandbox, open the inspector in the bottom bar, and the select the material that should have the lightmap, you will see a channels section in the inspector. This is where you will add your lightmap by clicking on the Add Lightmap texture button. At the bottom of that section is the Use lightmap as shadowmap toggle to set the correct mode for the texture. You can then click on the Tools (wrench icon) tab at the top and save the scene as a babylon file which will include the lightmap as you set it up.

image

  1. For mixing tiling and AO you also need to use two UV sets. You’ll likely place your tiled UVs in the first set and the AO UVs as an atlas in the second UV set. This can become complicated if you also need a light map on your mesh as you can only have two UV sets. This could become an issue if you wanted to bake your shadows (and use the lightmap as a shadowmap) but still illuminate your mesh with scene lights and therefore need an AO map. You would need to make sure that the UV atlas in your second UV set works for both AO and lightmap which could mean you need to divide up your message in a specific way to work. Once you have the separate UV sets your AO/lightmap will bake correctly and you can still control the UV scale on all of your textures separately.

Let me know if you still have more questions about this. Take care!

2 Likes