How to use lightmaps in the v3 editor if it’s not possible to set uv set 2 for lightmaps?

Hello, @julien-moreau

I read similar topic and dont find answer. I still don’t understand how to use lightmaps in the v3 editor if it’s not possible to set uv set 2 for lightmaps.
Now in 3ds max I am creating an additional object on which I assign a material with a map with second uv set, export this and reuse lightmap texture in editor.
or second trick is set this is in code editor or directly in *.babylon file. I did not find other options.

The second question relates directly to the display of lightmaps in the editor and player. the default mode for light 0 in the scene is 0
i use next line of code scene.lights[0].lightmapMode = 1 and all works fine but I think this is some kind of editor bug

Hey @kvasss
I looks like the editor is missing the properties to be modified. I’m adding it ASAP and will deploy so you’ll not have to deal with the code editor to configure the light map mode :slight_smile:

If I remember, the uvset 2 is used automatically by the standard material when setting the light map texture (if exists in the geometry). Am I right @Deltakosh?

@kvasss can you send me a model example sonI can try and confirm the bugfix before deploying? Thanks a lot!

Hi @julien-moreau

i use in 3ds max physical material and when exported, it is converted to pbr material since I use metal rough
UV2 set is used for AO and lightmaps

but there is no way to export lightmaps so now, as I described earlier, I set this through exporting lightmaps in the AO channel with the uv2 set for this texture
you can see it in the test scene!AsX2zlTCVKnHkDDNBA__kJWowiiQ?e=hYVH66
editor project

1)The problem is with the accuracy of the scale input field. the accuracy of the input field does not allow you to set the scale to 0.001 and since I work in 3ds max in millimeters to go to babylon units I need to set the scale to 0.001 but the field resets to 0

lightmap mode 0

lightmap mode 1
and normals on imac looks fine

but in editor looks inverted

i use desktop version of editor on windows. videocard nvidia 1050ti
…and I still don’t understand how to open project in online version of editor.

Hello again), @julien-moreau

Here is an example of lightmaps added in the editor
lightmap use uv1 and no option and there is no setting to change the channel as I wrote above

1 Like

Your scene look beautifull :slight_smile: about the uv channel can you not change it in the texture properties ? It is where we define it in Babylon.

Hi. I would like to build a 3D artist’s workflow based on the editor. for example, a sandbox is more suitable for a programmer or manager; for an artist, a workflow through a visual editor is preferable. At the moment, the problem is that there is not a single normal way to establish a second channel uv. There are two options: export with a lightmap from max, maya, blender or set uv channel in the editor. But at the moment, none of these options is implemented and you have to use dirty hacks.

Hi @Deltakosh
The question is related to texture atlases. If I use the same texture in this case lightmap for several materials, does this texture load and store in memory for each of the materials? Or is it loaded into memory only once and reused?

I just look at the editor and for some reason every time for a new material he creates a new texture

Textures are cached so it won t download it again or create a new pne on gpu.

Hello @julien-moreau
sorry for stupid question… but what’s about fix lightmap uvw channel? need switch to second channel for lightmaps but this not impossible. do you remember about this?