Announcement

Collapse
No announcement yet.

Shadow Stealth - "hide in the shadows" plugin

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

    [SUPPORT] Shadow Stealth - "hide in the shadows" plugin

    Hi All,

    Just submitted Shadow Stealth, a code plugin implementing "hide in the shadows" gameplay mechanic, perfect for thieves, assassins and alike. All the features are easily accessible from Blueprints, including very easy integration with AI Perception. No C++ knowledge needed.

    See what it's good for in the trailer:

    ​​​​or play with it in the example project build (win64).

    Features:
    • Supports All Light types and mobilities.
    • Supports per-channel (RGB) light intensity.
    • Integrates with AI Perception component through AI Sight sense.
    • AI Perception integration is extendible with Blueprints and C++.
    • Easy setup with a handful of components. Level editor tools and predefined actors provided for convenience.
    • Performance is independent of the size of the map and the number of lights.
    Changelog:
    • 1.5
      • Fixed packaging error
    • 1.4
      • New named notifications
      • BP and C++ extendible AI Sight integration
      • AI Sight Target with distance multiplier (per M.O.A.dev request)
      • Workaround for UE 4.24 bug UE-86045
    • 1.3
      • Volumetric Lightmap support
      • RectLight support
      • Fix ShadowStealthComponent tick behavior
    • 1.2
      • Add AISightShadowSenseEnabled for enabling/disabling if AISight sense uses shadows (Shadow Stealth default) or not (AIPerception default)
      • Add new methods of calculating light intensity from multiple test sockets: max, min, mean, median
      • Add Shadow Lights and Shadow Stealth Character actors to placement mode
      • Add TestSelfLocation flag to shadow stealth component
      • Fix AISight trace channel handling
    • 1.1
      • Add getting per color channel light intensity
      • Fix handling light color
    Screenshots:
    Click image for larger version  Name:	Screenshot_01.jpg Views:	4 Size:	211.5 KB ID:	1653942Click image for larger version  Name:	Screenshot_02.jpg Views:	2 Size:	198.9 KB ID:	1653943Click image for larger version  Name:	Screenshot_03.jpg Views:	2 Size:	460.0 KB ID:	1653944Click image for larger version  Name:	Screenshot_04.jpg Views:	1 Size:	379.8 KB ID:	1653938Click image for larger version  Name:	Screenshot_05.jpg Views:	1 Size:	375.9 KB ID:	1653936

    If you're in some implementation details, you can check out my GitHub projects:
    Last edited by sfider; 01-09-2020, 05:57 PM. Reason: Changelist for update 1.5
    Check out our Shadow Stealth plugin
    Check out our KiBLII plugin

    #2
    Just wanted to let everybody know that the Shadow Stealth plugin is available for download on the Marketplace: https://unrealengine.com/marketplace/shadow-stealth
    Check out our Shadow Stealth plugin
    Check out our KiBLII plugin

    Comment


      #3
      How does this work? Does it have collision on all the lights, and when player hits collision then it starts tracing?

      Comment


        #4
        Awesome sfider,

        Nice feature set. Does the system account for lighting color? Use Case example: The player must change color to match the lighting color to be considered in stealth.
        HeadlessStudios.com is now part of TheGameDevStore.com

        Comment


          #5
          Originally posted by Vathusmoure View Post
          How does this work? Does it have collision on all the lights, and when player hits collision then it starts tracing?
          This is exactly what it does for stationary and dynamic point and spot lights. There's a sphere collision for point lights and a capsule collision for spot lights. Stationary and dynamic directional lights are traced at all times. The intensity of the light is calculated with the same formula used by the engine in shaders.

          For static lights and indirect lighting (GI) the plugin uses precomputed lighting build on the level (only Sparse Volume Lighting Sample method is supported currently).
          Check out our Shadow Stealth plugin
          Check out our KiBLII plugin

          Comment


            #6
            Originally posted by TechLord View Post
            Awesome sfider,

            Nice feature set. Does the system account for lighting color? Use Case example: The player must change color to match the lighting color to be considered in stealth.
            Thanks TechLord, and double thanks because you just helped me find a bug. I take only the light intensity into account, but I forgot about the light color and it also has an impact on the intensity. I'll fix it ASAP and as a bonus I'll add the light color information.
            Check out our Shadow Stealth plugin
            Check out our KiBLII plugin

            Comment


              #7
              Originally posted by sfider View Post

              Thanks TechLord, and double thanks because you just helped me find a bug. I take only the light intensity into account, but I forgot about the light color and it also has an impact on the intensity. I'll fix it ASAP and as a bonus I'll add the light color information.
              Glad to help Look forwards to colored lights.
              HeadlessStudios.com is now part of TheGameDevStore.com

              Comment


                #8
                TechLord The update is waiting to be processed by Epic. I hope it won't take more than a week. Thanks again for the help

                EDIT: I underestimated Epic's response time. The update is live right now.
                Last edited by sfider; 08-29-2019, 08:00 AM.
                Check out our Shadow Stealth plugin
                Check out our KiBLII plugin

                Comment


                  #9
                  Awesome plugin support gameplay.

                  Comment


                    #10
                    Does this support movable rect lights?
                    And is there a reason u used capsule collider for spot lights instead of cone collider?
                    Also, is it possible to change it to be a toggle ( in stealth/not in stealth) rather than the light bar that's used now?
                    Last edited by Vathusmoure; 08-29-2019, 07:31 PM.

                    Comment


                      #11
                      Hi Vathusmoure,

                      Movable rect lights are not supported at the moment. It's something I'm planning for an update in some time.

                      The capsule collider is a better fit for spot lights. Spot light shape is not a real cone, it's a cone-shaped section of a sphere. To fit the spot light shape into a cone you would have to build a cone with a height equal to the spot light radius. For a large spot light angle (closing to 180) the cone would end up huge. here's no such problem with the capsule collider and it's also better for performance then cone. Also, the collide is only to check if we're in the visinity of the spot light. Before performing the trace, the socket is tested against the actual shape of the spot light.

                      In the plugin, you are provided with a floating-point value that represents the intensity of the light falling on your character. What you'll do with that value is totally up to you. In the example project, I've presented a little more complicated implementation, but in your game, you can choose to just toggle 'stealth' state on a set value of the light intensity. You can use events, that are built into the plugin for more convenient implementation.

                      If you didn't check it up yet, please download the binary build of the example project here.
                      You can also read more about the plugin features and how to use them in the documentation.

                      Btw, thanks for taking an interest in my plugin
                      Last edited by sfider; 08-29-2019, 08:59 PM. Reason: Clarification of the spot light anwer
                      Check out our Shadow Stealth plugin
                      Check out our KiBLII plugin

                      Comment


                        #12
                        1) I had to set my characters visibility channel to overlap to get this to work properly. I had it on block at first but it was saying I was hidden while doing things like running and jumping. Is this ok? Everything seems to be working correctly.

                        2) Is there a way to turn off the component on the player character? So that my AI can still see me. If I dont have any lights in my level, and only use skylight, my AI doesnt react to me.

                        3) I noticed with the directional light, if the trace hits any 1 socket, then you are fully lit. Is this intentional, or should there be a gradual increase like with the other lights?

                        That being said, I really like this plugin, good job

                        Comment


                          #13
                          Hi Vathusmoure

                          1) This is something I missed in the documentation. Your solution is correct. You could also create a separate trace channel and configure Shadow Stealth (through Project Settings) to use it instead of the visibility channel.

                          2) There is no way to switch between Shadow Stealth override of AISight Sense and the default implementation at runtime. If you don't want to use this override, change the base class of your character to Character instead of ShadowStealthCharacter and attach the ShadowStealthComponent to your mesh component using Blueprint Editor. Do you think that the plugin could benefit from a flag for disabling the AISight Sense override?

                          Also, if you get 0.0 light intensity when only the Skylight is in use, please look into Documentation > Basic Usage > Scene Setup > Static Lighting, and remember to build your lighting.

                          3) The light intensity value for the whole character is the maximum light intensity of Test Sockets. It works the same for both point and spot light. The behavior you see is the result of a more local nature of spot light.

                          Thanks for your support and all the motivating comments
                          Check out our Shadow Stealth plugin
                          Check out our KiBLII plugin

                          Comment


                            #14
                            It would be nice to be able to toggle the stealth on/off for certain circumstances (boss fights come to mind). And there's always things you don't think of, so maybe other unforeseen situations as well.
                            For the direction light, I think I explained it wrong. If my head socket is the only thing the light sees, I get an intensity value of, say 3. If I walk into the light, so that all 5 of my sockets are exposed to the directional light. The value is still 3. There's no difference. Its not a huge problem, just weird that if my head is the only thing lit. I have the same exposure as if my whole body is lit.

                            Comment


                              #15
                              I'll add the flag for AISight Sense override in the nearest update.

                              The behavior is intentional, it takes the maximum light intensity from all Test Sockets. But I see your point. In the nearest update, I'll add some other methods to the 'maximum': minimum, average and median. This way you'll be able to choose what best fit's your project.

                              As for the nearest update, I'm aiming for the end of the coming week.
                              Check out our Shadow Stealth plugin
                              Check out our KiBLII plugin

                              Comment

                              Working...
                              X