Using the Path Editor
Goals:
- Learn to use the different aspects of the Path Editor
- Create a complex flythrough path
This how-to assumes you can create/load a movie file and setup the initial streams and the required parameters. If not, refer to
CreatingASimpleMovie.
The path editor offers an assortment of different capabilities to help you design both simple and complex paths in 3D. First is the path controls window. This is where all of the options are for the editor.
There are two basic modes of the editor's operation: Add mode and Edit mode. Add mode will cause mouse clicks in the viewport to add a new point in that location. In Edit mode, however, mouse clicks will attempt to select the closest point. You can switch between modes by pressing the "Switch to Edit Mode" button. You will notice once Edit mode is entered, more features become available. You now have the ability to "Select All Points", "Deselect All Points", and "Delete All Points". Also, there are four text fields that allow for fine tuning of a point's values.
In Edit mode, the only selectable points are those that are contained in the current stream that is selected in the Streams pull down list. You can tell which stream this is by looking at the points in red connected by the white lines.
With a stream selected, select a single point by clicking on it with the left mouse button. This will cause its specific information to appear in the four text fields in the controls window.
Changing these values is as simple as entering the desired value and pressing enter.
You'll also notice an Undo and a Redo button. These allow you to revert back to earlier changes. When in the view port, pressing Ctrl-Z or Ctrl-Y is the same as pressing the Undo and Redo buttons, respectively.
Below the Undo/Redo buttons are the options. Here you can adjust the selection plane's opacity for better visibility, the Z location of the selection plane, the selection plane size, as well as the options to show/hide the coordinate axes and the bounding box. As well as using the slider to change the Z location of the selection plane, when working in the viewport you can press the up and down arrow keys for fine adjustments. Holding down control while pressing up or down will result in slightly larger adjustments.
You'll notice eight buttons on the bottom of the viewport. The first button is used to show/hide the stream legend. This is simply an indication of which stream is what color.
Next is a button with a lock on it. This is used to lock all movement in the view port, so dragging the mouse has no effect.
The next two buttons are used to lock rotation of the view port in either vertical or horizontal rotations, respectively. The same can also be accomplished by holding down control for locking vertical movement, and shift for locking horizontal.
The next three buttons allow for the view to be reset on the axes shown. The first will revert the view back to the initial view, that is, looking down the Z axis. The next will be looking down the X axis, and the last will be looking down the Y axis.
The last button is the move tool. When the move tool is selected, any selected points will be moved around the system. Using the move tool only affects the X and Y coordinates of the point. In order to use the mouse to adjust the Z coordinate, hold down the control key while moving the mouse. The move tool only generates mouse locations inside the selection plane, so you can only drag points around while the mouse is somewhere on that plane.
Also, at the far left is a label that shows the current mode the editor is in.
Now that the basics are outlined, lets create a complex path. I'll assume here that you already have the required streams/keyframes set up, and you are now ready to add the path to a camera location stream.
With the camera location stream selected in the editor, start by entering Add mode in the editor. You can begin adding points by clicking anywhere in the selection plane. While you are adding points, its easiest to use the up/down arrow keys to adjust the Z location of the plane. Now take the time to add points in whatever fashion you want. I want a bit of a spiral pattern, so I place the selection plane at the top of the box, and with each point added, I adjust the Z location a little bit. This results in the following:
If you now look at the keyframes for this stream, you'll notice the points we just added are there. You can now use the tools in the editor to fine tune your path to make it even more complex.
Using the basic ideas here, you should be able to see that virtually any path can be defined using the editor, all it takes is a little imagination and some practice.
To render the movie we've just created, proceed to
RenderingMovies.
Creating complex movies
This is a quick description of how to make complex paths in the path editor, for example one where cameras move and pause, and the simulation time varies throughout the visualization.
Start by creating a new movie (Movie Tab->New Movie).
Set up the framerate, but don't bother with the length just yet.
Now the Movie needs Streams. First we need a stream that will control the flow of time in the visualization. Add a new stream of type double. Set the ID/Name to something practical (simtime/SimTime). Set the interpolator to linear, since time flows linearly. Now we can add a Camera location stream. Add a new stream of type vector. Name the stream something logical, and set the Interpolator to TCB.
Now that the streams are set up, let's add points to the system. There are many ways to do this, so its up to you to experiment which is easiest. I find the quickest is to use the path editor and add points with mouse clicks. Under the path editor tab, click the "Show Path Editor Window" button to bring up the editor. Now select the camera location stream from the drop down box. Now you're ready to add points. Add a path to the system by clicking on the semi-transparent square. Move the square by either using the up/down arrow keys, or using the slider in the main window marked "Selection Plane Z Location". You don't need a lot of points, since the TCB spline can figure out the path on its own. The more path points you add, the closer the actual path is going to take to what you have defined. For example, create a path consisting of, say, 50 points.
With the 50 points added, and with each point being separated by half a second, you'll have a 25 second path to travel. Now let's set it up so the camera will stop at the end of the 25 seconds, wait for 10 seconds, then continue on another path. Go ahead and click in some more points, let's say 20. Now you have a 35 second path, with 70 points. But before we can go on, you have to change the time for the last 20 points just added. If you want the camera to wait 10 seconds before going on to point 51, here are the steps to take:
Under the Keyframes tab, select point 50. Press the + button to the right. This will add a new point with the current point's values (essentially, you just copied point 50). Select the new point 51. Modify the time so its at time 35 (point 50 is 25 seconds, so 10 seconds later it'll still be in the same spot, point 51). Now, still under the keyframes tab, go through the remaining 20 points (by clicking the > button) and increase the time by 9 seconds (so you'll have #52 be at 35.5 seconds, and all the way up)
That finishes up the Path part, now lets work on stopping time.
Let's say that 15 seconds into the simulation, you want the simulation time to stop, then resume 5 seconds later. Also, let's assume the simulation runs for 45 units. Under the keyframes tab, select the
SimTime? stream. Now add 4 keyframes by clicking the + button 4 times. You'll notice 4 key frames with time 0.0 and value 0.0. The time is for when in the movie time you want the simulation time to be. So at time=0.0 and value=0.0, that says at visualization time 0, the simulation time should be 0. This is fine for the first keyframe, so move to the 2nd keyframe. Here, we want to represent the point 15 seconds into the visualization at which time stops. So for this, set the time=15.0, and the value=15.0 (both are equal, so 1 unit simulation time = 1 second movie time). For the 3rd keyframe, we want to represent how long time has stopped for, so set time=20.0 (5 seconds later), and value=15.0 (sim time hasn't changed). Now for the fourth keyframe, we need to specify the end of the simulation. Set the time=50.0, and value=45.0. They're offset because of the delay we created in having the sim time stop. The important part to remember is that if for every second time increases, the simulation time also increases by one second, time will pass at the correct rate. To double the simulation time speed, having a 20 second simulation run in 10 seconds will do the trick.
Finally, go back and edit the movie length. The movie length should be 50 seconds, since that's how long our path and simulation goes for. Save the movie to a file, and you can now run the movie by following the instructions at
RenderingMovies.
--
AndrewRader?