View Full Version : Shaking the screen
03-11-2001, 11:12 AM
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.
03-11-2001, 11:44 AM
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.
03-11-2001, 11:49 AM
OK thanx.That's what I needed to hear http://www.opengl.org/discussion_boards/ubb/smile.gif
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.
03-12-2001, 01:48 AM
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.)
03-12-2001, 04:58 AM
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 ?
03-12-2001, 05:37 AM
I don't know if i understand you correctly but the original camera position isn't changed, only the copy of it (newcam).
03-13-2001, 08:57 AM
Oh I see! That's a really neat idea Spark! Thanx.
03-13-2001, 10:39 AM
i'm silly ;)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.