Lets make Lightmass EPIC (and understandable)

I took a look at 's original scene yesterday.

The first thing I noticed was that all the walls were 1024. When you’re iterating on lighting settings, it’s better to start a bit low on the resolution side and then increase for a final render. I set them all to 256 and it looks the same after lighting built, and builds in only 2 minutes! 256 on everything is 16x faster than 1024!

I’m focusing on skylight only right now but will look into splotchiness with spotlights later. The short summary is that photons from the skylight are going to be necessary to achieve high quality with reasonable build times. This is because the openings to the sky are tiny, the chance that a random ray will find the light are tiny, so lots of error. This is going to take me some time to implement (a few weeks) and it might not end up working.

I recall Modo came up with a solution to this called portals I believe. From what I remember it takes light and channels it through the window openings. Anyhow, maybe something to look at?

Hey guys, great talk on the settings. I hope I’m not too off topic, but I’ve setup a swarm render farm to help with the increased render times of these settings. It seems that the farmed jobs seem to stop/die (see gaps in screenshot) in the middle and then pick back up. Is this normal or do I have something configured wrong? Adding a bunch of additional CPUs to the farm only cuts my time by about 20%.

I was thinking about portal lights also. I render and bake a lot in mental ray and portal lights on interior openings are really necesary for clean solution in reasonable time.

Probably best for another thread to keep this one focused, but that distribution is what I would expect of a small scene. Basically, only separate components can be processed in parallel. Once all your local cores have been assigned components, and two of your remote machines were assigned components, there weren’t any more to go around so the rest of the remote machines quit. In a bigger scene (duplicate the existing one a few times) they will all be utilized.

quick question. I looked for the Lightmass.ini file and it seems to be in these weird locations:
Unreal Projects[name]\Saved\Config\Windows
Unreal Projects[name]\Intermediate\Config\CoalescedSourceConfigs

The file in the first location is empty so I assume it’s not the one. I changed NumHemisphereSamplesScale to 100 in the second file and I didn’t notice any difference so I’m wondering if it’s the right .ini to modify. Where is the Lightmass.ini file located?

Edit: sorry I misread the file name. BaseLightmass.ini doesn’t even exist anywhere in the project folder.
Thanks

BaseLightmass.ini is in the UE4 installation folder, it contains the default settings, the config files in your project folder are based on that and override the default.

that’s what I also have found while searching for some information. too high Indirect Light Intensity most certainly introduces leaks. you could try increasing it a bit till the point when leaks appear and then increase camera sensitivity in PostProcess volume… this helped in my scene a lot…

I’ve made my own tests. I used to rely too much on lightmap resolution to get rid of the splotches. But this time I tried to mess with the values in the ini and managed to get something better, with lower lightmaps. These renderings are not final quality but it looks decent for ‘‘untextured’’ geometry.



This thing is an unoptimized section of the Salk institute made by Evermotion. It’s 100 pieces (lol) and the walls have extruded lines, each tile of the flooring is geometry, etc. I still only used flatten mapping with steamroller and set the resolution to each mesh to 256! These would not be final render settings but it’s already not too bad for 256 Lightmaps.

Settings :

skylight with Epic courtyard hdri. intensity 8. static.
basic wall material from the started content

scale .15
bounces 100
quality 10
smoothness .66

in the baselightmass.ini I changed : (based on what suggested, but apparently he deleted his test post he made earlier…)

NumHemisphereSamplesScale=128
IndirectPhotonDensity=1200 (I doubled the default value)
IndirectIrradiancePhotonDensity=600 (I doubled the default value)

Compress lightmaps is set to false.

took 2 hours to build.

Don’t understand why deleted his post, that was good information!

@: despite being 256 resolution the lighting looks pretty good!

This evening I’ll test some scenes with those settings and check if the results are much better then what I got, hopefully spending less time while rendering :wink:

Sorry guys, I’m just planning a final guide for this topic. There is a lot of disconnected informations here.

Ok cool Rafareis!

nice result

Thanks.
In my installation folder, it’s named BaseLightmass.ini.old.ver
I copied its content to my “project folder\Config” and renamed it to BaseLightmass.ini. I still see splotches everywhere. How do i know if it’s taking effect? should i reopen the project or is rebuilding the lighting enough? (i already tried both)

I have UE 4.7.6 and 4.8.3 installed

There are lots of threads on the location of baselightmass.ini, you shouldn’t have to move its location.

https://forums.unrealengine.com/showthread.php?55604-Noob-question-about-BaseLightmass-ini

I tried to bake the whole salk institute with the settings in my previous test. After 11 hours it was still at 11%. And that’s with 2 core i7 :frowning:

Light Leaks

Hi friends,

So until now we had two different situations that required different approach to tackle them -

Situation 1 - Using only skylight with HDRI as cube map to lit the interiors

 We face problem of light splotches on the walls which are not coming in direct  of first bounce. But fortunately community members were able to provide easy solution to this problem through changing some values in Baselightmass.ini. 

 Solution - Increasing NumHemisphereSamples value to 512 () or NumHemisphereSamplesScale value to 128 (Koola) will get you the clean GI results without changing anything in Baselightmass.ini (Don't change both values together, they are the same values just on different location, Use either one of them but not both). 

Lightmass Settings -

Static lighting scale = .1
Num indirect lighting bounces = 100
indirect lighting quality = 10
Indirect lighting smoothness = 1

Situation 2 - Using Point, Spot or mesh lights in conjunction with Skylight.

 We face infamous problem of light leaks, Unfortunately there is no concrete solution provided as of yet. 

 Solution - Not provided as of now. 

I have already lost three commercial projects due to problem of light leaks, because clients are referring to Unreal Paris for quality and to achieve that I have to lower the “Static Lighting Level Scale” between .1 to .4 and on those values putting spot light or point light ruins the whole scene. I have managed to put out some decent work form Unreal lately by playing with BaseLightmass.ini, but still there is so much to learn.

@ - Critically need solution to problem of light leaks. @ and @Koola already have overcome this in there scenes (So solution is already there somewhere in BaseLightmass.ini, UV workflow or anything else).

@ - You are free to investigate problems on developer level or implementing new things, but meanwhile Kindly tell us the workflow to remove these light leaks.

Meanwhile I have also found something very interesting while experimenting with BaseLightmass.ini file (On same uploaded scene) -

Static lighting scale = .1
Num indirect lighting bounces = 100
indirect lighting quality = 4
Indirect lighting smoothness = 1

Values Changed in Baselightmass.ini

IndirectPhotonEmitConeAngle = 2
NumHemisphereSamples = 512

Lightmass Resolution of walls - 256
Lighgtmass Resolution Roof and Floor = 1024

On Medium Preset

Render Time = 19 Mins on single i7-4930K Overclocked at 4.6 GHz

Here are the results -

&stc=1

&stc=1

&stc=1

Same scene Rendered without changing [COLOR=#800080]IndirectPhotonEmitConeAngle = 2 (Keeping it on default value i.e 30), all other settings are same ([COLOR=#800080]Render Time = 19 Mins).

&stc=1

&stc=1

&stc=1

I am loosing some indirect lighting while using [COLOR=#800080]IndirectPhotonEmitConeAngle = 2, other then that I don’t see any mojor differnce. May be I am 100 % wrong on this approach, but who knows.

  • Don’t know what I am doing here, is this even a solution?

[/COLOR][/COLOR]

[/COLOR]

Interesting tests. Right now we may know the settings, but these are very simple scenes. When you have a big scene (my salk institute has about 2000 meshes/lightmaps) it takes FOREVER to build and that’s with 2 core i7. Think i’m going to have to let my pc run for the whole week-end lol.

My scene Unreal take on classic has 2300 meshes with all walls, roof and floor @ 1024 Resolution with other meshes at 256 resolution minimum. It took 22 hours on 2 x i7 4930K 32 GB RAM each. When you think what you are getting in the end - Unlimited camera angles for still images and animation, 22 Hours seems like a breeze.

You have to experiment with different values, and avoid Indirect Lighting Quality = 10 (For me it always worked between 4 - 6).

That’s what we are targeting here - Balance between quality and rendering time.

**** that’s a lot, but during those 22 hours you cannot work on anything else, unless you have more pc hehe!!!