Super Mario Galaxy 2/Camera

From Wexos's Wiki
Revision as of 18:02, 1 May 2024 by Wexos (talk | contribs) (Imported from avsys wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page describes the camera system in Super Mario Galaxy 2 (and presumably large parts of Super Mario Galaxy).

Parameters

There are plenty of parameters which are used to describe each camera. There are many different camera types, and different camera types use different parameters. Only parameters which are used are stored in the BCSV file. The following parameters have been observed:

Name Description
version
gflag.camendint
gflag.enableEndErpFrame
gflag.thru
num2
num1 Enables camera rotation.
angleB X-rotation.
angleA Y-rotation.
dist Distance between the camera and the focus point.
flag.subjectiveoff Disables first person.
vpanaxis.[X/Y/Z] Vertical pan axis.
vpanuse Enables vertical pan axis.
udown
pushdelaylow Air move delay?
pushdelay Ground move delay?
lplay Min Y?
uplay Max Y?
gndint Transition ground time?
lower Lower border?
upper Upper border?
camint Transition time.
fovy Field of view angle.
roll Roll.
loffsetv Look offset vertical.
loffset Look offset.
woffset.[X/Y/Z] Camera look at point. Specifies the target position which the camera looks at.
camtype Camera type.
id Camera identifier.
string
flag.collisionoff Disables collision.
flag.nofovy Enables field of view.
evpriority Event priority.
evfrm Event frames.
eflag.enableErpFrame Event use transition time.
camendint End transition time.
eflag.enableEndErpFrame Use event transition.
wpoint.[X/Y/Z] World point. Global position of the camera.
axis.[X/Y/Z] Player offset.
up.[X/Y/Z]
flag.noreset Disables reset. Prevents the camera rotation from resetting.
flag.antibluroff Disables anti-blur.
flag.lofserpoff

Types

The following camera types have been observed:

Name Description
CAM_TYPE_2D_SLIDE
CAM_TYPE_ANIM
CAM_TYPE_BEHIND_DEBUG
CAM_TYPE_BLACK_HOLE
CAM_TYPE_BOSS_DONKETSU
CAM_TYPE_CHARMED_FIX
CAM_TYPE_CHARMED_VECREG
CAM_TYPE_CHARMED_VECREG_TOWER
CAM_TYPE_CUBE_PLANET
CAM_TYPE_DEAD
CAM_TYPE_DONKETSU_TEST
CAM_TYPE_DPD
CAM_TYPE_EYEPOS_FIX Camera with fixed origin which looks at the player.
CAM_TYPE_EYEPOS_FIX_THERE Camera with fixed origin which looks at the player. The origin is not specified and is instead decided by the game.
CAM_TYPE_EYE_FIXED_THERE_TEST
CAM_TYPE_FOLLOW Camera which follows the player. The camera origin moves slower than the player.
CAM_TYPE_FOO_FIGHTER
CAM_TYPE_FOO_FIGHTER_PLANET
CAM_TYPE_FREEZE
CAM_TYPE_FRONT_AND_BACK
CAM_TYPE_GROUND
CAM_TYPE_ICECUBE_PLANET
CAM_TYPE_INNER_CYLINDER
CAM_TYPE_INWARD_SPHERE
CAM_TYPE_INWARD_TOWER
CAM_TYPE_INWARD_TOWER_TEST
CAM_TYPE_MEDIAN_PLANET
CAM_TYPE_MEDIAN_TOWER
CAM_TYPE_MTXREG_PARALLEL
CAM_TYPE_OBJ_PARALLEL
CAM_TYPE_POINT_FIX
CAM_TYPE_RACE_FOLLOW
CAM_TYPE_RAIL_DEMO
CAM_TYPE_RAIL_FOLLOW
CAM_TYPE_RAIL_WATCH
CAM_TYPE_SLIDER
CAM_TYPE_SPHERE_TRUNDLE
CAM_TYPE_SPIRAL_DEMO
CAM_TYPE_SUBJECTIVE
CAM_TYPE_TALK
CAM_TYPE_TOWER Camera with a fixed target whose origin follows the player.
CAM_TYPE_TOWER_POS
CAM_TYPE_TRIPOD_PLANET
CAM_TYPE_TRUNDLE
CAM_TYPE_TWISTED_PASSAGE
CAM_TYPE_WATER_FOLLOW
CAM_TYPE_WATER_PLANET
CAM_TYPE_WATER_PLANET_BOSS
CAM_TYPE_WONDER_PLANET
CAM_TYPE_XZ_PARA Camera which follows the player with a fixed angle.

IDs

A camera is identified and referenced by its "id" field which is a string. The field follows a specific format in order to work propertly, and many cameras have Japanese names. The numbers are always stored as hexadecimal integers with lowercase letters. The following formats are known:

ID Description
c:XXXX Cube camera. Used for cameras controlled by CameraArea (which are placed in CameraCube). XXXX is an integer which is referenced by Obj_arg0.
e:____ Event camera, triggered by a specific action (usually an object).
g:____ Group camera.
o:____ Other cameras.
s:XXXX Start camera. Used for start points which is referenced by Mario (which is placed in Start). XXXX is an integer which is referenced by Camera_id.

Event Camera

There are multiple event cameras. The following are known:

Name Description
e:シナリオスターター:XXX:YY番目 Scenario start camera. XXX represents the camera set and YY is the index.
e:スーパースピンドライバー:XXX:YY番目 Launch star camera. XXX represents the camera set and YY is the index.