Lightmap uv set not working

Hi All,

So i am trying to use a second uv set to bake lightmaps , i have am exporting from maya with two uv`s

Once in the sandbox am loading the lightmap that i`ve generated, but as you can see from the floor material, it doesnt us the uv set 1. Only the first uv0? You can see it has uv0 and uv1 in the object.

Any ideas? Thanks

Not on the top of my head :frowning: would you be able to provide a repro in the playground ???

Not sure about the sandbox, but when you load a texture, you can specify another coordinatesIndex to use another UV. Texture | Babylon.js Documentation
Setting it to 1 uses UV2 instead of UV1 - or 0 depending on how you want to index it.

Hi
Cant upload here as im a new user, ive added it to a onedrive. just the carpet model and the lightmap if you are able to test that would be great. thanks
https://1drv.ms/u/s!AseZdNEMLghX_RE06Pmy43TcpMPH?e=qU9iD3

Hi @paulr

After add lightmap file ;

UV set ===> 1 ,

Then update lightmap U scale , V scale to zero and 1 again

!!! You must make this in your own code

( I thought its a exporter problem )

hv nice works.

Here is the video

https://1drv.ms/v/s!At8Mj_69ieo1ihYBlitytx1NmxKj?e=JRGX5V

1 Like

Thanks very much for taking the time to check that @3dprof.com , that works great.

1 Like