Hi,
How to achieve this black and white effect?
Would it be possible (or best) to create a texture having the size of the screen, or place a billboard it in front of the camera, or models and ground have a special texture, or ... I don't know. On a real video you can see the gunner switch quickly between normal and night view like on the image below. It might be a thermal camera as bodies are close to white, like the copter here.
What do you think?
black and white
-
- Posts: 362
- Joined: Sun Dec 16, 2007 9:25 pm
I have very little understanding of shaders, but in my opinion they would be great for that kind of effect.
Post this userbar I made on other websites to show your support for Irrlicht!
http://img147.imageshack.us/img147/1261 ... wernq4.png
http://img147.imageshack.us/img147/1261 ... wernq4.png
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
You should be able to render the entire scene to a render texture, render that texture to a quad with a shader to turn color values into a scalar value, then render that quad over the entire screen.
But you are in luck, everything but the shader has been done for you with XEffects (Go look it up in project announcements).
But you are in luck, everything but the shader has been done for you with XEffects (Go look it up in project announcements).
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
hmm
You could also just set all the textures to grayscale in photoshop or something.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Call of Duty 4 has a level where you play through a thermal camera that looks just like your pic above.
I've done a bit on shaders, and I would recommend looking at post-processing effects. This link has a good look at how to do the thermal shader.
I've done a bit on shaders, and I would recommend looking at post-processing effects. This link has a good look at how to do the thermal shader.
well its really simple. i just tried it. with my shaderlib i made the following shaderfile.
And then just add some plin noise.
if u want a copy of that lib. just ask.
Code: Select all
<PostProcess name="BlackWhite" width="800" height="600">
<Pipeline vertex="standard" fragment=
"
uniform sampler2D tex0;
varying vec2 vTexCoord;
void main()
{
vec4 sample = texture2D(tex0, vTexCoord);
float a = sample.x+sample.y+sample.z;
a = a/3;
gl_FragColor = vec4(a, a, a, 1.0);
}
" target="" tex0="BlackWhite" tex1="" tex2="" tex3="">
</Pipeline>
</PostProcess>
if u want a copy of that lib. just ask.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.