Download

Volumetric Lightmap Samples bug (Reproduce-able)

So I think I’ve discovered a rather large bug with volumetric lightmaps in that it’s creating a lot of unnecessary samples and ignoring the height of the Lightmass importance volume:

So here’s my test scene; just a simple landscape mesh, a skylight and directional light, all set to static.

Here is the scene post light bake:

Note the lightmass importance volume and how far off samples are generated up in the Z direction. I can understand some extra samples are necessary for ‘padding’ with this system, however this seems excessive. The result of this is VASTLY increased bake times compared to Sparse Volume Lighting Samples. For example; on a larger scene my bake time went from 20 mins with Sparse Volume Lighting Samples, to 12 hours with Volumetric Lightmaps!

I’m thinking this must be a bug??

Other than this I’ve been loving the new lightmaps so far and hope to use it but this is killing my bake times and most likely eating up a lot more memory! :frowning:

Link to Answerhub page: Volumetric Lightmap Samples bug (Reproduce-able) - UE4 AnswerHub

This is intended. The samples must form a cube on every detail level.

The bricks do have to be cube shaped, but the top level grid does not. I’ll look into making the top level grid bound the importance volume better. In a huge terrain level the waste would be huge.

However in your case I think you’ll find the wasted samples have very little impact on memory or build time. They are all the lowest resolution level. After a lighting build you can find something like this in the log:

LogVolumetricLightmapImport: Imported Volumetric Lightmap in 0.691s
LogVolumetricLightmapImport: Indirection Texture 48x48x48 = 0.4Mb
LogVolumetricLightmapImport: BrickData 1280x30x5 = 5.3Mb
LogVolumetricLightmapImport: Bricks at Level
LogVolumetricLightmapImport: 0: 2.0% covering 100.0% of volume
LogVolumetricLightmapImport: 1: 5.3% covering 4.2% of volume
LogVolumetricLightmapImport: 2: 92.7% covering 1.2% of volume

Note only 2% of the memory are at level 0 (the lowest density), which is a typical distribution for all levels. These are not having much of an effect on build time or memory.

Yeah the problem I have is that on a larger level the waste is no longer negligible, even at 2%, it adds up. It also completely locks up the viewport when trying to view samples.

Is it also expected for my build time to be vastly increased with Volumetric Lightmaps compared to Sparse Volume Lighting Samples?

Humm… Is this mean it is better to use “multiple tiles” of lightmap importance volume instead of one huge one to keep the overall height of the volume to low? Because if the volume has to be in square, then larger the width and length of the volume, the height also be proportionally bigger? So by using smaller volume and then lay them down so they tile across, then theoretically, the height will be as high as the one of the volume’s width?

Has there been any progress on this?

No, the volume is calculated as the cubic bounds that encompasses all lightmass importance volumes and volumetric detail volumes. Make your level a cube and you’re golden. :slight_smile: