Bake lighting intentionally with low quality?

Here’s a puzzler: I’m making a game with very stylized cel-shaded graphics and I like the smooth, hard lines and stark contrasts that I get with unbuilt preview lighting (e.g. when you move a mesh and UE drops down some really quick guide-lighting).

When actually building lighting, it looks Too Good; the realistic multi-bounce global illumination is obviously more correct but the smoothness of the shadows produces a lot of ugly speckling and weird gradients once the cel shader gets a chance to chew it up.

I know that you can get similar results to preview lighting by only using movable lights, but if the lights don’t NEED to move, I’d just as soon bake them and save the performance impact.

Is there some way (either via tweaking a combination of settings or whatever) that will produce lighting like the preview… But as a “production quality” build, which I will get with a packaged game, rather than just as a PIE placeholder?

Try setting Num Indirect Lighting Bounces to 0 in World Settings and Light Source Angle to 0 in your directional light and then rebuild.

BSPs default to a lightmap of 32. Increase that to 64 to make it worse. Static meshes are the opposite. Lower that value of a static mesh to make it worse.

I don’t want decreased resolution, though, I want decreased lighting bounces. By “worse” I mean “less diffuse interreflections of light in the map”. I’ll try Jacky’s suggestion… But I do want to be clear, changing Lightmass in that way will affect a production build, right? I don’t want to change settings which are meant to improve lighting build times for WIP maps but which don’t carry over for a finished, packaged game.

Yes, it will affect the production build. Those settings i mentioned should give you the lighting you see in preview; no light bounces and sharp shadows. Keep in mind that no light bounces means completely black shadows so you may want to use a skylight if you want some sort of ambient lighting.

I actually like the pure-black shadows; my character has a lot of emissive lighting on him (lines all over his armor, a glowing eye light, etc) and it’s a very cool effect to have shadow casting which produces pure black elements that only show the emissive textures. That’s one of the reasons I wanted the effect, the cel shader produces really nice bi-tonal highlights and then the darkest areas get a pure black that shows emissive. It’s a very animation-style effect I like, and good global illumination makes the lighting too diffuse and sort of ruins it.

Basically my lighting solution is a single super-bright skylight, though I’ve considered adding secondary floodlight-style lights for certain areas.

Every light has an IndirectLightingIntensity, you can use that to scale down the GI. Lowering the bounces does something similar. There’s an overall ‘DiffuseBoost’ in WorldSettings->LightmassSettings as well.

So I’m bumping this to say I’ve been playing with it and it’s getting CLOSER, but it’s still not there.

I’m doing 0 bounces, using a single directional light source as my main light, and a secondary directional light (set to not cast shadows and with only a fraction of the intensity) with the same downward angle but 180° opposite yaw. This produces stark shadow lines but makes the shadows cast under open sky (and walls not touched by the main light) visible rather than black, approximating indirect illumination… Meanwhile surfaces which are vertically covered get pure black shadow regions, which looks really good for standing in the shadows of overhangs and for tunnels cut into surfaces.

But I still get weird speckling on quite a few surfaces, which I fix by moving the object and moving it back, resetting the lighting on that object to preview quality. I also have to do this with point lights, which are losing their sharp halos on nearby walls. So obviously something is still different here from what is being calculated, though I’m not sure what.

Check out the screenshots below:

On the left, we see the lighting result from building. On the right, we see what happens when objects are moved-and-moved-back to restore the preview quality lighting on those elements (on the top, the large cylindrical structure is moved; on the right, the 8 point lights in the hallway themselves are moved rather than the surfaces, though I expect the result is the same).

I don’t think it’s a problem with lightmap UVs, otherwise you would expect the problems to persist across the preview lighting as well, no?

Also: I can get PROPER “preview” quality lighting by setting my skylights to movable. I know that has a performance impact but it’s still functional as a workaround. However, no such solution for my point lights as they start throwing errors due to them overlapping each other so much. So I guess the real question is “how can I bake my lighting so that all of it has the same quality as movable lights, assuming those lights and what they were casting light on were unchanging?”