Archived

This topic is now archived and is closed to further replies.

How To Implement Night Vision

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to implement night vision in my engine. I am using DirectX9 Summer SDK. I tried to find something on google, but I got nothing. I tried to find something on gamedev, flipcode, again, I got nothing. But, I can see some games have this capability (Ex. SplinterCell, good!). Is this a secret? Why can''t I find anything about how to implement night vision? I thought I can do this changing back buffer image. I got back buffer. I tried lock it, but I couldn''t, so I copied it to another off-plane surface, I changed surface image to get night vision, then I copied that surface to back buffer. 1. This is too slowwwwwwwwwww! - copying from back buffer takes about 484 ms (no filter). - changing image takes about 922 ms. - copying image to back buffer takes 0 ms! (no filter) - total is 1406 ms. 2. Let say I found a faster way to change back buffer image; Which algorithm should I use to create night vision image from normal image? I hope somebody help me. BSekerci

Share this post


Link to post
Share on other sites
What about something like rendering your scene as normal, then rendering a final screen aligned quad over the image which is just green and is alpha blended. That might give you something like you are looking for

---------------------------------------

Let''''s struggle for our dream of Game!

http://andrewporritt.4t.com

Share this post


Link to post
Share on other sites
One way I''ve seen it done is to render the scene in greyscale, with one point light at the camera position, and then just blend the whole scene with a noise texture to give the "graininess" of the image.
I haven''t ever implemented this myself, but most games look like that''s the way they do it.

- JQ

Share this post


Link to post
Share on other sites
I don''t want just make it greenish. I want to be able to play with pixel colors.

To crete a night vision image from normal image, I think, I need some kind of algorithm, like Adaptive Contrast Enhancement.

I don''t know much pixel shaders. Maybe using pixel shaders it is easy. Any idea?

If I can''t find a faster way, I have to use your idea f8k8.

BSekerci

Share this post


Link to post
Share on other sites
Lol, i''ve actually seen games that just turn the screen green (*cough* valusoft''s navy seals *cough*)

The simple solution would be to integrate it into your lighting system (if it is able to). In my terrain engine, i used per-vertex lighting that was applied dynamically... which was very easy to fudge for night vision

Share this post


Link to post
Share on other sites
not that much to do really.

bascially in a scope or goggle, its greyscale.


light sources are the natural light sources which are a bit darker than normal, and the rest are IR sources (infra-red - same as what you would use in a laser pointer in a pen or on a rifle, and tv-remote controls).
these light up your suroundings a shirt load.

Our large Kenwood remote control can light up the surrounding 100 metres (radius) out side when we pull out our NV scope. The laser we have can target the tops of trees about 500metres away.


If you want to see something similar in action (but can''t afford to buy a pre assembled NV scope) then get a black and white (most are) CCD camera. Those are those little button like things or the security ones you get for houses.
Then get a pack of IR (black LEDs - you can get some transparent ones now though) LEDS, hook them up in parallel then go into your front yard at night.
Turn on the CCD normally, and you can see whatever you would at night time. Turn on the IR Led panel, and watch the screen light up like a christmas tree

Share this post


Link to post
Share on other sites
oh, the reason why they ave green-black screens is because that''s what all the tubes use to be like. It was the phosphur colour. We use a green-black monitor for ours.

Oh, and monochrome (green-black, white-black) tubes are higher definition than colour.

Share this post


Link to post
Share on other sites
I thought that the greenscale was used because our eyes can differenciate mroe shades of grey than of green...

( as the JPEG compression algorithm illustrates )

- Scott "me22" McMurray
( email/MSN me22@fastmail.ca ICQ 37213887 )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
A green noisy rectangle on the frame with additive saturation should do the trick, that''s the easy way. With saturation, bright colors will appear white and the picture will get more contrast. Add some bright horizontal lines in your texture for a TV-like effect, depends of the game though... You can also modulate the green intensity over time. If a light is suddenly visible, you increase the brightness (find a formula, parameters could be light distance and angle) then decrease smoothly during 2-3 seconds until you get the normal brightness, this simulates the "memory" effect that I noticed while I was at army.

It''s all about fine-tuning and tricks

http://edition.cnn.com/2001/US/11/06/ret.military.month/story.ground.troops.jpg

http://www.jsonline.com/news/iraq/image/1216grn.jpg

Share this post


Link to post
Share on other sites
quote:
Original post by falkone
Lol, i''ve actually seen games that just turn the screen green (*cough* valusoft''s navy seals *cough*)



LOL, ohhh, valusoft. Not that I could do better :-).

___________________________________________________________
Proceeding on a brutal rampage is the obvious choice.

Share this post


Link to post
Share on other sites