Difference between revisions of "KMP Editing/Cameras"

From Custom Mario Kart
Jump to navigation Jump to search
 
(19 intermediate revisions by 11 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.<br>
+
These are the main values set in a Camera point entry. Not all settings are known:
Good cameras will make your level look much more professional, but editing them can be difficult to master. It's very difficult to make Cameras with [[SZS Modifier]] by Chadderz, it's easier with [[Wiimms SZS Tools]]. You will note it in this list:
+
{| 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]]
  
{{KMP CAME header}}
+
[[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.
  
I advise you to learn editting Cameras with [[Wiimms SZS Tools]] and then use [[SZS Modifier]].
+
== 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|???}}
 +
|-
 +
|}
  
==Camera Editing/Step by Step guide==
+
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.
  
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]].
+
== 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. This value should be 0X00 in KMP Cloud (where X is the index of the starting camera), and is found next to the add camera button. The next cameras are each set in the CAME entry, as seen above.
  
If you setup a route that belongs to a camera, be sure, that the same route is not used by a global objects. Sharing a route between camera and objects may often cause a freeze.
+
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.
  
===Opening Pans===
+
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.
On VS races a sequence of cameras is shown. The u8 value at offset 0x06 in the CAME section header is the index of the first camera. The next cameras are linked by the u8 value at offset 0x01. Normally 3 cameras are used, but any number can be used.
 
  
[[File:CAME_LuigiM.png|1000px]]
+
[[Nintendo]] always shows the racers before the finish line in the third camera pan. You can follow this if you want to.
  
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.<br>
+
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.
If you found these 3 Cameras, we come to editting them.  
 
  
[[File:CAME2_LuigiM.png]]
+
=== 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.
  
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.
+
#Open or import your course model in 3ds Max.
You can find the Opening Route Sections so:
+
#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.
  
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.
+
== Replay Cameras ==
 +
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.
  
And now use Hex Calculator:
+
Important values for the AREA entry:
D+1=E<br>
+
{| class="wikitable"
Now convert it to Decimal:
+
|+ AREA entry data structure
E=14<br>
+
|-
Finally: The first Opening Route Section is Route Section 14. <br>
+
! Setting !! Description
It also works for [[Object]].
+
|-
 +
| 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.
 +
|}
  
Do it with the other two numbers and you have the Opening Routes for your Opening CAMEs.<br>
+
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.
  
After we found out the routes of this cameras, go to this Routes and drag them how you like it. You can drag them in the near of special objects or some buildings. The Camera will move how you dragged this route. It is advisable to drag the last Opening Camera Route to the Startline. Also you can change your Routes:<br>
+
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.
Search after the Route Section, where the Camera should move, as example Route Section 18.<br>
 
Convert the Decimal number to Hex:
 
18=12<br>
 
Then subtract it with 1 on Hex Calculator:
 
12-1=11<br>
 
  
And now write down this number in the Route Setting Box where the Route IDs are.<br>
+
=== Camera Type 00 (Goal) ===
For testing, it is good to link the last opening camera to the first to have an unlimited view. You can make it so:
+
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.
  
[[File:CAME5 LuigiM.png]]
+
=== 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.
  
This Settings are the next Camera in Hex, so. ''CAME 11'' has the the next ''CAME 12'' (Convert Hex to Decimal; 0C=12), The ''CAME 12'' has next ''CAME 13'' and ''CAME 13'' has none(=FF). Change the FF to the Hex digit of the first CAME. Example:<br>
+
=== Camera Type 02 (PathSearch) ===
The first Camera is ''CAME 11'' so Convert the 11 to Hex:
+
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.
11=0B<br>
 
So I change the FF to 0B and now the Cameras are looped.<br>
 
  
For [[user:Wiimm|Wimm]]'s analysis go to [[Cameras/Reference#Opening_Pan|Wiimms Opening Pan Analysis]].
+
=== 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.
  
[[File:CAME4 LuigiM.png]]
+
=== 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.
Now we define the points where the Cameras watch. The ''Start View Point'' shows where the Camera watch at the begin and the ''End View Point'' at the end of the Camera Intros. ''x3'' and ''y3'' controlls the zoom.<br>
 
This is how to do:<br>
 
First you search an object or a place, where the camera should look. Then you take the ''x'', ''y'' and ''z'' values and take it to the ''z3'', ''x4'' and ''y4'' values (''x'' to ''z3''; ''y'' to ''x4''; ''z'' to ''y4''). Make the ''x4'' value about 10000 higher. And then take it to the ''End View Points'', too. Then you can change there the ''y5'' values, that makes the Camera watchs higher while replay, or you change the other 2 values or all 3.
 
 
 
As example you can watch the Opening Pans of [http://www.youtube.com/watch?v=mzoAG74R5f4 Haunted Woods] and [http://www.youtube.com/watch?v=en0T6pqKiag Kalimari Desert], which Cameras are made by [[User:Wiimm|Wiimm]].
 
 
 
=== Cameras while replays and after Race ===
 
Now we come to the Cameras after Race. There you need knowledge about CAME Types and AREA.
 
 
 
==== AREA ====
 
First I come to AREA.
 
 
 
[[File:AREA-LuigiM.png]]<br>
 
[[File:AREA LuigiM 2.png]]
 
 
 
<pre>
 
menu      AREAtype  7
 
item      Camera  0
 
item      ObjClip  1
 
item      EfControl  2
 
item      FogControl  3
 
item      PullControl  4
 
item      EnemyFall  5
 
item      2DmapArea  6
 
</pre>
 
 
 
The list of the types can be found in the XML file /Race/Course/koopa_course.szs/course.0<br>
 
(for other AREA infos go to [[KMP_(File_Format)#AREA|AREA]] and [[Cameras/Reference]])
 
 
 
AREA with Type ''Camera 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). The other AREA types are unimportant. Don't change it!<br>
 
Drag the first AREA to a point in the near of the Stage. And then do it with all other AREAs. Make sure that there are in the right order. It's easier for CAME Editting.
 
 
 
==== CAME ====
 
 
 
[[File:CAME3_LuigiM.png]]
 
 
 
Cameras after Race have some diffrent types:
 
*00 = Camera immediately after finishing (the one that looks at you.)
 
*01 = ObjClip: Stays in one position but always points to the player. Used during replays.
 
*02 = PathSearch
 
*03 = KartFollow
 
*06 = OP_PathMoveAt<br>
 
(for all other types go to [[KMP_(File_Format)#CAME|CAME]] and [[Cameras/Reference]])
 
 
 
Camera Types 00, 01 and 03 can be used without any routes (Route IDs=FF). Camera Type 02 and 06 need Routes. All these have ''x3'' and ''y3''
 
values. If you drive while a replay or after a race in the near of one AREA it will activates the CAME, which is written in the Settings. The Type defines how the Camera is watching at the person:
 
*''PathSearch'' activates the Route that is written in the Settings. The Route is the Camera that looks at you.
 
*''OP_PathMoveAt'' activates the Route like ''PathSearch''. But it'll swing around you. Very difficult to controll!
 
*''ObjClip'' stays in one position and looks at you.
 
*''KartFollow'' is a Camera that follows you all the time. It needs after the Settings ''x3'' and ''y3'' the values from ''z3'' to ''x5''
 
*''Camera immediately after finishing'' is a Camera that follows you all the time. It needs after the Settings ''x3'' and ''y3'' the values from ''z3'' to ''x5''. If this Camera will activated by an AREA, it is the same as ObjClip.<br>
 
Finally, you only have to drag the Cameras with type ''01'', because all other search routes or watch directly to the person.
 
 
 
== Camera Analysis by MrBean35000vr and Wiimm ==
 
 
 
[[Cameras/Reference|MrBean's Analysis]]<br>
 
[[Cameras/Reference#Opening_Pan|Wiimm's Analysis]]
 
  
 +
{{Camera Links}}
  
 
== Links ==
 
== Links ==
 
{{Custom Track Tutorial}}
 
{{Custom Track Tutorial}}
 
[[category:Tutorials]][[category:Custom Track Tutorial]]
 
[[category:Tutorials]][[category:Custom Track Tutorial]]

Latest revision as of 16:20, 18 December 2022

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. This value should be 0X00 in KMP Cloud (where X is the index of the starting camera), and is found next to the add camera button. 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