Here we've combined everything we've done so far and created a fully functional accident re-creation software package.
It provided a nice challenge and helped us pull together everything we've learned into 1 cohesive package.
0 - Linear Interpolation Mode (done on a per frame basis)
1 - Bezier Interpolation Mode (done on a per frame basis)
2 - Circular Interpolation Mode (done on a per frame basis)
r - Toggle road editor on/off. (When this is on, all cars will be removed from the display)
SHIFT-1 - Show 1 Car
SHIFT-2 - Show 2 Cars
SHIFT-3 - Show 3 Cars
SHIFT-4 - Show 4 Cars
SHIFT-5 - Show 5 Cars
SHIFT-6 - Show 6 Cars
- (minus) - Subtracts a frame from the current car (you can never go below 1)
= (equals) - Add a frame to the current car (never going above 6)
+ (plus) - Add a frame to the current car (never going above 6)
3 - Use 3 key frames per car
4 - Use 4 key frames per car
5 - Use 5 key frames per car
6 - Use 6 key frames per car
space - Start/Stop animation
a - Start/Stop animation
c - Reload the intial accident scenario.
f - Display how the driver should avoid this wreck.
d - Display how the person getting hit should have driven defensivly.
|
|
Here is a quick run-down of how to create a simple accident and also how to create smooth motions.
To start off, press SHIFT-2 to just load up 2 cars --this will make creating the intial accident much easier.
You also may want to press r now to edit the road. You can add more nodes by clicking any of the smaller middle points and you can remove any point by dragging it off the screen.
Play around with this for a while until you get the road layout you are looking for.
Once you have finished editing you road, press r again to exit out of the road editing mode.
Now, lets get back to editing our cars!
First, click on the red car and the the +/- keys until you get the amount of frames you think you'll need (anywhere from just a single car, aka no motion, to up to 7 frames).
Frames are created on top of another, so if you move your main red car a little you'll notice the first frame underneath this. Also, frames are colored in decreasing saturation values,
meaning as you get further down your path the cars will be lighter and lighter.
Ok, go ahead and move your first frame to where ever you would like it. After this press either 1, 2 or 3 to set the interpolation mode you wish to use.
This will determine the cars motion from this frame to the next. So move your next frame somewhere, and then go ahead and press SPACE (or a) to see this animation.
Neat, huh?
But what do each of these "interpolation" modes do? (And no, they aren't related to INTERPOL the band silly).
Well. . . Linear [0] interpolation means just draw a straight line from my position to the next frame, and then, while animating, render a straight animation path. Pretty basic.
There is a little quirk in it where sometimes it will do a crazy twist when you just want it to go straight. If this happens then just adjust your line to be a little higher or lower, it should fix it.
Beizer [1] interpolation gives you a nice way to make sharp turns and to specify a path with a lot more control. Basically it relies on 4 points: the first car's position, it's velocity (that line sticking out of the car),
your next key-frame's position and the velocity of that key-frame car. Adjusting the velocities will give you sharper curves and you can make some cool effects by playing with these.
Circular [2] interpolation makes rounded curves and are generally used for fast acceleration and skid outs. This just takes your start and end position and draws a smooth curve between them.
Ok, that's all! start playing around with it and see what you can create. . . the posiblities are ENDLESS!! (well. . . kinda).
|
|
Here the red car cuts into a left turn and then hits the green car
(who is patiently waiting 5 minutes for this darn light to change!) and . . . KAPOW!!
Aww.. poor green car = (
Prevention.
Here the green car could have stoped further away from the light and also moved closer to the curb (d will simulate this).
Also, the red car could have stayed more to her right and delayed the turn some. Also a a quicker turn after this delay would have put her closer
to the curb and out of harm's way. (press f to simulate this).
|
|
Here the red car swings out wide during a right turn and TOTALLY runs into the green car!
(who, again, is patiently waiting 5 minutes for her light to change!) KRUNCH!!
The green car could have stoped further away from the light and also moved closer to the curb (d will simulate this).
The red car could have stayed close to the medain, so as to not swing out as wide. Also a delayed turn and a sharp tug on his wheel could have saved the day
(no, not Saves the Day, geeez!). You can press f to simulate this.
|
|
red car attempts to switch lanes and well, you know the drill:
green car goes ZOWIE!!
The green car could have been more aware and could have stayed out of red car's blind spot.
Also, if she realized red car might switch lanes, she could have slowed down a bit to prevent this. A good wail on the horn never hurts, either.
(d will simulate this).
The red car could have either USED his rear view mirrors, or better aligned them as to make them useful.
Also doing simple things such as using a turn signal and turning his head to check would have been nice.
(f to simulate this.
|
|
Blue car has left a gap for good ole' mr. red car (how nice of her; we should send flowers).
Well red car turns, but did not see green car . . . EEEEE-YOW!!
The green car could have been aware that someone had left a gap for the side street. Also more horn action works as well.
(d will simulate this).
The red car could have either wait a bit longer to ensure no one was coming in the next lane over. Also, slow down a bit, ok?
f to simulate this.
|
|
Blue car has left another gap for red car who (dun, dun dun...) does not see
green car . . . CLUNK-BASH-SMASH-KERPLUNKY!!
The green car could have been aware that someone had left a gap for the side street. Also more horn action works as well.
(d will simulate this).
The red car could have either wait a bit longer to ensure no one was coming in the next lane over. Also, slow down a bit, ok?
(f to simulate this.
|
|
Ok, since both red car and green car have suffered major damage by this point, they decide to have some fun.
DONUTS! yay! so they go around, but after a while start to lose control: . . . ZAMMO!
Dude, just don't do donuts next to another car. End. Of. Story.
(d and f will simulate this).
|
|
|