Shaking the screen

Hey people,

OK,is there any way of shaking the screen (kind of like experiencing turbulence) using the frame buffer or something? Or do I have to use my camera to achieve this effect? If both can be used,then how do you use the buffer and which one is faster?

Thanx for any help.

i dont know about a way of achiving this with the buffer, i dont no if there is, because if the camera moves, new portions of the scence is exposed to it, and new content needs to be rendered into the frame buffer, but if there is, it am almost absolutly sure the jittering the camera will be faster, since moving the camera that way or another doesnt matter, and if you want to move it like it shakes, it will be as fast as moving it along a path. and anyway, buffer operations tends to be slow.

OK thanx.That’s what I needed to hear

Even from the “reality” point of view, a shake caused by an heartquake or an explosion is achieved by moving the camera, shifting the buffer (donno how to do it) won’t change the perspective view, resulting in a scroll and not a real “point of view shake”.

I mean, when you jump you don’t just scroll your view, but u change the point of view in 3d, the same for shaking.

rIO.sK

I use a gradient noise function to distort the position of the camera:

newCam = cam;
newCam.x += noise(cam.x/f,cam.y/f,cam.z/f)*amp;
newCam.y += noise(cam.x/f,cam.y/f+100,cam.z/f)*amp;
newCam.z += noise(cam.x/f,cam.y/f,cam.z/f+100)*amp;

I can lower the frequense of the shakings by increasing f and change the amplitude by changing amp. (the +100 is done to prevent the x, y and z coordinate to get the same distortion value.)

// Spark

Spark,
the way you do the earthquake effect is cool but i think you should keep the original camera pos in order to make ‘static’ earthq. instead of a ‘moving’ earthq.
See what i mean ?

I don’t know if i understand you correctly but the original camera position isn’t changed, only the copy of it (newcam).

Oh I see! That’s a really neat idea Spark! Thanx.

i’m silly :wink: