Get lighting info on trace hit

I was searching for the solution and apparently you can’t get lighting information via blueprints. So I am looking for a way to do that with C++.
So basically what I want is for LineTrace hit result struct in blueprints to contain info on lighting condition of the texel hit by the trace, in a float value as an intensity of lighting, combined static, stationary and movable. Or maybe entirely new trace node if it is simpler to do, that’s not critical.

However.

I’m a total zero in programming. I understand nothing in C++. That’s why I was using blueprints in the first place. Last time I tried to inject custom code into my project (A few lines that were supposed to grant me blueprint control over AI Perception sight peripheral angle), it corrupted the entire thing and forced me to restore it from a backup.

So I would really appreciate as dumbed down as possible step by step instruction on how to implement that.

I’m not sure how far you can get without code, but there probably isn’t a quick and simple (or even fully built-in approach to this).

What you will need to do is possibly find the World Hit Location of the event. Using this location, possibly use “UGameplayStatics::ProjectWorldToScreen”. This should give you the screen pixel of world location and you can perhaps use this to grab the pixel colour.

As for the actual lighting ‘intensity’, I’m not actually sure. Or you trying to find out what light is affecting a certain point in the game and get the light data from that?

I’m trying to implement a stealth system for the player, plus some behavior for couple of NPCs (avoidance of lit areas). I planned to do four traces to go from the pawn’s origin towards the ground (Slightly off in four directions, to cover area where it’s standing instead of just single point right underneath), with resulting values being averaged out and then sent out as a multiplier for a visibility parameter.

Fallback plan right now is to use trigger volumes that add or substract from parameter of visibility on BeginOverlap and EndOverlap, but they will have to be placed and set up manually, plus that solution will ignore dynamic lights like flashlight of the player.
Although, now that you mentioned it, maybe using render target to a 4x4 pixel texture would be adequate alternative to that, but how to extract the value of pixel of the texture out as a parameter for blueprint to interact with?