You may want to review the Advanced Animation tutorial before proceding with this one...

Krummen Hacker's Mover / Path / Nurbs Plugins

Get the v2 versions of these plugins from Krummen Hacker's plugins page. You will need the KH_Mover, the KH_Path and the KH_Nurbs plugins. The KH_Mover and the KH_Path are both included in the single new (see NOTE) KH_Mover.dll file. The KH_Nurbs plugin is its own KH_Nurbs.dll file.

NOTE: If you have an older version of the Mover plugin in a file called simply Mover.dll, that file should be trashed.

This tutorial is not a complete set of documentation on these plugins, but it'll hopefully be enough to get across the basics of how they work together. We'll make a camera flight path, attach a camera to it, tell the camera which way to point and the talk about the places where time-based function graphs must be attached, and where time-based function graphs can optionally be attached.

The place to start is with a world and an idea. Once you've found a spot to set up your flight path, make a lot of cameras surrounding it. I recommend that you make at least one top view camera, one oblique view camera and one camera named something like 'flyer' or 'animated camera' to be attached to the eventual flight path. I also recommend rendering a low resolution top view to get a sense of the 'lay of the land.' Once you've done your ground work, it's time to get down to business with the creation of a KH_Nurbs object.

KH_Nurbs - creating the trajectory's shape

All of these objects are created via the menu found under the plug icon in the Create palette.

Krummen Hacker and I both follow the path of true scale, so the default KH_Nurbs object forms a semi-circle that's about 750 meters across. Because it comes in at a fixed size, use a simple click to place it in the RTR rather than a drag-to-scale.

Your two new best friends are the Select Tool and the Move Tool . Also, you're likely to run into a known bug in MojoWorld 2.0 which is - if you have a tool other than the Select Tool or Walkabout Tool active when you go to create a new object, the new object you're trying to create won't ever 'place' itself or be created, or it may be created at the center of the planet. Super-important tip: Make the Select Tool active _before_ creating new objects.

After the KH_Nurbs object is created, it'll look like this:

Pardon my artistic license of pasting in the AGL there.

That screenshot shows the entire KH_Nurbs object selected. To get anything useful done with it, you'll need to select points one at a time. Note that the point on one end is the same red as the curve. That point is the start of the path. Also note that the shape of the control points indicate the current direction of the KH_Nurbs object.

Use the Select Tool to select a point, then use the Move Tool to move each point around by dragging on the boxes at the ends of the three control axes. If the whole KH_Nurbs object is selected, it will be moved as a unit by the Move tool.

As for the two other Translate tools, the Scale tool will scale the entire KH_Nurbs object only if the entire KH_Nurbs object is currently selected. If just a single point is selected, the Scale tool has no effect. The Rotate Tool will rotate the entire KH_Nurbs object regardless of whether just a single point or the whole object is selected.

After dragging my points around for a while, looking at my world from a top view and two different oblique views, I have something that looks like this. (Viewed from around 4 Km altitude.)

In the KH_Nurbs editor dialog, I changed the name to 'Camera Trajectory.' While my sample here uses the default 8 points, points can be added and deleted. A KH_Nurbs object must have at least 4 control points.

Using the scroll wheel to add or remove points will do the best it can to preserve the path's shape while evenly distributing the new number of points. When clicking on either the Add a Point or Delete a Point checkboxes, the entire KH_Nurbs object will become seleted. Make sure the Select tool is active. If you are adding a point, click on the KH_Nurbs where you wish to add the new point. If you are deleting a point, click on the point to be deleted. After performing the add or delete action, the associated checkbox will become unselected.

The last parameter can be used to color the KH_Nurbs object however you'd like. That default red shows up nicely on the default planet, but as soon as you think about having a second KH_Nurbs nearby providing a flight path for an object other than the camera, being able to have the paths different colors helps an amazing amount!

 
KH_Path - the link between a KH_Mover and the trajectory
After you have your trajectory created, you have to make a KH_Path object to allow your trajectory to understand time. A KH_Path object has no size, so it'll appear as just an empty set of MojoWorld object control axes. Just click anywhere in the RTR to create one and then open the KH_Path editor. It won't have that view into the Pro UI for the Time graph, that's more artistic license on my part, combining two screenshots into one compact diagram...

Things that have changed from the default here are the name field, the Time parameter and the Nurbs sub-plugin DDLB. The name was set to Camera Link. The time parameter has been assigned the simplest possible Time-driven function graph (just a Time node directly feeding the Time parameter, but you may want to modify it with a Time curve or other Pro UI graph-monkeying). Lastly, the 'Camera Trajectory' object is selected for the Nurbs plugin slot.

The Speed Unit determines how the Position Offset parameter behaves and probably also has an effect on how the Speed Profile behaves (which is likely also modified by that 'Profile is Time Based' checkbox). I'm sure there's a lot of power and subtlty here that I haven't begun to appreciate, so I'm not going to go into any great detail on this right now.

For the purposes of this tutorial, go with the default of path_length/s. With that, the Position Offset ranges from 0 to 1, where 0 is at the beginning of the path and 1 is the end. Since we'll want our camera to go the whole length of the path, the Position Offset is set to 0 to position the camera at the start of the path.

The Speed Profile curve I'll touch on just a tiny bit. Its default is a flat curve, so that no matter what the input is, the output is always 0.1. That means it takes 10 seconds for the KH_Path object to traverse the entire KH_Nurbs object it is plugged in to, because the speed along the KH_Nurbs is a constant 0.1 pathlength per second. If you want it to take 20 seconds for the KH_Path object to traverse the whole KH_Nurbs, modify the curve so that the two end points are each at an output of 0.05 instead of 0.1.

 
KH_Mover - control the camera
The next thing to create is a KH_Mover object. Like the KH_Path object, a KH_Mover object has no dimension so it can be placed in the RTR with a simple click. There are adjustments to be made in all four sections of the KH_Mover's parameters.

First, change the name to Camera Mover. Then use the Object DDLB to select the camera you created to be moved with the KH_Mover. The rest of the top-most section should remain with the default values.

We'll skip over the Points to section for the moment as well as the Vertical above section. In the Position relative to section, change the DDLB to select the KH_Path object that we created above and named Camera Link (this is why you want to name stuff, so you're sure you're picking the right objects in these DDLBs). Note that when you tell the KH_Mover to position itself relative to the KH_Path, the KH_Mover stays where you created it and the Offset parameter in the Position relative to section fills in with some non-zero values. The quickest way to make the KH_Mover go where it belongs is to click the double arrow to collapse that Offset parameter to a single field, then double-click the field area and type in a 0.

If you were to hit 'record' right now, the camera would be moved by the mover along the trajectory, but it would always point whatever direction it was pointing at when you last twiddled it interactively. To make the camera point along the path, there's one more object we need to create...

 
A second KH_Path - something to point at
Create a second KH_Path object. This second KH_Path object should be named something like 'Camera Point' and it gets set up exactly the same way as the 'Camera Link' object (including a Time function graph). The difference between the two KH_Path objects is the Position Offset parameter for the Camera Point one should be something other than 0. If you want the camera to point forward along the path, a value around 0.01 works well. If the Position Offset is set to a negative value, something like -0.01, then the camera will point backwards.
 
Final KH_Mover details - the finishing touches on the camera control
Set the KH_Mover's Points at DDLB to select the Camera Point object. Now if you hit 'record', the camera will be moved by the mover along the trajectory and it will track the trajectory - almost. There's still the last detail of the KH_Mover's Vertical above parameter. The defaults in this section cause the camera to always be level. But if your trajectory goes up and down, even though the point the camera is told to point at is sometimes above the camera and other times below the camera, the camera will stubbornly stay level unless the Is Primary Direction? checkbox is turned off.

Here's what the final KH_Mover editor looks like:

 
Recording and Queueing
It isn't until after you've done all the setup of creating these objects, adjusting their parameters and building the appropriate Time-driven function graphs that you want to use MojoWorld's Movie editor to record the time for your animation. Since you do not need to be interactively flying the camera, you do not need to have your KH_Mover-controlled camera active when you record time. In fact, it's probably better to not have that camera active, but instead watch how things go from your top view camera. The time to switch to your KH_Mover-controlled camera is after time is recorded, but before the movie is queued. You can even be flying an interactive camera at the same time you are recording time for the KH_Mover-controlled camera(s), then switch between those cameras after recording to queue more than one animation from the same time recording.
 
There's a lot more that can be done with all this. You could have a second trajectory and a second link and mover all controlling an object other than a camera and the camera can point at that object on the other trajectory instead of at a point along the trajectory it is flying along. In this movie, the camera has its own KH_Mover, KH_Path and KH_Nurbs and the sphere has its own KH_Mover, KH_Path and KH_Nurbs. The camera's KH_Mover's Points to parameter points at the sphere's KH_Path object. The sphere's KH_Mover's Offset in the Position relative to section is driven by an elaborate Time-driven function graph which causes the sphere to not follow its trajectory exactly, but instead to bob and weave around on it - and due to that and that the camera points at the sphere's KH_Path, the sphere is not always dead center in the camera's view. There's a lot of power here, and like the rest of MojoWorld, with a lot of power comes a lot of complexity!

Back to Generator Tutorials

Home