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

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.

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

is right, 256 (and even 512) for your big walls is really not enough… try 1024 for each section of your wall or detach the interior face and assign a lightmap to it so it takes as much place as possible on your uv map and leave the rest of the faces on a low res lightmap. By detaching some parts, you reduce the risk of light leaking from a part to another on your mesh too!

Ex. The red face is detached because it will be the only visible part in my house. I’ll assign a lightmap with a resolution of 1024x1024 to it. The rest won’t be shown so I leave the default lightmap res (very low). You cannot have a better lightmap than that for your interior. A single face that occupy almost all your uv space!!! This does not cause any problem because I still have geometry behind to block light from coming in!!! It wouldn’t work if I only kept the interior face tho ( at least not with some blocking bsp).

And with a script to flatten everything it does not take really longer to make it this way.

There is a new update available, is someone can tell us if there is any improvement about lightmass…
Thanks for this thread, it’s very helpful !

I suppose that lightmass doesnt have to be improved for the moment (and indeed isnt part of the release notes for 4.10). One nice addition to expect will be light portals from , maybe in 4.11.