Wonky lighting previews (and no normals with lightmaps?)


I’m really happy with how this is coming along, but started running into lighting issues. Briefly:

  1. Using lightmaps, but apparently they don’t support normals? Shall I just delete my normal maps? I hate to not use them.

  2. Changing my global lightmap settings to that shown in this image supports normals, but some lights stop affecting some maps.

  3. As I add lights to the scene, the editor stops rendering them. They appear in the launch, but I’d like to be able to assess them in editor.

Any ideas?

1 Like

Do they appear after clicking on this button on the left?

The other questions I’m not sure about and would have to wait until @mvaligursky is back.

They should support normal maps. I will probably need to take a closer look if I get some time.

1 Like

Looks like there is a bug on the lightmapper button in the Editor causing it to crash out :frowning: Will have to log it

1 Like

Yeah, I click the Light Mapper button pretty constantly. Weird. Anyway, I look forward to any more info about the normal maps and other issues. Thanks! It’s looking great and I’m cranking onward. Just want to take full advantage of all the optimization and graphics possibilities.

For now, disable affect dynamic on all lights that are used for lightmapping or only have one light that affects dynamic.

I would also disable static on all models/lights and use batching instead.

1 Like

The issue with the normals is that the Color and Direction wasn’t selected (which makes sense) and is what you’ve confirmed above.

Looks like the main issue was due to the lightmapper button bug mentioned above in the Editor and you can work around it by disabling Affect Dynamic on all lights that are used for lightmapping

1 Like

That mostly worked. Only issue that remains is that a couple of the lights (the last few added) only affect some parts of the model. The wall (which the light is pointing at) remains untouched, despite the sidewalk and dumpster being illuminated. (Note: the wall WAS illuminated in previous iterations, so I’m confident it isn’t a UV issue.) It isn’t a HUGE deal, I’m mostly curious. Especially since I do intend to add a few more lights as needed.


You still have 2 lights that are lightmapping and have Affect Dynamic enabled. Please disable Affect Dynamic on these lights

I must be overlooking something-- I’ve scored through the hierarchy line by line and can’t see any lights I’ve missed. Clearly I am missing something?

Thanks for putting in the time-- and maybe you are looking at a previous version of the build? I toggled off dynamic on those earlier today, to no apparent effect. I have republished the build, in case that makes a difference.

Im looking at the Editor project posted here Wonky lighting previews (and no normals with lightmaps?)

See fork here https://playcanvas.com/project/999659/settings

So I pulled up both and compared. None of mine currently have Affect Dynamic enabled, HOWEVER, there are some differences:

In your fork, a lot of the lights have both Bake Lightmap AND Affect Lightmapped turned on. I had Affect Lightmapped turned off for all of mine (with Baked Lightmap being on).

If I change the problem lights in my scene to Affect Lightmapped enabled, they illuminate properly.

Is there a redundancy there? I had Affect Lightmapped turned off on all lights because I assumed Bake Lightmap covered everything.

EDIT: Not all lights affect the environment properly with “Affect Lightmapped” and “Bake Lightmaps” enabled. Enabling “Bake Lightmap” causes the light to stop illuminating properly. I guess I will just not bake lightmaps for those lights?

EDIT 2: Toggling on ALL of the following seems to fix it: Static, Bake Lightmap, Bake Direction but NOT Affect Lightmap.

That is the workaround I will use going forward. WHEW

I’ve taken another look at my fork and tweaked it.

Render/Model components should be have Static disabled
All lights should have Static disabled, Affect Dynamic disabled, Bake Lightmaps enabled and Bake Direction enabled

1 Like