Difference between revisions of "KMP Editing/Cameras"

From Custom Mario Kart
Jump to navigation Jump to search
(31 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Template:Under-construction|}}
+
This page is a part of the '''Custom Track Tutorial'''. [[Custom Track Tutorial|Back to the main tutorial page]].
 +
{{KMP}}
 +
== Introduction ==
 +
This page explains the basics of how cameras found in [[KMP]] files works in  [[Mario Kart Wii]]. There are two basic types of camera: opening pan and replay. Opening pans play before the start of VS and Grand Prix races. Replay cameras play after a VS or Time Trial race ends, during live view of an online race and during ghost replay. Good cameras can make your track look much better, but can be difficult to make. Improperly set cameras can make the game crash in any of these points. Make sure you always have backups of your KMP when editing. You can use any KMP editor for this. This page will use pictures of [[KMP Cloud]] with the KMP file from Mario Circuit (castle_course.szs) and the [[KCL]] exported to OBJ with Wiimms Tools used as background.
  
==Introduction==
+
When working with cameras, speed values are usually set in units per frame (speeds set in Route entries) or units per hundred frames (speeds set in CAME entry). Mario Kart Wii usually runs at 60 frames per second, so you can divide the values by 60 to convert them to units per second.
  
Improperly configured camera settings can cause game crashes during opening pans, replays and post-match winning laps. Back up your KMP before you start editing.  
+
These are the main values set in a Camera point entry. Not all settings are known:
 +
{| class="wikitable"
 +
|+ CAME entry data structure
 +
|-
 +
! Setting
 +
! Description
 +
! Names in<br/>[[Wiimms SZS Tools|Wiimms Tools]]
 +
! Column name in<br/>[[KMP Modifier]]
 +
! Box name in<br />[[KMP Cloud]]
 +
|-
 +
| Type
 +
| '''[[{{PAGENAME}}#Camera types|Camera type]]'''.
 +
| <tt>type</tt>
 +
| Type
 +
| Type
 +
|-
 +
| Next
 +
| '''Next camera''' entry index. Value 0xFF means: no next camera.
 +
| <tt>next</tt>
 +
| Next
 +
| Next
 +
|-
 +
| ?
 +
| Camshake. '''Unknown''' (always 0).
 +
| <tt>unknown</tt>
 +
| Shake
 +
| Shake
 +
|-
 +
| Route ID
 +
| '''Route''' used by the camera. This is index link into the [[#POTI|POTI]] section. -1 (0xFF) means ''"no route"''.
 +
| <tt>route</tt>
 +
| Route
 +
| Route
 +
|-
 +
| Camera Speed
 +
|  '''Velocity of the camera point''' in units per 100 frames (=units/1.67 sec).
 +
| <tt>v(came)</tt>
 +
| V(Cam)
 +
| Pointspeed
 +
|-
 +
| Zoom Speed
 +
| '''Velocity of zooming''' in units per 100 frames (=units/1.67 sec).
 +
| <tt>v(zoom)</tt>
 +
| V(Zoom)
 +
| Zoomspeed
 +
|-
 +
| View Speed
 +
| '''Velocity of the view point''' in units per 100 frames (=units/1.67 sec).
 +
| <tt>v(v.pt)</tt>
 +
| V(View)
 +
| Viewspeed
 +
|-
 +
| ?
 +
| Start flag. '''Unknown'''.
 +
| <tt>unknown</tt>
 +
| Flag<br/>(First 2 digits)
 +
| Start
 +
|-
 +
| ?
 +
| Movie flag. '''Unknown'''.
 +
| <tt>unknown</tt>
 +
| Flag<br/>(Second 2 digits)
 +
| Movie
 +
|-
 +
| Position (X, Y, Z)
 +
| A 3D '''position''' vector of the camera. Ignored if the camera uses routes.
 +
| <tt>position (x,y,z)</tt>
 +
| X, Y and Z
 +
| PositionX, PositionY and PositionZ
 +
|-
 +
| Rotation (X, Y, Z)
 +
| A 3D '''rotation''' vector. Almost always (0, 0, 0).
 +
| <tt>rotation (x,y,z)</tt>
 +
| Roll, Yaw and Pitch
 +
| RotationX, RotationY and RotationZ
 +
|-
 +
| Zoom Start
 +
| '''Zoom start''': Starting field of view. Angles >180 create curious effects.
 +
| <tt>zoom beg</tt>
 +
| Zoom
 +
| Zoomstart
 +
|-
 +
| Zoom End
 +
| '''Zoom end'''. Final field of view. "Zoom speed" controls the speed of zooming.
 +
| <tt>zoom end</tt>
 +
| Zoom2
 +
| Zoomend.
 +
|-
 +
| View Position Start/Relative Position (X, Y, Z)
 +
| Start vector of the '''view point''' ([[Camera#CAME_Types|camera type 5]]) or the relative camera '''position''' ([[{{PAGENAME}}#Camera types|camera type 3]]).
 +
| <tt>view point beg (x,y,z)</tt>
 +
| View(x), View(y) and View(z)
 +
| ViewStartX, ViewStartY and ViewStartZ
 +
|-
 +
| View Position End (X, Y, Z)
 +
| (Destination) vector of the '''view point'''.
 +
| <tt>view point end (x,y,z)</tt>
 +
| View2(x), View2(y) and View2(z)
 +
| ViewEndX, ViewEndY and ViewEndZ
 +
|-
 +
| Time
 +
| The '''time''' for how long this Camera is active, in frames.
 +
| <tt>sec*60</tt>
 +
| Time
 +
| Time
 +
|}
 +
&rarr; See more in-depth information on the page: [[CAME]]
  
Good cameras will make your level look much more professional, but editing them can be difficult to master.
+
[[Image:KMP New8 CAME.png|thumb|right|300px|KMP Cloud open in Mario Circuit's cameras; notice the route for the selected camera is also shown]]
 +
Cameras are found in the [[CAME]] section of the [[KMP Editing|KMP Editor]]. They can be placed like any normal object. The position only matters on certain camera types. Make sure the Route being used by each camera is unique to it; The same route should not be shared between multiple cameras or between cameras and objects.
  
==Camera Editing==
+
== Camera types ==
 +
{|class="wikitable"
 +
|+CAME Types
 +
|-
 +
! Value !! Name !! Type !! Explication !!Route controlled?
 +
|-
 +
| 00 || Goal || Goal || Activates immediately after passing the goal; with the player as the origin, the camera's ''View Start'' position both follows and looks at the player.<br>It can be reactivated as a Replay Camera if linked to an AREA, but does not display in spectator (online/waiting) mode  || {{no|No}}
 +
|-
 +
| 01 || FixSearch || Replay || Camera stays static in ''View Start'' location, and always looks towards the player || {{no|No}}
 +
|-
 +
| 02 || PathSearch || Replay || Route controlled, always looks at the player || {{yes|Yes}}
 +
|-
 +
| 03 || KartFollow || Replay || With the player as the origin, the camera's ''View Start'' position both follows and looks at the player || {{no|No}}
 +
|-
 +
| 04 || KartPathFollow || Replay/Opening || From its position, it looks at ''View Start'' and shifts view to ''View End'' || {{no|No}}
 +
|-
 +
| 05 || OP_FixMoveAt || Opening || Opening camera, follows route; from its position, it looks at ''View Start'' and shifts view to ''View End'' || {{yes|Yes}}
 +
|-
 +
| 06 || OP_PathMoveAt || Opening || Opening camera onboard with same effects as normal drive Camera ('''unsure''') || {{yes|Yes}}
 +
|-
 +
| 07 || MiniGame || Unknown || Unused || {{maybe|???}}
 +
|-
 +
| 08 || MissionSuccess || Unknown || Unused || {{maybe|???}}
 +
|-
 +
|}
  
Cameras can be placed like any normal object. The position only matters when using certain camera settings. Cameras are found in the [[CAME]] section of the [[KMP Editing|KMP Editor.]]
+
Types 04 and 05 are used for opening pans. Types 01 to 04 are used as replay cameras. Type 00 is the default replay camera, activated as soon as you pass the finish line or when no other camera is active.
  
===Opening Pans===
+
== Opening Pans ==
 +
Opening pans are a set of cameras that are shown before a race starts. [[Nintendo]] always use three cameras, usually with type 05 (although some tracks use camera type 04) with time values of ''220'', ''257'' and ''294'' in this order. This makes the cameras sync up with the song that plays; each camera is linked by the "Next Camera" value in the entry, the last one being -1 (0xFF). Any number of cameras playing for any amount of time is supported, though. If the cameras are too short, the sound will end early; if they are too long, the sound will finish but the cameras will keep playing.
 +
The first camera of the opening pans is set in the header of the CAME section. It can be edited using KMP Cloud or Wiimms Tools. The next cameras are each set in the CAME entry, as seen above.
  
[[File:CAME_LuigiM.png|1000px]]
+
The cameras follow a route, always at the speed set in the route settings. The point where the camera looks at is initially the view point start, and it shifts from it to the view point end in the specified speed. At the same time, the field of view, changes from the starting to the ending one at the specified speed. If any of the movements (route, view point or zoom) ends before the set time for the camera passes, it will just stay where it is.
  
The '''first two digits''' in the '''first settings box''' indicate the type of camera. Opening pans have the setting ''05''.  The length of time each camera is displayed is set in '''z5'''. Their values will be ''220'', ''257'' and ''294''; this is to synch the camera transitions with the opening music. Normally, the first 3 cameras listed (by id) will be the three opening pans, but this can vary. There are also normally two unused cameras with setting ''05'' at the end of the listing; these were apparently for setting up the pans shown in the background videos on the track selection screen.
+
So, to edit the opening cameras, first you should set the routes for them. Make sure the speed set in each point is correct and the camera takes about the same time to follow the route it is set to last. After that, set view point start and end and finally zoom values. Note that the speed of the view point is usually a much higher value, compared to zoom speeds. In KMP Cloud the values are read as hexadecimal.
These cameras can be edited, but to be safe, make sure to have all five. For [[user:Wiimm|Wimm]]'s analysis go to [[Cameras/Reference#Opening_Pan|Wiimms Opening Pan Analysis]].
 
  
[[File:CAME2_LuigiM.png]]
+
[[Nintendo]] always shows the racers before the finish line in the third camera pan. You can follow this if you want to.
  
The '''last two numbers''' in the '''first settings box''' control the [[KMP_(File_Format)#POTI|Route]] used.  A value of ''FF'' means the camera does not use a route.
+
When testing the camera pans, it's a good idea to set the "Next" value of the last camera for it to loop back to the first one. The cameras will loop endlessly (until you press a button to skip them), allowing you to view them as many times as you want to.
You can find the Opening Route Sections so:
 
  
As example in the pic I used SNES Ghost Valley 2. Take the first CAME with the '''z5''' as ''220'', here it is CAME ID 11. Take the Route Settings, here it is "0D", or only D.
+
=== Using [[3ds Max]] for the cameras ===
 +
It is possible to use 3ds Max to have a preview on how the camera's going to work, and find good values for the cameras and routes there. You need some knowledge of how to work with 3ds Max cameras, splines and animations for this.
  
And now use Hex Calculator:
+
#Open or import your course model in 3ds Max.
D+1=E
+
#Create a new camera object. Make sure it's a camera with a fixed view point.
 +
#Set the number of frames in the scene to the duration of the camera. For example, if it's the first camera of the opening pans, it would be 220 frames. Make sure the scene is set to 60 frames per second.
 +
#Create a spline. This is going to be your route.
 +
#Make the camera follow the spline. Set it so that in the first (key) frame of the animation, the camera is at the first point of the spline, and in the last frame, the camera is in the last point of the spline.
 +
#Create another spline. This one should only have two vertices. These are going to be the view start and view end points.
 +
#Make the camera view point follow this spline in a similar way that the camera itself follows the first one.
 +
#Set zoom values for the camera, one at the first frame and one at the last frame.
 +
#The camera should now follow a route, have its view point follow a route, and zoom from one opening to the other all in the same amount of time. You can play the animation with the view set to the camera to have a preview on it, and even edit it in real time.
 +
#When you're happy with the animation, export the spline the camera's following as a route using the OBJ exporter and use Wiimms Tools to get the spline into the text KMP file:
 +
##To do this, open the OBJ in a text editor, replace all the "v"s with 1s in the spline and paste that as a new route in the text KMP; Wiimms Tools will fix it when compiling.
 +
#Get the total lenght of the camera spline. Divide it by the number of frames in the scene. This is going to be the speed you'll put in each route point, except the last one which shouold be 0.
 +
#Copy the coordinates of the two vertices of the view point spline as view point start and end coordinates in the CAME entry.
 +
#Get the total lenght of the view point spline. Divide it by the number of frames in the scene and multiply it by 100. This is going to be the view point speed set in the CAME entry.
 +
#Get the initial and final values for zooming and copy them to the CAME entry. Take note of the difference between the two values. Divide it by the number of frames and multiply it by 100. This is going to be the zoom speed set in the CAME entry.
 +
*Note: the final result will be very approximate to the 3ds Max view, but not identical. This is specially true when it comes to the zooming, as there are other camera settings which can be set in 3ds Max which are not available for editing in Mario Kart Wii.
 +
*You can also do this for the other camera types (the replay cameras, listed below) but it's harder to know how the outcome will be, since it's hard to replicate the movement of players inside 3ds Max.
  
Now convert it to Decimal:
+
== Replay Cameras ==
E=14
+
Replay cameras are much harder to edit and test than opening pans; they require knowledge about KMP [[AREA]]s too. When viewing the replay or live feed, a camera is activated when the player being observed enters an AREA region. It does not deactivate automatically when the player leaves it. See [[KMP Editing#Areas (AREA)|this section]] for information on placing an AREA entry.
  
Finally: The first Opening Route Section is Route Section 14.  
+
Important values for the AREA entry:
 +
{| class="wikitable"
 +
|+ AREA entry data structure
 +
|-
 +
! Setting !! Description
 +
|-
 +
| Type || [[AREA type|Area '''type''']]. Type 0 is the one which refers to a camera.
 +
|-
 +
| Camera ID || '''Index of [[Camera|CAME]]'''. Camera this AREA refers to.
 +
|-
 +
| Position (X, Y, Z) || A '''3D position vector''' of the area.
 +
|-
 +
| Rotation (X, Y, Z) || A '''[[3D rotation vector]]''' of the area.
 +
|-
 +
| Scale (X, Y, Z) || A '''3D scale vector''' of the area.
 +
|}
  
It also works for [[Object]].
+
All other AREA settings shouold be left untouched, if you're working with the AREAs only for the cameras. Areas are also used for other things, see [[AREA type]] for this.
  
Do it with the other two numbers and you have the Opening Routes for your Opening CAMEs.
+
With your AREA region moved, rotated and scaled the way you want it to be and linked to the ID of a camera, it's time to set the camera settings. Depending on which camera type you choose (from 00 to 04), it will be set up differently.
  
Now there is another problem. If you drag the Opening CAMEs, nothing will happen. The Routes are showing to the same points. That is, because the CAMEs with ''Setting 05'' doesn't controll the position of the cameras. They controlls only the Time and can choose the [[KMP_(File_Format)#POTI|Routes]]. You have to test the other CAME positions. Drag them to other, diffrent points and experiment which CAMEs choose the Opening Positions.
+
=== Camera Type 00 (Goal) ===
 +
This is the default camera that looks directly at you as soon as the race finishes. It does not need an AREA to be activated, but it can be activated by one if needed. It does not use a route, so the route should be set to -1 (0xFF). The camera point place is ignored. It's recommended to just copy all the settings that were present in the type 00 camera of a Nintendo track. There should be only one type 00 camera in your KMP.
  
===CAME Types===
+
=== Camera Type 01 (FixSearch) ===
 +
It does not use a route, so the route should be set to -1 (0xFF). It also does not have a view point start, end or speed; only zoom start, end and speed values are set. This camera stays in the camera point place and looks directly at the player. It's the easiest camera type to set up.
  
[[File:CAME3_LuigiM.png]]
+
=== Camera Type 02 (PathSearch) ===
 +
This camera is similar to the opening pan. It follows a route at the speed specified in the route, so the camera point place is ignored. It does not have a view point start, end or speed; only zoom start, end and speed values are set. The camera always looks directly at the player.
  
*00 = Camera immediately after finishing (the one that looks at you)
+
=== Camera Type 03 (KartFollow) ===
*01 = ObjClip: Stays in one position but always points to the player. Used during replays.
+
It does not use a route, so the route should be set to -1 (0xFF). The camera point place is ignored; instead, the camera is placed in a position relative to the player, set from the ''View Start'' position, following and looking at the player.
*02 = PathSearch
 
*03 = KartFollow
 
*04 = KartPathFollow
 
*05 = Opening Pans
 
*06 = OP_PathMoveAt
 
*07 = MiniGame
 
*08 = MissionSuccess (left over from MKDS)
 
  
See also [[KMP_(File_Format)#CAME|CAME]] for the description of Settings and other Values.
+
=== Camera Type 04 (KartPathFollow) ===
 +
This camera is similar to the opening pan, and can be used as an opening pan camera. It stays in the camera point place and does not use a route, so the route should be set to -1 (0xFF). It has a view point start, end and speed; and also zoom start, end and speed. The camera looks from the view start point to the view end point, which moves at the specified speed.
  
==AREA==
+
=== Camera Type 06 (OP_PathMoveAt) ===
 +
This camera is similar to types 02 and 03 in a way that the camera follows a route and that moves relative to the player's position. Think of it like this: there's a route, but the route itself moves following the player, and the camera follows the route while looking at the player. The (0, 0, 0) position of the route is not the absolute coordinates, but the player's origin.
  
[[File:AREA-LuigiM.png]]
+
{{Camera Links}}
 
 
[[File:AREA camera bean.png]]
 
 
 
AREA with Camera Trigger 00 are the acctivators for the CAMEs '''after''' the race. If you drive in the near of one AREA after the race, it will acctivate the CAME that is written in the Settings (watch at the pics).
 
 
 
See also [[Cameras/Reference]]
 
 
 
See also [[KMP_(File_Format)#AREA|AREA]].
 
 
 
==Camera Analysis by MrBean35000vr and Wiimm==
 
 
 
Go here [[Cameras/Reference]]
 
  
 
== Links ==
 
== Links ==
 
{{Custom Track Tutorial}}
 
{{Custom Track Tutorial}}
 
[[category:Tutorials]][[category:Custom Track Tutorial]]
 
[[category:Tutorials]][[category:Custom Track Tutorial]]

Revision as of 21:04, 22 March 2017

This page is a part of the Custom Track Tutorial. Back to the main tutorial page.

Introduction

This page explains the basics of how cameras found in KMP files works in Mario Kart Wii. There are two basic types of camera: opening pan and replay. Opening pans play before the start of VS and Grand Prix races. Replay cameras play after a VS or Time Trial race ends, during live view of an online race and during ghost replay. Good cameras can make your track look much better, but can be difficult to make. Improperly set cameras can make the game crash in any of these points. Make sure you always have backups of your KMP when editing. You can use any KMP editor for this. This page will use pictures of KMP Cloud with the KMP file from Mario Circuit (castle_course.szs) and the KCL exported to OBJ with Wiimms Tools used as background.

When working with cameras, speed values are usually set in units per frame (speeds set in Route entries) or units per hundred frames (speeds set in CAME entry). Mario Kart Wii usually runs at 60 frames per second, so you can divide the values by 60 to convert them to units per second.

These are the main values set in a Camera point entry. Not all settings are known:

CAME entry data structure
Setting Description Names in
Wiimms Tools
Column name in
KMP Modifier
Box name in
KMP Cloud
Type Camera type. type Type Type
Next Next camera entry index. Value 0xFF means: no next camera. next Next Next
? Camshake. Unknown (always 0). unknown Shake Shake
Route ID Route used by the camera. This is index link into the POTI section. -1 (0xFF) means "no route". route Route Route
Camera Speed Velocity of the camera point in units per 100 frames (=units/1.67 sec). v(came) V(Cam) Pointspeed
Zoom Speed Velocity of zooming in units per 100 frames (=units/1.67 sec). v(zoom) V(Zoom) Zoomspeed
View Speed Velocity of the view point in units per 100 frames (=units/1.67 sec). v(v.pt) V(View) Viewspeed
? Start flag. Unknown. unknown Flag
(First 2 digits)
Start
? Movie flag. Unknown. unknown Flag
(Second 2 digits)
Movie
Position (X, Y, Z) A 3D position vector of the camera. Ignored if the camera uses routes. position (x,y,z) X, Y and Z PositionX, PositionY and PositionZ
Rotation (X, Y, Z) A 3D rotation vector. Almost always (0, 0, 0). rotation (x,y,z) Roll, Yaw and Pitch RotationX, RotationY and RotationZ
Zoom Start Zoom start: Starting field of view. Angles >180 create curious effects. zoom beg Zoom Zoomstart
Zoom End Zoom end. Final field of view. "Zoom speed" controls the speed of zooming. zoom end Zoom2 Zoomend.
View Position Start/Relative Position (X, Y, Z) Start vector of the view point (camera type 5) or the relative camera position (camera type 3). view point beg (x,y,z) View(x), View(y) and View(z) ViewStartX, ViewStartY and ViewStartZ
View Position End (X, Y, Z) (Destination) vector of the view point. view point end (x,y,z) View2(x), View2(y) and View2(z) ViewEndX, ViewEndY and ViewEndZ
Time The time for how long this Camera is active, in frames. sec*60 Time Time

→ See more in-depth information on the page: CAME

KMP Cloud open in Mario Circuit's cameras; notice the route for the selected camera is also shown

Cameras are found in the CAME section of the KMP Editor. They can be placed like any normal object. The position only matters on certain camera types. Make sure the Route being used by each camera is unique to it; The same route should not be shared between multiple cameras or between cameras and objects.

Camera types

CAME Types
Value Name Type Explication Route controlled?
00 Goal Goal Activates immediately after passing the goal; with the player as the origin, the camera's View Start position both follows and looks at the player.
It can be reactivated as a Replay Camera if linked to an AREA, but does not display in spectator (online/waiting) mode
No
01 FixSearch Replay Camera stays static in View Start location, and always looks towards the player No
02 PathSearch Replay Route controlled, always looks at the player Yes
03 KartFollow Replay With the player as the origin, the camera's View Start position both follows and looks at the player No
04 KartPathFollow Replay/Opening From its position, it looks at View Start and shifts view to View End No
05 OP_FixMoveAt Opening Opening camera, follows route; from its position, it looks at View Start and shifts view to View End Yes
06 OP_PathMoveAt Opening Opening camera onboard with same effects as normal drive Camera (unsure) Yes
07 MiniGame Unknown Unused ???
08 MissionSuccess Unknown Unused ???

Types 04 and 05 are used for opening pans. Types 01 to 04 are used as replay cameras. Type 00 is the default replay camera, activated as soon as you pass the finish line or when no other camera is active.

Opening Pans

Opening pans are a set of cameras that are shown before a race starts. Nintendo always use three cameras, usually with type 05 (although some tracks use camera type 04) with time values of 220, 257 and 294 in this order. This makes the cameras sync up with the song that plays; each camera is linked by the "Next Camera" value in the entry, the last one being -1 (0xFF). Any number of cameras playing for any amount of time is supported, though. If the cameras are too short, the sound will end early; if they are too long, the sound will finish but the cameras will keep playing. The first camera of the opening pans is set in the header of the CAME section. It can be edited using KMP Cloud or Wiimms Tools. The next cameras are each set in the CAME entry, as seen above.

The cameras follow a route, always at the speed set in the route settings. The point where the camera looks at is initially the view point start, and it shifts from it to the view point end in the specified speed. At the same time, the field of view, changes from the starting to the ending one at the specified speed. If any of the movements (route, view point or zoom) ends before the set time for the camera passes, it will just stay where it is.

So, to edit the opening cameras, first you should set the routes for them. Make sure the speed set in each point is correct and the camera takes about the same time to follow the route it is set to last. After that, set view point start and end and finally zoom values. Note that the speed of the view point is usually a much higher value, compared to zoom speeds. In KMP Cloud the values are read as hexadecimal.

Nintendo always shows the racers before the finish line in the third camera pan. You can follow this if you want to.

When testing the camera pans, it's a good idea to set the "Next" value of the last camera for it to loop back to the first one. The cameras will loop endlessly (until you press a button to skip them), allowing you to view them as many times as you want to.

Using 3ds Max for the cameras

It is possible to use 3ds Max to have a preview on how the camera's going to work, and find good values for the cameras and routes there. You need some knowledge of how to work with 3ds Max cameras, splines and animations for this.

  1. Open or import your course model in 3ds Max.
  2. Create a new camera object. Make sure it's a camera with a fixed view point.
  3. Set the number of frames in the scene to the duration of the camera. For example, if it's the first camera of the opening pans, it would be 220 frames. Make sure the scene is set to 60 frames per second.
  4. Create a spline. This is going to be your route.
  5. Make the camera follow the spline. Set it so that in the first (key) frame of the animation, the camera is at the first point of the spline, and in the last frame, the camera is in the last point of the spline.
  6. Create another spline. This one should only have two vertices. These are going to be the view start and view end points.
  7. Make the camera view point follow this spline in a similar way that the camera itself follows the first one.
  8. Set zoom values for the camera, one at the first frame and one at the last frame.
  9. The camera should now follow a route, have its view point follow a route, and zoom from one opening to the other all in the same amount of time. You can play the animation with the view set to the camera to have a preview on it, and even edit it in real time.
  10. When you're happy with the animation, export the spline the camera's following as a route using the OBJ exporter and use Wiimms Tools to get the spline into the text KMP file:
    1. To do this, open the OBJ in a text editor, replace all the "v"s with 1s in the spline and paste that as a new route in the text KMP; Wiimms Tools will fix it when compiling.
  11. Get the total lenght of the camera spline. Divide it by the number of frames in the scene. This is going to be the speed you'll put in each route point, except the last one which shouold be 0.
  12. Copy the coordinates of the two vertices of the view point spline as view point start and end coordinates in the CAME entry.
  13. Get the total lenght of the view point spline. Divide it by the number of frames in the scene and multiply it by 100. This is going to be the view point speed set in the CAME entry.
  14. Get the initial and final values for zooming and copy them to the CAME entry. Take note of the difference between the two values. Divide it by the number of frames and multiply it by 100. This is going to be the zoom speed set in the CAME entry.
  • Note: the final result will be very approximate to the 3ds Max view, but not identical. This is specially true when it comes to the zooming, as there are other camera settings which can be set in 3ds Max which are not available for editing in Mario Kart Wii.
  • You can also do this for the other camera types (the replay cameras, listed below) but it's harder to know how the outcome will be, since it's hard to replicate the movement of players inside 3ds Max.

Replay Cameras

Replay cameras are much harder to edit and test than opening pans; they require knowledge about KMP AREAs too. When viewing the replay or live feed, a camera is activated when the player being observed enters an AREA region. It does not deactivate automatically when the player leaves it. See this section for information on placing an AREA entry.

Important values for the AREA entry:

AREA entry data structure
Setting Description
Type Area type. Type 0 is the one which refers to a camera.
Camera ID Index of CAME. Camera this AREA refers to.
Position (X, Y, Z) A 3D position vector of the area.
Rotation (X, Y, Z) A 3D rotation vector of the area.
Scale (X, Y, Z) A 3D scale vector of the area.

All other AREA settings shouold be left untouched, if you're working with the AREAs only for the cameras. Areas are also used for other things, see AREA type for this.

With your AREA region moved, rotated and scaled the way you want it to be and linked to the ID of a camera, it's time to set the camera settings. Depending on which camera type you choose (from 00 to 04), it will be set up differently.

Camera Type 00 (Goal)

This is the default camera that looks directly at you as soon as the race finishes. It does not need an AREA to be activated, but it can be activated by one if needed. It does not use a route, so the route should be set to -1 (0xFF). The camera point place is ignored. It's recommended to just copy all the settings that were present in the type 00 camera of a Nintendo track. There should be only one type 00 camera in your KMP.

Camera Type 01 (FixSearch)

It does not use a route, so the route should be set to -1 (0xFF). It also does not have a view point start, end or speed; only zoom start, end and speed values are set. This camera stays in the camera point place and looks directly at the player. It's the easiest camera type to set up.

Camera Type 02 (PathSearch)

This camera is similar to the opening pan. It follows a route at the speed specified in the route, so the camera point place is ignored. It does not have a view point start, end or speed; only zoom start, end and speed values are set. The camera always looks directly at the player.

Camera Type 03 (KartFollow)

It does not use a route, so the route should be set to -1 (0xFF). The camera point place is ignored; instead, the camera is placed in a position relative to the player, set from the View Start position, following and looking at the player.

Camera Type 04 (KartPathFollow)

This camera is similar to the opening pan, and can be used as an opening pan camera. It stays in the camera point place and does not use a route, so the route should be set to -1 (0xFF). It has a view point start, end and speed; and also zoom start, end and speed. The camera looks from the view start point to the view end point, which moves at the specified speed.

Camera Type 06 (OP_PathMoveAt)

This camera is similar to types 02 and 03 in a way that the camera follows a route and that moves relative to the player's position. Think of it like this: there's a route, but the route itself moves following the player, and the camera follows the route while looking at the player. The (0, 0, 0) position of the route is not the absolute coordinates, but the player's origin.

Camera related articles

»Camera«
Technical information, includes an analysis.
»KMP«
File, where the camera setup is hold.
»KMP Editing/Cameras«
A KMP and camera tutorial.
»Wiimms SZS Tools/KMP«
How to edit KMP files using Wiimms SZS Tools.

Links