[SOLVED] Lighting.j3md has an exception to the lightmap support

Hi everyone.
During this period of time, I have been testing the lightmap part, and I found that the lighting.j3md material has an error in the lightmap support. Note that I use the uv coordinates of the second light map as follows:
When the normal map is not set, everything is normal.

But when the normal map is set, the screen goes black.

I don’t know if others have encountered it, or if others have solved it. :face_with_raised_eyebrow:

normal maps (and bump maps) only work with tangents. Your mesh doesn’t have tangents.

Edit: also note that this seems to have nothing to do with “lightmap” as your title suggests.


Thank you for your quick reply. let me try again

It really is! Thank you, I’m so stupid :rofl:

But the weird thing is that I don’t use light maps or create tangents. Normal maps work, at least not all black. :face_with_monocle:

Nah, I think everyone goes through this at some point.

True story: when I started using JME again in 2011 to write the original Mythruna, I added normal maps and bump maps to all kinds of stuff and it looked like it worked fine. And I knew better already that tangents were required just from general graphics knowledge and just assumed that JME must be doing some kind of magic. It turns out that some nvidia defaults were making it look like it worked and it looked like crap on almost every non-nvidia system and on macs. Took me forever to figure that out. (Edit: note that ‘forever’ in that time scale was about two days.)

So it really is something that everyone hits, I think… only their forum search skills might prevent them from asking about it… but it’s a hard thing to search for when you don’t know what causes it.

1 Like

Okay, to make sure everything is normal, I need to correctly construct the tangents for each model to prevent errors, thank you again! ! In addition, I tried your game and it still maintains 60 frame rate on my integrated graphics card, which is great!! :+1: :+1: