JP5089147B2 - Camera control method and CG game apparatus incorporating the camera control - Google Patents

Camera control method and CG game apparatus incorporating the camera control Download PDF

Info

Publication number
JP5089147B2
JP5089147B2 JP2006318738A JP2006318738A JP5089147B2 JP 5089147 B2 JP5089147 B2 JP 5089147B2 JP 2006318738 A JP2006318738 A JP 2006318738A JP 2006318738 A JP2006318738 A JP 2006318738A JP 5089147 B2 JP5089147 B2 JP 5089147B2
Authority
JP
Japan
Prior art keywords
camera
character
screen
terrain
line segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2006318738A
Other languages
Japanese (ja)
Other versions
JP2008132014A (en
Inventor
康男 津森
誠也 山中
Original Assignee
株式会社タイトー
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社タイトー filed Critical 株式会社タイトー
Priority to JP2006318738A priority Critical patent/JP5089147B2/en
Publication of JP2008132014A publication Critical patent/JP2008132014A/en
Application granted granted Critical
Publication of JP5089147B2 publication Critical patent/JP5089147B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、CG(コンピュータグラフィック)ゲームにおける3人称カメラの制御で、地形に合わせた視線を得るカメラ制御を行うことができるカメラ制御方法およびこのカメラ制御を取り入れたCGゲーム装置に関する。ここで「3人称カメラ」とは、画面上に現れる任意のキャラクタに対し、所定の位置関係で配置され、キャラクタを含む視界を撮影して画面として表示するカメラと定義する。   The present invention relates to a camera control method capable of performing camera control for obtaining a line of sight according to terrain by control of a third-person camera in a CG (computer graphic) game, and a CG game apparatus incorporating the camera control. Here, the “third-person camera” is defined as a camera that is arranged in a predetermined positional relationship with respect to an arbitrary character appearing on the screen and captures a field of view including the character and displays it as a screen.

CGゲームなどにおいて3人称カメラ位置を主体キャラクタに対し変化させるカメラ位置を制御するゲーム装置が提案されている。
その1つとしてキャラクタの移動速度に合わせてカメラの軸を制御する3次元ゲーム装置が開示されている(特許文献1)。
これは、3次元ゲーム装置において移動体を操作情報に基づき移動させる場合、追従する位置に仮想カメラを設定し、この仮想カメラから見た視界画像を合成するものである。カメラの視点設定部は移動体を基準としたX,Y,Zの3軸方向の少なくとも一軸成分を視点移動制御方向として、視点移動制御方向への移動体の速度成分を制御関数として仮想カメラの視点位置を移動制御している。
There has been proposed a game apparatus that controls a camera position that changes a third-person camera position with respect to a main character in a CG game or the like.
As one of them, a three-dimensional game device that controls the axis of a camera in accordance with the moving speed of a character is disclosed (Patent Document 1).
In this case, when a moving body is moved based on operation information in a three-dimensional game apparatus, a virtual camera is set at a position to follow and a view image viewed from the virtual camera is synthesized. The viewpoint setting unit of the camera uses at least one axis component in the X, Y, and Z directions with respect to the moving object as the viewpoint movement control direction, and uses the velocity component of the moving object in the viewpoint movement control direction as a control function. The movement of the viewpoint position is controlled.

一般のカメラ制御では、例えば、下りの坂道を下りる場合、カメラを通常より少し下に向けて先まで見通せるようにする必要があるが、この点については特許文献1におけるカメラ制御は、坂を下りている場合は下方向に移動するので、カメラの軸は下方向に向けることが可能である。しかしながら下り始めるまでは上下方向の移動がないので下方向にはカメラが向くことがない。下りの坂道にさしかかった所でカメラには下を向かせる必要があるがそのような制御はできない。
例えば、オートレースのバイクに追従してカメラ位置をZ軸方向に移動する場合、バイクが横方向(X軸方向)にΔXだけ速度を変化させたとき、カメラの視点位置をX軸方向に移動させ画面の中心より速度変化した方向にバイクを移動させて表示する。また、ジャンプなどで上方向(Y軸方向)にΔYだけ速度を変化させたとき、カメラの視点位置をY軸方向に移動させ画面の中心より上方向にバイクを移動させて表示し、臨場感を表現しているが、上述のように坂の上り下りなどに対してのカメラのピッチ軸の回転変化を行うものではない。
In general camera control, for example, when going down a downhill, it is necessary to make the camera look a little lower than usual so that the camera control in Patent Document 1 can go down the hill. Since the camera moves downward, the camera axis can be directed downward. However, since there is no movement in the vertical direction until it starts to descend, the camera does not face downward. Although it is necessary to point the camera down at the point where it approaches the downhill slope, such control is not possible.
For example, when moving the camera position in the Z-axis direction following an auto-race bike, when the bike changes its speed in the horizontal direction (X-axis direction) by ΔX, the camera viewpoint position moves in the X-axis direction. The bike is moved in the direction of speed change from the center of the screen and displayed. In addition, when the speed is changed by ΔY in the upward direction (Y-axis direction) by jumping or the like, the camera viewpoint position is moved in the Y-axis direction and the motorcycle is moved upward from the center of the screen for display. However, as described above, it does not change the rotation of the pitch axis of the camera with respect to uphill or downhill.

また、カメラを向ける目標との距離に応じてカメラ位置を変える方法が開示されている(特許文献2)。
これは、プレーヤキャラクタと他のキャラクタとの位置関係に係る視認性を高めることを目的とし、視線方向はプレーヤキャラクタPCと標的キャラクタTCとの中間位置を向くように制御し、プレーヤキャラクタPCと標的キャラクタTCとのライン差が大きくなるにつれて仮想カメラの俯角が大きくなるように制御するものである。
プレーヤキャラクタPCと標的キャラクタの距離に対応してカメラの俯角を制御するものであるが、プレーヤキャラクタPCと標的キャラクタが画面上に良好に入るように画面表示し、背景画との関係でキャラクタが進行すべき視界を適正にするものではない。
特開平11−146978号公報 特開2006−87600号公報
Further, a method for changing the camera position according to the distance from the target to which the camera is directed is disclosed (Patent Document 2).
This is for the purpose of improving the visibility related to the positional relationship between the player character and other characters, and the line-of-sight direction is controlled so as to face an intermediate position between the player character PC and the target character TC, Control is performed so that the depression angle of the virtual camera increases as the line difference from the character TC increases.
The depression angle of the camera is controlled in accordance with the distance between the player character PC and the target character, but the player character PC and the target character are displayed on the screen so as to enter the screen well, and the character is related to the background image. It does not optimize the field of view to be advanced.
Japanese Patent Laid-Open No. 11-146978 JP 2006-87600 A

通常、プレイヤはゲームに登場する主人公キャラクタを操作して背景画面の中を移動制御するため、主人公キャラクタが進むべき遠方が明瞭に判別できる表示がなされることが要請される。   Usually, since the player operates the main character appearing in the game to control movement in the background screen, it is required that the player can clearly display the distance to which the main character should travel.

本発明は上記要請に応えるもので、その目的は、画面の地形に合わせたカメラの角度位置を得ることができ、上り坂の地形では遠くを見通す構図や下り坂,崖などでは足元を見やすくする構図にカメラの撮影画面を制御するカメラ制御方法および該カメラ制御を取り入れたCGゲーム装置を提供することにある。   The present invention responds to the above request, and the purpose of the present invention is to obtain an angle position of the camera in accordance with the terrain of the screen, and to make it easy to see the feet on a composition that looks far away on uphill terrain, downhill, cliff, etc. It is an object of the present invention to provide a camera control method for controlling a shooting screen of a camera in a composition and a CG game apparatus incorporating the camera control.

前記目的を達成するために本発明の請求項1は、画面中を移動するキャラクタに対し、前記キャラクタを撮影した画像をモニタ画面に表示するCG画面の制御方法において、操作部からキャラクタの位置を移動させる操作がなされた場合、操作量に応じた位置にキャラクタを移動させ、前記キャラクタの移動位置に対応して追従設置されるようにカメラを設定し、前記カメラ設置位置とキャラクタを結ぶ延長上の線分であって、前記キャラクタから所定距離の線分先端が画面上に表示される地形面に対し交わるか否かを判断し、該判断で交わらない場合、前記線分先端が前記画面上に表示される地形面に対し略一致する位置になるように前記カメラの位置および光軸を前記キャラクタに対し移動・回転制御することを特徴とする。
本発明の請求項2は、請求項1記載の発明において前記交わるか否かの判断は所定の時間間隔で行い、交わらない場合には交わる方向に所定の角度だけカメラの光軸を回転させ、この動作を繰り返して前記地形面に対し略一致する位置になるまで制御することを特徴とする。
本発明の請求項3は、請求項2記載の発明において前記所定の角度ずつカメラの回転制御を繰り返し、前記線分先端が地形面に交わったとき、交わる前のカメラの回転位置に戻すことを特徴とする。
本発明の請求項4は、画面中を移動するキャラクタに対し、前記キャラクタを撮影した画像をモニタ画面に表示するCGゲーム装置において、操作部の操作にしたがってキャラクタを移動させるキャラクタ移動手段と、前記キャラクタの移動に従ってキャラクタを視界に捕らえるためのカメラ位置設定手段と、前記カメラ位置とキャラクタを結ぶ延長上の線分であって、前記キャラクタから所定距離の線分先端が画面上に表示される地形面に対し交わるか否かを判断し、該判断で交わらない場合、前記線分先端が前記画面上に表示される地形面に対し略一致する位置になるように前記カメラの位置および光軸を前記キャラクタに対し移動・回転制御する制御手段とを有し、前記キャラクタの移動と地形の変化に対応し、前記カメラからの視界が前記キャラクタを含めつつ空の部分と地形部分を所定の割合で画面に表示することを特徴とする。
本発明の請求項5は、請求項4記載の発明において前記制御手段は、交わるか否かの判断を所定の時間間隔で行い、交わらない場合には交わる方向に所定の角度だけカメラの光軸を回転させ、この動作を繰り返して前記地形面に対し略一致する位置になるまで制御することを特徴とする。
本発明の請求項6は、請求項5記載の発明において前記制御手段は、所定の角度ずつカメラの回転制御を繰り返し、前記線分先端が地形面に交わったとき、交わる前のカメラの回転位置に戻すことを特徴とする。
Claim 1 of the present invention in order to achieve the object, relative to the character to move the screen, the CG screen control method for displaying the previous SL image obtained by photographing a character on the monitor screen, the position of the character from the operation unit If the operation of moving is made to move the character to a position corresponding to the operation amount, corresponding to the movement position of the character to set the camera to be placed additionally follow, connecting the camera installation position and character It is determined whether or not a line segment tip of a predetermined distance from the character intersects the terrain surface displayed on the screen, and if it does not intersect in the determination, the line segment tip is The position and optical axis of the camera are controlled to move and rotate with respect to the character so that the position substantially coincides with the terrain surface displayed on the screen .
Claim 2 of the present invention, the intersecting determined whether in the invention according to the first aspect is carried out at predetermined time intervals, to rotate the optical axis of a predetermined angle in a direction crossing if disjoint camera, This operation is repeated until the position substantially coincides with the topographic surface.
According to a third aspect of the present invention, in the second aspect of the present invention, the rotation control of the camera is repeated by the predetermined angle , and when the front end of the line segment intersects the topographic surface, the camera is returned to the rotation position before the intersection. Features.
Claim 4 of the present invention, to the character to move the screen, in the CG game device for displaying the previous SL image obtained by photographing a character on the monitor screen, and character moving means for moving the character in accordance with operation of the operation unit, Camera position setting means for capturing the character in the field of view according to the movement of the character, and an extended line segment connecting the camera position and the character, and a line segment tip at a predetermined distance from the character is displayed on the screen It is determined whether or not to intersect with the terrain surface, and if it does not intersect with the determination, the position and optical axis of the camera so that the tip of the line segment is substantially coincident with the terrain surface displayed on the screen. the and control means for controlling movement and rotation relative to the character, in response to changes in the movement and terrain of the character, view from the camera And displaying the empty part and terrain portion while including the character on the screen at a predetermined ratio.
According to a fifth aspect of the present invention, in the invention according to the fourth aspect, the control means determines whether or not to intersect at a predetermined time interval, and if not intersects , the optical axis of the camera by a predetermined angle in the intersecting direction. , And this operation is repeated until the position substantially coincides with the terrain surface.
According to a sixth aspect of the present invention, in the invention according to the fifth aspect, the control means repeats the rotation control of the camera by a predetermined angle , and when the tip of the line segment intersects the topographic surface, the rotational position of the camera before the intersection It is characterized by returning to.

上記構成によれば、地形の面と視線の先端をヒットチェック(キャラクタから所定延長線上での所定距離先端が地形表面に交わっているか否かのチェック)してカメラの角度(ピッチ角)を制御するので、地形に合わせたカメラの角度を得ることができる。そのため、上り坂では空ではなく、地上を含めた視界位置で見ることができ、また、下り坂,崖などでは地形表示して足元の方を見やすくできる。 According to the above configuration, the terrain surface and the tip of the line of sight are hit-checked (check whether the tip at a predetermined distance on the extension line from the character intersects the terrain surface) and the camera angle (pitch angle) is determined. Since it is controlled, the camera angle can be obtained according to the terrain. For this reason, it is possible to see the field of view including the ground instead of the sky on the uphill, and the terrain display on the downhill, cliff, etc. makes it easier to see the feet.

まず、本発明によるカメラ制御方法を適用するための手法について説明する。
本発明ではカメラ位置からプレイヤを通った延長線上にあるプレイヤからの距離Lの位置と地面などの面と交わっているかの判定を行い、交わっている場合はカメラの角度を上を見るように変更し、交わっていない場合は角度を下げるように変更するが、交わっているか否かのヒットチェックは以下の手法を用いている。
First, a method for applying the camera control method according to the present invention will be described.
In the present invention a determination is made as to whether or intersects the position and the surface of such ground distance L from the player that an extension passing through the player from the camera position, when the intersect changing the angle of the camera to view on However, if it does not intersect, the angle is changed so as to lower the angle, but the hit check whether or not it intersects uses the following method.

1)まず、入力データを以下の通り定義する。
直線の開始点と終了点の位置情報を(x,y,z) VECTOR start, endとする。
面(3頂点情報による3角形)情報の配列を(x,y,z) VECTOR vertex〔〕とする。
ここでいう VECTOR は(x,y,z)の要素を持つ変数の型を意味する。
以下で用いられる floatは一般的な浮動小数点型の変数の型を意味する。
vertex 〔〕は VECTOR 型の変数の配列を意味する。
上記定義で面を3角形にしたのは、一般的に3角形でヒットデータを持っていることが多いためである。4角形であると曲がった面ができる可能性があり不都合が生じる場合がある。
1) First, input data is defined as follows.
The position information of the start point and end point of the straight line is (x, y, z) VECTOR start, end.
Let the array of face (triangles based on 3 vertex information) information be (x, y, z) VECTOR vertex [].
Here, VECTOR means a variable type having elements (x, y, z).
In the following, float means a general floating point type variable type.
vertex [] means an array of VECTOR type variables.
The reason why the surface is triangular according to the above definition is that generally the triangle has hit data in many cases. If it is a quadrangle, a curved surface may be formed, which may cause inconvenience.

2)面の頂点情報より面の法線データを作成し面の方程式を得る。
面の方程式は ax + by + cz + d = 0・・・(1)である。
つぎに面の頂点データより面を構成する2つの直線のベクトルを求める。
VECTOR vec1 = vertex[1] - vertex[0] ・・・(2)
VECTOR vec2 = vertex[2] - vertex[0] ・・・(3)
さらに法線データ normal を外積を使って求める。
VECTOR normal = vec1X vec2 ・・・(4)
(4)式の normal の x,y,zが(1)式の a,b,cに相当する。なおXは外積計算を意味する。dは定数である。
ついで、面の方程式より dを求める。
(1)式よりd = -(ax + by + cz) であるから、
d = -(vertex[0].x * normal.x + vertex[0].y * normal.y + vertex[0].z * normal.z) ・・・(5)となる。
2) Surface normal data is created from surface vertex information to obtain surface equations.
The equation of the surface is ax + by + cz + d = 0 (1).
Next, a vector of two lines constituting the surface is obtained from the vertex data of the surface.
VECTOR vec1 = vertex [1]-vertex [0] (2)
VECTOR vec2 = vertex [2]-vertex [0] (3)
Furthermore, normal data normal is obtained using the outer product.
VECTOR normal = vec1X vec2 (4)
The normal x, y, z in equation (4) corresponds to a, b, c in equation (1). X means outer product calculation. d is a constant.
Next, find d from the surface equation.
Since d =-(ax + by + cz) from equation (1),
d =-(vertex [0] .x * normal.x + vertex [0] .y * normal.y + vertex [0] .z * normal.z) (5)

3)直線の方程式より2)で求めた面と直線の交点を求める。
直線は最初の位置と方向ベクトル(vec)、媒介変数(t)でもって表されるので、まず面と直線が交わる媒介変数(t)を求める。
そのために、入力データ startの各要素(x,y,z)を(1)式の面の方程式のx,y,zに代入して求めた値float q を、end - start のベクトルVECTOR aと(4)式の法線データ normal の内積の結果で割る。
(1)式に、start.x ,start.y,start.zおよびnormal.x, normal.y,normal.z を代入すると、
float q = (start.x * normal.x + start.y * normal.y + start.z * normal.z + d) ・・・(6)
VECTOR a = (end - start)・・・(7)であり、
end - start のベクトルと法線データ normal の内積float b は
float b = a ・(normal)・・・(8)となる。
したがって、媒介変数(t)は
float t = q/b ・・・(9)となる。
なお(end - start) はベクトルの引き算であり,・は内積計算を意味する。
上記計算において、b =0になった場合は、面と直線が平行になっていることを意味するので、交わることが無いことが確定する。
また、 tが 0 <= t <= 1以外のときは面が裏向きの場合か、交わっていない場合などで、これもヒットの対象から外す。
3) From the straight line equation, find the intersection of the surface and straight line obtained in 2).
Since the straight line is represented by the initial position, the direction vector (vec), and the parameter (t), the parameter (t) where the surface and the line intersect is first obtained.
For this purpose, the value float q obtained by substituting each element (x, y, z) of the input data start into the x, y, z of the surface equation (1) is used as the vector VECTOR a of end-start. Divide by the result of the inner product of normal data normal in equation (4).
Substituting start.x, start.y, start.z and normal.x, normal.y, normal.z into equation (1)
float q = (start.x * normal.x + start.y * normal.y + start.z * normal.z + d) (6)
VECTOR a = (end-start) (7)
end-the inner product float b of the start vector and normal data normal
float b = a (normal) (8)
Therefore, the parameter (t) is
float t = q / b (9)
Note that (end-start) is a vector subtraction, and · means inner product calculation.
In the above calculation, when b = 0, it means that the surface and the straight line are parallel to each other, so that it is determined that they will not intersect.
Also, when t is not 0 <= t <= 1, it is also excluded from hits, for example, when the faces are face down or not intersecting .

このようにして(9)式より媒介変数(t)を求めた後、直線の方程式より面と直線の交点を求めることになる。
交点pは、
VECTOR p = a * t + start・・・(10)
ここで a * tは VECTOR a の各要素に媒介変数 tを掛けることを意味する。
(10)式は無限の大きさを持つ場合の面と直線との交点pを求めるものである。
Thus, after obtaining the parameter (t) from the equation (9), the intersection of the surface and the straight line is obtained from the straight line equation.
The intersection point p is
VECTOR p = a * t + start (10)
Here a * t means to multiply each element of VECTOR a by a parameter t.
Equation (10) is to obtain the intersection point p between the surface and the straight line when the size is infinite.

4)つぎに3)で求めた交点pは3角形の面の中を通っているのか、外を通っているかを調べる。
3)で求めた(10)式の交点pは直線が無限大の面と交わっている点であり、実際にチェックするべき3角形の面の中に存在しない可能性がある。そのため、3角形の中に存在するか否かを調べる。
そのためには、3)で求めた交点と3角形の各頂点を使って外積を求める。
・一つ目の頂点は
VECTOR vec1 = vertex[0] - p
VECTOR vec2 = vertex[1] - vertex[0]
VECTOR vec3 - 1 = vec1X vec2 である。

・二つ目の頂点は
VECTOR vec1 = vertex[1] - p
VECTOR vec2 = vertex[2] - vertex[1]
VECTOR vec3 - 2 = vec1X vec2 である。

・三つ目の頂点は
VECTOR vec1 = vertex[2] - p
VECTOR vec2 = vertex[0] - vertex[2]
VECTOR vec3 - 3 = vec1X vec2 である。
4) Next, it is examined whether the intersection point p obtained in 3) passes through the triangle surface or the outside.
The intersection point p of the equation (10) obtained in 3) is a point where the straight line intersects with an infinite surface and may not exist in the triangular surface to be actually checked. Therefore, it is checked whether or not it exists in the triangle.
For this purpose, an outer product is obtained using the intersection obtained in 3) and each vertex of the triangle.
・ The first vertex is
VECTOR vec1 = vertex [0]-p
VECTOR vec2 = vertex [1]-vertex [0]
VECTOR vec3 - a 1 = vec1X vec2.

・ The second vertex is
VECTOR vec1 = vertex [1]-p
VECTOR vec2 = vertex [2]-vertex [1]
VECTOR vec3 - a 2 = vec1X vec2.

・ The third vertex is
VECTOR vec1 = vertex [2]-p
VECTOR vec2 = vertex [0]-vertex [2]
VECTOR vec3 - a 3 = vec1X vec2.

上記3頂点分すべて同じ向きであれば、3)で求めた交点は3角形の内部に存在する。
各頂点の向きを比べる方法は、2)で求めたベクトル normal との内積を計算する方法がある。今回、求めるベクトルは、2)で求めたベクトル normal と同じ向きか180°反対の向きのベクトルになるためである。
2)で求めたベクトル normal との内積の符号を比べて、すべて同じ符号であるならば3)で求めた交点は3角形の内部に存在することになる。
2)で求めたベクトル normal との内積は以下のようになる。
float nn1 = vec3-1 ・ normal ・・・(11)
float nn2 = vec3-2 ・ normal ・・・(12)
float nn3 = vec3-3 ・ normal ・・・(13)
したがって上記(11)(12)(13)式の符号を調べることによって交点pが3角形の内部に存在するか否かを判別できる。
If all three vertices have the same orientation, the intersection obtained in 3) exists inside the triangle.
As a method of comparing the directions of the vertices, there is a method of calculating an inner product with the vector normal obtained in 2). This is because the vector to be obtained this time is a vector having the same direction as the vector normal obtained in 2) or a direction opposite to 180 °.
If the signs of the inner products with the vector normal obtained in 2) are compared, and the signs are all the same, the intersection point obtained in 3) exists inside the triangle.
The inner product with the vector normal obtained in 2) is as follows.
float nn1 = vec3 - 1 · normal ··· (11)
float nn2 = vec3 - 2 · normal ··· (12)
float nn3 = vec3 - 3 · normal ··· (13)
Therefore, it is possible to determine whether or not the intersection point p exists inside the triangle by examining the signs of the above equations (11), (12), and (13).

つぎにプレイヤの位置とカメラ角度からカメラ位置を求めるための行列式を説明する。回転行列式は後述のカメラ位置を求める演算のときに用いられるものである。
ここでは3行3列の行列を説明する。CGの計算では4行4列の行列を使うことがあるが、回転の計算に影響を及ぼすのはこの部分であるので、3行3列とした。
X軸の回転角度をRx、Y軸の回転角度をRy、Z軸の回転角度をRzとした時の各軸の回転は以下のようになる。
Next, a determinant for obtaining the camera position from the position of the player and the camera angle will be described. The rotation determinant is used in the calculation for obtaining the camera position described later.
Here, a 3 × 3 matrix will be described. In the calculation of CG, a matrix of 4 rows and 4 columns is sometimes used. However, since this part affects the calculation of rotation, it is set to 3 rows and 3 columns.
The rotation of each axis when the rotation angle of the X axis is Rx, the rotation angle of the Y axis is Ry, and the rotation angle of the Z axis is Rz is as follows.

・X軸の回転

Figure 0005089147
・・・(14)

・Y軸の回転
Figure 0005089147
・・・(15)
・Z軸の回転
Figure 0005089147
・・・(16) ・ Rotation of X axis
Figure 0005089147
(14)

・ Rotation of Y axis
Figure 0005089147
... (15)
・ Z axis rotation
Figure 0005089147
... (16)

これらを掛け合わせて回転行列を作成する。掛け合わせる順番により大きく結果が異なるが、掛け合わせる順番はシステム,ライブラリによって変わってくる。
今回はX,Y,Zの順番に掛けたものを説明する。
上の sin,cosを用いた式で説明すると見難くなるので、簡易版にて説明する。

行列の各要素に番号を与える。

Figure 0005089147
・・・(17)
? には各軸の記号を入れて表す。例えば、X軸の行列の要素は、Xm00,Xm01,Xm12,Xm10 ・・・
Y軸の行列の要素は、Ym00,Ym01,Ym12,Ym10 ・・・といった様にである。 Multiply these to create a rotation matrix. The results differ greatly depending on the order of multiplication, but the order of multiplication varies depending on the system and library.
This time, the thing which multiplied in order of X, Y and Z is explained.
Since it will be difficult to see if the above equation using sin and cos is used, it will be explained in a simplified version.

Give a number to each element of the matrix.
Figure 0005089147
... (17)
The symbol of each axis is put in? For example, the elements of the X-axis matrix are Xm00, Xm01, Xm12, Xm10.
The elements of the Y-axis matrix are Ym00, Ym01, Ym12, Ym10, and so on.

まず、X軸の回転行列とY軸の回転行列を掛け合わせる。
掛け合わせた回転行列XYの各要素は、

XYm00 = Xm00 * Ym00 + Xm01 * Ym10 + Xm02 * Ym20
XYm01 = Xm00 * Ym01 + Xm01 * Ym11 + Xm02 * Ym21
XYm02 = Xm00 * Ym02 + Xm01 * Ym12 + Xm02 * Ym22
XYm10 = Xm10 * Ym00 + Xm11 * Ym10 + Xm12 * Ym20
XYm11 = Xm10 * Ym01 + Xm11 * Ym11 + Xm12 * Ym21
XYm12 = Xm10 * Ym02 + Xm11 * Ym12 + Xm12 * Ym22
XYm20 = Xm20 * Ym00 + Xm21 * Ym10 + Xm22 * Ym20
XYm21 = Xm20 * Ym01 + Xm21 * Ym11 + Xm22 * Ym21
XYm22 = Xm20 * Ym02 + Xm21 * Ym12 + Xm22 * Ym22

Figure 0005089147
・・・(18)
となる。この結果とZ軸の回転行列を同様に掛け合わせることにより最終的な回転行列を得ることが出来る。 First, the X-axis rotation matrix and the Y-axis rotation matrix are multiplied.
Each element of the rotated rotation matrix XY is

XYm00 = Xm00 * Ym00 + Xm01 * Ym10 + Xm02 * Ym20
XYm01 = Xm00 * Ym01 + Xm01 * Ym11 + Xm02 * Ym21
XYm02 = Xm00 * Ym02 + Xm01 * Ym12 + Xm02 * Ym22
XYm10 = Xm10 * Ym00 + Xm11 * Ym10 + Xm12 * Ym20
XYm11 = Xm10 * Ym01 + Xm11 * Ym11 + Xm12 * Ym21
XYm12 = Xm10 * Ym02 + Xm11 * Ym12 + Xm12 * Ym22
XYm20 = Xm20 * Ym00 + Xm21 * Ym10 + Xm22 * Ym20
XYm21 = Xm20 * Ym01 + Xm21 * Ym11 + Xm22 * Ym21
XYm22 = Xm20 * Ym02 + Xm21 * Ym12 + Xm22 * Ym22

Figure 0005089147
... (18)
It becomes. By multiplying this result and the Z-axis rotation matrix in the same manner, a final rotation matrix can be obtained.

つぎに図1Aを用いてカメラ位置,カメラ角度,プレイヤ位置および注視(注目)点チェック位置に対し上記手法の取り入れ方法を説明する。
図1Aに示すようにカメラの位置を(camera pos(x,y,z)),カメラ角度を(camera angle(x,y,z)),画面の中心に持っていきたい点、すなわち3人称の場合、プレイヤキャラクタの頭部または頭部より少し上になる位置を(player pos(x,y,z)),camera posから player pos を通過しcamera angle方向に伸びる直線の、player posから距離Lの長さにある点すなわち注視点チェック位置を(check pos(x,y,z)) とする。
Next, referring to FIG. 1A, a method of incorporating the above method with respect to the camera position, camera angle, player position, and gaze (attention) point check position will be described.
As shown in FIG. 1A, the camera position is (camera pos (x, y, z)), the camera angle is (camera angle (x, y, z)), the point you want to bring to the center of the screen, that is, the third person In the case of, the player character's head or a position slightly above the head (player pos (x, y, z)), a distance from the player pos of a straight line extending from the camera pos through the player pos in the camera angle direction A point in the length of L, that is, a gaze point check position is defined as (check pos (x, y, z)).

カメラは通常プレイヤキャラクタを画面内に収めるように位置と角度が決定される。
カメラはこの固定された位置からプレイヤキャラクタを見るように角度を変更しても良いし、プレイヤキャラクタの移動に合わせて位置を移動しても良い。本発明によるCGゲーム機ではプレイヤが操作部によって固定された位置からカメラ角度を変えることができる。また、カメラとプレイヤキャラクタとは常に所定の位置関係になるようにCGゲーム機で設定されていれば、プレイヤの移動に従ってカメラ位置も移動する。
(i) まず、決定すべき点は、プレイヤキャラクタの位置player posである。これはプレイヤの操作部による入力などで操作され、操作情報の演算の結果、プレイヤキャラクタの位置が決定される。
(ii)次にカメラの角度camera angleを決定する。プレイヤの操作等からカメラの角度を変更する場合と、前回の演算結果を利用する場合がある。
The position and angle of the camera are usually determined so that the player character can be accommodated in the screen.
The camera may change the angle so as to see the player character from this fixed position, or may move the position in accordance with the movement of the player character. In the CG game machine according to the present invention, the player can change the camera angle from the position fixed by the operation unit. Further, if the CG game machine is set so that the camera and the player character always have a predetermined positional relationship, the camera position moves as the player moves.
(i) First, the point to be determined is the player character position player pos. This is operated by an input from the operation unit of the player, and the position of the player character is determined as a result of calculation of the operation information.
(ii) Next, the camera angle camera angle is determined. There are a case where the angle of the camera is changed by a player operation or the like, and a case where the previous calculation result is used.

(iii) 次にカメラの位置を決定する。カメラの位置はプレイヤキャラクタの位置とカメラの角度から求められる。プレイヤキャラクタから距離Lp離した位置をカメラの位置camera posとする。
カメラの位置camera posは、カメラのX軸,Y軸およびZ軸の角度(式(14)(15))を掛け合わせて回転行列XYを作り、これにZ軸の回転行列(式(16))を掛け合わせてX軸,Y軸およびZ軸の回転行列を作り、これにLpをベクトル成分として掛け合わせることにより求めることができる。
(iv) 次に地形と視線のヒットチェックを行う点check pos を求める。プレイヤキャラクタの位置からカメラの位置への逆ベクトルになるので、これも容易に求めることができる。
(iii) Next, the position of the camera is determined. The position of the camera is obtained from the position of the player character and the angle of the camera. The position separated from the player character by the distance Lp is defined as a camera position camera pos.
The camera position camera pos is multiplied by the camera X-axis, Y-axis, and Z-axis angles (Equations (14) and (15)) to form a rotation matrix XY, which is then rotated by the Z-axis rotation matrix (Equation (16)). ) To create a rotation matrix of the X axis, Y axis, and Z axis, and multiply this by Lp as a vector component.
(iv) Next, check point pos for performing a hit check of the terrain and the line of sight is obtained. Since this is an inverse vector from the position of the player character to the position of the camera, this can also be easily obtained.

(v) 次に地形の面と視線のヒットチェックを行う点check pos とのヒットチェックを行う。
これは、上記1)2)3)4)の手法を用いてチェックすることができる。このときplayer pos(x,y,z)は VECTOR start に,check pos (x,y,z)は VECTOR endにそれぞれ対応して演算されることとなる。3)4)の交点を求めて、交点が3角形の中か外かの判定で、check pos とplayer posを結ぶ線分と地形の面が交わっていれば、check pos が地形に入り込んでいるので、カメラの角度が上を見るように変更される。
もし、交わっていなければ、地形より浮いているので、カメラの角度が下を見るように変更される。
この処理をそのまま繰り返すと、地形と境界線上で毎回上下に変更するようになるので、地形に入り込んでいる時、または、地形から浮いている時どちらか片方で、変更後のカメラの角度でもう一度ヒットチェックを行い、ヒットチェックの結果が変わった場合は変更したカメラの角度を使わないで、変更前のカメラの角度に戻すように処理を行う。
(v) Next, a hit check is performed with the check pos to perform a hit check of the terrain surface and the line of sight.
This can be checked using the methods 1), 2), 3) and 4) above. At this time, player pos (x, y, z) is calculated corresponding to VECTOR start, and check pos (x, y, z) is calculated corresponding to VECTOR end. 3) Find the intersection of 4), and if the intersection is inside or outside of the triangle, if the line connecting check pos and player pos intersects the surface of the terrain, check pos enters the terrain So the camera angle is changed to look up.
If they don't meet, they are floating above the terrain, so the camera angle is changed to look down.
If this process is repeated as it is, it will change up and down every time on the terrain and the boundary line, so when entering the terrain or floating from the terrain, either one, again at the changed camera angle A hit check is performed, and if the result of the hit check changes, the process is performed so that the angle of the changed camera is not used and the angle of the camera before the change is returned.

つぎに、本発明の実施の形態を詳しく説明する。
図1Bは、本発明によるカメラ制御方法を用いたCGゲーム装置の外観を示す斜視図である。このCGゲーム装置1は家庭用ゲーム機であり、プレイヤはパッド2の各ボタン,方向選択ボタンなどを操作することによりモニタ3に表示されている画面上のキャラクタを移動させたり、種々の動作を行わせたりしてゲームを進行させることができる。
このゲームは主人公キャラクタ4が斜面5を登っている状態が示されており、斜面5と空6の部分が画面の略中央になるようにカメラ位置制御されており、プレイヤは背景画の前方を良く見通すことができる視界を得ている。
Next, embodiments of the present invention will be described in detail.
FIG. 1B is a perspective view showing an external appearance of a CG game device using the camera control method according to the present invention. The CG game apparatus 1 is a home-use game machine, and a player moves a character on the screen displayed on the monitor 3 by operating each button, direction selection button, or the like of the pad 2, or performs various operations. Or let the game progress.
In this game, the hero character 4 is shown climbing up the slope 5, the camera position is controlled so that the slope 5 and the sky 6 are in the approximate center of the screen, and the player moves in front of the background image. I have a good view.

図2は本発明によるカメラ制御方法を用いたCGゲーム装置の回路の実施の形態を示す回路ブロック図である。
家庭用ゲーム機1は、CPU10,画像処理回路11,メインバス13,メモリ回路14,外部記憶装置16,サウンド処理回路17およびスピーカ18より構成されている。
外部記憶装置16はCD−ROM,カード,DVDなどのメディアを装着してなる記憶部で、メディアにはゲームプログラムおよびそのデータを格納している。
ゲームプログラムはゲームを開始するための画面を表示させるゲーム開始起動ステップ,プレイヤからの移動操作などを受けてキャラクタ位置を移動させるゲーム操作ステップ,キャラクタ位置に対応しキャラクタ位置から所定の位置にカメラを設置するカメラ位置設定ステップ,プレイヤの操作に応じてゲーム処理を行うゲーム進行処理ステップ,カメラとキャラクタを結ぶ延長線であってキャラクタから所定距離の線分が地形の表面と交わっているか否かをチェックする衝突チェックステップ,衝突チェックで、所定距離の線分と地形の表面が一致(接触)しない場合、一致する方向にカメラのピッチを回転制御するカメラ角度調整ステップを含んでいる。
メモリ回路14はCPU10が処理を行う作業領域として用いられる他、演算結果などのデータを一時的に格納するRAMと、装置全体の制御を司る制御プログラムおよびそれに関連するデータを格納するROMを備えたものである。
FIG. 2 is a circuit block diagram showing an embodiment of a circuit of a CG game device using the camera control method according to the present invention.
The home game machine 1 includes a CPU 10, an image processing circuit 11, a main bus 13, a memory circuit 14, an external storage device 16, a sound processing circuit 17, and a speaker 18.
The external storage device 16 is a storage unit in which a medium such as a CD-ROM, a card, or a DVD is mounted. The medium stores a game program and its data.
The game program includes a game start starting step for displaying a screen for starting a game, a game operation step for moving a character position in response to a moving operation from the player, and a camera from a character position to a predetermined position corresponding to the character position. A camera position setting step to be installed; a game progress processing step for performing a game process in accordance with a player's operation; and whether or not a line segment extending from the character and a predetermined distance intersects the surface of the terrain. In the collision check step for checking, and in the collision check, if the line segment of the predetermined distance and the surface of the terrain do not match (contact), a camera angle adjustment step for rotating the camera pitch in the matching direction is included.
The memory circuit 14 is used as a work area where the CPU 10 performs processing, and also includes a RAM that temporarily stores data such as calculation results, a control program that controls the entire apparatus, and a ROM that stores data related thereto. Is.

画像処理回路11は、CPU10で演算処理された画像データを受信し、CRT3で表示するイメージデータに変換するものである。
サウンド処理回路17は、CPU10で演算処理されたサウンドデータを受信し、アナログ音声に変換しスピーカ18より背景音や音声などのサウンドを出力する。
CPU10は、ROMより制御プログラムを読み出し、装置全体の制御を行う機能を有する。外部記憶装置16に例えばCD−ROMが装着された場合、CPU10はCD−ROMのゲームプログラムを読み込み最初にゲーム開始の画面をCRTに表示させる。
CPU10では制御プログラムにより読み込まれたゲームプログラムにより、上記ステップの各機能を実現する。すなわち、ゲーム開始・進行部10a,ゲーム操作処理部10b,カメラ位置設定部10c,衝突チェック部10dおよびカメラ角度調整部10eの各機能を実現する。
The image processing circuit 11 receives the image data calculated by the CPU 10 and converts it into image data to be displayed on the CRT 3.
The sound processing circuit 17 receives the sound data calculated by the CPU 10, converts it into analog sound, and outputs a sound such as background sound and sound from the speaker 18.
The CPU 10 has a function of reading a control program from the ROM and controlling the entire apparatus. When a CD-ROM, for example, is loaded in the external storage device 16, the CPU 10 reads the CD-ROM game program and first displays a game start screen on the CRT.
The CPU 10 realizes each function of the above steps by a game program read by the control program. That is, the functions of the game start / progress unit 10a, the game operation processing unit 10b, the camera position setting unit 10c, the collision check unit 10d, and the camera angle adjustment unit 10e are realized.

図3は、キャラクタを含む画面をカメラ視点から撮影表示する際のカメラの制御方法を説明するための図である。
プレイヤは入力装置(パッド)を操作してキャラクタCを画面上で移動させることができる。(a)は水平の地面GOにキャラクタCが存在し、キャラクタCに対し、所定のカメラ角度で後方の所定距離にカメラVを設定し、カメラからキャラクタの頭部分を通って延長した長さLの点が地面に略一致するようにカメラの位置とピッチ角を調整した状態を示すものである。
カメラは、(b)に示すように画面の高さhに対し略1/2位置に地面と空の境界が配置されるように位置とピッチ角が調整される。
FIG. 3 is a diagram for explaining a camera control method when a screen including a character is captured and displayed from the camera viewpoint.
The player can move the character C on the screen by operating the input device (pad). In (a), a character C exists on a horizontal ground GO, the camera V is set at a predetermined distance behind the character C at a predetermined camera angle, and the length L is extended from the camera through the head of the character. This shows a state in which the position and pitch angle of the camera are adjusted so that these points substantially coincide with the ground.
As shown in (b), the camera is adjusted in position and pitch angle so that the boundary between the ground and the sky is arranged at approximately a half position with respect to the height h of the screen.

キャラクタCが移動して二点鎖線G1に示すような下り坂に差しかかった場合、当初のカメラのピッチ角の状態であると、(c)に示すようにキャラクタCの先の背景は空のみとなる。このような画面を回避するために、キャラクタCの移動により地形の傾きが変化した場合、(b)の図面になるようにカメラVの位置とピッチ角を僅かづつ移動・回転制御する。制御方法は僅かずつ修正するのではなく、地形の傾きが非常に大きくなったときにカメラの移動・回転を行うことも可能である。
また、二点鎖線G2に示すような上り坂に差しかかった場合、当初のカメラの位置とピッチ角の状態であると、()に示すようにキャラクタCの先の背景は地形のみとなる。このような画面を回避するために、キャラクタCの移動により地形の傾きが変化した場合、(b)の図面になるようにカメラVの位置とピッチ角を僅かづつ移動・回転制御する。制御方法は僅かずつ修正するのではなく、地形の傾きが相当傾いたときにカメラの移動・回転を行うことも可能である。
When the character C moves and approaches a downhill as shown by a two-dot chain line G1, if the pitch angle of the original camera is in the initial state, the background behind the character C is only empty as shown in FIG. It becomes. In order to avoid such a screen, when the inclination of the terrain is changed by the movement of the character C, the position and pitch angle of the camera V are moved and rotated little by little as shown in the drawing of (b). The control method is not corrected little by little, and the camera can be moved and rotated when the inclination of the terrain becomes very large.
Further, when approaching an uphill as shown by a two-dot chain line G2, if the original camera position and pitch angle are in the state, the background of the character C is only the topography as shown in ( d ). . In order to avoid such a screen, when the inclination of the terrain is changed by the movement of the character C, the position and pitch angle of the camera V are moved and rotated little by little as shown in the drawing of (b). The control method is not corrected little by little, but it is also possible to move and rotate the camera when the inclination of the terrain is considerably inclined.

図4は、図1BのCGゲーム装置におけるゲームにおけるカメラ制御の流れを説明するためのフローチャートである。
ゲーム内ではプレイヤが入出力装置(パッド)2のボタン操作することにより操作情報がCPU10に送られる。ゲーム操作処理部10bは入力した操作情報に基づき例えばキャラクタの移動であれば、キャラクタを操作情報に対応した分移動させ、その画像がCRT3に表示される。カメラ位置設定部10cはキャラクタ(頭位置または頭の僅かに上位置)から距離Lp離れた位置であって、水平面に対しピッチ角θhになるようにカメラを設定する。水平の地表をキャラクタが移動している限りは、このカメラの位置とキャラクタの位置の相対的関係は保持するようにカメラの位置を移動させる(ステップ(以下「S」という)001)。
FIG. 4 is a flowchart for explaining the flow of camera control in the game in the CG game device of FIG. 1B.
In the game, when the player operates the buttons of the input / output device (pad) 2, operation information is sent to the CPU 10. Based on the input operation information, the game operation processing unit 10b moves the character by the amount corresponding to the operation information, for example, if the character is moving, and the image is displayed on the CRT 3. The camera position setting unit 10c sets the camera so that it is at a distance Lp from the character (head position or slightly above the head position) and has a pitch angle θh with respect to the horizontal plane. As long as the character is moving on the horizontal ground surface, the camera position is moved so as to maintain the relative relationship between the camera position and the character position (step (hereinafter referred to as “S”) 001).

衝突チェック部10dは、キャラクタから延長される線分のLの長さの先端(チェック位置)のヒットチェックを行う。すなわち地面に対しチェック位置が交わっているか、または全く交わっていないかをチェックする(S002)。これは例えば1/60秒の間隔で行われ、上述したような演算式を使用して行われる。チェックの結果、図5(a)に示すように線分Lの先端部が交わって地面に入り込んでいる場合、カメラ角度調整部10eは2°上向きの角度修正する(S003)。そしてカメラの角度を調整する(S004)。これに伴い、カメラ位置もカメラ角度に沿った位置となる。 The collision check unit 10d performs a hit check of the tip (check position) of the length L of the line segment extended from the character. That checks do not intersect dolphin or no intersecting check position with respect to the ground (S002). This is performed, for example, at an interval of 1/60 seconds, and is performed using the arithmetic expression as described above. As a result of the check, when the leading ends of the line segment L cross and enter the ground as shown in FIG. 5A, the camera angle adjustment unit 10e corrects the angle upward by 2 ° (S003). Then, the angle of the camera is adjusted (S004). Accordingly, the camera position also becomes a position along the camera angle.

一方、チェックの結果、図6(a)に示すように線分Lの先端部が交わらず地面から離れている場合、カメラ角度調整部10eは1回のチェックで2°下向きの角度修正する(S004)。そして注視点が地面に交わったか否かをチェックする(S005)。注視点が地面に交わる位置に達ていると、1つ手前のチェック位置に戻り(S006)、カメラをその角度位置に調整する(S007)。それに伴いカメラ位置もカメラ角度に沿った位置となる。
このような動作の後、ゲームオーバーでなければ、再度S001からS002に戻り、同様な動作を繰り返し行う。この結果、注視点が地面から交わらない位置になった場合、1/60秒間隔で2°づつカメラのピッチ角が地面に交わる方向に制御され、図6(b)のように適正な視界を得られる位置にもたらされる。また、注視点が地面に交わる位置になった場合、1/60秒間隔で2°づつカメラのピッチ角が地面に交わらない方向に制御され、図5(b)のような適正な視界を得られる位置にもたらされる。
On the other hand, as a result of the check, when the tip of the line segment L does not intersect and is away from the ground as shown in FIG. 6A , the camera angle adjustment unit 10e corrects the angle downward by 2 ° in one check ( S004). Then, it is checked whether or not the gazing point intersects the ground (S005). Gazing point when being reached the position intersecting the ground, return to the front of the check position (S006), to adjust the camera to its angular position (S007). Accordingly, the camera position also becomes a position along the camera angle.
If the game is not over after such an operation, the process returns from S001 to S002 again, and the same operation is repeated. As a result, when the gazing point does not intersect with the ground, the camera pitch angle is controlled by 2 ° in 1/60 second intervals so as to intersect the ground , and an appropriate field of view is obtained as shown in FIG. Brought to the resulting position. In addition, when the gazing point is at a position where it intersects the ground , the camera pitch angle is controlled by 2 ° at 1/60 second intervals so that it does not intersect the ground, and an appropriate field of view as shown in FIG. 5B is obtained. Is brought to a position.

図7は、図4のフローチャートとは異なるカメラ制御方法を説明するためのフローチャートである。図4のフローチャートではカメラの角度2°づつ変更する場合について説明したが、この例はカメラの角度を1回の処理で確定させるものである。
S101はS001と同じ処理であり、カメラの位置とキャラクタの位置の相対的関係は保持するようにカメラの位置を移動させる
衝突チェック部10dは、キャラクタから延長される線分のLの長さの先端(チェック位置)のヒットチェックを行う。すなわち地面に対しチェック位置が交わっているか、または全く交わっていないかをチェックする(S102)。
FIG. 7 is a flowchart for explaining a camera control method different from the flowchart of FIG. In the flowchart of FIG. 4, the case where the camera angle is changed by 2 ° has been described, but in this example, the camera angle is determined by one process.
S101 is the same process as S001, and the camera position is moved so that the relative relationship between the camera position and the character position is maintained .
The collision check unit 10d performs a hit check of the tip (check position) of the length L of the line segment extended from the character. That is, it is checked whether the check position intersects with the ground or does not intersect at all (S102).

チェックの結果、図5(a)に示すように線分Lの先端部が交わって地面に入り込んでいる場合、カメラ角度調整部10eはカメラ角度を上を見るように修正する(S103)。そして再度、S102でヒットチェックを行い、交わっているならば、連続してカメラの角度を上を見るように変更する。チェックの結果、図6(a)に示すように線分Lの先端部が交わらず地面から離れている位置になった場合は、カメラ角度調整部10eは下向きの角度修正する(S104)。そして注視点が地面に交わったか否かをチェックし(S105)、交わっていない場合はカメラの角度位置を下に見るように変更する(S105)。このようにして、注視点が地面に交わる位置に達すると、1つ手前のチェック位置に戻り(S106)、カメラをその角度位置に調整する(S107)。それに伴いカメラ位置もカメラ角度に沿った位置となる。 As a result of the check, when the leading ends of the line segment L cross each other and enter the ground as shown in FIG. 5A, the camera angle adjustment unit 10e corrects the camera angle so as to look up (S103). Then, a hit check is performed again in S102, and if they intersect , the camera angle is continuously changed so as to look upward. As a result of the check, when the tip of the line segment L does not intersect and is away from the ground as shown in FIG. 6A , the camera angle adjustment unit 10e corrects the downward angle (S104). Then, it is checked whether or not the gazing point intersects the ground (S105), and if not, the angle position of the camera is changed to look downward (S105). In this way, the gazing point is the it reaches a position intersecting the ground, return to the front of the check position (S106), to adjust the camera to its angular position (S107). Accordingly, the camera position also becomes a position along the camera angle.

以上の実施の形態は家庭用ゲーム機について適用した例を説明したが、業務用ゲーム機,携帯ゲーム機,オンラインゲーム機などにも同様に適用できるものである。
また、注視点チェック動作を1/60秒間隔で行う例について説明したが、他の時間の間隔、例えば1/30秒,1/20秒などでチェックすることも可能である。1回のチェックでピッチ角を2°づつ修正しているが、この角度も他の角度、例えば1°,3°づつ修正しても良い。修正方法として注視点が地面に略一致する位置までの角度単位で修正することも可能である。例えば、水平面から崖の縁の部分に移動した場合、小さい角度単位で修正するのでは、崖に立ったときの適正な画面を表示する時間がかかるため、このような場合には大きな角度でカメラ位置を修正することが必要である。
Although the above embodiment has been described with reference to an example applied to a home game machine, the present invention can be similarly applied to an arcade game machine, a portable game machine, an online game machine, and the like.
Further, although an example in which the gazing point check operation is performed at 1/60 second intervals has been described, it is also possible to check at other time intervals, for example, 1/30 seconds, 1/20 seconds, or the like. Although the pitch angle is corrected by 2 ° in one check, this angle may be corrected by another angle, for example, 1 ° or 3 °. As a correction method, correction can be performed in units of angles up to a position where the gazing point substantially coincides with the ground. For example, if you move from the horizontal plane to the edge of the cliff, it will take time to display the proper screen when standing on the cliff if you correct it in small angle units. It is necessary to correct the position.

家庭用ゲーム機,業務用ゲーム機,携帯ゲーム機,オンラインゲーム機などに適用でき、地形に合わせた視線を得て画面表示するカメラ制御を取り入れたGCゲーム装置である。   This GC game device can be applied to home game machines, arcade game machines, portable game machines, online game machines and the like, and incorporates camera control that obtains a line of sight according to the terrain and displays it on the screen.

カメラ位置,カメラ角度,プレイヤ位置および注視点チェック位置に対し上記手法の取り入れ方法を説明するための図である。It is a figure for demonstrating the taking-in method of the said method with respect to a camera position, a camera angle, a player position, and a gaze point check position. 本発明によるカメラ制御方法を用いたCGゲーム装置の外観を示す斜視図である。It is a perspective view which shows the external appearance of the CG game device using the camera control method by this invention. 本発明によるカメラ制御方法を用いたCGゲーム装置の回路の実施の形態を示す回路ブロック図である。It is a circuit block diagram which shows embodiment of the circuit of the CG game device using the camera control method by this invention. キャラクタを含む画面をカメラ視点から撮影表示する際のカメラの制御方法を説明するための図である。It is a figure for demonstrating the control method of the camera at the time of imaging | photography displaying the screen containing a character from a camera viewpoint. 図1のカメラ制御方法の流れを説明するためのフローチャートである。It is a flowchart for demonstrating the flow of the camera control method of FIG. 画面を覆って視界が不良の場合のカメラの視界位置を良好にする例を説明するための図である。It is a figure for demonstrating the example which makes the visual field position of a camera favorable when a visual field is bad covering a screen. 足元が見えず視界が不良の場合のカメラの視界位置を良好にする例を説明するための図である。It is a figure for demonstrating the example which makes the visual field position of a camera favorable when a step cannot be seen but a visual field is bad. 図4のフローチャートとは異なるカメラ制御方法を説明するためのフローチャートである。5 is a flowchart for explaining a camera control method different from the flowchart of FIG. 4.

符号の説明Explanation of symbols

1 CGゲーム装置
2 入力装置(パッド)
3 モニタ(CRT)
10 CPU
11 画像処理回路
13 メインバス
14 メモリ回路
16 外部記憶装置
17 サウンド処理回路
18 スピーカ
1 CG game machine
2 Input device (pad)
3 Monitor (CRT)
10 CPU
11 Image processing circuit
13 Main bus 14 Memory circuit 16 External storage device 17 Sound processing circuit 18 Speaker

Claims (6)

画面中を移動するキャラクタに対し、前記キャラクタを撮影した画像をモニタ画面に表示するCG画面の制御方法において、
操作部からキャラクタの位置を移動させる操作がなされた場合、操作量に応じた位置にキャラクタを移動させ、
前記キャラクタの移動位置に対応して追従設置されるようにカメラを設定し、
前記カメラ設置位置とキャラクタを結ぶ延長上の線分であって、前記キャラクタから所定距離の線分先端が画面上に表示される地形面に対し交わるか否かを判断し、該判断で交わらない場合、前記線分先端が前記画面上に表示される地形面に対し略一致する位置になるように前記カメラの位置および光軸を前記キャラクタに対し移動・回転制御することを特徴とするカメラ制御方法。
To the character to move the screen, the CG screen control method for displaying the previous SL image obtained by photographing a character on the monitor screen,
When an operation for moving the position of the character is performed from the operation unit, the character is moved to a position corresponding to the operation amount,
In response to the movement position of the character to set the camera to be placed additionally slave,
It is a line segment on the extension connecting the camera installation position and the character, and it is determined whether or not the tip of the line segment at a predetermined distance from the character intersects the terrain surface displayed on the screen. In this case, the camera control is characterized in that the position and optical axis of the camera are controlled to move and rotate with respect to the character so that the end of the line segment is substantially coincident with the terrain surface displayed on the screen. Method.
前記交わるか否かの判断は所定の時間間隔で行い、交わらない場合には交わる方向に所定の角度だけカメラの光軸を回転させ、この動作を繰り返して前記地形面に対し略一致する位置になるまで制御することを特徴とする請求項1記載のカメラ制御方法。 The determination of whether or not to cross each other is performed at a predetermined time interval. If not , the optical axis of the camera is rotated by a predetermined angle in the crossing direction, and this operation is repeated until the position substantially coincides with the topographic surface. The camera control method according to claim 1, wherein control is performed until 前記所定の角度ずつカメラの回転制御を繰り返し、前記線分先端が地形面に交わったとき、交わる前のカメラの回転位置に戻すことを特徴とする請求項2記載のカメラ制御方法。 The camera control method according to claim 2, wherein the rotation control of the camera is repeated by the predetermined angle , and when the tip of the line segment intersects the topographic surface, the camera is returned to the rotation position before the intersection . 画面中を移動するキャラクタに対し、前記キャラクタを撮影した画像をモニタ画面に表示するCGゲーム装置において、
操作部の操作にしたがってキャラクタを移動させるキャラクタ移動手段と、
前記キャラクタの移動に従ってキャラクタを視界に捕らえるためのカメラ位置設定手段と、
前記カメラ位置とキャラクタを結ぶ延長上の線分であって、前記キャラクタから所定距離の線分先端が画面上に表示される地形面に対し交わるか否かを判断し、該判断で交わらない場合、前記線分先端が前記画面上に表示される地形面に対し略一致する位置になるように前記カメラの位置および光軸を前記キャラクタに対し移動・回転制御する制御手段とを有し、
前記キャラクタの移動と地形の変化に対応し、前記カメラからの視界が前記キャラクタを含めつつ空の部分と地形部分を所定の割合で画面に表示することを特徴とするCGゲーム装置。
To the character to move the screen, in the CG game device for displaying the previous SL image obtained by photographing a character on the monitor screen,
Character moving means for moving the character according to the operation of the operation unit;
Camera position setting means for capturing the character in view according to the movement of the character;
A line segment on the extension connecting the camera position and the character, and it is determined whether or not the tip of the line segment at a predetermined distance from the character intersects the terrain surface displayed on the screen. , and control means for the segment tip is controlled to move and rotation relative to the character position and the optical axis of the camera so as to be substantially coincident position with respect to terrain surface displayed on the screen,
A CG game device, wherein the CG game device displays an empty portion and a terrain portion on a screen in a predetermined ratio while including the character, in view of the movement of the character and a change in terrain.
前記制御手段は、交わるか否かの判断を所定の時間間隔で行い、交わらない場合には交わる方向に所定の角度だけカメラの光軸を回転させ、この動作を繰り返して前記地形面に対し略一致する位置になるまで制御することを特徴とする請求項4記載のCGゲーム装置。 The control means, it is determined whether intersect at predetermined time intervals, rotates the optical axis of a predetermined angle camera only in a direction intersecting if not intersect, substantially relative to the terrain surface by repeating this operation 5. The CG game apparatus according to claim 4, wherein control is performed until the positions coincide with each other. 前記制御手段は、所定の角度ずつカメラの回転制御を繰り返し、前記線分先端が地形面に交わったとき、交わる前のカメラの回転位置に戻すことを特徴とする請求項5記載のCGゲーム装置。 6. The CG game apparatus according to claim 5, wherein the control means repeats the rotation control of the camera by a predetermined angle, and returns to the rotation position of the camera before the intersection when the end of the line segment intersects the terrain surface. .
JP2006318738A 2006-11-27 2006-11-27 Camera control method and CG game apparatus incorporating the camera control Active JP5089147B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006318738A JP5089147B2 (en) 2006-11-27 2006-11-27 Camera control method and CG game apparatus incorporating the camera control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006318738A JP5089147B2 (en) 2006-11-27 2006-11-27 Camera control method and CG game apparatus incorporating the camera control

Publications (2)

Publication Number Publication Date
JP2008132014A JP2008132014A (en) 2008-06-12
JP5089147B2 true JP5089147B2 (en) 2012-12-05

Family

ID=39557289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006318738A Active JP5089147B2 (en) 2006-11-27 2006-11-27 Camera control method and CG game apparatus incorporating the camera control

Country Status (1)

Country Link
JP (1) JP5089147B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8784202B2 (en) * 2011-06-03 2014-07-22 Nintendo Co., Ltd. Apparatus and method for repositioning a virtual camera based on a changed game state
KR102003776B1 (en) 2013-08-13 2019-07-26 한화테크윈 주식회사 Method and apparatus of detecting posture of the camera for surveillance
JP5969531B2 (en) * 2014-04-03 2016-08-17 株式会社スクウェア・エニックス Image processing program, image processing apparatus, and image processing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW346611B (en) * 1996-03-28 1998-12-01 Sega Enterprises Kk An image processor, a game machine using the image processor, a method of image processing and a medium
JP2004341572A (en) * 2003-05-12 2004-12-02 Namco Ltd Image generation system, program, and information storage medium

Also Published As

Publication number Publication date
JP2008132014A (en) 2008-06-12

Similar Documents

Publication Publication Date Title
US7819748B2 (en) Game apparatus and storage medium storing game program
US8917240B2 (en) Virtual desktop coordinate transformation
JP4973658B2 (en) Image processing apparatus and image processing program
US7495665B2 (en) Storage medium having game program stored thereon and game apparatus
US7868889B2 (en) Method of causing object to take motion using motion data
EP1808210B1 (en) Storage medium having game program stored thereon and game apparatus
US7804502B2 (en) Method of causing first object to take motion according to positional relationship with second object
US7695367B2 (en) Storage medium having game program stored thereon and game apparatus
JP2009237680A (en) Program, information storage medium, and image generation system
US6762746B2 (en) Entertainment apparatus, storage medium and operation method of manipulating object
US20090322888A1 (en) Integrated circuit for detecting movements of persons
JP5089147B2 (en) Camera control method and CG game apparatus incorporating the camera control
US8708818B2 (en) Display control system, display control method, computer-readable storage medium having stored thereon display control program, and display control apparatus
JP5367954B2 (en) GAME PROGRAM, GAME DEVICE, AND STORAGE MEDIUM
JP2009223904A (en) Image generation device and method, program, and recording medium
JP2007282861A (en) Game apparatus, method of displaying character, program and recording medium
WO2019168061A1 (en) Information processing device, recording medium, head-mounted display, and information processing system
EP1854520B1 (en) Game program and game apparatus
JPWO2008132851A1 (en) Entertainment device, computer program, and computer-readable recording medium
JP4143590B2 (en) 3D image processing apparatus, game apparatus, 3D image processing program, and game program
JP2009251887A (en) Image generation system, program, and information storage medium
JP2006314634A (en) Game program and game device
WO2005038723A1 (en) Image display device, image display method, image display program, and computer-readable recording medium containing the image display program
JP2005111007A (en) Game program and game device
JP2010284258A (en) Game device and game program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090630

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100305

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100408

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20100415

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120321

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120417

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120911

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120911

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150921

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5089147

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150921

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150921

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350