Back to the Shapespark home page

Dynamic Lightmap size

Currently, we can select the number of lightmaps we want, or Shapespark will decrease the lightmap resolution for the whole scene to fit into the chosen amount of lightmaps.
My question is now if it is not possible to create a dynamic lightmap size? Instead of decreasing the resolution by, for example, 15% increase the lightmap 15%. Then we could save some more byte on an additional lightmap of which we may only need a part.

The Max lightmaps setting is an upper limit. If you set Max lighmaps to 2 and the uv unwrapping step manages to pack the scene into one lightmap with your configured resolution, only one lightmap is used.

Do I understand correctly that you would like to have one, but fully packed lightmap? The way to achieve this could be to set Max lightmaps to 1 and Lightmap resolution to some high value, for example 200. Then this high resolution will be reduced to the largest value that allows to pack the scene into one lightmap.

Keep in mind that if your second lightmap is tiny, say for example 128x2046 pixels, the download size and GPU memory usage will be also small for such a lightmap. So having a small second lightmap has small performance cost compared to having two full-resolution lightmaps.

Hi @jan,

I usually manage to reduce the whole scene of the apartment to 1 light map with good resolution. I delete surfaces that the camera does not see or set them to “0”. I am pleased to see that there are very few black surfaces left, such as:

Certainly my renders are faster then.

However, I recently noticed poor packaging, and I did not discover the cause.

I’m just guessing the problem is in the geometry of the object, but I don’t know which one.

Do you have any advice?

Hi Jan,

from my understanding the second lightmap has only the size which is required by Shapespark? So it “grows” up to 2048x2048 pixel at most but also can be smaller?

The max lightmap resolution is 4096x4096, but yes, the second lightmap will be only as large as required.

1 Like

@Vladan It is rather some larger object. Do you have some walls with such triangle like pattern? If the scene had more smaller objects, these empty black spaces would be filled with them. A layout with such large empty areas wastes some GPU memory, but the download size should be rather small, because the black areas will compress easily.

1 Like

Thank you @jan
Yes, the metal roof structure gives me these problems. You are right that the secondary light map is also faster to load.
Would rotating the surfaces in the UW mapping of the Shapespark light map make better use of space?

Because the metal structure elements are kept together in the lightmap, the connections between them must be smooth. Is this crucial from the 3D model perspective? If such smothness is not crucial, you could ensure the vertices have separate normals in the connecting places, and the elements should become disconnected in the lightmap.

1 Like