Announcement

Collapse
No announcement yet.

Illumination Detection System for Blueprints

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

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

    Comment


      #3
      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 !!!

      Comment


        #4
        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.

        Comment


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

          Click image for larger version  Name:	FB_IMG_1566504901157.jpg Views:	2 Size:	325.4 KB ID:	1655984
          Last edited by hippowombat; 08-22-2019, 04:19 PM.

          Comment


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

            Comment


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

              Comment


                #8
                Originally posted by MadRat1171 View Post
                ^ 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

                Comment


                  #9
                  Originally posted by hippowombat View Post


                  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.
                  This looks pretty awesome hippowombat. Any means to account for lighting color?
                  HeadlessStudios.com - S P A G H E T T I: Ninja Swords, Guns & Monsters & Other S**t! - Join Our Discord

                  Comment


                    #10

                    Originally posted by TechLord View Post

                    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.

                    Comment


                      #11
                      Originally posted by TechLord View Post

                      This looks pretty awesome hippowombat. Any means to account for lighting color?
                      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?

                      Comment


                        #12
                        For simplicity, the use case is...

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

                        IF player.color != source.color = "Alert Guards!!!" ELSE player is invisible.
                        HeadlessStudios.com - S P A G H E T T I: Ninja Swords, Guns & Monsters & Other S**t! - Join Our Discord

                        Comment


                          #13
                          Originally posted by TechLord View Post
                          For simplicity, the use case is...

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

                          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.

                          Comment


                            #14
                            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!

                            Comment


                              #15
                              Originally posted by hippowombat View Post

                              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.

                              Awesome work hippowombat! Im sold and ready to purchase! Whats the ETA on the marketplace?
                              HeadlessStudios.com - S P A G H E T T I: Ninja Swords, Guns & Monsters & Other S**t! - Join Our Discord

                              Comment

                              Working...
                              X