Illumination Detection System for Blueprints

I’ve built out a component-based system that aids the user in determining a superficial illumination value for an object/actor/player character/whatever that can be used for applications like stealth light/shadow mechanics or puzzle games.

Probe components account for point, spot, directional & sky lights, as well as custom “illumination volumes” in box or sphere shape for LPV injected emissive objects. (Note: LPV emission injections are broken in 4.20, the version this video was recorded in, but in case it makes it back into the engine or another solution comes up/people need to identify custom illumination areas, this is a workable solution.)

In this video, the player character has probes on head, shoulders, hands, torso, and feet (8 total.) Stress testing this with an average of 38 light overlaps per probe (not featured in this demo video) trace counts ran upwards of 300 traces per frame, or 72,000 traces per second, with no discernible impact on performance.

Wow. This was pretty cool. Could be used for a sneaking game. Love it.

This is so cool ! Once I tried to recreate Splinter Cell gameplay but amount of tracing from many light sources tanked performance to unplayable framerate. Seeing this with not killing FPS is amazing !!!

After realizing I overlooked the need to work with existing light setups/baked lighting, I refactored how my light probe framework checks for lights, clearing two loops off of my trace function, which can now run 500 traces per frame with no frame time cost. (75k traces per sec @ 150fps)

Example: a player with 8 probes (distributed to extremities, head and torso) can overlap 65 light bounds at once and trace for illumination based on distance to light source from probe (and view cone angle for spotlights on half of these traces) before frame times are affected.

Also added effective radius for probes so that per-point sample area can be configured for more broad/accurate coverage.

Here’s a video with an improved testing area, moving light sources, and per-probe illumination debugging.

^ This is good… Great work ! In video description you said that you are finishing up documentation, that means it’s going to release soon ?

Thanks! Yep, hoping to have it documented & released this weekend, time/kids permitting :slight_smile:

This looks pretty awesome @hippowombat. Any means to account for lighting color?

Thanks! It could definitely be included & tracked as a variable in the probe, as the bound volume that the probe references has a reference to whatever light it’s representing, so you’d just need to pass the color through in the Probe Detection function I’ve built in. I’ll mark down to include getting the referenced light properties in the example docs I’m writing out. :slight_smile:

Following up, do you have a use case for tracking color that you could suggest so I can better understand maybe how best to track it/document it?

For simplicity, the use case is…

The player must change color to match the lighting color to be considered in stealth.

[FONT=courier new]IF player.color != source.color = “Alert Guards!!!” ELSE player is invisible.

Sure thing, I’ve gone ahead and added a toggle-able step in the trace loop to check for light color at each intersection point per-probe.

This has reached release status, so I’ve started a thread in the community content tools/tutorials section as it’s better suited there. Can a mod please either merge these threads or close this one? Thanks!

Awesome work @hippowombat! Im sold and ready to purchase! Whats the ETA on the marketplace?

Hey there, this one’s not going in the marketplace, I’ve released it for free. Here is a post with some basic instructions and a Github link. Cheers!

Wow! Thanks. I might use this for a stealth prototype. :smiley: