Difference between revisions of "KMP Editing/Cameras"
m |
Igorseabra4 (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | This page is a part of the '''Custom Track Tutorial'''. [[Custom Track Tutorial|Back to the main tutorial page]]. | ||
{{KMP}} | {{KMP}} | ||
==Introduction== | ==Introduction== | ||
+ | This page will explain the basics of how [[KMP]] set cameras work 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: |
+ | {| 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 | ||
+ | |} | ||
+ | → See more in-depth information on the page: [[CAME]] | ||
− | + | [[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 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|???}} | ||
+ | |- | ||
+ | |} | ||
− | + | 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 | + | 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. |
− | If | ||
− | + | 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. | |
− | You can | ||
− | + | 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. | |
− | + | === 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. | |
− | |||
− | |||
− | |||
− | |||
− | + | 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. | ||
+ | |} | ||
− | + | 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)==== | |
− | + | ''With the player as the origin, the camera's ''View Start'' position both follows and looks at the player, it does not use a route'' | |
− | |||
− | === | + | ====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 Links}} | {{Camera Links}} | ||
− | == Links == | + | ==Links== |
{{Custom Track Tutorial}} | {{Custom Track Tutorial}} | ||
[[category:Tutorials]][[category:Custom Track Tutorial]] | [[category:Tutorials]][[category:Custom Track Tutorial]] |
Revision as of 06:17, 8 November 2016
This page is a part of the Custom Track Tutorial. Back to the main tutorial page.
- File formats
- KMP File Format & Sections
- AREA type
- Cameras
- ENPT Settings
- ITPT Settings
- Item Settings - Item Boxes
- Item Settings - Objects
- Lists
- Tutorials
- KMP Editing
- KMP Editing/Cameras
- Start Position
- Check Point
- Respawn Point
- Cannon
- Presence flags
- Enemy routes in battle arenas
- Testing a Track
- Visual Review with »wkmpt DRAW«
- Tools
Introduction
This page will explain the basics of how KMP set cameras work 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:
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
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
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.
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:
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)
With the player as the origin, the camera's View Start position both follows and looks at the player, it does not use a route
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«
- 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
Main Tutorials
Introduction –
Textures –
Scale –
Modeling ⇒ Using Blender –
BRRES: CTools
BRRES: BrawlBox –
BRRES: RiiStudio –
Minimap –
Solidity –
KCL: Wiimms Tools –
KMP Editing
Object Editing –
Cameras –
Cannons –
Post-effects –
Videos
Battle Arenas
Battle Arenas –
Enemy routes in battle arenas ⇒ Using Wiimm's Tools –
Coins
Misc. Tutorials
Getting Files –
BrawlBox Tricks –
Animations –
Shadows –
Mipmaps
Custom Effects –
Moving Terrain –
Music –
Ports –
Paint Remakes –
Tutorial Archive
Extended presence flags: Track Tutorial –
LE-CODE Track FAQ
Testing and Reviewing
Testing a Track –
Visual Review –
Track Transformation –
Fixing Errors
Software
3D Tools –
BrawlBox –
CTools Pack –
KMP3D –
KMP Cloud –
KMP Modifier
Lorenzi's KMP Editor –
MagicY –
Material Tool –
Post-Effect Editor –
Wiimms SZS Tools –
Wiimm's Tool Manager
Other
KMP Objects –
Custom Objects –
Model Database –
Tutorial Archive