Announcement

Collapse
No announcement yet.

Something similar to night vision, but simpler!

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

    Something similar to night vision, but simpler!

    Hey guys, so let me explain what I'm trying to achieve..
    Right now I have camera in my scene that has spot light attached to it. If it didn't spot a player, it is green, if it sees it it turns red..

    Now, since in reality, the cameras wouldn't shine light depending on whether they spotted something (or someone) or not, I had an idea. I want to give my player ability, whilst holding a certain key to be able to see the current state of cameras, in this case to be able to see their "lights" and nothing else..

    Images should make it clearer.. Imagine walking around the game and seeing this:
    Click image for larger version

Name:	before.png
Views:	1
Size:	707.7 KB
ID:	1144087

    And then you hold a certain key and while holding you can camera's spotlight, like this:
    Click image for larger version

Name:	after.png
Views:	1
Size:	750.1 KB
ID:	1144088

    Easy way is just to toggle visibility of light off and then while users hold the key it gets toggled ON, but that's easy for one camera, what if the level consists of 35.. Is there a way to create a list of cameras, and then on pressed key they all get toggled at the same time? Or perhaps, can I put all camera's spotlights into a separate layer that isn't being rendered until player hold the key down?

    P.S. Is there a better way to render that instead of using spotlights? I would also like the cone of the spotlight to be colored as well, slightly transparent and not just the hit on the floor..
    Because in real life, camer field-of-view is more similar to frustum than it is to cone.. Like transparent frustum would be more realistic, perhaps a mesh that doesn't have collision on and has transparent material?

    Thank you for "watching" my thread

    Click image for larger version

Name:	thanks.png
Views:	1
Size:	133.1 KB
ID:	1144090
    Last edited by eXtreme; 02-10-2015, 06:58 PM.

    #2
    I wonder if you could fake the effect using a decal?

    Comment


      #3
      Hey!
      I am not sure about which effect is the best! I myself would say that the one you got already seems cool! The idea of using a decal also is also good if you like something even better!

      For communicating with the several cameras though I could offer you some suggestions! First of all you can bind your camera toggle to an event dispatcher and work your way through that!
      Another even easier way would be to create an interface for your cameras (for the toggle) and then Get All Actors of Class! Then send your interface message to all the actors toggling the lights on/off!
      This post explains exactly that: https://docs.unrealengine.com/latest...T_5/index.html
      Check my User Interface Kit here: https://forums.unrealengine.com/show...-Interface-Kit
      A WIP Hex Planet Generation: https://forums.unrealengine.com/show...ral-Generation

      Comment


        #4
        Hey thanks for replies!

        I don't have much experience with decals, but I'll it!
        Also thanks for linking that site, should be helpful!

        Comment


          #5
          Another option is to use a Post Process volume, Tim Hobson has a bunch of tutorials over in his Photons be Free thread. Here is the Night Vision tutorial (with downloads!), it's not quite the same as your current method but may be useful:
          https://forums.unrealengine.com/show...l=1#post208230
          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

          Comment


            #6
            Hey DotCam, thanks! That link is super cool, in fact I'll be using that night-vision..
            Night-vision was always on to-do list but that one is awesome!

            Comment

            Working...
            X