Lets make Lightmass EPIC (and understandable)

Hi guys! Finally I got some time to finish this.

Thanks

You’re a god! :smiley: Thank you!

Hi

Its a very intersting thread. Thanks a lot to all contributors, especially the thread starter , and of course for all the insightful information. Its very nice to have first hand contribution from a developer.

From the tests I made, the parameters from Klepadło (thanx!), post #169, seems to give a very similar result on 's test scene to what Koola (thanx too!) gets with his parameters, post #172, but about 3 times faster and with no modification of the baselightmass.ini

‘Scale’ always means multiplier. Most of the ‘Scale’ variables in BaseLightmass.ini are to implement the various quality levels (Medium, Production). So for example NumHemisphereSamples * NumHemisphereSamplesScale gives the number of requested rays in the final gather. IndirectLightingQuality further scales up this setting.

Your calculation of total samples using NumHemisphereSamples * NumHemisphereSamplesScale * IndirectLightingQuality is correct. IndirectLightingQuality does affect a few other things though that also increase the build time.

Unfortunately I have not done enough investigation with the photons to understand exactly what is going on to answer a question like this. The phantom lights happen because not enough photons were gathered to estimate lighting. Increasing NumIrradianceCalculationPhotons and IndirectPhotonSearchDistance will both increase the number of photons gathered, which is the right direction. However there are several steps in there and I’m not sure which one is the problem (direct photons, indirect photons, irradiance photons).

Rafareis, great guide.

This is a good guideline. Lower ‘Static Lighting Level Scale’ means less reliance on smoothing, therefore the noise will show through. You have to then increase IndirectLightingQuality (NumHemisphereSamples) to compensate.

Lightmap resolution has the most predictable impact on the final image quality. It’s a good practice to always start working on quality issues with a lower lightmap resolution, and only set the the high resolution (1024) once you are confident in your settings.

This confuses me because when I increased lightmap rez a lot of problems disappeared.

Maybe because its about a different kind of problem. Increasing lightmap resolution indeed solves problems ‘when’ the problem is related to insufficient size of the uvmap dedicated to the lightmap of the object concerned.

@ : my previous post went through the moderation and appeared before yours with a delay. When you mention increasing IndirectLightingQuality, does it only affect NumHemisphereSamples or also the parameters related to PhotonScale (NumDirectPhotonsScale / NumIndirectPhotonsScale / NumIndirectIrradiancePhotonsScale : parameters modified by Koola in his latest lightmass settings.) ?

Maybe I made a mistake somewhere but I’m curious to know if the observation I made in my previous post is correct : Koola parameters (involving Lighmass modification) vs. Klepadło parameters (no Lightmass modification & being faster).
It would be nice to have your insight on this if possible :slight_smile:

Issues with lightmap resolution and issues with the photon bounces should be distinguishable. So he’s saying to thoroughly test your lighting settings (with iteration and faster builds) before committing to resolutions that will inflate your times. Only bump resolution when you have to.

I’m talking about when your texels are already on the centimeter scale, in which case 2x higher or lower is not going to make a huge difference in quality, but it will make a huge difference in build time.

You can use Lightmap Density viewmode to visualize texel size.

Was that English? Hahahahaha Note to self, better find out what a texel is. In all seriousness I just want to make pretty pictures not be an engineer, my head esplodes from this conversation. :wink:

Seems like my posts are still under the moderation process so I dunno when or where this one will appear in the thread but anyway :

A texel is a TEXture ELement. The tiniest element of a texture applied to a surface. See a brief description here

It looks like one of my post doesnt appear. If it does later on, sorry for the duplicate.

@ : if my tests are correct, the parameters from Klepadło (post #169) produce a similar quality than the parameters from Koola (post #172), but faster and without any modification of the baselightmass.ini.

The only way that I understand this, at least regarding the problem with shadows, would be that rising the IndirectLightingQuality replaces all the modifications suggested in the baselightmass.ini under [DevOptions.StaticLighting*Quality], ie not only NumHemisphereSamples(Scale) but also DirectPhotonsScale, NumIndirectPhotonsScale and NumIndirectIrradiancePhotonsScale.

Is that correct ?

Lightmaps are textures generated to contain shadowing informations, just like the diffuse texture of your material give you the colors. It’s the same as with vray/corona, etc. A low res texture, even with crazy high settings, is still a low res texture and will end up looking bad anyway!!!

Rafareis thank you very much for the guide!

Great article.
Thank you so much!

I am trying to follow Rafareis’s settings. The quality of indirect is much better but I am getting some strange results which I don’t know how to fix:

d709c13a50de223bc3a1d61dd02e8c1a2f7918b0.jpeg

Before changing the .ini settings there was no issue there. Any idea what’s causing this?

As you can see here it’s the same mesh, but not happening everywhere:

12f92e7557fc2d03b5132f19fa94d5e76c38fd57.jpeg

Never came across this before.

it looks like insufficient lightmap resolution for the walls / ceiling.

Can’t be that. Walls have 256 and ceiling 512.

I’m pretty sure it’s something in lightmass, I just can’t figure which setting would affect this.

This build is done using medium quality with .4 scale , 100 bounces, 1 indirect quality and 1 smoothness.

Lightmass.ini:

NumHemisphereSamples=128
NumIrradianceCalculationPhotons=4096
IndirectPhotonDensity=6000
IndirectIrradiancePhotonDensity=3000
IndirectPhotonSearchDistance=180

I’ve had the same result on a previous production build with 512 hemisphere samples, 12000 and 8000 PhotonDensity.

Have you made sure to separate your lightmap UV shells by at least one grid space? Try snapping the lightmap UV’s to the grid- (if using a 256 lightmap resolution, divide 1 by 256 to get the correct grid spacing, and then snap all UV’s to the closest grid space)

You have to increase your lightmap size on these walls or optmize the UV’s manually. Check if your meshes are too thin. Also, don’t use more than 20-30 indirect bounces. If you set it to 100, it will cause undesirable artifacts and will not bright your scene