I would like to generate camera shake in either a render or in BGE. How can I accomplish this?
You could insert a single keyframe for the location on the camera (if you dont have any movement) and then, in the the graph editor, add a noise modifier to the curves in the properties panel (N key). Adjust the values of the modifier so you can get the intensity and movement that you like.
As has been mentioned - fcurves modified with noise can do this.
For the game engine you can use an action with noise too (access action through the action actuator).
Note that while noise modified fcurves on camera are a start, you may want to have a very basic camera rig, I've seen this done before where an empty parent controls the camera, and there are 2 children, one the camera, another empty object with noise applied. The camera constrains to the noise empty using
Copy Transforms constraint.
This has the advantage you can do regular (non-noisy) animation to the parent, and the constraint can be animated so you can adjust the noise level over time. - Of course if you wanted to go further you could blend different types of noise easily by adding more empties+constraints and blending those in too (to simulate different terrain).
Since the game engine wont do constraints, something more complex like this would need to use python scripting.
Recorded hand held shake
- Select | Select Camera and (optionally) View | Camera or numpad 0.
- In the Timeline window:
- Enable Frame | Auto-Keyframing Mode | Add & Replace or simply use the button.
- Hit play (Alt+A) and enter trackball rotation rr or grab g mode.
- Move your pointing device around to generate the shake.
Note: You can get a more controlled (or violent) effect with different frame rate during recording.