Gpu lightmass looks great but terrain way darker then static meshes

When i bake my level in gpu lightmass the lighting doesnt seem to work correctly. It looks great on all static meshes but the terrain itself looks extremely dark in comparison. Whats going on with that?

That may be caused by one or more of a number of factors. Can you provide a screenshot of landscape material, skylight and directional settings, and the results on the landscape vs meshes?

In addition, is there a post process volume covering the meshes, but not landscape, or all of it, etc?

post processing is unbound and infininite. The skylight is a skylight from ultra dynamic sky except i set it to static for baking. Its a capture skylight. Attached screenshot has meshes and landscape with both unlit and baked lighting to see difference. The terrain material was from a purchased asset years ago and seems to have always worked fine in this level before trying gpu lightmass.

Seems like im also having artifacts on certain areas for static meshes as well… which changes depending on what value i use in “r.PathTracing.LightGridMaxCount”.

No matter what hte terrain is simply darker. Looks like the lights impact it in a lot of places but its ■■■■ near black.

Lightmass importance volumes cover the playable areas though may not cover some parts of the terrain in the distance. But again the areas within the importance volume have problems. GPU light mass is awesome but very unpredictable. I had high hopes when someone told me about r.PathTracing.LightGridMaxCount… but doesnt seem to fix all my issues.

Dynamic lighting works fine on the terrain.

The old rivers ive gotten from asset packs also seem really dark. Its not unreals new water system.

Here is a screenshot of the terrain after bake and unlit.

Also… bake what you see instead of baking the entire level seems to work fine in GPU lightmass… as in the terrain is not super dark. None of hte problems… wtf???

it could easily be the skylight…
in the material you posted, the top level BreakMaterialAttr node…what color data is it getting for base color? If any colors that are covering a large percentage of the terrain are dark enough, then the skylight could reprojecting that as darker shading in the lighting…

@kurylo3d

Would you mind terribly converting the terrain to a mesh, baking, and showing us how that looks?

I’m having trouble seeing why you feel the color is different than what you think it should be.
It’s 100% possible, I just don’t clearly see anything that points to anything being wildly bad / not what I would expect.

One thing that could be missing for rivers is reflection captures- this shouldn’t really change the darkness of the landscape vs the same(or similar) static mesh though.

again… thats not the issue here. THe terrain bakes the correct colors with a “bake what you see” mode. Here is a screenshot of that. And to illustrate there are other issues in the scene… here is a room where bake all makes almost every light in the room not contribute… as though there is something invisible blocking hte light. See the comparison shots for that one as well bake all vs bake what u see. (again works fine with bake what u see) In fact that edge of the light in the screen shot… is not in fact the edge of the light. The light that is seen there should extend beyond that hard dark line. Nothing is occluding the light but it is behaving as though something is in full bake mode. Also i can increase those lights to 100000000 lumens and u still wont see them. Its not a brightness issue when the problem occurs. It just literally doesnt let the lights contribute to certain areas. Almost a box like pattern for certain areas…

That being said i have had fluke occurences where bake what u see also stops working and i get the result of full bake. Its all a strange bug and im not sure what i to do about it. As i said in a previous level i just set "r.PathTracing.LightGridMaxCount 9999 " and that seemed to do the trick … but for this level it is not.

My thinking is that maybe your lights are set to movable and therefore the bake ignores them?

Doesn’t seem like there is much else going on in the realms of possibilities / wouldn’t really be easy to debug without looking into the project itself…

I dont think your understanding. The lights are all static. The comparison shots are showing both baked light map versions. The difference is one is done with “bake what u see mode” and the other is bake all mode. “Bake all” craps out. Again… every image in that screenshot is lightmapped. No changes between other then setting gpu lightmass to bake all instead of bake what u see.

In past project someone told me r.PathTracing.LightGridMaxCount would help get around light limits that gpu lightmass has or something… and it did work for antoher level, but for this one nothing is helping. GPU lightmass is just a very broken peice of ■■■■. Its unfortunate because it looks great and goes fast on my dual 3090 nvlink.

Again its definently a bug. I am just trying to find information to get around it.

1 Like

First of.
Engine version matters.
You need to go look up what the parameters are for your version. If there is a max light, what it is, etc.

Second of.
I was under the impression that gpu lightmass doesn’t use sli nor does the engine.
If I am factually wrong, please do let me know.

Third of.
I hope you realize we can’t do more than take wild guesses as to what the issue may be without actually looking at the specific project.

Fourth of.
There’s no point in getting mad at the engine. Just live with the fact it blows and cope with it. You’ll be more mentally sane :stuck_out_tongue:

Fifth thing.
Are the lights set to “static” or “stationary”?
Not sure if it really matters, but if they are stationary you can maybe try a go with setting their master BP to static… or vice-versa.
Don’t hold your breath on it working.

Last thing.
How many lights are we talking total for the scene to be baked?
The shots don’t seem as exuberant as other stuff you previously had issues with.

this is hte latest 4.27 version.

2nd… it does in fact take advantage of multiple gpus in 4.27. Some console commands and stuff but it works great. Volumetric lightmaps dont support the nvlink / sli portion, but the lightmaps themselves do.

3rd… sometimes wild guesses are enough. Last time i had this problem … someone private messaged me and taught me about r.PathTracing.LightGridMaxCount … which did in fact fix the problem on a previous level… just not this one…

4th… i mean… its not a working product as advertised. I have to fall back on cpu lightmass which is sad and looks different.

5th… STATIC. all lights arent even in blueprints… they just are placed randomly around and static.

last thing… around 860 lights scattered around multiple sublevels.

Cool on 2.
So far, I have just been using CPU off of a network of 5 ryzen because it was faster. (Mind you, I bake less than once a year XD so I just hijack all the office PCs)
Maybe a double 3090 rig can match it…


Can you / are you even able to bake only a specific sub level?

860 doesn’t seem like too many for a modular level IMHO…

This could in fact be an issue with .27 - there are plenty. The FPS/rendering pipeline is still no good.

I haven’t checked if there are any updates, but maybe you should build the latest avaliable source of .27.
Probably won’t help. But there’s a .001% chance it will? :stuck_out_tongue:

basically i had 5 cpus baking a level with my main one having 32 threads… rest with 8 or so… like a 4-12 hour build time… dual 3090s… besides the fact that gpu lightmass looks better… baked in about 10 min for the entire level.

I tried rebaking hiding most of the sub levels but the terrain and a few buildings. Building interior looks fine in that full bkae, but the terrain is inconsistent. Some areas brighter then others… with strange hard edge shadows to pitch blackness…

I mean look at how inconsistent some of these lightmaps are with full bake… Look at the box pattern that comes out of no where.

1 Like

Well, that last screencap could be a lightmap issue.
There’s a clear pattern to it.
Really odd as it is?

Idk what to tell you. .27 is really the trashiest launcher release ever.
Try to build your own version from source.

For me, it’s the only way to be able to use the engine at all.
The drop down menus in editor keep flickering at different height when using the regular launcher build.
And now the editor is also causing the main monitor (of 3 all4k) to turn on/off randomly when playing in PIE.

I don’t even know why I bothered updating the launcher version XD

problem is its not a light map issue… checking uvs is first thing i tried. In fact notice the rest of hte floor… they are all the same model duplicated over and over modularly. So its fine in some places and not in others… In fact i noticed the same pattern across the map on other static meshes.

Maybe that’s something for a bug report then?
Looks pretty random too.

I just deleted some lights and brought down the radius to low just for testing… man it looks way worse lol… the blockky black boxes everywehre… very random feeling. Previously radius was very far just because it was static and i didnt care. But for testing i brought the lights to cover just what they needed… problem is really bad still…

have you looked at the different visualization modes to see if there’s something consistent with the blockiness and bad lighting / shading? are distance fields enabled for shadowing or other things in the scene?

I’m creating a landscape with a pretty basic layered material on it, rendering only one texture of 3 so far, and I’m getting these dark bands on a certain area of the terrain. It’s dynamic only lighting, but when I viewed some visualization modes, it appeared a few things looked like they’re associated with the banding issue.

What are skylight settings for the levels it’s occurring in?