JP2004062618A - Program, recording medium, metaball plotting method and game machine - Google Patents

Program, recording medium, metaball plotting method and game machine Download PDF

Info

Publication number
JP2004062618A
JP2004062618A JP2002221463A JP2002221463A JP2004062618A JP 2004062618 A JP2004062618 A JP 2004062618A JP 2002221463 A JP2002221463 A JP 2002221463A JP 2002221463 A JP2002221463 A JP 2002221463A JP 2004062618 A JP2004062618 A JP 2004062618A
Authority
JP
Japan
Prior art keywords
ball
metaball
node
game character
voxel
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.)
Granted
Application number
JP2002221463A
Other languages
Japanese (ja)
Other versions
JP3790990B2 (en
Inventor
Junpei Tsuda
津田 順平
Zaiei Kin
金 在榮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koei Co Ltd
Original Assignee
Koei Co Ltd
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 Koei Co Ltd filed Critical Koei Co Ltd
Priority to JP2002221463A priority Critical patent/JP3790990B2/en
Priority to US10/325,756 priority patent/US6894688B2/en
Publication of JP2004062618A publication Critical patent/JP2004062618A/en
Application granted granted Critical
Publication of JP3790990B2 publication Critical patent/JP3790990B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program capable of dynamically plotting an object such as a game character using a metaball in a three-dimensional virtual space. <P>SOLUTION: In metaball update processing, a ball NB belonging to a node is arranged to a node N where a coordinates position in a virtual frame IB is given on the basis of motion data so as to construct a game character (S120). In density distribution processing, density h (r) is operated for each vertex of a voxel Vx from the reference position of a metaball MB in the minimum and maximum directions of a voxel index of the voxel Vx (S122). In Martin's cube processing, the vertex coordinates of a polygon are operated on the basis of the density h (r) of the metaball MB at the vertex coordinates of the voxel Vx and a preset threshold (S124). A relatively complicated shape such as a game character can be dynamically plotted with the metaball. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明はプログラム、記録媒体、メタボール描画方法及びゲーム装置に係り、特に、3次元仮想空間内にメタボールをオブジェクトとして動的に描画するプログラム、該プログラムを記録したコンピュータ可読記録媒体、該メタボール描画方法及び該ゲーム装置に関する。
【0002】
【従来の技術】
メタボールは、3次元仮想空間内に形成される立体であり、複数のメタボールが相互に近づくと相互に影響し合いながら融合し、逆に、遠ざかると分離する特性を有している。このため、メタボールを多数用いて自由曲面を持った形状を表現することができる。
【0003】
1997年に米国で出版された書籍「Introduction to Implicit Surfaces」(MORGAN KAUFMANN PUBLISHERS, INC. San Francisco, California発行)の26ページ(1.4.2 Blends)には、下式(1)に示すように、1986年にWyvillらによって開示されたメタボールの濃度を求める計算式が記載されている。式(1)において、h(r)はメタボール内部の濃度、すなわち、メタボールの強さを示す変数、rはメタボールの中心から濃度の評価点までの距離、Rはメタボールの半径を表している。
【0004】
【数1】

Figure 2004062618
【0005】
図39に示すように、式(1)によるメタボールの濃度h(r)は、距離rに対し6次関数の特性を有している。図40(A)に、半径1の2つのメタボール球が一部重なっている場合の式(1)によるメタボール球の内部の濃度分布を示す。重なっている部分の濃度h(r)は、2つのメタボール球の濃度の和となる。なお、図40(A)に示す形状は濃度分布であって、メタボールの形状そのものを表したものではない。図40(B)に、この濃度分布を真上から見たときの等濃度曲線(等濃度となる点を結んだ線)を示す。一番外側の太線がメタボール球の原形であり、内側の細線がメタボールの中心に向かって、閾値(0〜1の値をとり得る)を0.1刻みで大きくした場合の等濃度曲線である。閾値の値を大きくすると2つのメタボール球が分離し、閾値を小さくするとメタボール球が滑らかに融合する(くっつく)ことが分かる。図41(A)に示すように、図40(B)に示した等濃度曲線は、ちょうど2つのメタボール球の中心を通るように切断した断面の濃度分布に等しい。特定の等濃度曲線に対応する濃度値が、上述した閾値となる。指定した閾値で定まる断面での等濃度曲線の形状が、そのまま再生成される2つのメタボール球の形状となる(球なのでどこから見ても同じ形状となる)。なお、図41(B)は、式(1)において、閾値0.5の場合に再生成される2つのメタボール球の融合した形状を示している。
【0006】
また、特開平5−20406号には、距離rの次数を2次まで落とすと共に、特性については式(1)の6次関数と近似するように工夫したメタボール濃度の計算式が開示されている。この技術では、距離rの取り得る範囲を3つの区間に区分して各区分で特性の異なる別な計算式を用いて切り替えることによりメタボール内部の濃度を演算する。
【0007】
更に、例えば、特開平2001−229396号には、モーフィング技術を用いてゲームキャラクタの形状を変化させる技術が開示されている。モーフィング技術では、通常、3次元仮想空間上に存在するの1つの物体から別な物体へと一度に全体的に形状を変化させる表現を描画することができる。また、複数の部品としてのオブジェクトポリゴンを組み合わせて1つのポリゴンキャラクタを作るゲームも知られている。
【0008】
なお、本発明に関連する文献としては、Addison Wesley Publishing Co., Inc.から1990年に発行された「Computer Graphics」誌、第488頁から491頁に、James D. Joleyらのベジエ曲線に関する記載があり、1988年4月に発行された「The Visual Computer」誌、第283頁から295頁に、「Dynamic animation:interaction and control」(Jane Wilhelms, Matthew Moore, and Robert Skinner)の「2.2 Numerical integration methods」と題される、オイラー法による運動方程式に関する記載がある。また、(株)照晃堂発行、安居院猛、中嶋正之共著、「コンピュータグラフィックス」の第115頁から第117頁には、3次元行列内に蓄積されたデータから一定の濃度の表面を多角形で近似するマーチンキューブ法についての記載がある。
【0009】
【発明が解決しようとする課題】
しかしながら、従来のメタボール技術では、3次元仮想空間における静的な立体を滑らかな曲線で表現し曲線美の描画に用いられるため、ゲーム等の動的な描画に利用するには不向きであった。すなわち、例えば、複数のメタボールでキャラクタを表現しようとすれば、キャラクタには3次元仮想空間内で動的な動きが生じるので、キャラクタの動作につれてメタボールも動的な処理が必要となるが、従来技術では3次元仮想空間内のキャラクタ等を構成する複数のメタボールの動的処理、高速処理への対応が難しかった。
【0010】
また、モーフィングでは、メタボールの結合のように物体全体を部分的に分けて構成されるわけではないので、例えば関節部分の変化を強調するなどの部分的な変化を表現することが難しい。更に、モーフィングでは、予め変形のスタート及びゴールとなる形状モデルを用意する必要があるが、その2つの形状モデルについては、(1)構成ポリゴン数、構成頂点数がまったく同一であること、(2)構成ポリゴンの種類(3角形、4角形)及びその接続状況が全く同じあること、等の極めて強い制作上の制限が課せられる。しかも、モーフィングで可能な変化は幾何学的な変化のみであり、変化の際にポリゴン数等を増減させると接続部分で不連続が生じ、例えば、予定しない位置にポリゴンが生成されたり、重要なポリゴンが消滅する等の不具合が生じ得るため、位相的な変化を表現することは困難であった。
【0011】
本発明は上記事案に鑑み、3次元仮想空間でメタボールを用いたゲームキャラクタ等のオブジェクトを動的に描画可能なプログラム、該プログラムを記録したコンピュータ可読記録媒体、該メタボール描画方法及び該ゲーム装置を提供することを課題とする。
【0012】
【課題を解決するための手段】
上記課題を解決するために、本発明の第1の態様は、3次元仮想空間内にメタボールをオブジェクトとして動的に描画するプログラムであって、コンピュータを、モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを構成するように配置するメタボール配置手段、前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算する濃度演算手段、前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成するゲームキャラクタ生成手段、として機能させる。
【0013】
第1の態様では、メタボール配置手段によりモーションデータで3次元仮想空間内の座標位置が特定される複数のノードに対し該各々のノードに所属するメタボールがゲームキャラクタを構成するように配置され、濃度演算手段により3次元仮想空間内を多数に分割するボクセルの頂点でのメタボールの内部濃度が演算され、ゲームキャラクタ生成手段によりボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標が演算されてゲームキャラクタが生成される。本態様によれば、メタボール配置手段によりモーションデータで座標位置が特定されるノードにメタボールが配置され、濃度演算手段でメタボールの内部濃度が演算され、ゲームキャラクタ生成手段でメタボールのポリゴンの頂点座標が演算されゲームキャラクタが生成されるので、3次元仮想空間でメタボールを用いたキャラクタ等のオブジェクトを動的に描画することができる。
【0014】
第1の態様において、ゲームキャラクタの関節位置にノードが位置し、隣接するノードまでの距離を一定とすれば、ノードが人や動物の関節に対応し、ノード間が人や動物の骨格に対応するので、人や動物の骨格に近似させてゲームキャラクタの骨格を形成することができる。また、メタボール配置手段が、ノードに所属するメタボールの大きさを周期的に変動するようにすれば、ゲームキャラクタが呼吸している状態を表現することができる。更に、メタボール配置手段が、所定イベントが発生したときに、ノードへのメタボールの配置を解除し、予め定められた計算式又はテーブルにより設定される座標位置にメタボールが散乱するように配置すれば、ノードからメタボールが離れた状態、例えば、モーフィング技術では描画が難しい、ゲームキャラクタの肉体の一部が骨格から千切れた状態やゲームキャラクタ自体が爆発し肉体等が拡散する状態等を表現することができ、ゲーム等における表現力を高めることが可能となる。このとき、メタボール配置手段が、計算式又はテーブルにより設定される座標位置に配置されるメタボールの形状を変更するようにすれば、例えば、ゲームキャラクタが液状物質等で構成されている様子を表現することができる。
【0015】
また、第1の態様において、コンピュータを、更に、ゲームキャラクタの真下に配置され、ゲームキャラクタの移動に伴って地面を這いずる接地ボールをメタボールで生成する接地ボール生成手段として機能させるようにすれば、ゲームキャラクタが液状物質等で構成されており、その液状物質等が溜まっている様子を表現することができる。接地ボールは複数のメタボールで構成するようにしてもよく、接地ボール生成手段は、接地ボールを構成するメタボールがゲームキャラクタの足部のノード又は該足部のノードに配置されたメタボールに仮想バネで接続されているように該接地ボールを構成するメタボールの座標位置を演算するようにしてもよい。また、接地ボール生成手段は、接地ボールを構成するメタボールが一体となるように当該メタボールの形状を変更するようにしてもよい。
【0016】
更に、第1の態様において、コンピュータを、更に、特定のノードに所属するメタボールから滴り落ちる滴ボールをメタボールで生成する滴ボール生成手段として機能させるようにすれば、ゲームキャラクタが液状物質等で構成されている様子を強調することができる。このとき、滴ボール生成手段が滴ボールの落下速度を一定値以下に制限するようにすれば、自然界のように滴ボールが空気摩擦を受ける様子を表現することができる。更に、滴ボール生成手段が自然落下するように滴ボールの形状を変更するようにしてもよい。
【0017】
更にまた、第1の態様において、コンピュータを、更に、特定のノードに所属するメタボールから突出し触手状の触手ボールをメタボールで生成する触手ボール生成手段として機能させるようにしてもよい。触手ボール生成手段が触手ボールをベジエ曲線上に配置することで、触手ボールを滑らかな曲線で表現することができる。このとき、触手ボール生成手段は、ベジエ曲線を特定する点の間が仮想バネで接続されているように該ベジエ曲線を特定する点の座標位置を演算するようにしてもよい。
【0018】
また、上記課題を解決するために、本発明の第2の態様は、上記第1の態様に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体であり、本発明の第3の態様は、3次元仮想空間内にメタボールをオブジェクトとして動的に描画するメタボール描画方法であって、所定時間毎に、モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを構成するように配置し、前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算し、前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成する、ステップを含む。そして、本発明の第4の態様は、3次元仮想空間内にメタボールをオブジェクトとして動的に描画するゲーム装置であって、モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを構成するように配置するメタボール配置手段と、前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算する濃度演算手段と、前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成するゲームキャラクタ生成手段と、を備える。
【0019】
【発明の実施の形態】
以下、図面を参照して本発明をビデオゲームに適用した実施の形態について説明する。
【0020】
(構成)
図1に示すように、本実施形態のビデオゲームが実行される家庭用ビデオゲーム装置10は、ゲーム装置本体2に、スピーカ5を内蔵したテレビモニタ4及び入力装置3が接続されている。ゲーム装置本体2は、CD−ROM等の記録媒体1を装着可能な媒体読取部(図3参照)を有している。この媒体読取部に記録媒体を装着することにより記録媒体1に記録されたゲームプログラムやゲームデータが自動的にゲーム装置本体2内の記憶メモリにロードされる。
【0021】
図2に示すように、入力装置3には、ゲームを開始するためのスタートボタン30やゲームキャラクタを操作したり、ゲーム装置本体2からの選択問い合わせ等に応答するための□ボタン31、△ボタン32、○ボタン33、×ボタン34、及び、↑ボタン35、→ボタン36、←ボタン37、↓ボタン38で構成される十字方向ボタンセット等の種々のボタンが配置されている。
【0022】
図3に示すように、ゲーム装置本体2は装置全体の制御を行うCPUブロック20を備えている。CPUブロック20は、ゲーム装置本体2内の各部とのデータ転送を主に制御するSCU(System Control Unit)、中央演算処理装置として高速クロックで作動するCPU、ゲーム装置本体2の基本制御動作が記憶されたROM、CPUのワークエリアとして働くと共に記録媒体1に記録されたゲームプログラム及び種々のデータを一時的に記憶するRAM及びこれらを接続する内部バスで構成されている。
【0023】
SCUには外部バス25が接続されている。外部バス25は、コントローラパッド等の入力装置3からの入力を受信してCPUブロック20へ入力情報を転送する入力受信部21、図示しないサブCPUを備え記録媒体1に記録されたゲームプログラムを読み取りCPUブロック20へ転送するCD−ROMドライブ等の媒体読取部22、グラフック処理を行うCPU及びVRAMを備えCPUブロック20から送出された情報に従ってオブジェクトに対してテクスチャ処理、光源処理等を行い3次元フィールドでの描画処理を施す画像処理部23、並びに、図示しないサブCPUを備え、例えば、バックミュージックや戦闘音等の音響を処理する音響処理部24、に接続されている。また、入力受信部21は入力装置3に、画像処理部23はテレビモニタ4に、音響処理部24はテレビモニタ4に内蔵されたスピーカ5にそれぞれ接続されている。
【0024】
(動作)
次に、フローチャートを参照して、家庭用ビデオゲーム装置10の動作についてCPUブロック20のCPUを主体として説明する。なお、ゲーム装置本体2に電源が投入され、記録媒体1が挿入されると、3次元仮想空間にメタボールで構成されたオブジェクトを動的に描画するためのメタボール描画ルーチンが実行される。
【0025】
図4に示すように、メタボール描画ルーチンでは、まず、ステップ102において、初期設定処理が行われる。この初期設定処理では、キャラクタのフレーム毎のノード(関節)のモーションデータ、ノードの階層データ、キャラクタを構成するメタボール等の形状、大きさ等のオブジェクト情報を含むゲームデータ及びゲームプログラムがRAMにロードされ、時間t及びモーションカーソル(フレームカウンタ)mcをそれぞれ初期値の0とする。
【0026】
次にステップ104において、テレビモニタ4の垂直帰線周期と一致した、1/60秒(16.6ミリ秒)に一度の周期で行われる垂直帰線割込(Vsync)がなされたか否かを判断する。否定判断のときは、次のステップ106において、入力受信部21から転送された入力情報に対する入力処理やゲーム効果音を音響処理部24に合成させるための音響処理等のメイン処理を実行して、ステップ110へ進む。
【0027】
一方、ステップ104で肯定判断のときは、ステップ108において、3次元仮想空間(後述する仮想枠)内にメタボールで構成されたオブジェクトを配置・描画するための描画演算処理サブルーチンが実行される。
【0028】
ここで、本実施形態で描画されるキャラクタを含むオブジェクトの概要について説明する。図20(A)、(B)に示すように、キャラクタcは、人間の関節に相当する複数のノードN1〜N11を有している。図21に示すように、ノードN1〜N11は階層(親子関係)を構成しており、各ノードN間の距離は一定とされている。これらのノードNはテレビモニタ4上では非表示とされる。図22に示すように、ノードNには複数のノード所属ボールNBが割り当てられ(配置され)、後述するように、各ノード所属ボールNBの濃度分布処理やマーチンキューブ処理を経て、テレビモニタ4上に図21(A)に示すようなキャラクタcが表示される。なお、本実施形態でオブジェクトという場合には、3次元仮想空間上に描画されるキャラクタc以外の対象物を含む。すなわち、下表1に示すように、メタボールには複数の種類が存在するが、詳細については後述する。
【0029】
【表1】
Figure 2004062618
【0030】
図5に示すように、描画演算処理サブルーチンでは、ステップ112において、モーションカーソルmcに対応する現フレームでのキャラクタcのノードN1〜N11のモーションデータを取得する。このようなモーションデータは、スケール(Scale)情報、回転(Rotation)情報及び位置(Translation)情報(平行移動情報)で構成され、例えば、中前栄八郎、西田友是共著、株式会社昭晃堂発行、「3次元コンピュータグラフィックス」等に開示されているように、4行4列の行列の計算をフレーム毎に行うことでモーションを表現することができる。
【0031】
次のステップ114では、プレイヤがキャラクタcを攻撃するときに放たれる弾丸ボールBBに関連する処理を行うための弾丸ボール関連処理サブルーチンを実行する。図23に示すように、プレイヤは入力装置3を操作し弾丸ボールBBを発射することでキャラクタcに対する攻撃が可能である。すなわち、図2に示すように、入力装置3の十字方向ボタンセットを操作することでキャラクタcに対してカーソルを合わせ、○ボタン33を押下することで弾丸ボールBBを発射することできる。上述したステップ106のメイン処理では、○ボタン33が押下されたときに、カーソルの位置(弾丸ボールBBの着弾目標座標)を取り込み、弾丸ボールBBが発射された状態を表す弾丸ボール状態フラグbbfl(の状態値)を0から1に変更する。なお、本例では説明を簡単にするために、弾丸ボールBBが1個発射された場合について説明するが、弾丸ボールBBは複数個発射可能である。
【0032】
図6に示すように、弾丸ボール関連処理サブルーチンでは、ステップ142において弾丸ボール状態フラグbbflが1か否かを判断し、否定判断のときは、弾丸ボールBBが未発射のため、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進み、肯定判断のときは、次のステップ144で前回の垂直帰線割込時(1/60秒前)の弾丸ボール状態フラグbbflと現在の弾丸ボール状態フラグbbflとを比較することで、弾丸ボール状態フラグbbflが0から1に変更されたか、換言すれば、弾丸ボールBBが今プレイヤにより発射されたか否かを判断する。
【0033】
ステップ144で肯定判断のときは、次のステップ146において、弾丸ボールBBの速度ベクトルVを演算し、RAMに記憶する。弾丸ボールBBの発射位置座標は予め設定されており、弾丸ボールBBの速度(初速)の大きさ(スカラ値)も予め与えられている。このため、発射位置座標から弾丸ボールBBの着弾目標座標に向かう方向ベクトルを演算し、方向ベクトルに弾丸ボールBBの速度のスカラ値を掛けることによって速度ベクトルVを求めることができる(図23参照)。ここに、方向ベクトルとは、大きさについて意味を持たない単位ベクトルで、方向だけが意味を持つベクトル(x,y,z)をいい、この場合の方向ベクトル(x,y,z)は、着弾目標座標(x,y,z)から発射位置座標(x,y,z)の差を求め、単位ベクトル化することにより得ることができる。また、ステップ146では、着弾目標座標と発射位置座標との距離を演算してRAMに記憶する。なお、弾丸ボールBBの速度は一定として扱われ、空気の摩擦抵抗による減速については考慮していない。
【0034】
次にステップ148では、弾丸ボールBBの位置を演算しRAMに記憶し、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進む。弾丸ボールBBの位置Pは、Pを弾丸ボールBBの発射位置座標P(x,y,z)とすると、P=P+V・(1/60)により3次元座標軸x、y、zの各成分毎に求めることができる。
【0035】
一方、ステップ144で否定判断のときは、ステップ150において弾丸ボールBBの現在位置Pを演算してRAMに格納する。弾丸ボールBBの現在位置Pは、Pt−1を前回の垂直割込時の位置、δtを垂直帰線割込の時間(1/60秒)とすると、P=Pt−1+V・δtを用いて3次元座標軸x、y、zの各成分毎に求めることができる。従って、ステップ150では、弾丸ボールBBの最新位置(x,y,z)を前回の位置に基づいて垂直帰線割込毎に演算してRAMに記憶することとなる。なお、ステップ148及びステップ150で用いた弾丸ボールBBの位置Pの演算式は、弾丸ボールBBの速度ベクトルVが一定のため(加速度=0)、オイラー法の運動方程式の加速度を含む第3項を削除して表したものである。
【0036】
次いでステップ152では、弾丸ボールBBがノード所属ボールNのいずれかに命中したか否かを判断する。すなわち、現在のフレームでの各ノードNに割り当てられる全ノード所属ボールNBの中心座標Cを演算し(詳細後述)、図24(A)に示すように、弾丸ボールBBの(中心)位置Pが各ノード所属ボールNBの中心座標Cの所定半径d内にあるかを判断する。弾丸ボールBBが複数のノード所属ボールの所定半径d内に入るときは、そのうち最も距離の短いノード所属ボールNBに命中したものとみなす。なお、本例では、キャラクタcの頭を構成するノード所属ボールNBの半径を30〜40としたときに、弾丸ボールBBの半径は20〜30に設定されている(テレビモニタ4に実際に表示されるときには、後述するように、これらの大きさより小さくなる。)。
【0037】
ステップ152で否定判断のときは、次のステップ154において、弾丸ボールBBの位置Pのy成分(垂直方向座標成分)が地面又は地面より下の位置となったか(y≦0)否かを判断し、肯定判断のときは、ステップ158へ進み、否定判断のときは、ステップ156において、現在の弾丸ボールBBの位置Pがステップ146で演算した着弾目標座標と発射位置座標との距離の1.5倍(所定距離)以上の距離となったか否かを判断し、否定判断のときは、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進み、肯定判断のときは、次のステップ158において、弾丸ボール状態フラグbbflを1から0とし、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進む。従って、弾丸ボールBBがキャラクタcのノード所属ボールNBに命中しない場合に、位置Pが地面(y=0)より下になったとき又は所定距離以上となったときに、弾丸ボール状態フラグbbflを0とする。なお、弾丸ボール状態フラグbbflが0となると、弾丸ボールBBは消滅する。
【0038】
一方、ステップ152で肯定判断のときは、ステップ160で、弾丸ボールBBが命中した特定のノード所属ボールNB及び下位のノード所属ボールNBの命中フラグshflを0から1に変更する。すなわち、全ノード所属ボールNBは命中フラグshflを持っており、通常は命中フラグが0とされている。図22、図23に示すように、例えば、ノードN7に割り当てられるノード所属ボールNBに弾丸ボールBBが命中したときには、図21に示す階層情報により、ノードN7より下位のノードN8、N9に割り当てられるノード所属ボールNB、NBの命中フラグshflも0から1に変更される。なお、実際には、図23に示したノード所属ボールNB、NB等はそれぞれ3個程度のノード所属ボールに分割されてノードN7、N8、N9又はこれらのノード間に割り当てられており、図21に示した階層もより複雑となっているが、本実施形態では説明を簡単にするために、ノード所属ボールNB、NB等が1個で構成されているものとして説明する。
【0039】
次にステップ162では、図24(B)に示すように、複数個の破片ボールFBを発生させる。ここに、破片ボールFBとは、弾丸ボールBBがノード所属ボールBBに命中したときに飛び散るボールをいい(表1参照)、弾丸ボールBBの速度ベクトルVの方向に対して命中点H(弾丸ボールBBの中心点)から0度、±30度、±60度となる位置で弾丸ボールBBが命中したノード所属ボールNBの命中点H側の反対側に発生させる。各破片ボールFBは、バラツキを表現するために大きさが異なっており、例えば、平均半径を5とすると、±1程度の半径となるように半径4、6にランダムに設定される。また、ステップ162では、各破片ボールFBの速度ベクトルが演算され、RAMに格納される。各破片ボールFBの速度のバラツキを表すために、バラツキ係数a(0.5≦a≦1)が導入される。例えば、命中点Hから0度で発生する破片ボールFBの速度の場合には、命中前の弾丸ボールBBの方向ベクトルと同じ方向ベクトルに、命中前の弾丸ボールBBの速度ベクトルのスカラ値と0.5≦a≦1の範囲で乱数により取得したバラツキ係数aとを掛けることにより求められる。±30度、±60度で発生する破片ボールの速度ベクトルの場合は、まず、±30度、±60度で発生する破片ボールの方向ベクトルを算出し、この方向ベクトルに、命中前の弾丸ボールBBの速度ベクトルのスカラ値と0.5≦a≦1の範囲で乱数により取得したバラツキ係数aとを掛けることにより求められる。
【0040】
続いてステップ164では、命中した弾丸ボールBBがキャラクタcを構成するノード所属ボールNBに食い込んで停止した状態を表示するために(図31(A)参照)、弾丸ボールBBの速度ベクトルを(0,0,0)とし、ステップ166で、命中したノード所属ボールのパワーnbpから30を減算して、次のステップ168で、命中したノード所属ボールNBのパワーnbpが0未満となったか否かを判断する。すなわち、ステップ102での初期設定処理では、各ノード所属ボールNBにはパワーnbpとして100が与えられており、同じノード所属ボールNBに弾丸ボールBBが4回命中するとそのノード所属ボールNBのパワーnbpは0未満となる。
【0041】
ステップ168で否定判断のときは、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進み、肯定判断のときは、次のステップ170において、当該ノード所属ボールNB及び当該ノード所属ボールの下位となるノード所属ボールNBの状態フラグnbflを「崩落」とし、RAMに記憶した後、弾丸ボール関連処理サブルーチンを終了して図5のステップ116へ進む。上述した例に即して更に付言すれば、図22に示すように、ノードN7に割り当てられるノード所属ボールNBに弾丸ボールBBが命中したときは、ノードN7より下位のノードN8、N9に割り当てられるノード所属ボールNB、NBの状態フラグnbflも「通常」から「崩落」に変更される。ここに、「通常」とはノード所属ボールNBが所属するノードNに割り当てられた位置にある状態をいい(図22参照)、「崩落」とはノード所属ボールNB(例えば、NB、NB、NB)が所属するノードN(例えば、N7)に割り当てられた位置から離れて(千切れて)自然落下する状態をいう。
【0042】
図5のステップ116では、キャラクタcを構成する全ノード所属ボールNBの爆発に関連する処理を行うための爆発関連処理サブルーチンを実行する。図7に示すように、爆発関連処理サブルーチンでは、ステップ182で、全ノード所属ボールNBのパワーnbpの総和(Σnbp)を演算し、次のステップ184において、全ノード所属ボールNBのパワーnbpの総和が初期設定処理でのパワーの総和の50%以下か否かを判断する。上述したように、各ノード所属ボールNBの初期設定処理でのパワーnbpは100であり、図22に示すように、ノード所属ボールNBが18個のときは、Σnbpが900以下か否かが判断される。
【0043】
否定判断のときは、キャラクタcは爆発しないものとして、爆発関連処理サブルーチンを終了し図5のステップ118へ進む。一方、肯定判断のときは、ステップ186で全ノード所属ボールNBの状態フラグnbflを「爆発」とし、次のステップ188において、全ノード所属ボールNBの拡散順(拡散開始時間)を演算し、RAMに記憶した後、爆発関連処理サブルーチンを終了して図5のステップ118へ進む。
【0044】
ノード所属ボールNBの状態フラグnbflが「爆発」となると、キャラクタcを構成するノード所属ボールNBは楕球状の破片となって散乱(拡散)する。全ノード所属ボールNBは同時に散乱するようにしても良く又ランダムでも良いが、本実施形態では時間的にばらばらに散乱する。爆発の中心は、図6のステップ152で弾丸ボールBBが命中したノード所属ボールNBとなる。図22に示したノード所属ボールNBが爆発の中心となる場合には、例えば、ノードN7、N8、N9に割り当てられるノード所属ボールNB、NB、NBの拡散開始時間ts=0(現在)、ノードN7、N10、N11に割り当てられるノード所属ボールNBの拡散開始時間ts=20(現在から20/60秒後)、ノードN7、N6に割り当てられるノード所属ボールNBの拡散開始時間ts=40、ノードN7、N1に割り当てられるノード所属ボールNBの拡散開始時間ts=60、ノードN1、N2、N3に割り当てられるノード所属ボールNBの拡散開始時間ts=80、ノードN1、N4、N5に割り当てられるノード所属ボールNBの拡散開始時間ts=100というように、拡散開始時間tsに時間差を設けて拡散順が設定される。また、拡散開始時の各ノード所属ボールNBの方向及び初速は、爆発により全ノード所属ボールNBが概ね全方向に散乱するように各拡散初速ベクトルVが予め設定されている。
【0045】
図5のステップ118では、全てのメタボールについて後述するメタボール更新処理及び濃度分布処理が終了したか否かを判断し、否定判断のときは、ステップ120でメタボールのオブジェクト情報を更新(生成)するためのメタボール更新処理サブルーチンを実行する。
【0046】
図8に示すように、メタボール更新処理サブルーチンでは、ステップ212において、処理対象がノード所属ボールNBか否かを判断する。肯定判断のときは、ステップ214で後述するノード所属ボール処理サブルーチンを実行し、否定判断のときは、ステップ216において、処理対象が接地ボールGBか否かを判断する。接地ボールGBとは、キャラクタcの真下に配置されキャラクタcの移動に伴って地面を這いずるボールをいい(表1、図20(A)参照)、テレビモニタ4上ではキャラクタcの真下に配置された水たまりのように表示される。肯定判断のときは、ステップ218で後述する接地ボール処理サブルーチンを実行し、否定判断のときは、ステップ220において、処理対象が触手ボールTBか否かを判断する。触手ボールTBとは、特定のノード所属ボールから突出し細長い触手を構成するボールをいう(表1、図20(A)参照)。肯定判断のときは、ステップ222で後述する触手ボール処理サブルーチンを実行し、否定判断のときは、ステップ224において、処理対象が弾丸ボールBBか否かを判断する。肯定判断のときは、ステップ226で後述する弾丸ボール処理サブルーチンを実行し、否定判断のときは、ステップ228において、処理対象が破片ボールFBか否かを判断する。肯定判断のときは、ステップ230で後述する破片ボール処理サブルーチンを実行し、否定判断のときは、ステップ232で滴ボール処理サブルーチンを実行する。なお、滴ボールとは、特定のノード所属ボールNBから滴り落ちるボールをいう(表1、図20(A)参照)。
【0047】
図9に示すように、ノード所属ボールサブルーチンでは、ステップ252において、処理対象のノード所属ボールNBの状態フラグnbflが通常か否かを判断する。ステップ252での判断が肯定のときは、次のステップ254で、処理対象のノード所属ボールNBの命中フラグshflが1か否かを判断し、否定判断のときはステップ257へ進み、肯定判断のときは、ステップ256において、ステップ112で取得した、処理対象のノード所属ボールNBが所属する(割り当てられる)ノードNのモーションデータを、弾丸ボールBBの衝撃に従って補正するためのノード補正処理サブルーチンを実行する。
【0048】
図10に示すように、ノード座標補正処理サブルーチンでは、ステップ302において、処理対象のノード所属ボールNBの回転角が既に演算されているか否かを判断し、肯定判断のときはステップ308に進み、否定判断のときは、次のステップ304において、弾丸ボールBBが命中した衝撃によるキャラクタcの仰け反りを表すための回転角を演算する。
【0049】
図23に示すように、命中点Hに弾丸ボールBBが命中すると、命中点Hには、(ノードN1から命中点Hに向かうベクトルr)と(力を表すベクトルF)との外積となるトルクTが生ずる。このとき、キャラクタcの仰け反りを表すために、キャラクタcの中心ノードとなるノードN1を中心として回転するものとする。なお、ベクトルFは、便宜上、ステップ146で演算した弾丸ボールBBの速度ベクトルV(x,y,z)の各成分値をそのまま用いてもよいし、ステップ146で演算した弾丸ボールBBの方向ベクトルに所定のスカラ値を掛けて算出するようにしてもよい。
【0050】
例えば、ベクトルr、ベクトルFの(x,y,z)成分を、それぞれ(0,10,−2)、(9,2,−4)とすると、ノードN1に働くトルクTは、T=(0,10,−2)×(9,2,−4)=(−36,−18,−90)となり、ノードN1を中心とする回転量Aは、{(−36)+(−18)+(−90)1/2=98.6として求めることができる。回転量A=98.6をこのまま回転角Aとするには値が大きいので、1/10として算出する。弾丸ボールBBが命中した衝撃によるキャラクタcの仰け反りをゲーム上適切に表現するためには、キャラクタcの仰け反り角度を30度以上とすることが好ましいので、回転角A=30+9.86=39.86(度)として演算する。なお、回転角Aが60(度)を超えるときは、ゲーム上適切に表現するために、回転角Aを最大値の60(度)とする。
【0051】
続いてステップ306では、単位時間(1/60秒)当たりの進み回転角及び戻り回転角を演算してRAMに記憶する。すなわち、上記の例に則して説明すれば、弾丸ボールBBが命中したときのキャラクタcの仰け反りを1フレームで描画すると奇異に感じられるため、10フレームで回転量A=39.86(度)の回転を表し(単位時間当たりの進み回転角Aa=39.86/10=3.986(度))、30フレームで本来の(ステップ112で取得する)ノードNの座標位置に戻す(単位時間当たりの戻り回転角Ar=39.86/30=1.32(度))。また、図21に示す階層情報によりノードN7より下位のノードN8、N9もノードN7と同様に回転する。従って、ステップ306では、これらのノードのうち最初の処理対象となるノードNの進み回転角Aa、戻り回転角Arのみを演算してRAMに記憶する。なお、ステップ302で既に回転角を演算済みかを判断するには、処理対象のノード所属ボールNBの命中フラグshflが1のときに、ステップ306で記憶する(記憶した)RAMの所定領域を参酌すればよい。
【0052】
ステップ308では、現フレームでの回転状態を把握するために、回転角カウンタrotcを1インクリメントし、次のステップ310において、回転角カウンタrotcが10以下か否かを判断する。肯定判断のときは、ステップ312において、ステップ112で取得した処理対象のノードNのモーションデータについてステップ306でRAMに記憶した進み回転角Aa分回転させ、ノード補正処理サブルーチンを終了して図9のステップ257へ進む。このようなモーションデータの補正(ノード補正)は、上述した「3次元コンピュータグラフィックス」等で公知のように、モーションデータを含む行列と回転角を含む行列とを掛けることで演算することができる。一方、否定判断のときは、次のステップ314において、回転角カウンタrotcが40か否かを判断し、否定判断のときは、ステップ316において、ステップ112で取得した処理対象のノードNのモーションデータについてステップ306でRAMに記憶した戻り回転角Ar分回転させ、ノード補正処理サブルーチンを終了して図9のステップ257へ進み、肯定判断のときは、ステップ318において、弾丸ボールBBの衝撃の影響がなくなったものとして、命中フラグshflを1から0とし、ノード補正処理サブルーチンを終了して図9のステップ257へ進む。
【0053】
ステップ257では、所属ノードに処置対象のノード所属ボールNBを配置する(割り当てる)。図25に示すように、例えば、ノードN1に配置されるノード所属ボールNBを例として説明すると、ノードN1のモーションデータmatN1は、スケール情報(x,y,z)=(1,1,1)、(グローバル)位置情報(x,y,z)=(30,120,0)及び回転情報(x,y,z)=(0,0,0)を含んでおり、現在のフレームでのモーションデータとしてステップ112で取得されている(又はステップ306で補正されている。)。ノードN1に所属するノード所属ボールNBのスケール情報(x,y,z)=(20,30,20)、ノードN1に対する位置情報(x,y,z)=(0,10,10)は一定で予め定められており、行列matCで表すことができる。行列matCは一定なため、例えば、ゲームデータを作成する前に静的なモデルデータを作成して得ることができる。ノード所属ボールNBは、行列matCでノードN1に割り当てられる。ノード所属ボールNBのグローバル座標でのオブジェクト情報は、matNB=matN1・matCで演算することができる。すなわち、ノード所属ボールNBのグローバル座標における中心位置Cは(30,130,10)であり、スケール(大きさ)は(20,30,20)である。なお、図25には、上述したステップ312、316に関連してy軸を中心に回転した場合のmatN1の一例を示しており、スケール情報が(1,1,1)以外となる。また、詳細説明を省略したステップ152での全ノード所属ボールNBの中心座標Cは、本ステップのように4行4列の行列同士を掛けることで、又は、演算負荷を軽減するために、両行列のうちの位置情報のみを加算することで演算することができる。
【0054】
次のステップ258では、処理対象のノード所属ボールNBの大きさを変更する呼吸処理を行う。例えば、ノード所属ボールNBの大きさが(20,30,20)の場合に、当該ノード所属ボールNBは、1.5倍(30,45,30)までの大きさに垂直帰線周期毎に周期的に変更される。すなわち、垂直帰線周期毎にスケール情報が1.1倍、1.2倍、・・・、1.5倍に変更され、その後、1.4倍、1.3倍、・・・、1.0倍に変更される周期を繰り返す。前回の垂直帰線周期の大きさのデータをRAMに記憶しておくことで、現在のスケール情報の変更データを得ることができる。このような処理により、各ノード所属ボールNBの大きさが変更され、キャラクタcが呼吸している様子を描画することができる。
【0055】
次にステップ260では、処理対象のノード所属ボールNBが滴ボールDBを発生させるノード所属ボールか否かを判断する。図20(A)、(B)に示すように、本例では、ノードN9、N11に割り当てられるノード所属ボールNBが滴ボールDBを発生させるノード所属ボールである。否定判断のときは、ノード所属ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、次のステップ262において、滴ボールフラグdbflが0か否かを判断する。ステップ262で否定判断のときは、ノード所属ボール処理サブルーチンを終了して図5のステップ122へ進む。一方、ステップ262で肯定判断のときは、次のステップ264で滴ボールフラグdbflを0から1に変更し、ノード所属ボール処理サブルーチンを終了して図5のステップ122へ進む。これにより、滴ボールDBが発生する。
【0056】
ステップ252での判断が否定のときは、ステップ266において、処理対象のノード所属ボールNBの状態フラグnbflが「爆発」か否かを判断する。ステップ266での判断が肯定のときは、次のステップ268において、ステップ188で演算した処理対象のノード所属ボールNBの拡散開始時間が経過したか否かを判断し、否定判断のときは、拡散順に至ってないのでノード所属ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、ステップ270で当該ノード所属ボールNBの位置を演算する。上述したように、拡散速度Vは、地面より上にあるときは、V=VS−1−g・δtで演算するが地面まで来たら止まる。ノード所属ボールNBの位置は、その拡散速度ベクトルVをオイラー法の運動方程式で求める(P=Pt−1+VS−1・δt)。なお、Vs−1は前回の垂直帰線割込時の拡散速度、gは重力加速度、δtは垂直帰線割込時間(1/60秒)、Pは現在の位置、Pt−1は前回の垂直帰線割込時の位置をそれぞれ表している。
【0057】
次にステップ272において、ステップ270で演算された処理対象のノード所属ボールNBの位置Pのy成分が0又は0より小さいか否かを判断し、否定判断のときは、ステップ274において、処理対象のノード所属ボールNBが楕球状となるように変更する形状変更処理を行う。例えば、処理対象のノード所属ボールNBの拡散開始前のスケール情報が(20,30,20)で、現在の拡散速度Vがx、y、z成分で(3,4,5)とすると、拡散速度Vのx、y、z成分のうち最も絶対値の大きいz成分の数値を利用して、20×30×20=(20+a)×(30+a)×(20+5)を満たすaを算出し(a=−2.5)、ノード所属ボールNBの拡散前の体積と拡散中の体積とが概ね同じとなるように、処理対象のノード所属ボールNBのスケール情報を(20−2.5,30−2.5,20+5)=(18.5,27.5,25)として演算して、ノード所属ボール処理サブルーチンを終了し図5のステップ122へ進む。なお、拡散速度Vが減衰してV=0となる瞬間に、処理対象のノード所属ボールNBは拡散開始前のスケール情報と同じ(20,30,20)となる。
【0058】
一方、ノード所属ボールNBが自然落下するときに、ステップ270(又は後述するステップ280)で演算したノード所属ボールNBのy成分の速度が3(m/s)とすると、y成分の速度の絶対値に着目して、20×30×20=(20+a)×(30+3)×(20+a)を満たすaを算出し(a=−1)、ノード所属ボールNBの拡散前の体積と自然落下中の体積とが概ね同じとなるように、処理対象のノード所属ボールNBのスケール情報を(20−1,30+3,20−1)=(19,33,19)として演算して(図32(B)参照)、ノード所属ボール処理サブルーチンを終了し図5のステップ122へ進む。なお、この場合に20×30×20=(20×a)×(30×1.1)×(20×a)としてaを演算するようにしてもよい。このとき、30×1.1は30+3と同じ意味となる。
【0059】
このように拡散速度Vに応じて、処理対象のノード所属ボールNBのスケール情報が確定し、ステップ270(又は後述するステップ280)で演算した位置情報と併せて、「爆発」状態のノード所属ボールNBのオブジェクト情報となる行列matNBを得ることができる。
【0060】
一方、ステップ272で否定判断されたときは、ステップ276において、ノード所属ボールNBの状態フラグnbflを「這いずり」とし、RAMに記憶した後、ノード所属ボール処理サブルーチンを終了して図5のステップ122へ進む。ここに、「這いずり」とは、図26に示すように、ノード所属ボールNBが地面に到達した後に、予め設定された一定速度V(スカラ値)でキャラクタcの足部のノードN3又はノードN5向けて地面を這いずり、ノードN3又はノードN5に到達した後、図20(B)に示すように、階層を構成するノードNを経由して本来所属するノードNの位置まで移動することをいう。例えば、図22に示したノード所属ボールNBの状態フラグnbflが「這いずり」となると、ノード所属ボールNBは、地面に到達したときの形状でノードN3に向かって地面を這いずり、ノードN3に到達した後、ノードN2、N1を経て所属するノードN7の位置まで移動する。また、ノードN7に対して反対側に配置されたノードN10に所属するノード所属ボールNBの場合には、地面に到達したときの形状でノードN5に向かって地面を這いずり、ノードN5に到達した後、ノードN4、N1、N7を経て所属するノードN10の位置まで移動する。従って、図21に示した階層情報に従ってノード所属ボールNBが割り当てられる左右のノードより地面を這いずるときに到達目標となるノードや経由するノードが異なることになる。
【0061】
ステップ266での判断が否定のときは、ステップ278において、処理対象のノード所属ボールNBの状態フラグnbflが「崩落」か否かを判断する。肯定判断のときは、ステップ280で、処理対象のノード所属ボールNBの位置を演算する。「崩落」では、処理対象のノード所属ボールNBがキャラクタcから千切れ自然落下する状態が描画される。このため、ステップ270で地面より上にあったときの演算と同様に、処理対象のノード所属ボールNBの状態フラグnbflが「崩落」となる直前の(「通常」での)x成分、y成分、z成分をそのまま維持する。なお、次の垂直帰線割込時(1/60秒後)にVt−1として用いられる現在のy成分の速度V=−g・δt+Vt−1についても併せて演算しRAMに記憶して、ステップ272に進む。
【0062】
一方、ステップ278で否定判断のとき、すなわち、処理対象のノード所属ボールNBの状態フラグnbflが「這いずり」のときは、ステップ282で、処理対象のノード所属ボールNBの位置を演算する。ノードN3、N5の位置はフレーム毎にモーションデータが変更されるので、処理対象のノード所属ボールNBが地面を這いずる方向は垂直帰線割込毎に異なる。このため、行列matN3(又はmatN5)によりノードN3(又はノードN5)の現在位置(到達目標)と前回の垂直帰線割込時の処理対象のノード所属ボールNBの位置とから方向ベクトルVを算出し、スカラ値で表される速度Vを掛けることによって速度ベクトルVcr(Vcr=V・V)を求めRAMに記憶する。処理対象のノード所属ボールNBの(中心)位置Pcrは、Pcr=Pt−1+Vcr・δtで演算することができる。なお、処理対象のノード所属ボールNBが地面を這いずっているときは、テレビモニタ4上での楕球状のノード所属ボールNBの上部半球のみが表示される。また、ノードN3(又はノードN5)に到達した後は、到達目標をノードN2(又はノードN4)、N1と順次変更して、処理対象のノード所属ボールNBの位置が状態フラグnbfl「通常」の位置となるまで、位置が演算される。これにより、「這いずり」状態のノード所属ボールNBのオブジェクト情報となる行列matNBを得ることができる。
【0063】
上述したように、ノード所属ボールNBはノードN3(又はノードN5)に到達すると、ノードN2(又はノードN5)に向かう。換言すれば、ノード所属ボールNBのy成分は0より大きくなる。従って、ステップ284では、ノード所属ボールNBの位置情報のy成分が0より大きいか否かを判断し、否定判断のときは、地面を這いずっている状態を続行するためにノード所属ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、次のステップ286で、処理対象のノード所属ボールNBの「通常」での位置を演算し(図22、図25参照)、ステップ288において、処理対象のノード所属ボールNBの現在の位置がステップ286で演算した「通常」での位置の所定半径内にあるかを判断することで、処理対象のノード所属ボールNBが通常位置に戻ったか否かを判断する。否定判断のときは、ノードN間を這いずっている状態を続行するためにノード所属ボール処理サブルーチンを終了して図5のステップ122へ進む。一方、肯定判断のときは、次のステップ290で、処理対象のノード所属ボールNBの状態フラグnbflを「通常」とすると共に、処理対象のノード所属ボールのパワーnbpを100とし、ノード所属ボール処理サブルーチンを終了して図5のステップ122へ進む。
【0064】
次に、図27(A)を参照して、接地ボールGBについて説明する。接地ボールGBは、地面に配設される(位置情報のy成分が0の)4つの小接地ボールGBa、GBb、GBc、GBdで構成されている。各小接地ボールGBa〜GBdが分離すると接地ボールGBが複数個となり奇異に感じられるため、フレーム毎に各小接地ボールのスケール情報及び位置情報を調整し、1個の接地ボールGBが形成される。このため、小接地ボールGBa〜GBdはノードN3又はノードN5に関連付けられており、仮想バネの概念が導入されている。すなわち、小接地ボールGBa、GBbの中心及びノードN5、小接地ボールGBc、GBdの中心及びノードN3は、それぞれ仮想バネを介して接続されている。また、小接地ボールGBa、GBbの中心間及び小接地ボールGBc、GBdの中心間は、別の仮想バネで接続されている。
【0065】
図11に示すように、接地ボール処理サブルーチンでは、ステップ322において、全ての小接地ボールの処理が終了したか否かを判断し、否定判断のときは、次のステップ324で、対象の小接地ボールの前回の垂直帰線割込時の位置及び対象の小接地ボールが関連付けられたノードNの現在の位置を読み出し、ステップ326において対象の小接地ボールに働く加速度αを演算する。
【0066】
図27(B)に示すように、小接地ボールGBaを例に挙げて説明すると、ノードN5及び小接地ボールGBaの中心間の距離xはステップ324で読み出した位置から求めることができる。仮想バネには、kを予め設定されたバネ定数、ノードN1から受ける加速度をαとすると、F=−kx=mαの力Fが作用している。いま、小接地ボールGBaの質量mを1とすると、加速度αは、α=−kxとして求めることができる。上述したように、小接地ボールGBa及びGBb間には、別の仮想バネが存在している。この仮想バネによる加速度αを算出するため、対象の小接地ボールGBaと小接地ボールGBbとの前回の垂直帰線割込時の位置を読み出し、両者間の距離xを求める。加速度αは、F=−kx=α(m=1)により算出される。加速度αは加速度αと加速度αとを(x,y,z)成分毎に加算することで得ることができる。
【0067】
次いでステップ328では、対象の小接地ボールの速度Vを、V=Vt−1+αδによりx成分及びz成分について演算しRAMに記憶する。この演算式において、Vt−1は前回の垂直帰線割込時の小接地ボールの速度を表している。なお、接地ボールGBの位置情報のy成分は常に0のため演算する必要はない(V=(x,0,z))。
【0068】
次のステップ330では、対象の小接地ボールの前回の垂直帰線割込時のスケール及び速度Vt−1を読み出して、ステップ328で演算した速度Vから対象の小接地ボールの大きさを演算し現在のスケールとしてRAMに記憶する。例えば、小接地ボールGBaの前回の垂直帰線割込時のスケールが(20,0,30)で速度Vt−1が(10,0,5)のときは、速度Vt−1のx,z成分のうち絶対値の大きいx成分(10)に着目し、小接地ボールGBaの大きさ(面積)を同じに維持するために、20×30=(20+10)×(30−a)から、現在の小接地ボールGBaのz成分のスケールを算出する(a=10)。この演算により、現在の小接地ボールGBaのスケールは(30,0,20)となる。なお、小接地ボールGBaの現在の位置には、前回の垂直帰線割込時の位置が用いられる(後述するステップ332参照)。
【0069】
従って、ステップ324〜330では、ノードN3(又はノードN5)の移動により小接地ボールとの距離が大きくなる場合に、仮想バネによる力Fが大きくなる(小接地ボールGBaの加速度α及び小接地ボールGBaがノードN3(又はノードN5)に追随する速度Vが大きくなる)結果、加速度αが作用する方向へ小接地ボールのスケールが大きくなるように変更されるので、小接地ボール同士が分離しない傾向を保持することができ、接地ボールGBを1個として描画することができる。
【0070】
次にステップ332では、対象の小接地ボールの最新位置Pを演算しRAMに記憶して、ステップ322へ戻る。最新位置Pは、P=Pt−1+V・δtで演算することができる。なお、Pt−1は前回の垂直帰線割込時の対象の小接地ボールの位置を表している。ステップ322で肯定判断のときは、ノード所属ボール処理サブルーチンを終了し図5のステップ122へ進む。
【0071】
図12に示すように、触手ボール処理サブルーチンでは、ステップ336において、触手ボールTBの基部位置Pを演算する(図20(A)も参照)。触手ボールTBの基部位置Pは、ノード所属ボールNBの状態フラグnbflが「通常」のときに、特定のノード所属ボールNB(本例では、ノードN7に割り当てられキャラクタcの肩に配置されるノード所属ボールNB)の中心に位置する(例えば、(50,120,100))。ただし、ノード所属ボールNBの状態フラグnbflが「爆発」(正確には、拡散開始時以降)、「崩落」、又は「這いずり」(正確には、y=0での這いずり)のときは、触手ボールTBの基部位置Pは、y成分が0の(50,0,100)として接地ボールGBの表面に位置する。触手ボールTBの基部位置Pは、ノード所属ボールNBの状態フラグnbflが「這いずり」でy=0の間は、垂直帰線割込が繰り返されても、変わることなく維持され、ノード所属ボールNBの状態フラグnbflが「這いずり」でy>0となると、ノード所属ボールNBの中心となる。
【0072】
従って、触手ボールTBの基部位置Pは、ノード所属ボールNBの状態フラグnbflが「通常」以外のときに、ノード所属ボールNBが「爆発」(拡散開始時以降)、「崩落」又はその後の「這いずり」となると、接地ボールGBに固着するように描画され、「這いずり」でノード所属ボールNBのy成分が0より大きくなると、ノード所属ボールNBの中心に固着して本来のノード所属ボールNBの位置まで戻るように描画される。
【0073】
次のステップ338では、触手ボールTBの先端位置Pを演算する。図20(A)に示すように、触手ボールTBの先端位置Pは、プレイヤキャラクタが存在するときは、当該プレイヤキャラクタを威嚇するように、プレーヤキャラクタの移動に追随するように設定することも可能であるが、本例では、プレイヤキャラクタが存在しない場合を想定して、仮想カメラに向かって触手ボールTBの先端位置Pを移動させることでプレイヤを威嚇する。すなわち、非可視の目標点Pδtが予めモーションデータとして設定されており、前回の垂直帰線割込時の目標点Pδt−1(図29(C)参照)から一定間隔(例えば、(10,10,10))隔てられた位置が触手ボールTBの先端位置Pとして演算される。
【0074】
図20(A)に示すように、触手ボールTBは、基部位置P及び先端位置P間でベジエ曲線を利用して滑らかな曲線として描画される。図29(A)に示すように、ベジエ曲線は、一般に4点(P,P,P,P)で形成される。本例では、触手ボールTBをリアルに表現するために、4点を超える中間点が用いられている。この場合に、図29(B)に示すように、4点で形成されるベジエ曲線をそのまま連結すると、点Pが不連続点となる(滑らかでなくなる)。このため、図29(C)に示すように、点Pと点Pとの中間に点P’を存在させて、触手ボールTBを滑らかな曲線で描画している。
【0075】
図30(A)に示すように、触手ボールTBの基部、先端及び中間点は仮想バネで接続されている。今、中間点Pに着目して、現在の中間点Pの位置を演算する場合について詳述すると、図30(B)に示すように、前回の垂直帰線割込時に中間点Pに働いていた力Fδt−1は、Fδt−1=F01+F02によりベクトルで表される。力F01、F02は、前回の垂直帰線割込時に、基部位置Pに接続された仮想バネ及び中間点Pに接続された仮想バネが、それぞれ中間点Pに作用していた力を表している。力F01は、前回の垂直帰線割込時の基部位置Pと前回の垂直帰線割込時の中間点Pの位置との距離をx、仮想バネのバネ定数をk、基部位置Pに接続された仮想バネによる前回の垂直帰線割込時の中間点Pの加速度をα01とすると、F01=−kx=mα01として求めることができる。質量m=1とすると、加速度α01はα01=−kxとなる。同様に、力F02は、F02=−kx=mα02として求めることができる。なお、α02は中間点Pに接続された仮想バネによる前回の垂直帰線割込時の中間点Pの加速度を表している。従って、前回の垂直帰線割込時に中間点Pに働いていた加速度αt−1は、αt−1=α01+α02で求めることができる。中間点Pは、この加速度αt−1の方向に移動する。このように、前回の垂直帰線割込時の加速度、速度、位置を用いて中間点Pを含む各中間点の演算するのは、基部位置Pから中間点P、P、・・・、P方向、及び、先端位置Pから中間点P、P、・・・、P方向への双方向に、基部位置P、先端位置Pの位置の変動が1/60秒毎に仮想バネを介して順に隣りの中間点に伝達される様子を描画するためである。
【0076】
ステップ340では、前回の垂直帰線割込時に中間点P、P、P’、P、P(以下、これらの中間点を総称するときは中間点Pという。)に働いていた加速度αt−1、速度Vt−1及び前回の垂直帰線割込時の中間点Pの位置Pt−1を読み出して、中間点Pの現在位置Pを演算する。現在の中間点Pの位置は、現在の中間点Pの速度をV(=Vt−1+αt−1・δt)とすると、P=Pt−1+Vt−1・δtで与えられる。
【0077】
次のステップ342では、図30(C)に示すように、中間点Pの現在位置Pで働く力Fから加速度α及び速度Vを演算し、現在位置Pと共にRAMに記憶して、次回の垂直帰線割込時のステップ340での演算に備える。次いでステップ344では、ステップ336、338、340で演算した基部位置P、先端位置P、中間点Pで表されるベジエ曲線を演算し、次のステップ346でベジエ曲線上に触手ボールTBを配置して触手ボール処理サブルーチンを終了し図5のステップ122へ進む。なお、触手ボールTBの太さ(直径)は予め定められており、触手ボールTBに仮想バネの概念を導入したことで、触手ボールTBは伸縮(基部位置P、先端位置P、中間点P間の距離が変動)することとなる。このため、本例では、触手ボールTBは、触手ボールの伸縮に反比例するように触手ボールTBの基部位置P、先端位置P、中間点P間で太さが変更される。
【0078】
図13に示すように、弾丸ボール処理サブルーチンでは、弾丸ボールBBの方向ベクトルが0(図6のステップ164参照)か否かを判断し、否定判断のときは、弾丸ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、ステップ354で弾丸ボールカウンタbbcを1インクリメントし、次のステップ356において、弾丸ボールカウンタbbcが180か否かを判断する。なお、弾丸ボールカウンタbbcが180となるのは、弾丸ボール方向ベクトルが0となってから、180×1/60=3(秒)後である。
【0079】
肯定判断のときは、次のステップ358で、ノード所属ボールNBに命中後の弾丸ボールBBの位置を演算する。なお、命中前の弾丸ボールBBの位置は図6のステップ148、150で演算済みである。図32(A)に示すように、弾丸ボールBBは、ノード所属ボールNBに命中すると、方向ベクトルが0となるため、命中点Hを弾丸ボールBBの中心としてノード所属ボールBBに食い込んだ状態で静止するが、命中したノード所属ボールBBは、所属するノードNの位置がフレーム毎に更新されるため、グローバル座標上で移動するので、結果として弾丸ボールBBもグローバル座標上で移動することになる。このため、ステップ358では、ステップ164で命中したノード所属ボールNBの中心を0とした命中点Hの座標系(x,y,z)を予め演算しておき、その座標系(x,y,z)を用いて、図28に示すように、命中したノード所属ボールNBの中心に対する弾丸ボールBBの中心のグローバル座標上での位置(50,10,130)を演算する。なお、図28は、ノード所属ボールNBの中心を0としたときの命中点Hの座標系(x,y,z)を(1,0,0)とした例である。
【0080】
次のステップ360では、後述する、メタボールの外形を演算するときに用いる濃度係数m_fChargeを通常での1から−1に変更し、弾丸ボール処理サブルーチンを終了して図5のステップ122へ進む。なお、濃度係数m_fChargeを−1とすることで、図31(B)に示すように、弾丸ボールBBは非可視となり、命中したノード所属ボールNBの弾丸ボールBBが食い込んでいる箇所が穴が空いた状態で描画される。
【0081】
一方、ステップ356で否定判断のときは、ステップ358と同様に、弾丸ボールBBの位置を演算し、弾丸ボールカウンタbbcが300か否かを判断し、否定判断のときは、弾丸ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、ステップ366で弾丸ボール状態フラグbbflを0とし、弾丸ボール処理サブルーチンを終了して図5のステップ122へ進む。弾丸ボールカウンタbbcが300となるのは、弾丸ボールBBがノード所属ボールNBに命中してから5秒後である。従って、弾丸ボールBBはノード所属ボールNBに命中後3秒間は可視状態で表示され、その後2秒間は非可視状態、すなわち、ノード所属ボールNBに穴が空いた状態で表示される。
【0082】
図14に示すように、破片ボール処理サブルーチンでは、ステップ372で破片ボールカウンタfbcを1インクリメントし、次のステップ374において、fbcが100かを判断する。肯定判断のときは、ステップ380へ進み、否定判断のときは、ステップ376において、破片ボールFBが発生した位置に、ステップ162で演算した破片ボールFBの速度ベクトルと破片ボールカウンタbbcと垂直帰線割込の時間(1/60秒)を掛けた移動距離を加えることで、破片ボールFBの現在位置(x,y,z)を演算する。次にステップ378では、破片ボールFBの位置のy成分が0又は0より小さいか否かを判断し、否定判断のときは、破片ボール処理サブルーチンを終了して図5のステップ122へ進み、肯定判断のときは、破片ボールFBの存在期間(100/60秒)が経過したか、又は、地面に到達したので、処理対象の破片ボールFBを消滅させ、破片ボール処理サブルーチンを終了して図5のステップ122へ進む。なお、本例では、破片ボールFBは滴ボールDBより小さく存在期間も短いため、ノード所属ボールNBの拡散時、崩落時、自然落下時のような、又は、後述する滴ボールの自然落下時のような形状変更処理を欠いている。
【0083】
図15に示すように、滴ボール処理サブルーチンでは、ステップ392で落下速度を補正する。上述したように、滴ボールDBを発生させるノード所属ボールNBが予め設定されており、ノード所属ボールNB上の滴ボールDBを発生させる発生点(x,y,z)も定められている。グローバル座標上では、図28に示した行列で滴ボールDBの発生点が演算可能である。滴ボールDBは自然落下するため、発生時の滴ボールDBの位置のx成分、z成分をそのまま保持し、y成分について滴ボールDBの現在位置を演算すれば、滴ボールDBを描画することができる。滴ボールDBの落下速度(y成分)は、ステップ270の場合と同様に、V=−g・δt+Vt−1−C・Vt−1・δtにより演算することができる(図32(A)参照)。滴ボールDBは、自然落下により空気による摩擦抵抗を受ける(Cは摩擦抵抗)。この結果、落下速度Vの最大値は3.1m/sとなる(図32(B)参照)。
【0084】
続くステップ394では、滴ボールDBのスケール情報(形状)を変更する。滴ボールDBの発生点でのスケール情報を(10,20,10)、ステップ392で演算された現在の落下速度Vのy成分を3(m/s)とすると、落下速度Vを利用して10×20×10=(10×a)×(20×1.15)×(10×a)を満たすaの絶対値を算出し(aの絶対値:0.7)、滴ボールDBの落下前の体積と落下中との体積とが概ね同じとなるように、滴ボールDBのスケールを(10×0.7,23,10×0.7)=(7,13,7)として演算する(図32(B)参照)。
【0085】
次いでステップ396では、滴ボールDBの位置を演算する。滴ボールDBの現在位置のy成分は、ステップ270の場合と同様に、P=Pt−1+VS−1・δtにより演算することができる。次にステップ398では、ステップ396で演算した滴ボールDBの現在位置のy成分Pが0又は0より小さいか否かを判断し、否定判断のときは、滴ボール処理サブルーチンを終了して図5のステップ122へ進む。一方、肯定判断のときは、次のステップ400で滴ボールフラグdbflを0とし、滴ボール処理サブルーチンを終了して図5のステップ122へ進む。これにより、処理対象の滴ボールDBは接地ボールGBに到達して消滅し、次の垂直帰線割込時に滴ボールDBの発生点で新たな滴ボールが発生する(ステップ264)。
【0086】
従って、メタボール更新処理サブルーチンでは、現在のフレームで存在する全メタボールが、原則的にスケール情報、位置情報、回転情報を含むオブジェクト情報(4行4列の行列)により3次元仮想空間(仮想枠)内に原始的に配置される。なお、上述したように、触手ボールTBはベジエ曲線上に配置されるので、4行4列の行列の形式ではないが、ベジエ曲線で特定されるオブジェクト情報により3次元仮想空間内に配置される。
【0087】
図5のステップ122では、3次元仮想空間内に配置されたメタボールの濃度分布を評価点毎に調べる濃度分布処理サブルーチンが実行されるが、濃度分布処理サブルーチンについて触れる前に、本実施形態で用いられるメタボール内部の濃度評価式、評価点及び濃度評価について説明する。
【0088】
本実施形態では、メタボール内部の濃度h(r)を評価する濃度評価式として下式(2)が用いられる。式(2)において、Rはメタボールの半径、rはメタボールの基準位置から評価点までの距離、m_fChargeは1又は−1をとるメタボールの濃度係数を表している。なお、基準位置とは、メタボールの濃度が1となる位置をいい、例えば、楕球の場合にはその中心位置となる。
【0089】
【数2】
Figure 2004062618
【0090】
図33に示すように、式(2)によるメタボールの濃度h(r)は、距離rに対して2次関数の特性を有している。式(2)は、r/R<1のときに用いられるメタボール内部の濃度の評価式であり、図33から明らかなように、r/R≧1(メタボールの外部)では、濃度h(r)は0となる。
【0091】
式(2)でメタボールの濃度係数m_fChargeが1の場合に、半径1(R=1)の2つのメタボール球が一部重なっている(融合している)状態を考えると、図34(A)に示すように、融合部分に相当する位置に凸部が形成された濃度分布状態となる。図34(B)、(C)に、この濃度分布を真上から見たときの等濃度曲線、閾値が0.8のときの2つのメタボールの融合形状を示す。閾値は、等濃度曲線を指定(特定)するパラメータとして機能する。なお、本実施形態では、メタボール描画ルーチンにおいて閾値を一定値(0.3程度)として用いているため、レンダリング空間にメタボールを再生成すると、メタボールのスケール情報より小さな形状となる。一方、半径1の2つのメタボール球が一部重なっている場合に、一方のメタボール球に濃度係数m_fCharge=−1を与えると、当該一方のメタボールが非可視となる状態が表現されると共に、その周りの濃度が下がり、他方のメタボール球の融合部分に穴が空いた状態を表現することができる(図31(B)参照)。
【0092】
図35(A)に示すように、メタボールMBは、3次元仮想枠IB内に配置される。仮想枠IBは、大きさが(Δx,Δy,Δz)の多数のボクセルVxに仮想的に分割されている。例えば、仮想枠IBの大きさを(150,150,150)、x,y,z方向にそれぞれ120個のボクセルが存在すると、Δx,Δy,Δzは、150/120として求めることができる。各ボクセルVxには、ボクセルを識別するためのボクセルインデクスが付与されている。例えば、グローバル座標(0,0,0)に頂点を有するボクセルVx(図35(A)の紙面手前左下のボクセル)には最小値(1,1,1)のインデクスが付与されており、グローバル座標(150,150,150)に頂点を有するボクセルVx(図35(A)の紙面奥右上のボクセル)には最大値(nxmax,nymax,nzmax)のインデクスが付与されている。各ボクセルVxの頂点(グリッド)が式(2)による評価の対象となる濃度評価点となる。なお、仮想枠IBの一番外側(仮想枠IBを画定する面)での濃度h(r)は0に設定されている。
【0093】
次に、本実施形態でメタボールの形状として多用される楕球を例として、濃度評価について説明する。P(x,y,z)を楕球の中心、P(x,y,z)を任意の点、X≡x−x,Y≡y−y,Z≡z−zとして表した場合に、楕球の形状は下式(3)による(r/R)が一定となる面で与えられる。
【0094】
【数3】
Figure 2004062618
【0095】
濃度評価では、(r/R)<1内のすべてのボクセルの頂点に対して、式(2)による濃度h(r)の値を求める必要があり、メタボールでオブジェクトを動的に描画する場合には、濃度h(r)を高速で演算しなければならない。
【0096】
式(3)において、Zを固定したときに、(r/R)の最小値を与える(X,Y)は、下式(4)に示すように、式(3)をX,Yで偏微分した値を0として求めることができる。また、Z,Yを固定したときに、(r/R)の最小値を与えるXは、下式(5)に示すように、式(3)をXで偏微分した値を0として求めることができる。
【0097】
【数4】
Figure 2004062618
【0098】
(r/R)を各ボクセルに対して評価する場合に、まず、zをメタボールの中心のz座標zからzが大きくなる方向、及び、小さくなる方向に動かしていき、(r/R)の最小値を与える(x,y)を式(4)で求め、最小値の(r/R)が1又は1を超えたところでzを動かすのを止める。そのとき、動かすそれぞれのzに対して(r/R)の最小値を与える点からyが大きくなる方向、及び、小さくなる方向に動かしていき、そのそれぞれのz,yに対して(r/R)の最小値を与えるxを式(5)で求め、最小値が1を超えたところでyを動かすのを止める。そして、それぞれのz,yに対してxを(r/R)の最小値を与える点から大きくなる方向、及び、小さくなる方向に動かしていき、式(3)で(r/R)を次々に評価し、(r/R)が1を超えたところで評価を終える。この演算は、楕球を表す式(3)のどの断面をとってみても、(r/R)の値の中央が最小値となり両側が2次曲線のように単調にせり上がっていく性質を利用したものであり、評価の対象となる楕球の内部を過不足なく高速に評価することができる。xについては連続的に変化させて(r/R)を評価して行くが、(r/R)は二次式のため、隣接点の差分はxの一次式となる。従って、二階差分までとるようにすれば、一区間の(r/R)の計算ループが加減算だけで得ることができる。
【0099】
図16に示すように、濃度分布処理サブルーチンでは、ステップ502において、処理対象のメタボールの形状情報を読み出す。メタボールの形状には楕球、円柱(カプセル)、円錐台(カプセル)等があり、形状情報にはデフォルト値を用いることができる。なお、図16の濃度分布処理サブルーチンは、メタボールの形状情報が楕球のときの処理であるが、後述するように、形状情報に応じたメタボールの立体形状を表す計算式により濃度評価が可能である。
【0100】
次にステップ504では、予め設定されたボクセルインデクス(n,n,n)の最小値(1,1,1)及び最大値(nxmax,nymax,nzmax)を読み出して、メタボールの中心のz座標zからzが小さくなる方向の計算を開始する。まず、z/Δzの商をボクセルインデクスnz0として余りを切り捨てる。従って、ボクセルVxの頂点の中間がメタボールMBの中心位置となる場合がある。次にステップ506では、n=nz0としてz方向のボクセルインデクスを設定する。
【0101】
次いでステップ508では、zが小さくなる方向の最初のz座標z=n・Δz及び(r/R)が最小値となる(x,y)の座標を演算する。なお、式(5)に従って、x−x={(de−bf)/(ab−d)}(z−z)から、本ステップ(及び後述するステップ522)における定数項cは−(de−bf)・z/(ab−d)+xとなり、y−y={(df−ae)/(ab−d)}(z−z)から、定数項cは−(df−ae)・z/(ab−d)+yとなる。次にステップ510において、nがnの最小値(図35(A)参照)の1以上か否かを判断し、否定判断のときはステップ520へ進み、肯定判断のときは、次のステップ512で、このときの(x,y,z)での(r/R)を式(3)を用いて演算し、ステップ514において、(r/R)が1以上か否かを判断する。肯定判断のときはステップ520へ進み、否定判断のときは、次のステップ516においてy処理サブルーチンを呼び出す。
【0102】
図17に示すように、y処理サブルーチンでは、ステップ542で現在のy座標からy/Δyの商をボクセルインデクスny0として余りを切り捨てて、ステップ544で現在のy座標からボクセルインデクスnをny0として設定し、次のステップ546でyが小さくなる方向の最初のy座標y=n・Δyを演算する。次にステップ548で(r/R)が最小値となるxを演算する。なお、上述した式(5)に従って、(x−x)=−{d(y−y)+f(z−z)}/aから、本ステップ(及び後述するステップ564)における定数項cは(dy+fz)/a+xとなる。次にステップ550において、nがnの最小値の1以上か否かを判断し、否定判断のときはステップ560へ進み、肯定判断のときは、次のステップ552で、このときの(x,y,z)での(r/R)を式(3)を用いて演算し、ステップ554において、(r/R)が1以上か否かを判断する。肯定判断のときはステップ560へ進み、否定判断のときは、次のステップ556においてx処理サブルーチンを呼び出す。
【0103】
図18に示すように、x処理サブルーチンでは、ステップ602で現在のx座標からx/Δxの商をボクセルインデクスnx0として余りを切り捨てて、ステップ604で現在のx座標からボクセルインデクスnをnx0として設定すると共に、xが小さくなる方向の最初のx座標x=n・Δxを演算する。次にステップ606で書き込みポインタを現在の(n,n,n)に合わせ、ステップ608でこのときの(x,y,z)での(r/R)を演算し、次のステップ610でxがΔx減少した場合の(r/R)の差分Δ(r/R)及び2階差分Δ(r/R)を演算する。
【0104】
式(3)をXについてみれば、(r/R)=aX+2(dY+fZ)X+C(Cは定数)の形で表すことができる。XがΔx減少した場合の差分Δ(r/R)は、Δ(r/R)=(r/R)(X−Δx)−(r/R)(X)=a(X−Δx)+2(dY+fZ)(X−Δx)+C−{aX+2(dY+fZ)X+C}により、Δ(r/R)={(2a(−Δx)}x+{a(−Δx)+2(dy+fz)}(−Δx)+cとして求めることができる。なお、定数項cは−2(ax+dy+fz)(−Δx)となる。同様に、xがΔx減少した場合の(r/R)の2階差分Δ(r/R)は2a(−Δx)となる。
【0105】
次にステップ612において、nがnの最小値の1以上か否かを判断し、否定判断のときはステップ620へ進み、肯定判断のときは、次のステップ614で(r/R)が1より小さいか否かを判断する。否定判断のときはステップ620へ進み、肯定判断のときは、ステップ616で、(n,n,n)のボクセルに対応するRAMの位置に(r/R)から求めたメタボールの濃度h(r)を書き込んで、次のステップ618で書き込みポインタを1デクリメントしてステップ612へ戻る。このとき、n=n−1、(r/R)=(r/R)+Δ(r/R)、Δ(r/R)=Δ(r/R)+Δ(r/R)として演算が行われる。すなわち、ステップ610で(r/R)の1階差分、2階差分を求めているので、nが減少する毎に2階差分と前回の1階差分から、1階差分を更新して(r/R)を演算することができる。
【0106】
ステップ620では、ボクセルインデクスnをnx0+1として設定すると共に、xが大きくなる方向の最初のx座標x=n・Δxを演算し、ステップ622で書き込みポインタを現在の(n,n,n)に合わせ、ステップ624でこのときの(x,y,z)での(r/R)を式(3)を用いて演算し、次のステップ626で、ステップ610と同様に、xがΔx増加した場合の(r/R)の差分Δ(r/R)及び2階差分Δ(r/R)を演算する。Δ(r/R)は2a(Δx)x+{aΔx+2(dy−fz)}Δx+c、Δ(r/R)は2a(Δx)として求めることができる。なお、定数項cは−2(ax+dy+fz)Δxとなる。
【0107】
次にステップ628において、nがnの最大値nxmax(図35(A)参照)より小さいか否かを判断し、肯定判断のときは、次のステップ630において、(r/R)が1より小さいか否かを判断する。肯定判断のときは、ステップ632において、(n,n,n)のボクセルに対応するメモリ(RAM)の位置に(r/R)から求めたメタボールの濃度h(r)を書き込んで、次のステップ634で書き込みポインタを1インクリメントしてステップ628へ戻る。これにより、n=n+1、(r/R)=(r/R)+Δ(r/R)、Δ(r/R)=Δ(r/R)+Δ(r/R)として演算が行われる。すなわち、ステップ626で(r/R)の1階差分、2階差分を求めているので、nが増加する毎に2階差分と前回の1階差分から、1階差分を更新して(r/R)を演算することができる。ステップ628又はステップ630で否定判断のときは、x処理サブルーチンを終了して図17のステップ558(又は、後述するステップ574)へ進む。
【0108】
ステップ558では、nを1デクリメントして(n=n−1)、ステップ550へ戻る。これにより、y、x(ステップ546、548参照)を、それぞれ、y=y−Δy、x=x−(−d/a)Δyとして演算が実行される。
【0109】
ステップ560では、y方向のボクセルインデクスnをny0+1として設定し、ステップ562でyが大きくなる方向の最初のy座標y=n・Δyを演算し、次のステップ564において、ステップ548と同様に、(r/R)が最小値となるxを演算する。
【0110】
次にステップ566において、nがnの最大値nymaxより小さいか否かを判断し、肯定判断のときは、ステップ568でこのときの(x,y,z)での(r/R)を式(3)を用いて演算し、次のステップ570において、(r/R)が1以上か否かを判断する。否定判断のときは、ステップ572において、上述したx処理サブルーチンを呼び出して実行し、ステップ574でnを1インクリメントして(n=n+1)、ステップ566へ戻る。このとき、y、x(ステップ562、564参照)を、それぞれ、y=y+Δy、x=x+(−d/a)Δyとして演算が実行される。ステップ566で否定判断のとき、又は、ステップ570で肯定判断のときは、y処理サブルーチンを終了して図16のステップ518(又は、後述するステップ532)へ進む。
【0111】
ステップ518では、nを1デクリメントして(n=n−1)、ステップ510へ戻る。これにより、zはΔzデクリメントされ(z=z−Δz)、x、yは、それぞれ、x−{(de−bf)/(ab−d)}Δz、y−{(df−ae)/(ab−d)}Δzとして演算が実行される。
【0112】
ステップ520では、z方向のボクセルインデクスnをnz0+1として設定し、ステップ522でzが大きくなる方向の最初のz座標z=n・Δz、及び、ステップ508と同様に、(r/R)が最小値となるx,yの座標を演算する。次にステップ524において、nがnの最大値nzmaxより小さいか否かを判断し、肯定判断のときは、ステップ526でこのときの(x,y,z)での(r/R)を式(3)を用いて演算し、次のステップ528において、(r/R)が1以上か否かを判断する。否定判断のときは、次のステップ530において、上述したy処理サブルーチンを呼び出して実行し、ステップ532でnを1インクリメントして(n=n+1)、ステップ524へ戻る。このとき、zはΔzインクリメントされ(z=z+Δz)、x、yは、それぞれ、x+{(de−bf)/(ab−d)}Δz、y+{(df−ae)/(ab−d)}Δzとして演算が実行される。ステップ524で否定判断のとき、又は、ステップ528で肯定判断のときは、濃度分布処理サブルーチンを終了して図5のステップ118へ進む。
【0113】
上述したように、メタボールMBは、楕球以外に種々の形状を採る。図36(A)に示すように、メタボールMBがP(x,y,z)、P(x,y,z)を端点とし両端が半球状に丸められた半径Rの円柱のときには、直線P上の点をP(x,y,z)とすると(t:媒介変数)、点PはP=P+vec(V01)tと表すことができる。ここで、vec(V01)≡P−Pであり、vec(V01)はベクトルV01を表している。任意の点P(x,y,z)から直線Pに降ろした垂線の足は、t=vec(V01)・vec(V0P)/{vec(V01)}としたときのP上の点となる。このとき、直線Pからの距離rは、r=[{vec(V01)}・{vec(V0P)}−({vec(V01)・vec(V0P)}]/{vec(V01)}となる。ここで、vec(V0P)≡P−Pである。実際には直線でなく線分Pが対象なので、媒介変数tがt≦0のときは、r={vec(V0P)}、t≧1のときは、r={vec(V1P)}となる(図36(B)参照)。従って、基準位置は中心線となる。
【0114】
以上を纏めると、vec(V01)・vec(V0P)≦0(図36(B)のa部)ではr={vec(V0P)}、0<vec(V01)・vec(V0P)<{vec(V01)}(図36(B)のb部)ではr=[{vec(V01)}・{vec(V0P)}−({vec(V01)・vec(V0P)}]/{vec(V01)}、vec(V01)・vec(V0P)≧{vec(V01)}(図36(B)のc部)ではr={vec(V1P)}となる。なお、vec(V1P)≡P−Pである。
【0115】
一般性を失わないので、以下、z≧zと仮定すると、zを固定したときにrの最小値を与える(x,y)は、rをx,yで偏微分した値が0となる点で得ることができるが、直感的にも明らかなように、z≦zでは(x,y)=(x,y)、z<z<zでは(x,y)=({(x−x)(z−z)/(z−z)}+x,{(y−y)(z−z)/(z−z)}+y)、z≧zでは(x,y)=(x,y)となる。
【0116】
z,yを固定したときにrの最小値を与えるxは、rをxで偏微分した値が0となる点で得ることができる。ここで式の簡略化のためにP相対の変数、(X,Y,Z)=(x−x,y−y,z−z)、(X,Y,Z)=(x−x,y−y,z−z)を導入し、rをxで偏微分すると、vec(V01)・vec(V0P)≦0では∂r/∂x=2X、0<vec(V01)・vec(V0P)<{vec(V01)}では∂r/∂x={2(Y +Z )X−2X(YY+ZZ)}/(X +Y +Z )、vec(V01)・vec(V0P)≧{vec(V01)}では∂r/∂x=2(X−X)となる。
【0117】
これにより、求めるXは、(YY+ZZ)≦0のときX=0、0<(YY+ZZ)<(Y +Z )のときX=X(YY+ZZ)/(Y +Z )、(YY+ZZ)≧(Y +Z )のときX=Xとなる。
【0118】
実際の濃度評価のときに、問題としているrはどの断面をとっても最小となる箇所が一カ所で(区間となる場合もある)、周囲は単調にせり上がっていく性質を持っているので、最小となる点から計算を始めて周囲に計算を進めてr≧Rとなる点で計算を終えるようにすれば、メタボールMBの内部を過不足なく計算できる。具体的には、まずzは(z−R)≦z≦(z+R)がとり得る範囲のため、そのそれぞれのzに対してrが最小となる(x,y)を求める。次に、yを周囲に動かしていきrの最小値を与えるxを求める。その際のrがr≧Rになれば、yを動かすのを止める。そして、それぞれのyに対してxを周囲に動かしていき、r≧Rとなる点まで計算する。rは展開すれば判るように場合分けのそれぞれについて高々2次のため、xが隣接する点での差分は高々xの1次となる。従って、差分の差分までとるようにすれば、連続するxの区間のrの計算ループを加減算だけで組み立てることができる。また、場合分けの分岐となるvec(V01)・vec(V0P)は展開すると高々xの1次式のため、これもxが隣接する点での差分は定数となるので、同様に扱う。場合分けの遷移は、vec(V01)・vec(V0P)のxの符号と動かす方向によって、vec(V01)・vec(V0P)≦0→0<vec(V01)・vec(V0P)<{vec(V01)}→vec(V01)・vec(V0P)≧{vec(V01)}、及び、vec(V01)・vec(V0P)≧{vec(V01)}→0<vec(V01)・vec(V0P)<{vec(V01)}→vec(V01)・vec(V0P)≦0、のいずれかに決まるので、場合分けはそれほど増えないことが判る。
【0119】
また、図36(C)に示すように、メタボールMBがP(x,y,z)、P(x,y,z)を端点とし、点Pからの半径R、点Pからの半径Rで、両端が球状に丸められた円錐台のときには、直線P上の点をP(x,y,z)とすると(t:媒介変数)、点PはP=P+vec(V01)tと表すことができる。なお、vec(V01)≡P−Pである。ここで、任意の点P(x,y,z)とPとの距離に関する関数Rを、媒介変数tを用いて、R=(P−P/{(R−R)t+Rの様に考える。これを最小化する媒介変数tは、K≡R/(R−R)、vec(V01)≡(P−P)、vec(V0P)≡(P−P)とすると、t={Kvec(V01)+vec(V0P)}・vec(V0P)/{(Kvec(V01)+vec(V0P)}・vec(V01)となる。
【0120】
両端の球に接する円錐の頂点をP(x,y,z)とすると、簡単な計算により、P=−{R/(R−R)}vec(V01)+Pとなることが分かる。ここで、vec(VF0)≡P−P,vec(VFP)≡P−P等とすると、媒介変数tは、t={vec(VF0)+vec(V0P)}・vec(V0P)/{vec(VF0)+vec(V0P)}・vec(V01)=vec(VFP)・vec(V0P)/vec(VFP)・vec(V01)となる。このとき、Rは、R=(1/R )[{vec(VF0)}−{vec(VFP)・vec(VF0)}/{vec(VFP)}={vec(V0P)×vec(V01)}/(R−R{vec(VFP)}となる。なお、「×」は外積を表している。両端が丸められた部分については、t≦0ではR={vec(V0P)}/R 、t≧1ではR={vec(V1P)}/R となる。
【0121】
以上を纏めると、t≦0ではR={vec(V0P)}/R 、0<t<1ではR={vec(V0P)×vec(V01)}/(R−R{vec(VFP)}、t≧1ではR={vec(V1P)}/R となる。Rが定数となる曲面が求める形状となる。
【0122】
一般性を失わないので、以下、z≧zと仮定すると、zを固定したときにrの最小値を与える(x,y)は、Rをx,yで偏微分した値が0となる点で得ることができるが、直感的にも明らかなように、z≦z又はz≧zでは、(z−z/R ≦(z−z/R のときに(x,y)=(x,y)、(z−z/R >(z−z/R のときに(x,y)=(x,y)となり、z<z<zでは、(x,y)=({(x−x)(z−z)/(z−z)}+x,{(y−y)(z−z)/(z−z)}+y)となる。
【0123】
z,yを固定したときにRの最小値を与えるxは、Rをxで偏微分した値が0となる点で得ることができるが、計算の詳細は省略するが、t≦0又はt≧1では、(Y0P +Z0P )/R ≦(Y1P +Z1P )/R のときにx=x、(Y0P +Z0P )/R >(Y1P +Z1P )/R のときにx=xとなり、0<t<1では、x={(YFPFP+ZFPFP)XF0/(YFPF0+ZFPF0)}+xとなる。ここで、Y0P≡y−y、Y1P≡y−y、YFP≡y−y、YF0≡y−y等である(Z**についても同様。)。
【0124】
実際の濃度評価のときに、問題としているRはどの断面をとっても最小となる場所が一カ所で(区間になる場合もある)周囲は単調にせり上がっていく性質を持っているので、最小となる点から計算を始めて周囲に計算を進めてR≧1となる点で計算を終えるようにすれば、メタボールMBの内部を過不足なく計算できる。具体的には、まずzはmin(z−R,z−R)≦z≦max(z+R,z+R)がとり得る範囲のため、そのそれぞれのzに対してRが最小となる(x,y)を求める。次にyを周囲に動かしていき、Rの最小値を与えるxを求める。その際のRがR≧1になれば、yを動かすのを止める。そして、それぞれのyに対してxを周囲に動かしていき、R≧1となる点まで計算する。Rは展開すれば判るように端球の部分についてはxの2次であり、xが隣接する点での差分は高々xの1次になる。従って、差分の差分までとるようにすれば、連続するxの区間のRの計算ループが加減算だけで組み立てることができる。
【0125】
円錐台の部分については、(xの高々2次)/(xの高々2次)の形なので、分母、分子についてそれぞれ2回差分までとれば、連続するxの区間のrの計算ループが除算一回以外は加減算だけで組み立てることができる。また、場合分けの目安となる媒介点数tであるが、展開すると(xの高々2次)/(xの高々1次)の形をしている。tと0,1との比較をすれば良いだけなので、分母を払って考えれば、分母と分子と0の間の大小比較だけで場合分けができることが判る。従って、分母については、差分、分子については2回差分までとるようにすれば、連続するxの区間の場合分けの変化については加減算と大小比較だけで組み立てることができる。このように、濃度分布処理サブルーチンでは、仮想枠IB内に配置されたメタボールの立体形状に従って濃度が演算される。
【0126】
ステップ118で肯定判断のときは、ステップ124で、各ボクセルVxの頂点(評価点)での濃度が閾値より上か下かを調べていき、閾値が一定となる点の集合(等濃度面)をポリゴンで表現するためのマーチンキューブ処理を実行する。すなわち、マーチンキューブ処理では、濃度h(r)が一定の値(閾値)となる点の集合(等濃度面)をポリゴンで表現することを考え、この等濃度面を最終的に表現したい(再生成される)メタボールMBの形状と定義する。なお、図35(B)に示すように、仮想枠IBには、メタボールMBで構成されたキャラクタc全体が入っている。仮想枠IBの中心は、例えば、キャラクタcのヘソであっても足元であってもよいが、キャラクタcの移動に追随して移動し、仮想枠IBの大きさは、キャラクタc全体が入れば、キャラクタcの上下左右の外径に接触している必要はない。
【0127】
図19に示すように、マーチンキューブ処理サブルーチンでは、ステップ702で上述したボクセルインデクスを用いて全ボクセルVxについて処理が終了したか否かを判断する。すなわち、図35(B)に示すように、紙面手前左下のボクセルから調べていき、紙面奥右上のボクセルについて処理が終了したか否かを判断する。
【0128】
否定判断のときは、ステップ704で、閾値により対象ボクセルの頂点のオン・オフを検出する。すなわち、対象ボクセルとメタボールMBとがどのように交差するかを調べるために、対象ボクセルの8つの頂点について、頂点の濃度h(r)が閾値より高い(メタボールMBの内側)ときにオンとし、頂点の濃度h(r)が閾値より低い(メタボールMBの外側)ときにオフとして検出する。本ステップでは、ボクセルVxを順に検出していくので、新たに調べる必要がある頂点は3つだけとなる。上述したように、仮想枠IBの一番外側は濃度が0に設定されているため、たとえ、(1,1,1)のボクセルVxを調べるときでも、3つの頂点を調べれば十分である。図37は、図35(B)に示すボクセルVxが対象ボクセルのときに、当該ボクセルの頂点等を示したものである。なお、対象ボクセルの各頂点の濃度h(r)は、キャラクタcの動作等に伴ってフレーム毎に変化し、既に演算済みである(図18のステップ616、632)。
【0129】
次にステップ706では、ポリゴンの頂点を生成する辺を検出する。すなわち、ボクセルとメタボールMBとが交差する辺(図37の点a、b、c、dを含む辺)を求める。ボクセルには、8つの頂点があるので、各頂点のオン/オフの組み合わせは2=256通りである。例えば、各頂点に番号を振り、その頂点番号を2の指数部分と決めておいて、オンの頂点分だけ加算したインデクスを考えれば、図37に示す場合のインデクスは、2+2+2+2=170となる。インデクスは0から255までの値となるので、256組みの等濃度面のデータで構成されるデータテーブルが予め用意されている。このデータテーブルには、1組の等濃度面のデータにつき、▲1▼ポリゴン頂点が生成されるボクセルの辺、▲2▼そのポリゴン頂点をどのように結んで等濃度を形成するか、が記録されている。例えば、図37に則して説明すれば、頂点AP0−AP1間を辺0、頂点AP2−AP3間を辺1、頂点AP4−AP5間を辺2、頂点AP6−AP7間を辺3とすると、データテーブルの(インデクス+1)番目に、上記▲1▼の部分には{辺0、辺1、辺2、辺3}の4つが記録されており、上記▲2▼の部分には{辺0、辺1、辺2}の3つ及び{辺1、辺2、辺3}の3つが記録されている。3点が決まれば、ポリゴン面が生成できるので、{辺0、辺1、辺2}で1つの等濃度面ができ、{辺1、辺2、辺3}で1つの等濃度面ができる。ただし、この段階では、ポリゴン面を形成する辺は特定されているが、未だ辺上の点a、b、c、dの位置は特定されていない。
【0130】
次にステップ708では、ステップ706で特定された辺と、対象ボクセルの頂点の濃度h(r)から、対象ボクセルとメタボールMBとが交差する点の座標を演算する。例えば、辺0上の点aの座標について詳述すれば、図38に示すように、頂点AP1の濃度値と頂点AP0の濃度値とを線型に近似して閾値に対応する箇所を点aの位置とする。なお、頂点AP0、AP1等の濃度h(r)はキャラクタcの動きに伴ってフレーム毎に変化するので、各ボクセルの頂点の濃度h(r)は変動し、図38の傾きが変わり点a等の位置も変動する。このように、ステップ708では、点a、b、c、dの位置を特定し、図37に示すように、点a、b、c及び点b、c、dの2つの三角形、すなわち、等濃度面で構成されるポリゴン面を特定して、ステップ702へ戻る。ステップ702で肯定判断のときは、マーチンキューブ処理サブルーチンを終了し図5のステップ126へ進む。
【0131】
ステップ126では、画像処理部23にマーチンキューブ処理サブルーチンで取得したポリゴン面のデータを含む描画データを送出する。これにより、画像処理部23は、ポリゴン面にテクスチャを貼り付け、光源処理等の通常の描画処理を行って、垂直帰線割込周期でテレビモニタ4に画像データを送出する。テレビモニタ上には、融合(又は分離)したメタボールMBがオブジェクトとして動的に描画される。
【0132】
次にステップ128で、モーションカーソルmcを1インクリメントすると共に、時間tを1インクリメントして、次のステップ130において、現在のモーションカーソルmcによるフレームがモーションの最終フレームか否かを判断する。否定判断のときは、描画演算処理サブルーチンを終了して図5のステップ110へ進み、肯定判断のときは、ステップ132でモーションカーソルmcを0とし次のモーションを指定して描画演算処理サブルーチンを終了して図5のステップ110へ進む。
【0133】
ステップ110では、ステップ106でゲームを終了させるための所定ボタンが押下された否かを判断し、否定判断のときは、ステップ104へ戻り、肯定判断のときは、メタボール描画ルーチンを終了する。
【0134】
(作用等)
以上のように、本実施形態では、メタボール更新処理でモーションデータによりノードNに仮想枠IB内の座標位置が付与され、ノードNにノード所属ボールNBが配置され(ステップ120)、濃度分布処理で立体形状を表す計算式に従ってメタボールMBの基準位置からボクセルVxのボクセルインデクスの最小方向及び最大方向に向かってボクセルVxの頂点毎に式(2)により濃度h(r)が演算され(ステップ122)、マーチンキューブ処理でボクセルVxの頂点座標でのメタボールMBの濃度h(r)と予め設定された閾値とに基づいてポリゴンの頂点座標が演算されて(ステップ124)、キャラクタcが生成される。
【0135】
式(2)は従来技術の濃度評価式より単純化されておりボクセルVCの頂点での濃度演算を高速に行うことができる。このため、メタボールの数を増加させることができゲームキャラクタ等の比較的複雑な形状を動的に描画することができる共に、式(2)で得られる等濃度曲線は複数のメタボールを融合させた場合に適度な凹凸を含みゲームキャラクタ等のゴツゴツ感を表現することができるので、曲線美を追求して滑らかな曲線で静的にオブジェクトを描画する場合と比べ、ゲームキャラクタ等の表現に相応しい描画を実現することができる。特に、本実施形態のキャラクタcのように複数のメタボールで構成される場合は、メタボールが融合・分離する精細な液体感を(粘性を帯びた液体であれば尚一層)表現するのに向いている。
【0136】
また、図19に示したように、マーチンキューブ処理では予め設定された閾値と等しいメタボールの等濃度面をポリゴンの頂点として演算するが、その際、メタボールMB自体の変化(その大きさ、位置、数、濃度など)はプログラムによって実行時に動的に制御することが十分可能であり(図5のステップ120、122)、これにより変化するポリゴン情報もまた実行時に動的に0から生成することができる(ステップ704〜708)。このことは、ゲームキャラクタ等の制作工程の効率化と共に、モーフィング技術では表現不能であった各種の表現を可能とする。例えば、メタボールMBの爆発や崩落などの変化をモーフィングによって実現しようとすると、スタートとゴールの2つの形状モデル間に上述した(1)、(2)の制限を越える相違(位相的な相違)が発生するため、2つの形状モデルの補間が不能となる。本実施形態では、マーチンキューブ処理でメタボールの形状の変化、メタボールの濃度分布の変化として処理し、ポリゴン面をその変化に応じて動的に生成するため、モーフィングに課される制限はまったく発生しない。従って、本実施形態では、モーフィング技術では実現不能であったポリゴンの位相的な変化を動的に表現することができると共に、ゲームキャラクタの動的表現力を高めることができる。
【0137】
なお、本実施形態では、ゲームキャラクタを人に近似した例を示したが、本発明はこれに限定されることなく、ノードは動物の関節に対応し、ノード間は動物の骨格に相当するので、ノードにノード所属ボールを配置することによって、任意の動物等をゲームキャラクタとして表現することができることは云うまでもない。
【0138】
また、本実施形態では、接地ボールGBを4つの小接地ボールとした例を示したが、接地ボールGBは1つの小接地ボールで構成されていてもよい。更に、本実施形態では小接地ボールに接続された仮想バネがノードN3、N5に接続されたている例を示したが、当該仮想バネはノードN3、N5に所属するノード所属ボールNBに接続するようにしてもよく、更にまた、小接地ボール間の全てに仮想バネを接続するようにしてもよい。このようにしても、本実施形態と同様に、小接地ボール間の分離を防止することができる。また、本実施形態では、触手ボールをメタボールで構成する例を示したが、3次元ポリゴンモデルによって構成するようにしてもよい。
【0139】
更に、本実施形態では、ノード所属ボールNBの速度、加速度、位置等を演算する場合に計算式を示して例示したが、予め計算式により計算したテーブルを準備しておいてテーブルのデータを按分して速度等を算出するようにしてもよい。
【0140】
また、本実施形態では、ステップ274、394等でノード所属ボールNBや滴ボールDBの形状変更例を示したが、例えば、ノード所属ボールや滴ボール等のメタボールの速度方向に形状を任意に引き伸ばして、速度方向に直交する方向の形状を縮めるようにすればよい。このようにすることで、メタボールの速度を視覚的にも表現することが可能となる。
【0141】
更に、本実施形態では、ノード所属ボールNBが地面を這いずる場合に一定速度Vとした例を示したが、ノード所属ボールNBが地面を這いずるときに、接地ボールGBとの間に仮想バネで接続されるようにしてもよい。このようにすれば、バネの力によって速度が変化し(速度は一定とならず)、オイラー法による運動方程式を用いて加速度、位置等を演算することが可能となる。
【0142】
また、本実施形態では、弾丸ボールBBをノード所属ボールNBに命中した後、所定時間経過後に非可視とする例を示したが、例えば、弾丸ボールBBの濃度係数m_fChargeを常に−1で非可視状態とし、同じ座標位置で同じ大きさのポリゴンモデルによるボールを重ねて表示することで弾丸ボールBBを表現してもよく、更に、所定時間経過後にポリゴンモデルによるボールを消去することで、命中したノード所属ボールNBに穴があく(窪みができる)状態を表現するようにしてもよい。
【0143】
更にまた、本実施形態では、式(2)により濃度h(r)を演算するときに、z座標から演算を始め(ステップ504)、y座標、x座標の演算を行う例を示したが(図16〜図18)、本発明はこれに限定されることなく、例えば、x座標から演算を始めるようにしてもよいことは論を待たない。
【0144】
更に、本実施形態では、仮想枠IBの一辺当たり120個のボクセル数とした例を示したが、仮想枠IBのx,y,z方向でボクセル数が異なっていてもよいことは云うまでもない。ボクセル数及びメタボール数はオブジェクトを動的に描画するために、CPUの処理速度によって変更可能であり、ボクセル数を多くすることで、再生成されるオブジェクトの解像度を高めることができる。
【0145】
更に、本実施形態ではゲームプログラムやゲームデータを記録した記録媒体1を媒体読取部22で読み取ることによりRAMへプログラムを転送するようにしたが、媒体読取部22を備えずROMにゲームプログラムを記憶してこのROMからゲームプログラムやゲームデータを読み出すようにしてもよい。このようにすれば、ゲーム専用機とすることができる。また、本実施形態では、記録媒体としてCD−ROMを使用する例で説明したが、CPUブロック20のRAMにロード可能なROMカートリッジや大容量のディスク、マグネットオプティカルディスク等であっても、これらの媒体読取部を備えていれば本発明を適用することができることは論を待たない。
【0146】
また、本実施形態では、一定間隔で行うため、垂直帰線周期の割込処理内で種々の演算を行う例を示したが、タイマ割込処理内やメイン処理内で行われるようにしてもよい。
【0147】
【発明の効果】
以上説明したように、本発明によれば、メタボール配置手段によりモーションデータで座標位置が特定されるノードにメタボールが配置され、濃度演算手段でメタボールの内部濃度が演算され、ゲームキャラクタ生成手段でメタボールのポリゴンの頂点座標が演算されゲームキャラクタが生成されるので、3次元仮想空間でメタボールを用いたキャラクタ等のオブジェクトを動的に描画することができる、という効果を得ることができる。
【図面の簡単な説明】
【図1】家庭用ゲーム装置の接続態様を示す概略斜視図である。
【図2】家庭用ゲーム装置に使用される入力装置の平面図である。
【図3】ゲーム装置本体の概略構成を示すブロック図である。
【図4】実施形態のゲーム装置本体のCPUが実行するメタボール描画ルーチンのフローチャートである。
【図5】メタボール描画ルーチンのステップ108の詳細を示す描画演算処理サブルーチンのフローチャートである。
【図6】描画演算処理サブルーチンのステップ114の詳細を示す弾丸ボール関連処理サブルーチンのフローチャートである。
【図7】描画演算処理サブルーチンのステップ116の詳細を示す爆発関連処理サブルーチンのフローチャートである。
【図8】描画演算処理サブルーチンのステップ120の詳細を示すメタボール更新処理サブルーチンのフローチャートである。
【図9】メタボール更新処理サブルーチンのステップ214の詳細を示すノード所属ボール処理サブルーチンのフローチャートである。
【図10】ノード所属ボール処理サブルーチンのステップ256の詳細を示すノード座標補正処理サブルーチンのフローチャートである。
【図11】メタボール更新処理サブルーチンのステップ218の詳細を示す接地ボール処理サブルーチンのフローチャートである。
【図12】メタボール更新処理サブルーチンのステップ222の詳細を示す触手ボール処理サブルーチンのフローチャートである。
【図13】メタボール更新処理サブルーチンのステップ226の詳細を示す弾丸ボール処理サブルーチンのフローチャートである。
【図14】メタボール更新処理サブルーチンのステップ230の詳細を示す破片ボール処理サブルーチンのフローチャートである。
【図15】メタボール更新処理サブルーチンのステップ232の詳細を示す滴ボール処理サブルーチンのフローチャートである。
【図16】描画演算処理サブルーチンのステップ122の詳細を示す濃度分布処理サブルーチンのフローチャートである。
【図17】濃度分布処理サブルーチンのステップ516、530の詳細を示すy処理サブルーチンのフローチャートである。
【図18】y処理サブルーチンのステップ556、572の詳細を示すx処理サブルーチンのフローチャートである。
【図19】描画演算処理サブルーチンのステップ124の詳細を示すマーチンキューブ処理サブルーチンのフローチャートである。
【図20】メタボールで描画されるキャラクタのノードを示す説明図であり、(A)はテレビモニタに表示されるキャラクタのノード位置、(B)はノード番号を示す。
【図21】キャラクタのノードの階層情報を模式的に示す説明図である。
【図22】キャラクタのノードに割り当てられるノード所属ボールを模式的に示す説明図である。
【図23】弾丸ボールがノード所属ボールに命中したときに発生するトルクについて力と半径とを模式的に示す説明図である。
【図24】弾丸ボールがノード所属ボールに命中したときの状態を模式的に示す説明図であり、(A)は命中範囲、(B)は破片ボールの発生を示す。
【図25】グローバル座標でのノードの位置とノード所属ボールの位置とを示す説明図である。
【図26】ノード所属ボールが地面を這いずる状態を模式的に示す説明図である。
【図27】接地ボールを示す説明図であり、(A)は小接地ボールと仮想バネとの関係、(B)は小接地ボールに働く力を示す。
【図28】グローバル座標での弾丸ボールの命中点を示す説明図である。
【図29】ベジエ曲線の説明図であり、(A)は4点で構成されるベジエ曲線、(B)は4点で構成されるベジエ曲線を単純に繋いだ場合、(C)は4点で構成されるベジエ曲線を滑らかに繋いだ場合を示す。
【図30】触手ボールの仮想バネを模式的に示し、(A)は仮想バネで繋がれた触手ボール、(B)は前回の垂直帰線割込時に中間点Pに作用していた力、(C)は中間点Pに現在作用している力を示す。
【図31】弾丸ボールとノード所属ボールとの関係を示す説明図であり、(A)は弾丸ボールの濃度係数が1のときの状態、(B)は弾丸ボールの濃度係数が−1のときの状態を示す。
【図32】滴ボールの自然落下による速度変化及び形状変化を模式的に示し、(A)は空気による摩擦抵抗を受けない場合、(B)は空気による摩擦抵抗を受ける場合を示す。
【図33】実施形態で用いられる濃度評価式で濃度係数を1としたときの濃度と距離との関係を示すグラフである。
【図34】半径1の2つのメタボール球について実施形態で用いられる濃度評価式により濃度を演算したときの等濃度曲線を示し、(A)は等濃度曲線の外観斜視図、(B)は平面図、(C)は閾値を0.8としたときの等濃度曲線の平面図である。
【図35】実施形態で用いられる仮想枠とボクセルとの関係を模式的に示す説明図であり、(A)はボクセルとボクセルインデクスとの関係、(B)は仮想枠内に配置されたオブジェクトとボクセルとの関係を示す。
【図36】メタボールが楕球以外の立体形状をとるときの距離演算の説明図であり、(A)は円柱部での任意の点までの距離、(B)球状に丸められた両端での任意の点までの距離、(C)は両端が球状に丸められた円錐台を示す。
【図37】ボクセルの頂点とポリゴン面との関係を示す説明図である。
【図38】ボクセルの辺を構成する頂点の濃度とボクセルの辺上のポリゴン面の頂点位置との関係を示す説明図である。
【図39】従来技術の濃度評価式による濃度と距離との関係を示すグラフである。
【図40】半径1の2つのメタボール球について従来技術の濃度評価式により濃度を演算したときの等濃度曲線を示し、(A)は等濃度曲線の外観斜視図、(B)は平面図である。
【図41】等濃度曲線の説明図であり、(A)は2つのメタボール球が融合した状態を模式的に示し、(B)は閾値が0.5の場合に再生成されるメタボール球の平面図である。
【符号の説明】
1 記録媒体
10 家庭用ビデオゲーム装置(ゲーム装置)
20 CPUブロック(コンピュータ)
CPU (メタボール配置手段、濃度演算手段、ゲームキャラクタ生成手段、接地ボール生成手段、滴ボール生成手段、触手ボール生成手段)[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a program, a recording medium, a metaball drawing method, and a game apparatus, and more particularly, a program for dynamically drawing a metaball as an object in a three-dimensional virtual space, a computer-readable recording medium storing the program, and the metaball drawing method And the game apparatus.
[0002]
[Prior art]
The metaball is a solid formed in a three-dimensional virtual space, and has a characteristic that when a plurality of metaballs approach each other, they fuse together while influencing each other, and conversely, separate when separated. For this reason, a shape having a free-form surface can be expressed using a large number of metaballs.
[0003]
In the book “Introduction to Implict Surfaces” published in the United States in 1997 (MORGAN KAUFANNN PUBLISHERS, INC. San Francisco, California), page 26 (1.4.2 Blends), as shown below: Describes a calculation formula for determining the concentration of metaballs disclosed by Wyville et al. In 1986. In Expression (1), h (r) is a concentration indicating the concentration inside the metaball, that is, a variable indicating the strength of the metaball, r is a distance from the center of the metaball to the evaluation point of the concentration, and R is a radius of the metaball.
[0004]
[Expression 1]
Figure 2004062618
[0005]
As shown in FIG. 39, the metaball concentration h (r) according to the equation (1) has a sixth-order function characteristic with respect to the distance r. FIG. 40A shows the concentration distribution inside the metaball sphere according to the equation (1) when two metaball spheres having a radius of 1 partially overlap. The density h (r) of the overlapping portion is the sum of the densities of the two metaball spheres. Note that the shape shown in FIG. 40A is a concentration distribution, and does not represent the shape of the metaball itself. FIG. 40B shows an equal density curve (a line connecting points with equal density) when this density distribution is viewed from directly above. The outermost thick line is the original shape of the metaball sphere, and the inner thin line is an isoconcentration curve when the threshold value (which can take a value of 0 to 1) is increased in increments of 0.1 toward the center of the metaball. . It can be seen that when the threshold value is increased, the two metaball spheres are separated, and when the threshold value is decreased, the metaball spheres are smoothly fused (attached). As shown in FIG. 41 (A), the isoconcentration curve shown in FIG. 40 (B) is equal to the concentration distribution of a cross section cut so as to pass through the centers of two metaball spheres. A density value corresponding to a specific isodensity curve is the above-described threshold value. The shape of the isoconcentration curve in the cross section determined by the specified threshold value is the shape of two metaball spheres that are regenerated as they are (they are the same shape from any point of view because they are spheres). Note that FIG. 41B shows a shape in which two metaball spheres regenerated when the threshold value is 0.5 in Equation (1) are fused.
[0006]
Japanese Patent Laid-Open No. 5-20406 discloses a formula for calculating the metaball concentration which is devised to reduce the order of the distance r to the second order and approximate the characteristic to the sixth order function of the formula (1). . In this technique, the range within which the distance r can be obtained is divided into three sections, and the concentration inside the metaball is calculated by switching using different calculation formulas having different characteristics in each section.
[0007]
Furthermore, for example, Japanese Patent Application Laid-Open No. 2001-229396 discloses a technique for changing the shape of a game character using a morphing technique. In the morphing technique, it is usually possible to draw an expression that changes its shape as a whole from one object existing in a three-dimensional virtual space to another object. A game is also known in which object polygons as a plurality of parts are combined to create one polygon character.
[0008]
The literature related to the present invention includes Addison Wesley Publishing Co. , Inc. "Computer Graphics", published in 1990, pages 488 to 491, James D. There is a description of the Bezier curve of Joley et al., “The Visual Computer” magazine published in April 1988, pages 283 to 295, “Dynamic animation: interaction and control” (Jane Wilhelms, Rorthew There is a description of the equation of motion by the Euler method entitled “2.2 Numerical integration methods” by Skinner). Also, published by Teruido Co., Ltd., Takeshi Yasui and Masayuki Nakajima, “Computer Graphics”, pages 115 to 117, a polygonal surface with a certain concentration from the data stored in the three-dimensional matrix. There is a description of the Martin cube method approximated by.
[0009]
[Problems to be solved by the invention]
However, in the conventional metaball technology, a static solid in a three-dimensional virtual space is represented by a smooth curve and used for drawing a beautiful curve. That is, for example, if a character is expressed by a plurality of metaballs, the character will dynamically move in the three-dimensional virtual space. Therefore, the metaball needs to be dynamically processed as the character moves. In the technology, it was difficult to cope with dynamic processing and high-speed processing of a plurality of metaballs constituting characters in a three-dimensional virtual space.
[0010]
In morphing, it is difficult to express partial changes such as emphasizing changes in joints, for example, because the entire object is not partially divided as in the case of metaballs. Furthermore, in morphing, it is necessary to prepare in advance a shape model that will be the start and goal of deformation. For the two shape models, (1) the number of constituent polygons and the number of constituent vertices are exactly the same, (2 ) Extremely strong production restrictions are imposed, such as the types of constituent polygons (triangles and tetragons) and their connection conditions being exactly the same. Moreover, the only change that can be made by morphing is a geometric change. When the number of polygons is increased or decreased at the time of change, discontinuity occurs at the connected part, for example, polygons are generated at unplanned positions, Since problems such as disappearance of polygons may occur, it is difficult to express topological changes.
[0011]
In view of the above circumstances, the present invention provides a program capable of dynamically drawing an object such as a game character using a metaball in a three-dimensional virtual space, a computer-readable recording medium storing the program, the metaball drawing method, and the game device. The issue is to provide.
[0012]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, a first aspect of the present invention is a program for dynamically drawing a metaball as an object in a three-dimensional virtual space. For a plurality of nodes whose coordinate positions are specified, a metaball arrangement means for arranging a metaball belonging to each of the nodes so as to constitute a game character, and a vertex of a voxel that divides the three-dimensional virtual space into a large number Density calculating means for calculating the internal density of the metaball, and game character generating means for generating a game character by calculating the vertex coordinates of the polygon based on the internal density of the metaball at the vertex of the voxel and a preset threshold value To function as.
[0013]
In the first aspect, metaballs belonging to each of the plurality of nodes whose coordinate positions in the three-dimensional virtual space are specified by the motion data by the metaball arranging means are arranged so as to form a game character, The calculation means calculates the internal concentration of the metaball at the vertex of the voxel that divides the three-dimensional virtual space into a large number, and the game character generation means calculates the internal concentration of the metaball at the vertex of the voxel and a preset threshold value. The vertex coordinates of the polygon are calculated and a game character is generated. According to this aspect, the metaball is arranged at the node whose coordinate position is specified by the motion data by the metaball arrangement means, the internal density of the metaball is calculated by the density calculation means, and the vertex coordinates of the metaball polygon are calculated by the game character generation means. Since it is calculated and a game character is generated, an object such as a character using a metaball can be dynamically drawn in a three-dimensional virtual space.
[0014]
In the first mode, if a node is located at the joint position of the game character and the distance to the adjacent node is constant, the node corresponds to a joint of a person or an animal, and the node corresponds to a human or animal skeleton. Therefore, the skeleton of the game character can be formed by approximating the skeleton of a person or animal. Further, if the metaball placement means periodically changes the size of the metaball belonging to the node, the state where the game character is breathing can be expressed. Furthermore, when the metaball placement means cancels the placement of the metaball on the node when a predetermined event occurs, and the metaball is placed so as to be scattered at the coordinate position set by a predetermined calculation formula or table, A state where the metaball is separated from the node, for example, a state in which drawing by the morphing technique is difficult, a state where a part of the body of the game character is cut off from the skeleton, a state where the game character itself explodes and the body etc. diffuses can be expressed. It is possible to enhance the expressive power in games and the like. At this time, if the metaball arrangement means changes the shape of the metaball arranged at the coordinate position set by the calculation formula or the table, for example, it expresses a state in which the game character is composed of a liquid substance or the like. be able to.
[0015]
Further, in the first aspect, if the computer is further arranged as a ground ball generating means that generates a ground ball that is arranged directly below the game character and crawls the ground with the movement of the game character, using a metaball. A state in which the game character is composed of a liquid substance or the like and the liquid substance or the like is accumulated can be expressed. The ground ball may be composed of a plurality of metaballs, and the ground ball generation means uses virtual springs to attach the metaballs that constitute the ground ball to the game character's foot node or the metaball arranged at the foot node. You may make it calculate the coordinate position of the metaball which comprises this grounding ball so that it may be connected. Further, the ground ball generation means may change the shape of the metaball so that the metaballs constituting the ground ball are integrated.
[0016]
Furthermore, in the first aspect, if the computer is further caused to function as a drop ball generating means for generating a drop ball that drops from a meta ball belonging to a specific node by the meta ball, the game character is composed of a liquid substance or the like. You can emphasize how it is done. At this time, if the drop ball generating means limits the drop speed of the drop ball to a certain value or less, it is possible to express a state in which the drop ball is subjected to air friction as in the natural world. Further, the shape of the drop ball may be changed so that the drop ball generating means naturally falls.
[0017]
Furthermore, in the first aspect, the computer may further function as a tentacle ball generating unit that generates a tentacle-like tentacle ball that protrudes from a metaball belonging to a specific node. When the tentacle ball generating means places the tentacle ball on the Bezier curve, the tentacle ball can be expressed by a smooth curve. At this time, the tentacle ball generation means may calculate the coordinate position of the point specifying the Bezier curve so that the points specifying the Bezier curve are connected by a virtual spring.
[0018]
In order to solve the above problem, a second aspect of the present invention is a computer-readable recording medium on which the program according to the first aspect is recorded, and the third aspect of the present invention is 3 A metaball drawing method for dynamically drawing a metaball as an object in a three-dimensional virtual space, and each of a plurality of nodes whose coordinate positions in the three-dimensional virtual space are specified by motion data at predetermined time intervals. The metaballs belonging to the nodes are arranged so as to constitute a game character, the internal concentration of the metaballs at the vertices of the voxels that divide the three-dimensional virtual space into a large number is calculated, and the metaballs at the vertexes of the voxels A step of generating a game character by calculating vertex coordinates of the polygon based on the internal density of the image and a preset threshold value. A fourth aspect of the present invention is a game apparatus that dynamically draws a metaball as an object in a three-dimensional virtual space, wherein a plurality of coordinate positions in the three-dimensional virtual space are specified by motion data. Metaball placement means for placing a metaball belonging to each node so as to constitute a game character, and an internal concentration of the metaball at a vertex of a voxel that divides the three-dimensional virtual space into a large number for each node Density calculating means for calculating, and game character generating means for calculating the vertex coordinates of the polygon based on the internal density of the metaball at the vertex of the voxel and a preset threshold value to generate a game character.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment in which the present invention is applied to a video game will be described with reference to the drawings.
[0020]
(Constitution)
As shown in FIG. 1, in a home video game apparatus 10 in which a video game according to the present embodiment is executed, a television monitor 4 incorporating a speaker 5 and an input device 3 are connected to a game apparatus body 2. The game apparatus body 2 has a medium reading unit (see FIG. 3) into which a recording medium 1 such as a CD-ROM can be mounted. By mounting the recording medium on the medium reading unit, the game program and game data recorded on the recording medium 1 are automatically loaded into the storage memory in the game apparatus body 2.
[0021]
As shown in FIG. 2, the input device 3 includes a □ button 31 and a △ button for operating a start button 30 for starting a game, a game character, and responding to a selection inquiry from the game device main body 2. Various buttons such as a cross direction button set including 32, ○ button 33, X button 34, ↑ button 35, → button 36, ← button 37, and ↓ button 38 are arranged.
[0022]
As shown in FIG. 3, the game apparatus body 2 includes a CPU block 20 that controls the entire apparatus. The CPU block 20 stores an SCU (System Control Unit) that mainly controls data transfer with each unit in the game apparatus body 2, a CPU that operates as a central processing unit with a high-speed clock, and a basic control operation of the game apparatus body 2 ROM, which functions as a work area for the CPU and a game program recorded on the recording medium 1 and a RAM for temporarily storing various data, and an internal bus connecting them.
[0023]
An external bus 25 is connected to the SCU. The external bus 25 includes an input receiving unit 21 that receives input from the input device 3 such as a controller pad and transfers input information to the CPU block 20 and a sub CPU (not shown), and reads a game program recorded on the recording medium 1. A medium reading unit 22 such as a CD-ROM drive to be transferred to the CPU block 20, a CPU and a VRAM for performing graphic processing, and texture processing, light source processing, etc. for the object according to information sent from the CPU block 20, and a three-dimensional field Are connected to an image processing unit 23 that performs a rendering process in FIG. 5 and a sound processing unit 24 that includes a sub CPU (not shown) and processes sound such as back music and battle sounds. The input receiving unit 21 is connected to the input device 3, the image processing unit 23 is connected to the television monitor 4, and the acoustic processing unit 24 is connected to the speaker 5 built in the television monitor 4.
[0024]
(Operation)
Next, the operation of the home video game apparatus 10 will be described mainly with the CPU of the CPU block 20 with reference to the flowchart. When the game apparatus body 2 is turned on and the recording medium 1 is inserted, a metaball drawing routine for dynamically drawing an object composed of metaballs in a three-dimensional virtual space is executed.
[0025]
As shown in FIG. 4, in the metaball drawing routine, first, in step 102, an initial setting process is performed. In this initial setting process, game data and game programs including object data such as motion data of nodes (joints) for each frame of the character, hierarchical data of nodes, and shapes and sizes of metaballs constituting the character are loaded into the RAM. The time t and the motion cursor (frame counter) mc are set to 0 as initial values.
[0026]
Next, in step 104, it is determined whether or not a vertical blanking interrupt (Vsync) performed once every 1/60 seconds (16.6 milliseconds), which coincides with the vertical blanking cycle of the television monitor 4, has been made. to decide. When the determination is negative, in the next step 106, main processing such as input processing for the input information transferred from the input receiving unit 21 and acoustic processing for synthesizing the sound effects of the game to the acoustic processing unit 24 is executed. Proceed to step 110.
[0027]
On the other hand, when the determination in step 104 is affirmative, in step 108, a drawing calculation processing subroutine is executed to place and draw an object composed of metaballs in a three-dimensional virtual space (a virtual frame described later).
[0028]
Here, an outline of an object including a character drawn in the present embodiment will be described. As shown in FIGS. 20A and 20B, the character c has a plurality of nodes N1 to N11 corresponding to human joints. As shown in FIG. 21, the nodes N1 to N11 form a hierarchy (parent-child relationship), and the distance between the nodes N is constant. These nodes N are not displayed on the television monitor 4. As shown in FIG. 22, a plurality of node-affiliated balls NB are assigned (arranged) to the node N and, as will be described later, the density distribution processing and the Martin cube processing of each node-affiliated ball NB are performed on the television monitor 4. A character c as shown in FIG. In addition, when referring to an object in this embodiment, an object other than the character c drawn in the three-dimensional virtual space is included. That is, as shown in Table 1 below, there are a plurality of types of metaballs, which will be described in detail later.
[0029]
[Table 1]
Figure 2004062618
[0030]
As shown in FIG. 5, in the drawing calculation processing subroutine, in step 112, motion data of nodes N1 to N11 of the character c in the current frame corresponding to the motion cursor mc is acquired. Such motion data is composed of scale information, rotation information, and position information (translation information). For example, co-authored by Eihachiro Nakamae and Tomoaki Nishida, published by Shosodo Co., Ltd. As disclosed in “3D computer graphics” and the like, motion can be expressed by calculating a 4 × 4 matrix for each frame.
[0031]
In the next step 114, a bullet ball related processing subroutine for executing processing related to the bullet ball BB released when the player attacks the character c is executed. As shown in FIG. 23, the player can attack the character c by operating the input device 3 and firing a bullet ball BB. That is, as shown in FIG. 2, the bullet ball BB can be launched by operating the cross direction button set of the input device 3 to move the cursor to the character c and pressing the ○ button 33. In the main processing of step 106 described above, when the circle button 33 is pressed, the position of the cursor (the target landing coordinates of the bullet ball BB) is taken in, and a bullet ball state flag bbfl (indicating a state in which the bullet ball BB has been fired) Change the state value) from 0 to 1. In this example, for the sake of simplicity, a case where one bullet ball BB is fired will be described. However, a plurality of bullet balls BB can be fired.
[0032]
As shown in FIG. 6, in the bullet ball related processing subroutine, it is determined in step 142 whether or not the bullet ball state flag bbfl is 1. If the determination is negative, the bullet ball BB has not been fired, so The subroutine ends and the routine proceeds to step 116 in FIG. 5. If the determination is affirmative, the bullet ball status flag bbfl at the time of the previous vertical blanking interruption (before 1/60 seconds) and the current bullet ball are determined in the next step 144. By comparing the state flag bbfl, it is determined whether the bullet ball state flag bbfl has been changed from 0 to 1, in other words, whether the bullet ball BB has been fired by the player now.
[0033]
If the determination in step 144 is affirmative, the velocity vector V of the bullet ball BB is determined in the next step 146.BIs calculated and stored in the RAM. The firing position coordinates of the bullet ball BB are set in advance, and the magnitude (scalar value) of the speed (initial speed) of the bullet ball BB is also given in advance. Therefore, a velocity vector V is calculated by calculating a direction vector from the firing position coordinates to the landing target coordinates of the bullet ball BB and multiplying the direction vector by the scalar value of the velocity of the bullet ball BB.BCan be obtained (see FIG. 23). Here, the direction vector is a unit vector having no meaning with respect to the size, and means a vector (x, y, z) in which only the direction has a meaning. In this case, the direction vector (x, y, z) is: It can be obtained by obtaining the difference between the firing position coordinates (x, y, z) from the landing target coordinates (x, y, z) and converting them into unit vectors. In step 146, the distance between the landing target coordinates and the firing position coordinates is calculated and stored in the RAM. Note that the velocity of the bullet ball BB is treated as constant, and deceleration due to the frictional resistance of air is not considered.
[0034]
Next, at step 148, the position of the bullet ball BB is calculated and stored in the RAM, the bullet ball related processing subroutine is terminated, and the routine proceeds to step 116 of FIG. The position P of the bullet ball BB is P0Is the firing position coordinate P (x, y, z) of the bullet ball BB, P = P0+ VB(1/60) can be obtained for each component of the three-dimensional coordinate axes x, y, z.
[0035]
On the other hand, when a negative determination is made at step 144, the current position P of the bullet ball BB is calculated at step 150 and stored in the RAM. The current position P of the bullet ball BB is Pt-1Is the position at the time of the previous vertical interruption, and δt is the time of the vertical blanking interruption (1/60 seconds), P = Pt-1+ VB-It can obtain | require for every component of the three-dimensional coordinate axis x, y, z using (delta) t. Accordingly, in step 150, the latest position (x, y, z) of the bullet ball BB is calculated for each vertical blanking interruption based on the previous position and stored in the RAM. The calculation formula for the position P of the bullet ball BB used in step 148 and step 150 is the velocity vector V of the bullet ball BB.BIs constant (acceleration = 0), the third term including the acceleration of the Euler's equation of motion is deleted.
[0036]
Next, at step 152, it is determined whether or not the bullet ball BB has hit one of the node assigned balls N. That is, the center coordinates C of all the node belonging balls NB assigned to each node N in the current frame are calculated (details will be described later), and the (center) position P of the bullet ball BB is calculated as shown in FIG. It is determined whether or not each node belonging ball NB is within a predetermined radius d of the center coordinates C. When the bullet ball BB falls within the predetermined radius d of a plurality of node belonging balls, it is considered that the node belonging ball NB having the shortest distance has hit. In this example, when the radius of the node assigned ball NB constituting the head of the character c is 30-40, the radius of the bullet ball BB is set to 20-30 (actually displayed on the television monitor 4). When it is done, it will be smaller than these sizes, as will be described later).
[0037]
If the determination in step 152 is negative, it is determined in the next step 154 whether or not the y component (vertical coordinate component) of the position P of the bullet ball BB has become the ground or a position below the ground (y ≦ 0). If the determination is affirmative, the process proceeds to step 158. If the determination is negative, in step 156, the current position P of the bullet ball BB is calculated as 1. of the distance between the landing target coordinates calculated in step 146 and the firing position coordinates. It is determined whether or not the distance is five times (predetermined distance) or more. If the determination is negative, the bullet ball related processing subroutine is terminated and the process proceeds to step 116 in FIG. 5. If the determination is affirmative, the next step is performed. At 158, the bullet ball state flag bbfl is changed from 1 to 0, the bullet ball related processing subroutine is terminated, and the routine proceeds to step 116 of FIG. Accordingly, when the bullet ball BB does not hit the node assigned ball NB of the character c, the bullet ball state flag bbfl is set when the position P falls below the ground (y = 0) or exceeds a predetermined distance. 0. When the bullet ball state flag bbfl becomes 0, the bullet ball BB disappears.
[0038]
On the other hand, when the determination in step 152 is affirmative, in step 160, the hit flag shfl of the specific node assigned ball NB and the lower node assigned ball NB that the bullet ball BB has hit is changed from 0 to 1. That is, all the node belonging balls NB have a hit flag shfl, and the hit flag is normally set to 0. As shown in FIGS. 22 and 23, for example, the node assigned ball NB allocated to the node N7AWhen the bullet ball BB hits, the node belonging ball NB assigned to the nodes N8 and N9 lower than the node N7 according to the hierarchical information shown in FIG.B, NBCThe hit flag shfl is also changed from 0 to 1. In practice, the node belonging ball NB shown in FIG.A, NBBEtc. are divided into about three node-affiliated balls and assigned to nodes N7, N8, N9 or between these nodes, and the hierarchy shown in FIG. 21 is more complicated, but in this embodiment, In order to simplify the explanation, the node belonging ball NBA, NBBIn the following description, it is assumed that there is one piece.
[0039]
Next, at step 162, as shown in FIG. 24B, a plurality of broken balls FB are generated. Here, the broken ball FB refers to a ball that scatters when the bullet ball BB hits the node assigned ball BB (see Table 1), and the velocity vector V of the bullet ball BB.BTo the opposite side of the hit point H side of the node belonging ball NB where the bullet ball BB hits at a position of 0 °, ± 30 °, ± 60 ° from the hit point H (center point of the bullet ball BB) generate. Each piece ball FB has a different size in order to express variation. For example, when the average radius is 5, the spheres are randomly set to radii 4 and 6 so as to have a radius of about ± 1. In step 162, the velocity vector of each broken ball FB is calculated and stored in the RAM. A variation coefficient a (0.5 ≦ a ≦ 1) is introduced to represent the variation in speed of each piece ball FB. For example, in the case of the velocity of the fragment ball FB generated at 0 degree from the hit point H, the scalar value of the velocity vector of the bullet ball BB before the hit is set to the same direction vector as the direction vector of the bullet ball BB before the hit and 0. .Multidot..ltoreq.a.ltoreq.1 by multiplying by a variation coefficient a obtained by random numbers. In the case of the velocity vector of a broken ball generated at ± 30 degrees and ± 60 degrees, first calculate the direction vector of the broken ball generated at ± 30 degrees and ± 60 degrees, and use this direction vector as the bullet ball before hit. It is obtained by multiplying the scalar value of the velocity vector of BB by the variation coefficient a obtained by random numbers in the range of 0.5 ≦ a ≦ 1.
[0040]
Subsequently, in step 164, in order to display a state in which the hit bullet ball BB has bitten into the node assigned ball NB constituting the character c and stopped (see FIG. 31A), the velocity vector of the bullet ball BB is set to (0). , 0, 0), and in step 166, subtract 30 from the power nbp of the hit node-affiliated ball, and in the next step 168, determine whether the power nbp of the hit node-affiliated ball NB is less than zero. to decide. That is, in the initial setting process in step 102, each node belonging ball NB is given 100 as the power nbp, and when the bullet ball BB hits the same node belonging ball NB four times, the power nbp of the node belonging ball NB Is less than 0.
[0041]
When a negative determination is made at step 168, the bullet ball related processing subroutine is terminated and the routine proceeds to step 116 of FIG. 5. When an affirmative determination is made, at the next step 170, the node assigned ball NB and the node assigned ball subordinates. After the state flag nbfl of the node belonging ball NB to be “collapsed” is stored in the RAM, the bullet ball related processing subroutine is terminated and the routine proceeds to step 116 in FIG. In further addition to the above example, as shown in FIG. 22, the node assigned ball NB assigned to the node N7.AWhen the bullet ball BB hits the node, the node assigned ball NB assigned to the nodes N8 and N9 lower than the node N7B, NBCThe status flag nbfl is also changed from “normal” to “collapse”. Here, “normal” means a state in which the node assigned ball NB is in the position assigned to the node N to which the node assigned ball NB belongs (see FIG. 22), and “collapse” means the node assigned ball NB (for example, NBA, NBB, NBC) To the node N (for example, N7) to which it belongs, and is a state where it naturally falls off (cut into pieces).
[0042]
In step 116 of FIG. 5, an explosion related processing subroutine for performing processing related to the explosion of all the node assigned balls NB constituting the character c is executed. As shown in FIG. 7, in the explosion related processing subroutine, in step 182, the sum (Σnbp) of the power nbp of all the node assigned balls NB is calculated, and in the next step 184, the sum of the power nbp of all the node assigned balls NB. Is less than 50% of the total power in the initial setting process. As described above, the power nbp in the initial setting process of each node assigned ball NB is 100. As shown in FIG. 22, when there are 18 node assigned balls NB, it is determined whether Σnbp is 900 or less. Is done.
[0043]
If the determination is negative, it is assumed that the character c does not explode, and the explosion-related processing subroutine ends, and the process proceeds to step 118 in FIG. On the other hand, if the determination is affirmative, the state flag nbfl of all the node assigned balls NB is set to “explosion” in step 186, and in the next step 188, the diffusion order (diffusion start time) of all the node assigned balls NB is calculated. Then, the explosion related processing subroutine is terminated and the routine proceeds to step 118 in FIG.
[0044]
When the state flag nbfl of the node belonging ball NB becomes “explosion”, the node belonging ball NB constituting the character c is scattered (diffused) as an elliptical fragment. All the node belonging balls NB may be scattered at the same time or may be random, but in the present embodiment, they are scattered in time. The center of the explosion is the node assigned ball NB hit by the bullet ball BB in step 152 of FIG. Node belonging ball NB shown in FIG.AIs the center of the explosion, for example, the node belonging ball NB assigned to the nodes N7, N8, N9A, NBB, NBCDiffusion start time ts = 0 (current), node assigned ball NB assigned to nodes N7, N10, N11 diffusion start time ts = 20 (20/60 seconds later), node assignment assigned to nodes N7, N6 Ball NB spreading start time ts = 40, node belonging ball NB assigned to nodes N7, N1 spreading start time ts = 60, node belonging ball NB assigned to nodes N1, N2, N3 spreading start time ts = 80, The spreading order is set by providing a time difference to the spreading start time ts, such as the spreading start time ts = 100 of the node assigned ball NB assigned to the nodes N1, N4, and N5. Further, the direction and initial velocity of each node assigned ball NB at the start of diffusion are determined so that all the node assigned balls NB are scattered in almost all directions due to the explosion.0Is preset.
[0045]
In step 118 of FIG. 5, it is determined whether metaball update processing and density distribution processing, which will be described later, have been completed for all metaballs. If negative determination is made, the object information of the metaball is updated (generated) in step 120. The metaball update processing subroutine is executed.
[0046]
As shown in FIG. 8, in the metaball update processing subroutine, in step 212, it is determined whether or not the processing target is the node assigned ball NB. If the determination is affirmative, a node assigned ball processing subroutine, which will be described later, is executed in step 214. If the determination is negative, in step 216, it is determined whether or not the processing target is a ground ball GB. The ground ball GB is a ball that is arranged directly below the character c and crawls on the ground as the character c moves (see Table 1, FIG. 20A), and is arranged directly below the character c on the TV monitor 4. It looks like a puddle. If the determination is affirmative, a ground ball processing subroutine, which will be described later, is executed in step 218. If the determination is negative, in step 220, it is determined whether or not the processing target is a tentacle ball TB. The tentacle ball TB is a ball that protrudes from a specific node-affiliated ball and constitutes an elongated tentacle (see Table 1, FIG. 20A). If the determination is affirmative, a tentacle ball processing subroutine, which will be described later, is executed in step 222. If the determination is negative, in step 224, it is determined whether the processing target is a bullet ball BB. If the determination is affirmative, a bullet ball processing subroutine, which will be described later, is executed in step 226. If the determination is negative, in step 228, it is determined whether or not the processing target is a fragment ball FB. When the determination is affirmative, a fragment ball processing subroutine, which will be described later, is executed at step 230, and when the determination is negative, a droplet ball processing subroutine is executed at step 232. The drip ball refers to a ball dripping from a specific node assigned ball NB (see Table 1, FIG. 20A).
[0047]
As shown in FIG. 9, in the node assigned ball subroutine, in step 252, it is determined whether or not the status flag nbfl of the node assigned ball NB to be processed is normal. If the determination in step 252 is affirmative, in the next step 254, it is determined whether or not the hit flag shfl of the processing target node assigned ball NB is 1. If the determination is negative, the process proceeds to step 257, where an affirmative determination is made. In step 256, a node correction processing subroutine for correcting the motion data of the node N to which the processing target node belonging ball NB belongs (assigned) acquired in step 112 according to the impact of the bullet ball BB is executed. To do.
[0048]
As shown in FIG. 10, in the node coordinate correction processing subroutine, in step 302, it is determined whether or not the rotation angle of the node assigned ball NB to be processed has already been calculated. If the determination is negative, in the next step 304, a rotation angle is calculated to represent the back-up of the character c due to the impact of the bullet ball BB hit.
[0049]
As shown in FIG. 23, when the bullet ball BB hits the hit point H, the hit point H has a torque that is the outer product of (vector r from the node N1 to the hit point H) and (vector F representing force). T occurs. At this time, in order to represent the warping of the character c, it is assumed that the node C1 rotates about the node N1 that is the central node of the character c. The vector F is a velocity vector V of the bullet ball BB calculated in step 146 for convenience.BEach component value of (x, y, z) may be used as it is, or may be calculated by multiplying the direction vector of the bullet ball BB calculated in step 146 by a predetermined scalar value.
[0050]
For example, when the (x, y, z) components of the vector r and the vector F are (0, 10, -2) and (9, 2, -4), respectively, the torque T acting on the node N1 is T = ( 0, 10, −2) × (9, 2, −4) = (− 36, −18, −90), and the rotation amount A around the node N1RIs {(−36)2+ (-18)2+ (-90)2}1/2= 98.6. Rotation amount ARSince the value is large to set the rotation angle A to 98.6 as it is, it is calculated as 1/10. In order to properly represent the back-and-forth of the character c due to the impact of the bullet ball BB in the game, it is preferable that the back-and-forth angle of the character c is 30 degrees or more, so the rotation angle A = 30 + 9.86 = 39.86. Calculate as (degrees). When the rotation angle A exceeds 60 (degrees), the rotation angle A is set to a maximum value of 60 (degrees) in order to appropriately represent the game.
[0051]
In step 306, the advance rotation angle and the return rotation angle per unit time (1/60 second) are calculated and stored in the RAM. That is to say, in the case of the above example, since it is felt strange if the back-up of the character c when the bullet ball BB hits is drawn in one frame, the rotation amount A = 39.86 (degrees) in 10 frames. (Advance rotation angle per unit time Aa = 39.86 / 10 = 3.986 (degrees)), and returns to the original coordinate position of node N (obtained in step 112) in 30 frames (unit time) Winning return rotation angle Ar = 39.86 / 30 = 1.32 (degrees)). Further, the nodes N8 and N9 lower than the node N7 also rotate in the same manner as the node N7 based on the hierarchical information shown in FIG. Accordingly, in step 306, only the advance rotation angle Aa and the return rotation angle Ar of the node N to be processed first among these nodes are calculated and stored in the RAM. In order to determine whether or not the rotation angle has already been calculated in step 302, when the hit flag shfl of the processing target node assigned ball NB is 1, the predetermined area of the RAM stored (stored) in step 306 is referred to. do it.
[0052]
In step 308, in order to grasp the rotation state in the current frame, the rotation angle counter rotc is incremented by 1. In the next step 310, it is determined whether or not the rotation angle counter rotc is 10 or less. If the determination is affirmative, in step 312, the motion data of the node N to be processed acquired in step 112 is rotated by the advance rotation angle Aa stored in the RAM in step 306, and the node correction processing subroutine is terminated to complete FIG. Proceed to step 257. Such motion data correction (node correction) can be calculated by multiplying the matrix containing the motion data and the matrix containing the rotation angle, as is well known in the above-described “three-dimensional computer graphics” or the like. . On the other hand, if a negative determination is made, it is determined in the next step 314 whether or not the rotation angle counter rotc is 40. If a negative determination is made, in step 316 the motion data of the node N to be processed acquired in step 112 is determined. Is rotated by the return rotation angle Ar stored in the RAM in step 306, the node correction processing subroutine is terminated, and the process proceeds to step 257 in FIG. 9. If the determination is affirmative, in step 318, the impact of the bullet ball BB is affected. Assuming that there is no more, the hit flag shfl is changed from 1 to 0, the node correction processing subroutine is terminated, and the routine proceeds to step 257 in FIG.
[0053]
In step 257, the node affiliation ball NB to be treated is placed (assigned) to the affiliation node. As shown in FIG. 25, for example, the node assigned ball NB arranged at the node N1DAs an example, the motion data matN1 of the node N1 includes scale information (x, y, z) = (1, 1, 1), (global) position information (x, y, z) = (30, 120, 0) and rotation information (x, y, z) = (0, 0, 0), which are acquired as motion data in the current frame at step 112 (or corrected at step 306). ). Node belonging ball NB belonging to node N1DScale information (x, y, z) = (20, 30, 20) and position information (x, y, z) = (0, 10, 10) for the node N1 are constant and predetermined, and the matrix matCDIt can be expressed as Matrix matCDCan be obtained by, for example, creating static model data before creating game data. Node belonging ball NBDIs the matrix matCDIs assigned to the node N1. Node belonging ball NBDThe object information in global coordinates is matNBD= MatN1 ・ matCDIt can be calculated with. That is, the node belonging ball NBDCenter position C in global coordinatesDIs (30, 130, 10), and the scale (size) is (20, 30, 20). FIG. 25 shows an example of matN1 in the case of rotating around the y axis in relation to the above-described steps 312, 316, and the scale information is other than (1, 1, 1). Further, the central coordinates C of all the node belonging balls NB in step 152, which are not described in detail, are multiplied by a matrix of 4 rows and 4 columns as in this step, or in order to reduce the calculation load, The calculation can be performed by adding only the position information in the matrix.
[0054]
In the next step 258, a breathing process for changing the size of the node assigned ball NB to be processed is performed. For example, the node belonging ball NBDIs (20, 30, 20), the node assigned ball NB is periodically changed to a size of 1.5 times (30, 45, 30) every vertical blanking period. . That is, the scale information is changed to 1.1 times, 1.2 times,..., 1.5 times for each vertical blanking period, and then 1.4 times, 1.3 times,. Repeat the cycle changed to 0 times. By storing data of the size of the previous vertical blanking period in the RAM, change data of the current scale information can be obtained. By such processing, the size of each node assigned ball NB is changed, and it is possible to draw a state where the character c is breathing.
[0055]
Next, in step 260, it is determined whether or not the node assigned ball NB to be processed is a node assigned ball that generates a drop ball DB. As shown in FIGS. 20A and 20B, in this example, the node assigned ball NB assigned to the nodes N9 and N11 is a node assigned ball that generates a drop ball DB. If the determination is negative, the node assigned ball processing subroutine is terminated and the process proceeds to step 122 in FIG. 5. If the determination is affirmative, in the next step 262, it is determined whether or not the drop ball flag dbfl is zero. If the determination in step 262 is negative, the node assigned ball processing subroutine is terminated and the routine proceeds to step 122 in FIG. On the other hand, when an affirmative determination is made at step 262, the dropped ball flag dbfl is changed from 0 to 1 at the next step 264, the node assigned ball processing subroutine is terminated, and the routine proceeds to step 122 of FIG. Thereby, a drop ball DB is generated.
[0056]
If the determination in step 252 is negative, it is determined in step 266 whether or not the status flag nbfl of the node assigned ball NB to be processed is “explosion”. If the determination in step 266 is affirmative, in the next step 268, it is determined whether or not the diffusion start time of the processing target node assigned ball NB calculated in step 188 has elapsed. Since they are not in order, the node assigned ball processing subroutine is terminated and the routine proceeds to step 122 in FIG. 5. When an affirmative determination is made, the position of the node assigned ball NB is calculated at step 270. As mentioned above, the diffusion rate VSIs above the ground when VS= VS-1Calculate with -g · δt, but stop when it reaches the ground. The position of the node assigned ball NB is the diffusion velocity vector VSIs obtained by the Euler's equation of motion (Pt= Pt-1+ VS-1.Delta.t). Vs-1Is the diffusion speed at the time of the previous vertical blanking interruption, g is the gravitational acceleration, δt is the vertical blanking interruption time (1/60 seconds), PtIs the current position, Pt-1Represents the position at the time of the previous vertical blanking interruption.
[0057]
Next, at step 272, the position P of the node assigned ball NB to be processed calculated at step 270 is displayed.NIt is determined whether or not the y component is 0 or smaller than 0. If the determination is negative, in step 274, a shape changing process is performed to change the node belonging ball NB to be processed into an oval. For example, the scale information before the start of diffusion of the processing target node assigned ball NB is (20, 30, 20), and the current diffusion speed VSIs the x, y, z component (3, 4, 5), the diffusion rate VSA satisfying 20 × 30 × 20 = (20 + a) × (30 + a) × (20 + 5) is calculated using the numerical value of the z component having the largest absolute value among the x, y, and z components of (a = −) 2.5), the scale information of the node belonging ball NB to be processed is set to (20-2.5, 30-2. 30-2.30-2.30) so that the volume before diffusion of the node assigned ball NB and the volume during diffusion are substantially the same. 5, 20 + 5) = (18.5, 27.5, 25), the node assigned ball processing subroutine is terminated, and the routine proceeds to step 122 in FIG. The diffusion rate VSDecays to VSAt the moment when = 0, the node belonging ball NB to be processed becomes the same as the scale information before starting diffusion (20, 30, 20).
[0058]
On the other hand, if the velocity of the y component of the node assigned ball NB calculated in step 270 (or step 280 described later) is 3 (m / s) when the node assigned ball NB naturally falls, the absolute velocity of the y component is absolute. Focusing on the value, a satisfying 20 × 30 × 20 = (20 + a) × (30 + 3) × (20 + a) is calculated (a = −1), and the volume of the node-affiliated ball NB before diffusion and the natural falling The scale information of the node assigned ball NB to be processed is calculated as (20-1, 30 + 3, 20-1) = (19, 33, 19) so that the volume is substantially the same (FIG. 32B). (See FIG. 5), the node assigned ball processing subroutine is terminated and the routine proceeds to step 122 in FIG. In this case, a may be calculated as 20 × 30 × 20 = (20 × a) × (30 × 1.1) × (20 × a). At this time, 30 × 1.1 has the same meaning as 30 + 3.
[0059]
Thus, the diffusion rate VSAccordingly, the scale information of the node assigned ball NB to be processed is determined and becomes the object information of the node assigned ball NB in the “explosion” state together with the position information calculated in step 270 (or step 280 described later). The matrix matNB can be obtained.
[0060]
On the other hand, when a negative determination is made in step 272, in step 276, the state flag nbfl of the node assigned ball NB is set to “crawl” and stored in the RAM, and then the node assigned ball processing subroutine is terminated and step 122 in FIG. Proceed to Here, as shown in FIG. 26, “crawl” means that the node N3 or the node N5 of the foot of the character c at a predetermined constant speed V (scalar value) after the node belonging ball NB reaches the ground. This refers to moving to the position of the node N to which it originally belongs, via the node N constituting the hierarchy, as shown in FIG. 20B after reaching the node N3 or the node N5. For example, the node belonging ball NB shown in FIG.AWhen the status flag nbfl of the node becomes “scrambled”, the node belonging ball NBACrawls the ground toward the node N3 in the shape when it reaches the ground, and after reaching the node N3, moves to the position of the node N7 to which it belongs via the nodes N2 and N1. Further, in the case of the node assigned ball NB belonging to the node N10 arranged on the opposite side to the node N7, after hitting the ground toward the node N5 in the shape when reaching the ground, after reaching the node N5 , Move to the position of the node N10 to which it belongs via the nodes N4, N1, and N7. Therefore, according to the hierarchical information shown in FIG. 21, the node that is the target to reach and the node that passes through are different from the left and right nodes to which the node assigned ball NB is assigned.
[0061]
If the determination in step 266 is negative, it is determined in step 278 whether or not the status flag nbfl of the node assigned ball NB to be processed is “collapsed”. If the determination is affirmative, in step 280, the position of the node assigned ball NB to be processed is calculated. In “collapse”, a state is drawn in which the node belonging ball NB to be processed falls naturally from the character c. For this reason, the x component and the y component immediately before the state flag nbfl of the processing target node assigned ball NB becomes “collapsed” (in the “normal” state), similarly to the calculation when it is above the ground in step 270. , Z components are maintained as they are. At the time of the next vertical blanking interrupt (after 1/60 seconds)t-1Current y component velocity V used ast= -G · δt + Vt-1Are also calculated and stored in the RAM, and the process proceeds to step 272.
[0062]
On the other hand, when a negative determination is made at step 278, that is, when the status flag nbfl of the processing target node assigned ball NB is “crawl”, the position of the processing target node assigned ball NB is calculated at step 282. Since the motion data of the positions of the nodes N3 and N5 is changed for each frame, the direction in which the node assigned ball NB to be processed hits the ground is different for each vertical blanking interrupt. Therefore, the direction vector V is calculated from the current position (target) of the node N3 (or node N5) and the position of the node belonging ball NB to be processed at the previous vertical blanking interruption by the matrix matN3 (or matN5).UAnd multiplying by the velocity V represented by the scalar value, the velocity vector Vcr(Vcr= V ・ VU) Is stored in the RAM. (Center) position P of the node belonging ball NB to be processedcrIs Pcr= Pt-1+ Vcr-It can be calculated by δt. When the node belonging ball NB to be processed is hitting the ground, only the upper hemisphere of the elliptical node belonging ball NB on the television monitor 4 is displayed. Further, after reaching the node N3 (or the node N5), the arrival target is sequentially changed to the node N2 (or the node N4) and N1, and the position of the processing target node assigned ball NB is changed to the state flag nbfl “normal”. The position is calculated until the position is reached. Thereby, the matrix matNB that is the object information of the node belonging ball NB in the “crawl” state can be obtained.
[0063]
As described above, when the node assigned ball NB reaches the node N3 (or the node N5), the ball belongs to the node N2 (or the node N5). In other words, the y component of the node assigned ball NB is greater than zero. Accordingly, in step 284, it is determined whether or not the y component of the position information of the node belonging ball NB is greater than 0. If the determination is negative, the node belonging ball processing subroutine is executed in order to continue the state of scooping the ground. 5 and proceeds to step 122 in FIG. 5. If the determination is affirmative, in the next step 286, the position of the processing target node assigned ball NB in “normal” is calculated (see FIG. 22 and FIG. 25). In step 288, it is determined whether or not the current position of the node belonging ball NB to be processed is within a predetermined radius of the position “normal” calculated in step 286, so that the node belonging ball NB to be processed is in the normal position. It is determined whether or not the process has returned to. If a negative determination is made, the node assigned ball processing subroutine is terminated in order to continue the state where the nodes N are being crawled, and the process proceeds to step 122 in FIG. On the other hand, if the determination is affirmative, in the next step 290, the status flag nbfl of the processing target node belonging ball NB is set to “normal”, the power nbp of the processing target node belonging ball is set to 100, and the node belonging ball processing is performed. The subroutine is terminated and the routine proceeds to step 122 in FIG.
[0064]
Next, the ground ball GB will be described with reference to FIG. The ground ball GB is composed of four small ground balls GBa, GBb, GBc, GBd disposed on the ground (the y component of the position information is 0). When each small ground ball GBa to GBd is separated, the ground ball GB becomes plural and feels strange. Therefore, the scale information and position information of each small ground ball is adjusted for each frame to form one ground ball GB. . For this reason, the small ground balls GBa to GBd are associated with the node N3 or the node N5, and the concept of a virtual spring is introduced. That is, the centers of the small ground balls GBa and GBb and the node N5, and the centers of the small ground balls GBc and GBd and the node N3 are connected via virtual springs. In addition, the centers of the small ground balls GBa and GBb and the centers of the small ground balls GBc and GBd are connected by another virtual spring.
[0065]
As shown in FIG. 11, in the ground ball processing subroutine, in step 322, it is determined whether or not the processing of all the small ground balls has been completed. The position at the time of the previous vertical blanking interruption of the ball and the current position of the node N associated with the target small ground ball are read, and in step 326, the acceleration α acting on the target small ground ball is calculated.
[0066]
As shown in FIG. 27B, taking the small ground ball GBa as an example, the distance x between the center of the node N5 and the small ground ball GBa can be obtained from the position read in step 324. For the virtual spring, k is a preset spring constant, and the acceleration received from the node N1 is α1Then F = −kx = mα1The force F is acting. If the mass m of the small ground ball GBa is 1, the acceleration α1Is α1= -Kx. As described above, another virtual spring exists between the small ground balls GBa and GBb. Acceleration α by this virtual spring2To calculate the distance x between the target small ground ball GBa and small ground ball GBb at the time of the previous vertical blanking interruption. Acceleration α2F = −kx = α2(M = 1). Acceleration α is acceleration α1And acceleration α2Can be obtained for each (x, y, z) component.
[0067]
Next, at step 328, the velocity V of the target small ground balltVt= Vt-1+ ΑδtTo calculate the x component and the z component and store them in the RAM. In this equation, Vt-1Represents the speed of the small ground ball at the time of the previous vertical blanking interruption. Since the y component of the position information of the ground ball GB is always 0, there is no need to calculate (Vt= (X, 0, z)).
[0068]
In the next step 330, the scale and speed V at the time of the previous vertical blanking interruption of the target small ground ball.t-1Is read and the speed V calculated in step 328 is read.tThe size of the subject small ground ball is calculated and stored in the RAM as the current scale. For example, the scale at the time of the previous vertical blanking interruption of the small ground ball GBa is (20, 0, 30) and the speed Vt-1When is (10, 0, 5), the speed Vt-1In order to maintain the same size (area) of the small ground ball GBa, paying attention to the x component (10) having a large absolute value among the x and z components, 20 × 30 = (20 + 10) × (30−a ) To calculate the scale of the z component of the current small ground ball GBa (a = 10). By this calculation, the scale of the current small ground ball GBa is (30, 0, 20). The current position of the small ground ball GBa is the position at the time of the previous vertical blanking interruption (see step 332 described later).
[0069]
Therefore, in steps 324 to 330, when the distance from the small ground ball increases due to the movement of the node N3 (or node N5), the force F by the virtual spring increases (the acceleration α of the small ground ball GBa and the small ground ball). Speed V at which GBa follows node N3 (or node N5)tAs a result, the scale of the small ground balls is changed so that the scale of the small ground balls increases in the direction in which the acceleration α acts. Therefore, the tendency that the small ground balls do not separate from each other can be maintained, and one ground ball GB is used. Can be drawn.
[0070]
Next, at step 332, the latest position P of the target small ground ball.tIs calculated and stored in the RAM, and the process returns to step 322. Latest position PtIs Pt= Pt-1+ Vt-It can be calculated by δt. Pt-1Represents the position of the target small ground ball at the time of the previous vertical blanking interruption. If the determination in step 322 is affirmative, the node assigned ball processing subroutine is terminated and the routine proceeds to step 122 in FIG.
[0071]
As shown in FIG. 12, in the tentacle ball processing subroutine, in step 336, the base position P of the tentacle ball TB is set.0(See also FIG. 20A). Base position P of tentacle ball TB0Is the node affiliation ball NBEWhen the state flag nbfl of “N” is “normal”, a specific node assigned ball NB (in this example, the node assigned ball NB assigned to the node N7 and placed on the shoulder of the character c)E) (For example, (50, 120, 100)). However, the node affiliation ball NBEWhen the state flag nbfl is “explosion” (exactly after the start of diffusion), “collapse” or “crawl” (precisely, whisper when y = 0), the base position P of the tentacle ball TB0Is located on the surface of the ground ball GB as (50, 0, 100) where the y component is 0. Base position P of tentacle ball TB0Is the node affiliation ball NBEAs long as the state flag nbfl is “crawl” and y = 0, even if the vertical blanking interrupt is repeated, it remains unchanged and the node belonging ball NBEWhen the status flag nbfl of the “scramble” is y> 0 and the node belonging ball NBEThe center of
[0072]
Therefore, the base position P of the tentacle ball TB0Is the node affiliation ball NBEWhen the status flag nbfl of the node is other than “normal”, the node belonging ball NBEIs “explosion” (after the start of diffusion), “collapse”, or subsequent “crawl”, it is drawn so as to be fixed to the ground ball GB, and the ball belonging to the node NB by “crawl”EWhen the y component of becomes larger than 0, the node belonging ball NBENB sticks to the center of the original ball NBEIt is drawn to return to the position of.
[0073]
In the next step 338, the tip position P of the tentacle ball TB is reached.5Is calculated. As shown in FIG. 20A, the tip position P of the tentacle ball TB5When a player character exists, it can be set to follow the movement of the player character so as to threaten the player character. In this example, it is assumed that there is no player character. The tip position P of the tentacle ball TB toward the virtual camera5The player is intimidated by moving. That is, the invisible target point PδtIs set as motion data in advance, and the target point P at the time of the previous vertical blanking interruptionδt-1A position separated from a certain interval (for example, (10, 10, 10)) from the position (see FIG. 29C) is the tip position P of the tentacle ball TB.5Is calculated as
[0074]
As shown in FIG. 20A, the tentacle ball TB has a base position P.0And tip position P5It is drawn as a smooth curve using a Bezier curve. As shown in FIG. 29A, a Bezier curve generally has four points (P0, P1, P2, P3). In this example, more than four intermediate points are used to realistically represent the tentacle ball TB. In this case, as shown in FIG. 29B, if the Bezier curves formed by four points are connected as they are, the point P3Becomes a discontinuous point (not smooth). For this reason, as shown in FIG.2And point P3Point P in the middle2'Is present, and the tentacle ball TB is drawn with a smooth curve.
[0075]
As shown in FIG. 30A, the base, tip, and intermediate point of the tentacle ball TB are connected by a virtual spring. Now, midpoint P1Paying attention to the current intermediate point P1More specifically, when calculating the position of the intermediate point P, as shown in FIG.1Force F that workedδt-1Is Fδt-1= F01+ F02Is represented by a vector. Force F01, F02Is the base position P at the time of the previous vertical blanking interruption.0Virtual spring and intermediate point P connected to2Virtual springs connected to the intermediate points P1It represents the force that was acting on. Force F01Is the base position P at the time of the previous vertical blanking interruption.0And the intermediate point P at the time of the previous vertical blanking interruption1X is the distance to the position of k, the spring constant of the virtual spring is k, the base position P0Intermediate point P at the time of the previous vertical blanking interruption by a virtual spring connected to1Acceleration of α01Then, F01= -Kx = mα01Can be obtained as If mass m = 1, acceleration α01Is α01= −kx. Similarly, force F02Is F02= -Kx = mα02Can be obtained as Α02Is the midpoint P2Intermediate point P at the time of the previous vertical blanking interruption by a virtual spring connected to1Represents the acceleration. Therefore, the intermediate point P at the time of the previous vertical blanking interruptionmAcceleration α that worked ont-1Is αt-1= Α01+ Α02Can be obtained. Intermediate point P1Is the acceleration αt-1Move in the direction of. Thus, using the acceleration, speed, and position at the time of the previous vertical blanking interruption, the intermediate point P1The calculation of each intermediate point including the base position P0To midpoint P1, P2... P4Direction and tip position P5To midpoint P4, P3... P1Base position P in both directions0, Tip position P5This is to draw a state in which the fluctuation of the position is transmitted to the adjacent intermediate point in order via the virtual spring every 1/60 seconds.
[0076]
In step 340, the intermediate point P at the time of the previous vertical blanking interruption1, P2, P2', P3, P4(Hereinafter, when these intermediate points are collectively referred to as intermediate points PmThat's it. Acceleration α that worked ont-1, Speed Vt-1And the intermediate point P at the time of the previous vertical blanking interruptionmPosition Pt-1Is read out and the intermediate point P is read.mCurrent position PtIs calculated. Current midpoint PtIs at the current midpoint PmV speedt(= Vt-1+ Αt-1・ Δt), Pt= Pt-1+ Vt-1・ It is given by δt.
[0077]
In the next step 342, as shown in FIG.mCurrent position PtForce F working intTo acceleration αtAnd speed VtTo calculate the current position PtAt the same time, it is stored in the RAM to prepare for the calculation in step 340 at the next vertical blanking interrupt. Next, at step 344, the base position P calculated at steps 336, 338, and 340 is obtained.0, Tip position P5, Intermediate point PmIn step 346, the tentacle ball TB is placed on the Bezier curve, the tentacle ball processing subroutine is terminated, and the process proceeds to step 122 in FIG. The thickness (diameter) of the tentacle ball TB is determined in advance. By introducing the concept of the virtual spring to the tentacle ball TB, the tentacle ball TB expands and contracts (base position P).0, Tip position P5, Intermediate point PmThe distance between them will fluctuate). For this reason, in this example, the tentacle ball TB has the base position P of the tentacle ball TB so as to be inversely proportional to the expansion and contraction of the tentacle ball.0, Tip position P5, Intermediate point PmThe thickness is changed between.
[0078]
As shown in FIG. 13, in the bullet ball processing subroutine, it is determined whether or not the direction vector of the bullet ball BB is 0 (see step 164 in FIG. 6). If the determination is negative, the bullet ball processing subroutine is terminated. Proceeding to step 122 in FIG. 5, if the determination is affirmative, the bullet ball counter bbc is incremented by 1 in step 354, and in the next step 356, it is determined whether the bullet ball counter bbc is 180 or not. The bullet ball counter bbc reaches 180 after 180 × 1/60 = 3 (seconds) after the bullet ball direction vector becomes zero.
[0079]
If the determination is affirmative, in the next step 358, the position of the bullet ball BB after hitting the node assigned ball NB is calculated. The position of the bullet ball BB before hitting has already been calculated in steps 148 and 150 in FIG. As shown in FIG. 32 (A), when the bullet ball BB hits the node assigned ball NB, the direction vector becomes 0, so that the hit point H is the center of the bullet ball BB and bites into the node assigned ball BB. The node belonging ball BB that has hit but moves is moved on the global coordinates because the position of the node N to which it hits is updated every frame, and as a result, the bullet ball BB also moves on the global coordinates. . Therefore, in step 358, the coordinate system (x, y, z) of the hit point H with the center of the node assigned ball NB hit in step 164 as 0 is calculated in advance, and the coordinate system (x, y, z Using z), as shown in FIG. 28, the position (50, 10, 130) on the global coordinate of the center of the bullet ball BB with respect to the center of the hitting node assigned ball NB is calculated. FIG. 28 shows an example in which the coordinate system (x, y, z) of the hit point H when the center of the node assigned ball NB is 0 is (1, 0, 0).
[0080]
In the next step 360, the density coefficient m_fCharge used when calculating the outer shape of the metaball, which will be described later, is changed from 1 to −1 as usual, the bullet ball processing subroutine is terminated, and the routine proceeds to step 122 in FIG. When the concentration coefficient m_fCharge is set to −1, the bullet ball BB becomes invisible as shown in FIG. 31 (B), and the portion where the bullet ball BB of the hit node assigned ball NB bites is punctured. It is drawn in the state.
[0081]
On the other hand, when a negative determination is made at step 356, the position of the bullet ball BB is calculated as in step 358 to determine whether or not the bullet ball counter bbc is 300. When a negative determination is made, the bullet ball processing subroutine is executed. When the determination is affirmative, the bullet ball state flag bbfl is set to 0 in step 366, the bullet ball processing subroutine is terminated, and the flow proceeds to step 122 in FIG. The bullet ball counter bbc reaches 300 five seconds after the bullet ball BB hits the node assigned ball NB. Accordingly, the bullet ball BB is displayed in a visible state for 3 seconds after hitting the node assigned ball NB, and then displayed in an invisible state for 2 seconds, that is, in a state where the node assigned ball NB has a hole.
[0082]
As shown in FIG. 14, in the fragment ball processing subroutine, in step 372, the fragment ball counter fbc is incremented by 1, and in the next step 374, it is determined whether fbc is 100 or not. If the determination is affirmative, the process proceeds to step 380. If the determination is negative, in step 376, the velocity vector of the fragment ball FB calculated in step 162, the fragment ball counter bbc, and the vertical blanking are located at the position where the fragment ball FB is generated. The current position (x, y, z) of the broken ball FB is calculated by adding the moving distance multiplied by the interruption time (1/60 seconds). Next, in step 378, it is determined whether or not the y component at the position of the fragment ball FB is 0 or less than 0. If the determination is negative, the fragment ball processing subroutine is terminated and the process proceeds to step 122 in FIG. At the time of determination, since the existence period (100/60 seconds) of the broken ball FB has elapsed or the ground has been reached, the broken ball FB to be processed is extinguished, and the broken ball processing subroutine is terminated, and FIG. Proceed to step 122. In this example, since the fragment ball FB is smaller than the drop ball DB and has a short existence period, it is during the diffusion, collapse, natural fall of the node belonging ball NB, or during the natural fall of the drop ball described later. Such shape change processing is lacking.
[0083]
As shown in FIG. 15, in the drop ball processing subroutine, the drop speed is corrected in step 392. As described above, the node assigned ball NB for generating the drop ball DB is set in advance, and the generation point (x, y, z) for generating the drop ball DB on the node assigned ball NB is also determined. On the global coordinates, the generation point of the drop ball DB can be calculated using the matrix shown in FIG. Since the drop ball DB naturally falls, the drop ball DB can be drawn by holding the x component and the z component of the drop ball DB at the time of occurrence as they are, and calculating the current position of the drop ball DB with respect to the y component. it can. The drop velocity (y component) of the drop ball DB is V V as in the case of Step 270.t= -G · δt + Vt-1-C ・ Vt-1・ Calculation can be performed by δt (see FIG. 32A). The drop ball DB receives a frictional resistance due to air due to a natural drop (C is a frictional resistance). As a result, the drop speed VtThe maximum value is 3.1 m / s (see FIG. 32B).
[0084]
In the following step 394, the scale information (shape) of the drop ball DB is changed. The scale information at the generation point of the drop ball DB is (10, 20, 10), and the current drop speed V calculated in step 392 is displayed.tAssuming that y component of 3 (m / s) is the drop velocity VtIs used to calculate the absolute value of a satisfying 10 × 20 × 10 = (10 × a) × (20 × 1.15) × (10 × a) (absolute value of a: 0.7) The scale of the drop ball DB is (10 × 0.7, 23, 10 × 0.7) = (7, 13, 7) so that the volume before the drop of the ball DB is substantially the same as that during the drop. ) (See FIG. 32B).
[0085]
Next, at step 396, the position of the drop ball DB is calculated. The y component at the current position of the droplet ball DB is P as in the case of step 270.N= Pt-1+ VS-1-It can be calculated by δt. Next, at step 398, the y component P of the current position of the droplet ball DB calculated at step 396 is displayed.NIs determined to be 0 or less than 0. If the determination is negative, the drop ball processing subroutine is terminated and the routine proceeds to step 122 in FIG. On the other hand, if the determination is affirmative, the droplet ball flag dbfl is set to 0 in the next step 400, the droplet ball processing subroutine is terminated, and the routine proceeds to step 122 in FIG. As a result, the target drop ball DB reaches the ground ball GB and disappears, and a new drop ball is generated at the generation point of the drop ball DB at the next vertical blanking interruption (step 264).
[0086]
Therefore, in the metaball update processing subroutine, all the metaballs existing in the current frame are in principle a three-dimensional virtual space (virtual frame) based on object information (a matrix of 4 rows and 4 columns) including scale information, position information, and rotation information. Primitively placed inside. As described above, the tentacle ball TB is arranged on the Bezier curve, so it is not in the form of a 4 × 4 matrix, but is arranged in the three-dimensional virtual space according to the object information specified by the Bezier curve. .
[0087]
In step 122 of FIG. 5, a concentration distribution processing subroutine for checking the concentration distribution of the metaballs arranged in the three-dimensional virtual space for each evaluation point is executed. Before the touch on the concentration distribution processing subroutine, it is used in the present embodiment. A concentration evaluation formula, evaluation points, and concentration evaluation inside the metaball will be described.
[0088]
In the present embodiment, the following equation (2) is used as a concentration evaluation equation for evaluating the concentration h (r) inside the metaball. In Expression (2), R represents the radius of the metaball, r represents the distance from the reference position of the metaball to the evaluation point, and m_fCharge represents the concentration coefficient of the metaball that takes 1 or -1. The reference position refers to a position where the density of the metaball is 1, for example, the center position in the case of an ellipse.
[0089]
[Expression 2]
Figure 2004062618
[0090]
As shown in FIG. 33, the metaball concentration h (r) according to the equation (2) has a quadratic function characteristic with respect to the distance r. Equation (2) is expressed as r2/ R2<Evaluation formula of concentration inside metaball used when <1>, and as is apparent from FIG.2/ R2When ≧ 1 (outside of the metaball), the concentration h (r) is zero.
[0091]
When the metaball concentration coefficient m_fCharge is 1 in the equation (2), a state in which two metaball spheres having a radius of 1 (R = 1) are partially overlapped (fused) is considered as shown in FIG. As shown in FIG. 4, the density distribution state is such that convex portions are formed at positions corresponding to the fused portions. FIGS. 34B and 34C show an equal density curve when this density distribution is viewed from directly above, and a fusion shape of two metaballs when the threshold value is 0.8. The threshold functions as a parameter for designating (specifying) the isodensity curve. In this embodiment, since the threshold value is used as a constant value (about 0.3) in the metaball drawing routine, when the metaball is regenerated in the rendering space, the shape becomes smaller than the scale information of the metaball. On the other hand, when two metaball spheres having a radius of 1 partially overlap each other, if one metaball sphere is given a concentration coefficient m_fCharge = −1, a state in which the one metaball is invisible is expressed. A state in which the surrounding density is lowered and a hole is formed in the fusion part of the other metaball sphere can be expressed (see FIG. 31B).
[0092]
As shown in FIG. 35A, the metaball MB is arranged in the three-dimensional virtual frame IB. The virtual frame IB is virtually divided into a large number of voxels Vx having a size of (Δx, Δy, Δz). For example, if the size of the virtual frame IB is (150, 150, 150) and 120 voxels exist in the x, y, and z directions, Δx, Δy, and Δz can be obtained as 150/120. Each voxel Vx is assigned a voxel index for identifying a voxel. For example, the index of the minimum value (1, 1, 1) is assigned to the voxel Vx having a vertex at the global coordinate (0, 0, 0) (the voxel on the lower left side in front of the page in FIG. 35A). Voxel Vx having a vertex at coordinates (150, 150, 150) (the voxel at the top right of the page in FIG. 35A) has a maximum value (nxmax, Nymax, Nzmax) Index is assigned. The vertex (grid) of each voxel Vx becomes a density evaluation point to be evaluated by the equation (2). The density h (r) on the outermost side of the virtual frame IB (the surface that defines the virtual frame IB) is set to zero.
[0093]
Next, density evaluation will be described using an ellipse frequently used as the shape of the metaball in this embodiment as an example. P0(X0, Y0, Z0) Is the center of the ellipsoid, P (x, y, z) is an arbitrary point, X≡xx0, Y≡yy0, Z≡z−z0The ellipsoidal shape is represented by the following equation (3) (r / R)2Is given as a constant surface.
[0094]
[Equation 3]
Figure 2004062618
[0095]
In the concentration evaluation, (r / R)2<It is necessary to obtain the value of the density h (r) according to the formula (2) for all voxel vertices in 1. When the object is dynamically drawn with the metaball, the density h (r) is set to It must be calculated at high speed.
[0096]
In Formula (3), when Z is fixed, (r / R)2(X, Y) that gives the minimum value of can be obtained by assuming that the value obtained by partial differentiation of equation (3) by X and Y is 0, as shown in the following equation (4). When Z and Y are fixed, (r / R)2X which gives the minimum value of can be obtained by setting a value obtained by partial differentiation of the expression (3) by X as 0, as shown in the following expression (5).
[0097]
[Expression 4]
Figure 2004062618
[0098]
(R / R)2Is evaluated for each voxel, first z is the z coordinate z of the center of the metaball0Move in the direction of increasing z and decreasing direction from z to (r / R)2(X, y) that gives the minimum value of the value is obtained by Equation (4), and the minimum value (r / R)2Stops moving z when 1 or exceeds 1. Then, for each z to move (r / R)2From the point that gives the minimum value of, move in the direction of increasing y and decreasing direction, and for each z, y, (r / R)2X which gives the minimum value of is obtained by the equation (5), and the movement of y is stopped when the minimum value exceeds 1. And x for each z, y (r / R)2And move in the direction of increasing and decreasing from the point that gives the minimum value of (r / R) in equation (3)2Are evaluated one after another, (r / R)2When the number exceeds 1, the evaluation ends. This calculation can be performed by taking any cross section of the expression (3) representing an ellipsoid (r / R)2It uses the property that the center of the value is the minimum and both sides rise monotonously like a quadratic curve, and the inside of the ellipsoid to be evaluated can be evaluated at high speed without excess or deficiency. . x is continuously changed (r / R)2(R / R)2Since is a quadratic expression, the difference between adjacent points is a linear expression of x. Therefore, if up to the second floor difference is taken, one section of (r / R)2This calculation loop can be obtained only by addition and subtraction.
[0099]
As shown in FIG. 16, in the density distribution processing subroutine, in step 502, the shape information of the metaball to be processed is read. The shape of the metaball includes an ellipse, a cylinder (capsule), a truncated cone (capsule), and the like, and a default value can be used for the shape information. Note that the density distribution processing subroutine of FIG. 16 is processing when the shape information of the metaball is an ellipse, but as described later, it is possible to evaluate the concentration by a calculation formula representing the solid shape of the metaball according to the shape information. is there.
[0100]
Next, in step 504, a preset voxel index (nx, Ny, Nz) Minimum value (1, 1, 1) and maximum value (nxmax, Nymax, Nzmax) And z-coordinate z of the center of the metaball0Starts calculation in the direction in which z decreases. First, z0The quotient of / Δz is the voxel index nz0As the remainder is rounded down. Therefore, the middle of the vertex of the voxel Vx may be the center position of the metaball MB. Next, in step 506, nz= Nz0To set a voxel index in the z direction.
[0101]
Next, at step 508, the first z coordinate z = n in the direction of decreasing z.zΔz and (r / R)2The coordinate of (x, y) where becomes the minimum value is calculated. In addition, xx according to Formula (5)0= {(De-bf) / (ab-d2)} (Z-z0) To the constant term c in this step (and step 522 described later).1Is-(de-bf) · z0/ (Ab-d2) + X0And yy0= {(Df-ae) / (ab-d2)} (Z-z0) To the constant term c2Is-(df-ae) · z0/ (Ab-d2) + Y0It becomes. Next, in step 510, nzIs nzIs determined to be 1 or more of the minimum value (see FIG. 35A). If the determination is negative, the process proceeds to step 520. , Z) (r / R)2Is calculated using equation (3), and in step 514, (r / R)2Whether or not is 1 or more. If the determination is affirmative, the process proceeds to step 520. If the determination is negative, the y processing subroutine is called in the next step 516.
[0102]
As shown in FIG. 17, in the y processing subroutine, in step 542, the current y coordinate is changed to y.0/ Voxel index ny0The remainder is rounded down to the voxel index n from the current y coordinate in step 544.yNy0And the first y coordinate y = n in the direction in which y decreases in the next step 546yCalculate Δy. Next, in step 548 (r / R)2X is the minimum value. In addition, according to the above-described formula (5), (xx0) =-{D (y-y0) + F (z-z0)} / A, the constant term c in this step (and step 564 described later).3Is (dy0+ Fz0) / A + x0It becomes. Next, in step 550, nyIs nyIn the case of a negative determination, the process proceeds to step 560. In the case of an affirmative determination, in the next step 552, (r / at (x, y, z) at this time is determined. R)2Is calculated using equation (3), and in step 554, (r / R)2Whether or not is 1 or more. If the determination is affirmative, the process proceeds to step 560. If the determination is negative, an x processing subroutine is called in the next step 556.
[0103]
As shown in FIG. 18, in the x processing subroutine, in step 602, the current x coordinate is changed to x.0/ Voxel index nx0The remainder is rounded down to the voxel index n from the current x coordinate in step 604.xNx0And the first x coordinate x = n in the direction of decreasing xxCalculate Δx. Next, in step 606, the write pointer is set to the current (nx, Ny, Nz) In step 608 (r / R) at (x, y, z) at this time2When x is reduced by Δx in the next step 610, (r / R)2Difference Δ (r / R)2And second-order difference Δ2(R / R)2Is calculated.
[0104]
Looking at Formula (3) for X, (r / R)2= AX2+2 (dY + fZ) X + C (C is a constant). Difference Δ (r / R) when X decreases by Δx2Is Δ (r / R)2= (R / R)2(X−Δx) − (r / R)2(X) = a (X−Δx)2+2 (dY + fZ) (X−Δx) + C− {aX2+2 (dY + fZ) X + C}, Δ (r / R)2= {(2a (−Δx)} x + {a (−Δx) +2 (dy + fz)} (− Δx) + c4Can be obtained as The constant term c4Is -2 (ax0+ Dy0+ Fz0) (− Δx). Similarly, (r / R) when x decreases by Δx22nd floor difference Δ2(R / R)2Is 2a (−Δx)2It becomes.
[0105]
Next, in step 612, nxIs nxIt is determined whether or not the minimum value is 1 or more. If a negative determination is made, the process proceeds to step 620;2Whether or not is smaller than 1 is determined. If a negative determination is made, the process proceeds to step 620. If an affirmative determination is made, in step 616, (nx, Ny, Nz) (R / R) at the RAM location corresponding to the voxel2The metaball density h (r) obtained from the above is written, and in the next step 618, the write pointer is decremented by 1, and the flow returns to step 612. At this time, nx= Nx-1, (r / R)2= (R / R)2+ Δ (r / R)2, Δ (r / R)2= Δ (r / R)2+ Δ2(R / R)2Is calculated as follows. That is, in step 610, (r / R)2Since the first floor difference and the second floor difference are calculated, nxEvery time decreases, the first floor difference is updated from the second floor difference and the previous first floor difference (r / R)2Can be calculated.
[0106]
In step 620, the voxel index nxNx0Set as +1 and the first x coordinate x = n in the direction of increasing xxΔx is calculated, and in step 622, the write pointer is set to the current (nx, Ny, Nz) And (r / R) at (x, y, z) at this time in step 6242Is calculated using equation (3), and in the next step 626, as in step 610, (r / R) when x increases by Δx2Difference Δ (r / R)2And second-order difference Δ2(R / R)2Is calculated. Δ (r / R)2Is 2a (Δx) x + {aΔx + 2 (dy−fz)} Δx + c5, Δ2(R / R)2Is 2a (Δx)2Can be obtained as The constant term c5Is -2 (ax0+ Dy0+ Fz0) Δx.
[0107]
Next, in step 628, nxIs nxMaximum value of nxmax(Refer to FIG. 35 (A)). It is determined whether or not it is smaller, and in the case of an affirmative determination, in the next step 630, (r / R)2Whether or not is smaller than 1 is determined. If the determination is affirmative, in step 632 (nx, Ny, Nz(R / R) at the memory (RAM) position corresponding to the voxel2The metaball density h (r) obtained from the above is written, and in the next step 634, the write pointer is incremented by 1, and the flow returns to step 628. As a result, nx= Nx+1, (r / R)2= (R / R)2+ Δ (r / R)2, Δ (r / R)2= Δ (r / R)2+ Δ2(R / R)2Is calculated as follows. That is, in step 626 (r / R)2Since the first floor difference and the second floor difference are calculated, nxEvery time increases, the first floor difference is updated from the second floor difference and the previous first floor difference (r / R)2Can be calculated. If a negative determination is made in step 628 or step 630, the x processing subroutine is terminated, and the process proceeds to step 558 in FIG. 17 (or step 574 described later).
[0108]
In step 558, nyIs decremented by 1 (ny= Ny-1), it returns to step 550. As a result, y and x (see steps 546 and 548) are calculated as y = y−Δy and x = x − (− d / a) Δy, respectively.
[0109]
In step 560, the voxel index n in the y directionyNy0Set as +1, and the first y coordinate y = n in the direction in which y increases in step 562yΔy is calculated, and in the next step 564, as in step 548, (r / R)2X is the minimum value.
[0110]
Next, in step 566, nyIs nyMaximum value of nymaxIt is determined whether or not it is smaller, and if affirmative determination is made, in step 568, (r / R) at (x, y, z) at this time2Is calculated using equation (3), and in the next step 570, (r / R)2Whether or not is 1 or more. When the determination is negative, in step 572, the above-described x processing subroutine is called and executed, and in step 574, nyIncrement 1 by (ny= Ny+1), it returns to step 566. At this time, calculation is executed with y and x (see steps 562 and 564) as y = y + Δy and x = x + (− d / a) Δy, respectively. When a negative determination is made at step 566 or when an affirmative determination is made at step 570, the y processing subroutine is terminated and the routine proceeds to step 518 (or step 532 described later) in FIG.
[0111]
In step 518, nzIs decremented by 1 (nz= Nz-1), it returns to step 510. Thus, z is decremented by Δz (z = z−Δz), and x and y are respectively x − {(de−bf) / (ab−d).2)} Δz, y − {(df−ae) / (ab−d)2)} Δz is executed.
[0112]
In step 520, the voxel index n in the z directionzNz0Set as +1 and the first z coordinate z = n in the direction of increasing z in step 522zΔz and (r / R) as in step 5082The coordinates of x and y at which is the minimum value are calculated. Next, in step 524, nzIs nzMaximum value of nzmaxIt is determined whether or not it is smaller, and if affirmative determination is made, in step 526, (r / R) at (x, y, z) at this time2Is calculated using equation (3), and in the next step 528, (r / R)2Whether or not is 1 or more. If the determination is negative, in the next step 530, the y processing subroutine described above is called and executed, and in step 532, nzIncrement 1 by (nz= Nz+1), it returns to step 524. At this time, z is incremented by Δz (z = z + Δz), and x and y are respectively x + {(de−bf) / (ab−d).2)} Δz, y + {(df−ae) / (ab−d)2)} Δz is executed. When a negative determination is made at step 524 or when an affirmative determination is made at step 528, the density distribution processing subroutine is terminated and the routine proceeds to step 118 of FIG.
[0113]
As described above, the metaball MB takes various shapes other than the ellipsoid. As shown in FIG. 36A, the metaball MB is P.0(X0, Y0, Z0), P1(X1, Y1, Z1) Is the end point, and both ends are rounded into a hemispherical shape and the radius R is a straight line P0P1The upper point is Pt(Xt, Yt, Zt) (T: parameter), point PtIs Pt= P0+ Vec (V01) T. Where vec (V01) ≡P1-P0And vec (V01) Is the vector V01Represents. A straight line P from an arbitrary point P (x, y, z)0P1The leg of the perpendicular dropped to t = vec (V01) ・ Vec (V0P) / {Vec (V01)}2P whentThis is the top point. At this time, the straight line P0P1The distance r from is r2= [{Vec (V01)}2・ {Vec (V0P)}2− ({Vec (V01) ・ Vec (V0P)}2] / {Vec (V01)}2It becomes. Where vec (V0P) ≡PP0It is. Actually a line segment P instead of a straight line0P1Since r is an object, when the parameter t is t ≦ 0, r2= {Vec (V0P)}2When t ≧ 1, r2= {Vec (V1P)}2(See FIG. 36B). Therefore, the reference position is the center line.
[0114]
In summary, vec (V01) ・ Vec (V0P) ≦ 0 (part a in FIG. 36B), r2= {Vec (V0P)}2, 0 <vec (V01) ・ Vec (V0P) <{Vec (V01)}2In (b part of FIG. 36 (B)) r2= [{Vec (V01)}2・ {Vec (V0P)}2− ({Vec (V01) ・ Vec (V0P)}2] / {Vec (V01)}2, Vec (V01) ・ Vec (V0P) ≧ {vec (V01)}2In (c part of FIG. 36 (B)) r2= {Vec (V1P)}2It becomes. Note that vec (V1P) ≡PP1It is.
[0115]
Since generality is not lost,1≧ z0Assuming that z is fixed, r2(X, y) giving the minimum value of2Can be obtained at a point where the value obtained by partial differentiation of x with respect to x and y becomes 0, but z ≦ z as is intuitively clear.0Then (x, y) = (x0, Y0), Z0<Z <z1(X, y) = ({(x1-X0) (Z-z0) / (Z1-Z0)} + X0, {(Y1-Y0) (Z-z0) / (Z1-Z0)} + Y0), Z ≧ z0Then (x, y) = (x1, Y1)
[0116]
r when z and y are fixed2X giving the minimum value of is r2Can be obtained at a point where the value obtained by partial differentiation of x with respect to x becomes zero. Here, P is used to simplify the formula.0Relative variable, (X1, Y1, Z1) = (X1-X0, Y1-Y0, Z1-Z0), (X, Y, Z) = (xx0, Yy0, Zz0) And r2Is partially differentiated by x, vec (V01) ・ Vec (V0P) ≦ 02/ ∂x = 2X, 0 <vec (V01) ・ Vec (V0P) <{Vec (V01)}2Then ∂r2/ ∂x = {2 (Y1 2+ Z1 2) X-2X1(Y1Y + Z1Z)} / (X1 2+ Y1 2+ Z1 2), Vec (V01) ・ Vec (V0P) ≧ {vec (V01)}2Then ∂r2/ ∂x = 2 (XX1)
[0117]
Thus, the desired X is (Y1Y + Z1When Z) ≦ 0, X = 0, 0 <(Y1Y + Z1Z) <(Y1 2+ Z1 2) When X = X1(Y1Y + Z1Z) / (Y1 2+ Z1 2), (Y1Y + Z1Z) ≧ (Y1 2+ Z1 2) When X = X1It becomes.
[0118]
In actual density evaluation, it is a problem r2Since there is a single point (which may be a section) that is the smallest in any cross section, the surroundings have a property of rising monotonously. R2≧ R2If the calculation is finished at the point, the inside of the metaball MB can be calculated without excess or deficiency. Specifically, first z is (z0−R) ≦ z ≦ (z1Since + R) is a possible range, r for each z2Find (x, y) that minimizes. Next, move y around2Find x giving the minimum value of. R at that time2Is r2≧ R2If it becomes, stop moving y. Then move x around each y, r2≧ R2Calculate to the point. r2As can be understood from the expansion, the difference between the adjacent cases is at most quadratic because the difference between the adjacent points is at most x. Therefore, if the difference is taken to the difference, r in the continuous section of x2This calculation loop can be assembled by adding and subtracting. In addition, vec (V01) ・ Vec (V0P) Is a linear expression of at most x when expanded, and the difference at the point where x is adjacent is a constant, so it is handled in the same way. The case-by-case transition is vec (V01) ・ Vec (V0P) And vec (V01) ・ Vec (V0P) ≦ 0 → 0 <vec (V01) ・ Vec (V0P) <{Vec (V01)}2→ vec (V01) ・ Vec (V0P) ≧ {vec (V01)}2And vec (V01) ・ Vec (V0P) ≧ {vec (V01)}2→ 0 <vec (V01) ・ Vec (V0P) <{Vec (V01)}2→ vec (V01) ・ Vec (V0P) ≦ 0, it can be seen that the number of cases does not increase so much.
[0119]
In addition, as shown in FIG.0(X0, Y0, Z0), P1(X1, Y1, Z1)0Radius R from0, Point P1Radius R from1And when the truncated cone is rounded at both ends, the straight line P0P1The upper point is Pt(Xt, Yt, Zt) (T: parameter), point PtIs Pt= P0+ Vec (V01) T. Note that vec (V01) ≡P1-P0It is. Here, arbitrary points P (x, y, z) and PtR function for distance to2With the parameter t2= (PPt)2/ {(R1-R0) T + R0}2Think like this. The parameter t that minimizes this is K≡R0/ (R1-R0), Vec (V01) ≡ (P1-P0), Vec (V0P) ≡ (PP0) T = {Kvec (V01) + Vec (V0P)} ・ Vec (V0P) / {(Kvec (V01) + Vec (V0P)} ・ Vec (V01)
[0120]
Let the apex of the cone that touches the spheres at both ends be PF(XF, YF, ZF) PF=-{R0/ (R1-R0)} Vec (V01) + P0It turns out that it becomes. Where vec (VF0) ≡P0-PF, Vec (VFP) ≡PPFAnd so on, the parameter t is t = {vec (VF0) + Vec (V0P)} ・ Vec (V0P) / {Vec (VF0) + Vec (V0P)} ・ Vec (V01) = Vec (VFP) ・ Vec (V0P) / Vec (VFP) ・ Vec (V01) At this time, R2Is R2= (1 / R0 2) [{Vec (VF0)}2-{Vec (VFP) ・ Vec (VF0)}2/ {Vec (VFP)}2= {Vec (V0P) X vec (V01)}2/ (R1-R0)2{Vec (VFP)}2It becomes. “×” represents an outer product. For the part rounded at both ends, if t ≦ 0, R2= {Vec (V0P)}2/ R0 2, T ≧ 1, R2= {Vec (V1P)}2/ R1 2It becomes.
[0121]
In summary, when t ≦ 0, R2= {Vec (V0P)}2/ R0 2, 0 <t <1, R2= {Vec (V0P) X vec (V01)}2/ (R1-R0)2{Vec (VFP)}2, T ≧ 1, R2= {Vec (V1P)}2/ R1 2It becomes. R2A curved surface with a constant is a desired shape.
[0122]
Since generality is not lost,1≧ z0Assuming that z is fixed, r2(X, y) giving the minimum value of2Can be obtained at a point where the value obtained by partial differentiation of x with respect to x and y becomes 0, but z ≦ z as is intuitively clear.0Or z ≧ z1Then, (z-z0)2/ R0 2≦ (z−z1)2/ R1 2(X, y) = (x0, Y0), (Z-z0)2/ R0 2> (Z-z1)2/ R1 2(X, y) = (x1, Y1) And z0<Z <z1Then, (x, y) = ({(x1-X0) (Z-z0) / (Z1-Z0)} + X0, {(Y1-Y0) (Z-z0) / (Z1-Z0)} + Y0)
[0123]
R when z and y are fixed2X giving the minimum value of R is R2Can be obtained at the point where the value obtained by partial differentiation of x with respect to x is 0, details of the calculation are omitted, but when t ≦ 0 or t ≧ 1, (Y0P 2+ Z0P 2) / R0 2≤ (Y1P 2+ Z1P 2) / R1 2Where x = x0, (Y0P 2+ Z0P 2) / R0 2> (Y1P 2+ Z1P 2) / R1 2Where x = x1Where 0 <t <1, x = {(YFPYFP+ ZFPZFP) XF0/ (YFPYF0+ ZFPZF0)} + XFIt becomes. Where Y0P≡y−y0, Y1P≡y−y1, YFP≡y−yF, YF0≡y0-YFEtc. (Z**The same applies to. ).
[0124]
R in question during actual concentration evaluation2Has the property that the area where the cross section takes the minimum is one place (there may be a section) has the property of rising monotonously, so start the calculation from the point where it becomes the minimum and proceed to the surroundings R2If the calculation is finished at a point where ≧ 1, the inside of the metaball MB can be calculated without excess or deficiency. Specifically, first, z is min (z0-R0, Z1-R1) ≦ z ≦ max (z0+ R0, Z1+ R1) Is a possible range, R for each z2Find (x, y) that minimizes. Then move y around and R2Find x giving the minimum value of. R at that time2Is R2If ≧ 1, stop moving y. Then move x around each y, R2Calculate to the point where ≧ 1. R2As can be seen from the expansion, the end sphere portion is quadratic of x, and the difference between adjacent points of x is at most the primary of x. Therefore, if the difference is taken up to the difference, the R in the continuous section of x2The calculation loop can be assembled by adding and subtracting.
[0125]
The portion of the truncated cone has a shape of (second order of x) / (second order of x). Therefore, if the difference between the denominator and the numerator is taken up to twice, r of successive sections of x2The calculation loop can be constructed by adding and subtracting except for one division. In addition, the number of intermediate points t that is a guide for dividing the case, but when expanded, takes the form of (second order of x) / (first order of x). Since it is only necessary to make a comparison between t and 0, 1, it can be seen that if the denominator is paid, the case can be divided only by comparing the denominator, the numerator, and 0. Therefore, if the denominator is set to the difference and the numerator is set to the difference twice, the change of the case division in the continuous x section can be assembled only by addition / subtraction and magnitude comparison. As described above, in the density distribution processing subroutine, the density is calculated according to the three-dimensional shape of the metaball arranged in the virtual frame IB.
[0126]
If the determination in step 118 is affirmative, in step 124, it is checked whether the density at the vertex (evaluation point) of each voxel Vx is above or below the threshold value, and a set of points where the threshold value is constant (equal density surface). Martin cube processing is performed to represent a polygon with a polygon. That is, in the Martin cube processing, it is considered that a set of points (equal density surface) where the density h (r) has a constant value (threshold value) is expressed by polygons, and this equal density surface is to be expressed finally (reproduction). Defined) as the shape of the metaball MB. As shown in FIG. 35B, the virtual frame IB contains the entire character c made up of the metaball MB. The center of the virtual frame IB may be, for example, the thigh or the foot of the character c, but moves following the movement of the character c, and the size of the virtual frame IB is the size of the entire character c. The character c need not be in contact with the upper, lower, left and right outer diameters.
[0127]
As shown in FIG. 19, in the martin cube processing subroutine, it is determined in step 702 whether or not the processing has been completed for all voxels Vx using the voxel index described above. That is, as shown in FIG. 35 (B), a check is performed from the lower left voxel in front of the page, and it is determined whether or not the processing has been completed for the upper right voxel in the page.
[0128]
If a negative determination is made, in step 704, on / off of the vertex of the target voxel is detected based on a threshold value. That is, in order to examine how the target voxel and the metaball MB intersect, for the eight vertices of the target voxel, when the vertex density h (r) is higher than the threshold (inside the metaball MB), it is turned on. When the vertex density h (r) is lower than the threshold (outside the metaball MB), it is detected as off. In this step, since the voxels Vx are detected in order, only three vertices need to be newly examined. As described above, since the density is set to 0 on the outermost side of the virtual frame IB, it is sufficient to examine three vertices even when examining the (1,1,1) voxel Vx. FIG. 37 shows the vertices and the like of the voxel when the voxel Vx shown in FIG. 35B is the target voxel. Note that the density h (r) of each vertex of the target voxel changes for each frame in accordance with the motion of the character c and the like, and has already been calculated (steps 616 and 632 in FIG. 18).
[0129]
Next, in step 706, an edge for generating a vertex of the polygon is detected. That is, the side where the voxel and the metaball MB intersect (side including points a, b, c, and d in FIG. 37) is obtained. A voxel has 8 vertices, so the on / off combination of each vertex is 28= 256 ways. For example, if a number is assigned to each vertex, the vertex number is determined as an exponent part of 2, and the number of ON vertices is added, the index shown in FIG.1+23+25+27= 170. Since the index is a value from 0 to 255, a data table composed of 256 sets of isodensity surface data is prepared in advance. In this data table, (1) sides of voxels where polygon vertices are generated and (2) how the polygon vertices are connected to form equal densities are recorded for a set of equidensity surface data. Has been. For example, referring to FIG. 37, if the vertex AP0-AP1 is side 0, the vertex AP2-AP3 is side 1, the vertex AP4-AP5 is side 2, and the vertex AP6-AP7 is side 3. In the (index + 1) th portion of the data table, four {side 0, side 1, side 2, side 3} are recorded in the portion {circle around (1)}, and {side 0} is recorded in the portion {circle around (2)} above. , Side 1, side 2} and {side 1, side 2, side 3} are recorded. If three points are determined, a polygon surface can be generated, so that one side with one side is formed with {Side 0, Side 1, Side 2}, and one side surface with {Side 1, Side 2, Side 3}. . However, at this stage, the sides forming the polygon surface are specified, but the positions of the points a, b, c, and d on the sides have not been specified yet.
[0130]
Next, in step 708, the coordinates of the point where the target voxel and the metaball MB intersect are calculated from the side specified in step 706 and the density h (r) of the vertex of the target voxel. For example, the coordinates of the point a on the side 0 will be described in detail. As shown in FIG. 38, the density value of the vertex AP1 and the density value of the vertex AP0 are approximated to a linear shape, and the location corresponding to the threshold value is indicated by the point a. Position. It should be noted that the density h (r) of the apexes AP0, AP1, etc. changes from frame to frame with the movement of the character c, so that the density h (r) of the vertex of each voxel varies, and the slope of FIG. The position of etc. also fluctuates. Thus, in step 708, the positions of the points a, b, c, and d are specified, and as shown in FIG. 37, the two triangles of the points a, b, c and the points b, c, and d, that is, etc. A polygon surface composed of density surfaces is specified, and the process returns to step 702. If the determination in step 702 is affirmative, the martin cube processing subroutine is terminated and the routine proceeds to step 126 in FIG.
[0131]
In step 126, drawing data including polygon plane data acquired by the marching cube processing subroutine is sent to the image processing unit 23. Thus, the image processing unit 23 pastes the texture on the polygon surface, performs normal drawing processing such as light source processing, and sends the image data to the television monitor 4 at the vertical blanking interval. On the television monitor, the fused (or separated) metaball MB is dynamically drawn as an object.
[0132]
Next, in step 128, the motion cursor mc is incremented by 1 and the time t is incremented by 1. In the next step 130, it is determined whether or not the frame by the current motion cursor mc is the final frame of the motion. If the determination is negative, the drawing operation processing subroutine is terminated and the process proceeds to step 110 in FIG. 5. If the determination is affirmative, the motion cursor mc is set to 0 in step 132 and the next motion is specified to end the drawing operation processing subroutine. Then, the process proceeds to step 110 in FIG.
[0133]
In step 110, it is determined whether or not a predetermined button for ending the game is pressed in step 106. If a negative determination is made, the process returns to step 104. If an affirmative determination is made, the metaball drawing routine is ended.
[0134]
(Action etc.)
As described above, in the present embodiment, the coordinate position in the virtual frame IB is assigned to the node N by the motion data in the metaball update process, the node assigned ball NB is arranged in the node N (step 120), and the density distribution process The density h (r) is calculated by the equation (2) for each vertex of the voxel Vx from the reference position of the metaball MB toward the minimum direction and the maximum direction of the voxel index from the reference position of the metaball MB according to the calculation formula representing the three-dimensional shape (step 122). Then, the vertex coordinates of the polygon are calculated based on the density h (r) of the metaball MB at the vertex coordinates of the voxel Vx and a preset threshold value in the Martin cube processing (step 124), and the character c is generated.
[0135]
Expression (2) is simplified from the density evaluation formula of the prior art, and density calculation at the apex of the voxel VC can be performed at high speed. For this reason, the number of metaballs can be increased and a relatively complicated shape such as a game character can be drawn dynamically, and the isoconcentration curve obtained by equation (2) combines a plurality of metaballs. In this case, it is possible to express the rugged feeling of a game character, etc. with moderate unevenness, so that it is suitable for the expression of a game character, etc., compared to the case of statically drawing an object with a smooth curve pursuing curvy Can be realized. In particular, in the case of being composed of a plurality of metaballs as in the character c of the present embodiment, it is suitable for expressing a fine liquid feeling that the metaballs are fused and separated (even more if the liquid is viscous). Yes.
[0136]
Further, as shown in FIG. 19, in the Martin Cube process, a metaball equal density surface equal to a preset threshold value is calculated as a vertex of a polygon. At this time, the change of the metaball MB itself (its size, position, The number, density, etc.) can be sufficiently controlled dynamically by the program at the time of execution (steps 120 and 122 in FIG. 5), and polygon information that changes thereby can also be dynamically generated from zero at the time of execution. Yes (steps 704 to 708). This makes it possible to produce various kinds of expressions that could not be expressed by the morphing technology, as well as to improve the production process of game characters and the like. For example, if a change such as explosion or collapse of the metaball MB is to be realized by morphing, there is a difference (topological difference) that exceeds the limitations (1) and (2) described above between the two shape models of the start and goal. As a result, interpolation of the two shape models becomes impossible. In the present embodiment, since processing is performed as a change in the shape of the metaball and a change in the concentration distribution of the metaball in the Martin cube process, and the polygonal surface is dynamically generated according to the change, no restrictions imposed on the morphing occur. . Therefore, according to the present embodiment, it is possible to dynamically express the phase change of the polygon which cannot be realized by the morphing technique, and to increase the dynamic expressive power of the game character.
[0137]
In this embodiment, an example in which a game character is approximated to a person is shown. However, the present invention is not limited to this, and nodes correspond to animal joints, and between nodes correspond to animal skeletons. Needless to say, an arbitrary animal or the like can be represented as a game character by placing a node belonging ball at a node.
[0138]
In the present embodiment, the ground ball GB is shown as four small ground balls. However, the ground ball GB may be composed of one small ground ball. Furthermore, in the present embodiment, an example is shown in which the virtual spring connected to the small ground ball is connected to the nodes N3 and N5, but the virtual spring is connected to the node belonging ball NB belonging to the nodes N3 and N5. Further, a virtual spring may be connected to all between the small ground balls. Even if it does in this way, isolation | separation between small grounding balls can be prevented similarly to this embodiment. Further, in the present embodiment, an example in which the tentacle ball is configured by a metaball is shown, but it may be configured by a three-dimensional polygon model.
[0139]
Furthermore, in the present embodiment, the calculation formula is shown and illustrated when calculating the speed, acceleration, position, etc. of the node belonging ball NB. However, the table calculated by the calculation formula is prepared in advance and the table data is distributed. Thus, the speed or the like may be calculated.
[0140]
In the present embodiment, the example of changing the shape of the node belonging ball NB or the drop ball DB is shown in steps 274, 394, etc. However, for example, the shape is arbitrarily stretched in the velocity direction of the metaball such as the node belonging ball or the drop ball. Thus, the shape in the direction orthogonal to the speed direction may be reduced. In this way, the speed of the metaball can be expressed visually.
[0141]
Furthermore, in the present embodiment, an example is shown in which the constant velocity V is set when the node assigned ball NB hits the ground. However, when the node assigned ball NB hits the ground, a virtual spring is connected to the ground ball GB. You may be made to do. In this way, the speed is changed by the force of the spring (the speed is not constant), and the acceleration, position, etc. can be calculated using the equation of motion by the Euler method.
[0142]
Further, in the present embodiment, an example is shown in which the bullet ball BB hits the node assigned ball NB and then becomes invisible after a predetermined time has elapsed. For example, the density coefficient m_fCharge of the bullet ball BB is always invisible at −1. The bullet ball BB may be expressed by displaying a ball with a polygon model of the same size at the same coordinate position and displaying it in a state, and after hitting by erasing the ball with the polygon model after a predetermined time has passed A state in which a hole is formed in the node belonging ball NB (a hollow is formed) may be expressed.
[0143]
Furthermore, in this embodiment, when the density h (r) is calculated by the equation (2), the calculation is started from the z coordinate (step 504), and the y coordinate and the x coordinate are calculated. 16 to 18), the present invention is not limited to this. For example, it should be understood that the calculation may be started from the x coordinate.
[0144]
Furthermore, in the present embodiment, an example in which the number of voxels is 120 per side of the virtual frame IB is shown, but it goes without saying that the number of voxels may be different in the x, y, and z directions of the virtual frame IB. Absent. The number of voxels and the number of metaballs can be changed according to the processing speed of the CPU in order to dynamically draw the object. By increasing the number of voxels, the resolution of the regenerated object can be increased.
[0145]
Further, in the present embodiment, the recording medium 1 on which the game program or game data is recorded is read by the medium reading unit 22 to transfer the program to the RAM. However, the game program is stored in the ROM without the medium reading unit 22. And you may make it read a game program and game data from this ROM. In this way, a dedicated game machine can be obtained. In this embodiment, the CD-ROM is used as the recording medium. However, even a ROM cartridge that can be loaded into the RAM of the CPU block 20, a large-capacity disk, a magnetic optical disk, etc. It goes without saying that the present invention can be applied if a medium reading unit is provided.
[0146]
Also, in the present embodiment, an example is shown in which various calculations are performed within the vertical blanking interval interrupt process because it is performed at regular intervals, but it may be performed within the timer interrupt process or the main process. Good.
[0147]
【The invention's effect】
As described above, according to the present invention, the metaball is arranged at the node whose coordinate position is specified by the motion data by the metaball arranging means, the internal concentration of the metaball is calculated by the density calculating means, and the metaball is calculated by the game character generating means. Since the vertex coordinates of the polygon are calculated and a game character is generated, an effect that an object such as a character using a metaball can be dynamically drawn in the three-dimensional virtual space can be obtained.
[Brief description of the drawings]
FIG. 1 is a schematic perspective view showing a connection mode of a consumer game device.
FIG. 2 is a plan view of an input device used for a consumer game device.
FIG. 3 is a block diagram showing a schematic configuration of a game apparatus main body.
FIG. 4 is a flowchart of a metaball drawing routine executed by the CPU of the game apparatus main body according to the embodiment.
FIG. 5 is a flowchart of a drawing calculation processing subroutine showing details of step 108 of the metaball drawing routine.
FIG. 6 is a flowchart of a bullet ball related processing subroutine showing details of step 114 of the drawing calculation processing subroutine.
FIG. 7 is a flowchart of an explosion-related processing subroutine showing details of step 116 of the drawing calculation processing subroutine.
FIG. 8 is a flowchart of a metaball update processing subroutine showing details of step 120 of the drawing calculation processing subroutine.
FIG. 9 is a flowchart of a node assigned ball processing subroutine showing details of step 214 in the metaball update processing subroutine.
FIG. 10 is a flowchart of a node coordinate correction processing subroutine showing details of step 256 of the node assigned ball processing subroutine.
FIG. 11 is a flowchart of a ground ball processing subroutine showing details of step 218 of the metaball update processing subroutine.
FIG. 12 is a flowchart of a tentacle ball processing subroutine showing details of step 222 of the metaball update processing subroutine.
FIG. 13 is a flowchart of a bullet ball processing subroutine showing details of step 226 of the metaball update processing subroutine.
FIG. 14 is a flowchart of a fragment ball processing subroutine showing details of step 230 of the metaball update processing subroutine.
FIG. 15 is a flowchart of a drop ball processing subroutine showing details of step 232 of the metaball update processing subroutine.
FIG. 16 is a flowchart of a density distribution processing subroutine showing details of step 122 of the drawing calculation processing subroutine.
FIG. 17 is a flowchart of a y processing subroutine showing details of steps 516 and 530 of the density distribution processing subroutine.
FIG. 18 is a flowchart of an x processing subroutine showing details of steps 556 and 572 of the y processing subroutine.
FIG. 19 is a flowchart of a Martin cube processing subroutine showing details of step 124 of the drawing calculation processing subroutine.
20A and 20B are explanatory diagrams showing character nodes drawn with a metaball, where FIG. 20A shows the node positions of the characters displayed on the television monitor, and FIG. 20B shows the node numbers.
FIG. 21 is an explanatory diagram schematically showing hierarchical information of character nodes.
FIG. 22 is an explanatory diagram schematically showing a node assigned ball assigned to a character node;
FIG. 23 is an explanatory view schematically showing a force and a radius with respect to a torque generated when a bullet ball hits a node assigned ball.
FIGS. 24A and 24B are explanatory views schematically showing a state when a bullet ball hits a node assigned ball, where FIG. 24A shows a hit range and FIG. 24B shows generation of a fragment ball.
FIG. 25 is an explanatory diagram showing the position of a node and the position of a node belonging ball in global coordinates.
FIG. 26 is an explanatory diagram schematically showing a state in which a node assigned ball hits the ground.
27A and 27B are explanatory views showing a ground ball, wherein FIG. 27A shows the relationship between the small ground ball and the virtual spring, and FIG. 27B shows the force acting on the small ground ball.
FIG. 28 is an explanatory diagram showing a hit point of a bullet ball in global coordinates.
FIG. 29 is an explanatory diagram of a Bezier curve, where (A) is a Bezier curve composed of four points, (B) is a simple connection of Bezier curves composed of four points, and (C) is four points. The case where the Bezier curve which consists of is connected smoothly is shown.
30 schematically shows a virtual spring of a tentacle ball, (A) is a tentacle ball connected by a virtual spring, and (B) is an intermediate point P at the time of the previous vertical blanking interruption.1(C) is the intermediate point P1Indicates the force currently acting.
FIGS. 31A and 31B are explanatory diagrams showing the relationship between a bullet ball and a node assigned ball, where FIG. 31A shows a state when the density coefficient of the bullet ball is 1, and FIG. 31B shows a case where the density coefficient of the bullet ball is −1; Indicates the state.
FIGS. 32A and 32B schematically show changes in speed and shape due to a natural drop of a drop ball. FIG. 32A shows a case where no frictional resistance is caused by air, and FIG. 32B shows a case where a frictional resistance is caused by air.
FIG. 33 is a graph showing the relationship between density and distance when the density coefficient is 1 in the density evaluation formula used in the embodiment.
FIGS. 34A and 34B show isoconcentration curves when the concentrations are calculated by the density evaluation formula used in the embodiment for two metaball spheres having a radius of 1. FIG. 34A is an external perspective view of the isoconcentration curves, and FIG. FIG. 4C is a plan view of an isodensity curve when the threshold value is 0.8.
FIG. 35 is an explanatory diagram schematically showing a relationship between a virtual frame and a voxel used in the embodiment, where (A) is a relationship between a voxel and a voxel index, and (B) is an object arranged in the virtual frame. And the relationship between voxels.
FIG. 36 is an explanatory diagram of distance calculation when the metaball takes a three-dimensional shape other than an ellipse. The distance to an arbitrary point, (C), shows a truncated cone with both ends rounded into a spherical shape.
FIG. 37 is an explanatory diagram showing a relationship between a vertex of a voxel and a polygon surface.
FIG. 38 is an explanatory diagram showing the relationship between the density of vertices constituting a side of a voxel and the vertex position of a polygon surface on the side of the voxel.
FIG. 39 is a graph showing the relationship between density and distance according to a density evaluation formula of the prior art.
FIGS. 40A and 40B show isoconcentration curves when the concentration is calculated using a conventional density evaluation formula for two metaball spheres having a radius of 1. FIG. 40A is an external perspective view of the isoconcentration curve, and FIG. is there.
FIG. 41 is an explanatory diagram of an isoconcentration curve, in which (A) schematically shows a state where two metaball spheres are fused, and (B) shows a metaball sphere regenerated when the threshold value is 0.5. It is a top view.
[Explanation of symbols]
1 Recording medium
10 Home video game device (game device)
20 CPU block (computer)
CPU (metaball arrangement means, concentration calculation means, game character generation means, ground ball generation means, drop ball generation means, tentacle ball generation means)

Claims (18)

3次元仮想空間内にメタボールをオブジェクトとして動的に描画するプログラムであって、コンピュータを、
モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを構成するように配置するメタボール配置手段、
前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算する濃度演算手段、
前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成するゲームキャラクタ生成手段、
として機能させるためのプログラム。
A program for dynamically drawing a metaball as an object in a three-dimensional virtual space,
Metaball arrangement means for arranging a metaball belonging to each of the plurality of nodes whose coordinate positions in the three-dimensional virtual space are specified by motion data so as to constitute a game character;
Concentration calculating means for calculating the internal concentration of the metaball at the apex of the voxel that divides the three-dimensional virtual space into a large number;
Game character generation means for generating a game character by calculating vertex coordinates of a polygon based on an internal density of a metaball at a vertex of the voxel and a preset threshold;
Program to function as.
前記ノードは、前記ゲームキャラクタの関節位置に位置し、隣接するノードまでの距離が一定であることを特徴とする請求項1に記載のプログラム。The program according to claim 1, wherein the node is located at a joint position of the game character and a distance to an adjacent node is constant. 前記メタボール配置手段は、前記ノードに所属するメタボールの大きさを周期的に変動させることを特徴とする請求項1に記載のプログラム。The program according to claim 1, wherein the metaball placement unit periodically varies the size of a metaball belonging to the node. 前記メタボール配置手段は、所定イベントが発生したときに、前記ノードへの前記メタボールの配置を解除し、予め定められた計算式又はテーブルにより設定される座標位置に前記メタボールが散乱するように配置することを特徴とする請求項1に記載のプログラム。The metaball arrangement means releases the arrangement of the metaball at the node when a predetermined event occurs, and arranges the metaball to be scattered at a coordinate position set by a predetermined calculation formula or table. The program according to claim 1. 前記メタボール配置手段は、前記計算式又はテーブルにより設定される座標位置に配置されるメタボールの形状を変更することを特徴とする請求項4に記載のプログラム。The program according to claim 4, wherein the metaball placement unit changes a shape of a metaball placed at a coordinate position set by the calculation formula or the table. コンピュータを、更に、前記ゲームキャラクタの真下に配置され、前記ゲームキャラクタの移動に伴って地面を這いずる接地ボールをメタボールで生成する接地ボール生成手段として機能させることを特徴とする請求項1に記載のプログラム。2. The computer according to claim 1, further comprising a computer that functions as a ground ball generating unit that is disposed directly below the game character and generates a ground ball that metaphorizes the ground as the game character moves. program. 前記接地ボールが複数のメタボールで構成されていることを特徴とする請求項6に記載のプログラム。The program according to claim 6, wherein the ground ball is composed of a plurality of metaballs. 前記接地ボール生成手段は、前記接地ボールを構成するメタボールが前記ゲームキャラクタの足部のノード又は該足部のノードに配置されたメタボールに仮想バネで接続されているように該接地ボールを構成するメタボールの座標位置を演算することを特徴とする請求項7に記載のプログラム。The ground ball generating means configures the ground ball so that a meta ball constituting the ground ball is connected to a meta ball arranged at the foot node of the game character or the foot node by a virtual spring. The program according to claim 7, wherein the coordinate position of the metaball is calculated. 前記接地ボール生成手段は、前記接地ボールを構成するメタボールが一体となるように形状を変更することを特徴とする請求項8に記載のプログラム。The program according to claim 8, wherein the ground ball generation unit changes a shape so that metaballs constituting the ground ball are integrated. コンピュータを、更に、特定のノードに所属するメタボールから滴り落ちる滴ボールをメタボールで生成する滴ボール生成手段として機能させることを特徴とする請求項1に記載のプログラム。The program according to claim 1, further causing the computer to function as a drop ball generating unit that generates a drop ball that drops from a meta ball belonging to a specific node. 前記滴ボール生成手段は、前記滴ボールの落下速度を一定値以下に制限することを特徴とする請求項10に記載のプログラム。The program according to claim 10, wherein the drop ball generating unit limits a drop speed of the drop ball to a predetermined value or less. 前記滴ボール生成手段は、自然落下するように前記滴ボールの形状を変更することを特徴とする請求項11に記載のプログラム。The program according to claim 11, wherein the drop ball generating unit changes the shape of the drop ball so that the drop ball spontaneously falls. コンピュータを、更に、特定のノードに所属するメタボールから突出し触手状の触手ボールをメタボールで生成する触手ボール生成手段として機能させることを特徴とする請求項1に記載のプログラム。2. The program according to claim 1, further causing a computer to function as a tentacle ball generating means for generating a tentacle-like tentacle ball protruding from a metaball belonging to a specific node by the metaball. 前記触手ボール生成手段は、前記触手ボールをベジエ曲線上に配置することを特徴とする請求項13に記載のプログラム。The program according to claim 13, wherein the tentacle ball generating unit arranges the tentacle ball on a Bezier curve. 前記触手ボール生成手段は、前記ベジエ曲線を特定する点の間が仮想バネで接続されているように該ベジエ曲線を特定する点の座標位置を演算することを特徴とする請求項14に記載のプログラム。15. The tentacle ball generating means calculates a coordinate position of a point specifying the Bezier curve so that points specifying the Bezier curve are connected by a virtual spring. program. 請求項1乃至請求項15のいずれか1項に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。The computer-readable recording medium which recorded the program of any one of Claim 1 thru | or 15. 3次元仮想空間内にメタボールをオブジェクトとして動的に描画するメタボール描画方法であって、所定時間内に、
モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを構成するように配置し、
前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算し、
前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成する、
ステップを含むメタボール描画方法。
A metaball drawing method for dynamically drawing a metaball as an object in a three-dimensional virtual space, and within a predetermined time,
For a plurality of nodes whose coordinate positions in the three-dimensional virtual space are specified by motion data, metaballs belonging to the respective nodes are arranged so as to constitute a game character,
Calculating the internal concentration of the metaballs at the vertices of voxels that divide the three-dimensional virtual space into a large number;
A game character is generated by calculating the vertex coordinates of a polygon based on the internal concentration of the metaball at the vertex of the voxel and a preset threshold value,
Metaball drawing method including steps.
3次元仮想空間内にメタボールをオブジェクトとして動的に描画するゲーム装置であって、
モーションデータにより前記3次元仮想空間内の座標位置が特定される複数のノードに対し、該各々のノードに所属するメタボールを、ゲームキャラクタを生成するように配置するメタボール配置手段と、
前記3次元仮想空間内を多数に分割するボクセルの頂点での前記メタボールの内部濃度を演算する濃度演算手段と、
前記ボクセルの頂点でのメタボールの内部濃度と予め設定された閾値とに基づいてポリゴンの頂点座標を演算してゲームキャラクタを生成するゲームキャラクタ生成手段と、
を備えたことを特徴とするゲーム装置。
A game device that dynamically draws a metaball as an object in a three-dimensional virtual space,
Metaball placement means for placing a metaball belonging to each of the plurality of nodes whose coordinate positions in the three-dimensional virtual space are specified by motion data so as to generate a game character;
A concentration calculating means for calculating an internal concentration of the metaball at a vertex of a voxel that divides the three-dimensional virtual space into a large number;
Game character generating means for calculating a vertex coordinate of a polygon based on an internal density of a metaball at a vertex of the voxel and a preset threshold, and generating a game character;
A game apparatus comprising:
JP2002221463A 2002-07-30 2002-07-30 Program, recording medium, metaball drawing method, and game apparatus Expired - Fee Related JP3790990B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2002221463A JP3790990B2 (en) 2002-07-30 2002-07-30 Program, recording medium, metaball drawing method, and game apparatus
US10/325,756 US6894688B2 (en) 2002-07-30 2002-12-19 Program, recording medium, rendering method and rendering apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002221463A JP3790990B2 (en) 2002-07-30 2002-07-30 Program, recording medium, metaball drawing method, and game apparatus

Publications (2)

Publication Number Publication Date
JP2004062618A true JP2004062618A (en) 2004-02-26
JP3790990B2 JP3790990B2 (en) 2006-06-28

Family

ID=31941765

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002221463A Expired - Fee Related JP3790990B2 (en) 2002-07-30 2002-07-30 Program, recording medium, metaball drawing method, and game apparatus

Country Status (1)

Country Link
JP (1) JP3790990B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101877901B1 (en) * 2016-12-29 2018-07-12 세종대학교산학협력단 Method and appratus for providing vr image
JP2018175849A (en) * 2018-02-23 2018-11-15 株式会社コロプラ Information processing method, apparatus, and program for implementing that information processing method in computer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101877901B1 (en) * 2016-12-29 2018-07-12 세종대학교산학협력단 Method and appratus for providing vr image
JP2018175849A (en) * 2018-02-23 2018-11-15 株式会社コロプラ Information processing method, apparatus, and program for implementing that information processing method in computer

Also Published As

Publication number Publication date
JP3790990B2 (en) 2006-06-28

Similar Documents

Publication Publication Date Title
JP3760347B2 (en) Program, recording medium, game character drawing method, and game apparatus
KR100517856B1 (en) Image processor for games
JP3696216B2 (en) Three-dimensional video game apparatus, control method of virtual camera in three-dimensional video game, program and recording medium
JP4794343B2 (en) Image generation system, program, and information storage medium
JPH10247252A (en) Collision judging processor
JP2006024236A5 (en)
JP2006065877A5 (en)
JP2001273517A (en) Game system and computer-readable recording medium with recording program for game recorded thereon
JP2008113762A (en) Game program and game device
EP1085470A2 (en) Method of creating a dynamic image, storage medium and program executing apparatus
JP3926307B2 (en) Three-dimensional image drawing apparatus and method, program, and recording medium
KR100281837B1 (en) Image processing apparatus and game device having same
EP1085472A2 (en) Method of creating image frames, storage medium and apparatus for executing program
JP3790990B2 (en) Program, recording medium, metaball drawing method, and game apparatus
JP3245142B2 (en) Game system and information storage medium
JP3766974B2 (en) Program and recording medium
JP3757396B2 (en) Program, recording medium, polygon surface calculation method, and game apparatus
US6894688B2 (en) Program, recording medium, rendering method and rendering apparatus
JP2002216165A (en) Image generation system, program and information storage medium
JP6863678B2 (en) Program and game equipment
JP2003006675A (en) Method and device for controlling image display, recording medium recording the same method and game machine
JP6945699B2 (en) Program and game equipment
JP3442336B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2006075619A (en) Image processing method and image processing device
JP2005092754A (en) Image processor and image processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050802

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050909

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060112

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: 20060314

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060324

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120414

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20150414

Year of fee payment: 9

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees