Textures and lightmap

This isnt strictly JME, but I was hoping one of you would know.

I have models with a texture and a lightmap working in JME, but was wondering how you would manage a model with multiple textures and a lightmap. For example, I have a level which needs different textures on different bits, but I cannot put it in one large texture atlas because they need to wrap and tile, like say a brick texture.

I have done this before, a model with multiple different textures that all tile onto faces, but then how could I add a lightmap to this that covers the entire model? Would I need to seperate the geometry up into different bits for each different texture, then create a seperate lightmap for each of these?

You will need to use two sets of texture coordinates, one for regular textures and another for lightmaps. Those texture coordinates will be exported to jME3 correctly, but you will need to properly set the jME3 material “SeparateTexCoord” parameter to true so the LightMap texture parameter uses the 2nd texture coordinates instead of the first.