Security Camera Rendering

Started by
6 comments, last by mvtapia 17 years, 10 months ago
Hello everyone, does anybody know how to make a camera view like the one on security cameras; you know black and white. I know that modern security cameras are in color but I want to know how to achive this effect. And maybe low resolution (I don't know about the low resolution type but I hope is not creating a new device). Thanks
Marco Tapia
Advertisement
you could just only use greyscale colors in ur textures. thats probably the laziest way of doing it tho. wouldnt rly work if you want to show the same scene in greyscale and in color.
Im pretty new to directx but you should look into pixel shaders. From what Ive read about them I think they are called for every pixel drawn. If thats true, you could write one to convert colors into greyscale. Maybe take the average of the rgb values and set them all equal to that.
That wasn't really the answer I wanted but thanks anyway. I think the point of having a security camera is to switch between the scene from player prespective (color) and camera perspective (grayscale). I think I read somewhere about changing the gamma something so you can get just the R or G or B from a screen but I'm not really sure if you can tweek this to make it black and white...
any thoughts?
Marco Tapia
Pixel Shaders are the best way to go about turning a scene to grayscale. Implementing them might give you a little trouble, but having them output in grayscale instead of color is a complete breeze, and would probably have little effect on actual performance.

They also allow you to only apply the effect to part of the scene (if you want the camera to only be in a small box on the side of the window, for example), or you could apply the effect to the entire frame and turn it off when you go back to normal view.

Finally, I don't think a Gamma Ramp would be able to produce the effect you're looking for, but even if it could, it would be difficult to get to work the same on all machines. Pixel Shaders are an effective way of making it work equally on all machines, and could be used to produce many other effects if you ever want to add more stuff later.

Hope this helps :).
Sirob Yes.» - status: Work-O-Rama.
As we can see from real life, security camera output is rather granular and low-quality so additionaly to what have been already advised I would like to say that to achieve a really good security camera rendering you should spice the grayscale pixel shader with a bit of noise(perlin with proper parameters will do the job) and probably downsample the whole thing as well.
Sorry for the delay, I'll try pixel shaders and see what happens, for now, thank you guys.
Marco Tapia
Hey been reading around and I found an easy way to do this... Just modify the pipeline like in this forum thread.
http://www.gamedev.net/community/forums/topic.asp?topic_id=345032
It works pretty good. My only problem is that some of the textures look a little too dark.
Marco Tapia

This topic is closed to new replies.

Advertisement