JP4632596B2 - Image generation system, program, and information storage medium - Google Patents

Image generation system, program, and information storage medium Download PDF

Info

Publication number
JP4632596B2
JP4632596B2 JP2001273538A JP2001273538A JP4632596B2 JP 4632596 B2 JP4632596 B2 JP 4632596B2 JP 2001273538 A JP2001273538 A JP 2001273538A JP 2001273538 A JP2001273538 A JP 2001273538A JP 4632596 B2 JP4632596 B2 JP 4632596B2
Authority
JP
Japan
Prior art keywords
cutting
string
vertex
polygonal column
intersection
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.)
Expired - Fee Related
Application number
JP2001273538A
Other languages
Japanese (ja)
Other versions
JP2003085585A (en
Inventor
量一 加来
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.)
Namco Ltd
Bandai Namco Entertainment Inc
Original Assignee
Namco Ltd
Namco Bandai Games Inc
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 Namco Ltd, Namco Bandai Games Inc filed Critical Namco Ltd
Priority to JP2001273538A priority Critical patent/JP4632596B2/en
Publication of JP2003085585A publication Critical patent/JP2003085585A/en
Application granted granted Critical
Publication of JP4632596B2 publication Critical patent/JP4632596B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像生成システム、プログラム及び情報記憶媒体に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
従来より、仮想的な3次元空間であるオブジェクト空間内において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。ガンゲームを楽しむことができる画像生成システムを例にとれば、プレーヤは、銃などを模して作られたガン型コントローラ(シューティングデバイス)を用いて、画面に映し出される敵キャラクタ(オブジェクト)などの標的オブジェクトをシューティングすることで、敵キャラクタとの間で攻防を繰り返すことができる3次元ゲームを楽しむ。
【0003】
また、ガン型コントローラに限らず、プレーヤが刀や剣などの武器を操作入力部として用いて、画面上に現れる敵キャラクタと斬り合うことで3次元ゲームを楽しむことも考えることができる。この場合、プレーヤの仮想現実感を向上させるため、画面上の敵キャラクタを相手にリアルに斬り合う動作を入力することができることが望ましい。そして、プレーヤの斬り方に応じて、敵キャラクタなどの物体が切断される画像を生成できれば、より一層仮想現実感を向上させることができる。
【0004】
このような物体の切断平面を生成する手法として、操作入力部の軌跡に応じてオブジェクトを切断する手法が考えられる。しかしながら、オブジェクトが複数のポリゴンにより構成されている場合、ポリゴンごとに切断平面が通過したか否かの判定処理を行っていたのでは、リアルタイム性が要求されるゲーム画像などを生成することは困難であるという問題がある。
【0005】
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、処理負荷をかけることなく、オブジェクトに対して任意の切断平面で切断する画像を、リアルタイムで生成することができる画像生成システム、プログラム及び情報記憶媒体を提供することにある。
【0006】
【課題を解決するための手段】
上記課題を解決するために、本発明は、画像生成を行う画像生成システムであって、対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、上面の頂点の位置が前記交点の位置に設定された第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトとについて、所与の視点から見える画像を生成する手段とを含むことを特徴とする。
【0007】
また本発明に係るプログラムは、上記手段としてコンピュータを機能させることを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能な情報記憶媒体であって、上記手段としてコンピュータを機能させるプログラムを記憶することを特徴とする。
【0008】
本発明によれば、多角柱オブジェクトを、対向する多角形の上面の頂点及び下面の頂点により定義したので、この多角柱オブジェクトの側面を切断平面が切断する場合、上面の頂点とこれに対応する下面の頂点とを結ぶ線と、切断平面との交点を求め、切断前の多角柱オブジェクト(第1の多角柱オブジェクト)の上面の頂点と、この切断前の多角柱オブジェクトを複製して生成した第2の多角柱オブジェクトの下面の頂点に、求めた交点を設定するだけで、切断平面に沿って切断された2つの多角柱オブジェクトを、少ない処理負荷で生成することができる。
【0009】
したがって、例えば任意の切断平面に沿って多角柱オブジェクトが切断される様子を表現するゲーム画像をリアルタイムに生成することができるようになる。
【0010】
なお、切断前の第1の多角柱オブジェクトの上面の頂点と、第2の多角柱オブジェクトの下面の頂点とを、それぞれ求めた交点の位置に設定する場合に限定されるものではなく、切断前の第1の多角柱オブジェクトの下面の頂点と、第2の多角柱オブジェクトの上面の頂点を、それぞれ求めた交点の位置に設定することも可能である。
【0011】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記切断平面を、前記第1の多角柱オブジェクトのローカル座標系に座標変換する手段を含み、前記交点は、前記ローカル座標系において求められることを特徴とする。
【0012】
ここで、ローカル座標系に座標変換される前の切断平面の座標系に限定されるものではない。第1の多角柱オブジェクトのローカル座標系では、上面及び下面の各頂点の座標が既知の状態となる。したがって、本発明によれば、切断平面をこのローカル座標系に座標変換することによって、求めるべき交点の位置を求める座標軸を限定することができ、処理負荷の軽減を図ることができる。
【0013】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記ローカル座標系は、互いに直交する第1〜第3の座標軸を有し、前記上面及び前記下面に第1及び第2の座標軸が設定され、前記上面及び前記下面に対して垂直な方向に第3の座標軸が設定されることを特徴とする。
【0014】
本発明によれば、多角柱オブジェクトを定義する上面及び下面の頂点座標が第1及び第2の座標軸上で既知の状態となるため、求めるべき交点の位置は、第3の座標軸についてのみ求めるようにすればよいので、処理負荷の軽減を図ることができる。
【0015】
また本発明は、画像生成を行う画像生成システムであって、対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記第1の多角柱オブジェクトとの位置関係に応じて決められる前記第1の多角柱オブジェクトのローカル座標系に、前記切断平面を座標変換する手段と、前記ローカル座標系において、前記切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトについて、所与の視点から見える画像を生成する手段と、を含むことを特徴とする。
【0016】
また本発明に係るプログラムは、上記手段としてコンピュータを機能させることを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能な情報記憶媒体であって、上記手段としてコンピュータを機能させるプログラムを記憶することを特徴とする。
【0017】
ここで、ローカル座標系に座標変換される前の切断平面の座標系に限定されるものではない。
【0018】
本発明によれば、多角柱オブジェクトを、対向する多角形の上面の頂点及び下面の頂点により定義し、この多角柱オブジェクトと、そのの側面を切断する切断平面との位置関係に応じて決められる多角柱オブジェクトのローカル座標系に、切断平面を座標変換するようにしたので、上面の頂点とこれに対応する下面の頂点とを結ぶ線と、切断平面との交点を求め、この交点を、切断前の多角柱オブジェクト(第1の多角柱オブジェクト)の上面の頂点と、この切断前の多角柱オブジェクトを複製して生成した第2の多角柱オブジェクトの下面の頂点とに設定するだけで、切断平面に沿って切断された2つの多角柱オブジェクトを、少ない処理負荷で生成することができる。
【0019】
したがって、例えば板オブジェクトのように、多角柱オブジェクトとして処理することができるが、その切断平面の向きが多様となる場合であっても、最適な座標系で切断平面が切断する交点をより少ない処理負荷で求めることができるようになる。そのため、例えば任意の切断平面に沿って板オブジェクトが切断される様子を表現するゲーム画像をリアルタイムに生成することができるようになる。
【0020】
なお、切断前の第1の多角柱オブジェクトの上面の頂点と、第2の多角柱オブジェクトの下面の頂点とを、それぞれ求めた交点の位置に設定する場合に限定されるものではなく、切断前の第1の多角柱オブジェクトの下面の頂点と、第2の多角柱オブジェクトの上面の頂点を、それぞれ求めた交点の位置に設定することも可能である。
【0021】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、切断前の第1の多角柱オブジェクトの側面を構成する上面及び下面の頂点間を結ぶ線を前記交点の位置が内分する比率に基づいて、前記側面にマッピングされていたテクスチャにおけるテクスチャ座標を求め、上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、第2の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、切断後の第1の多角柱オブジェクト及び第2の多角柱オブジェクトの当該側面に、切断前のテクスチャをマッピングすることを特徴とする。
【0022】
本発明によれば、切断前の第1の多角柱オブジェクトの側面にマッピングされていたテクスチャについて、切断前の第1の多角柱オブジェクトの側面を構成する上面及び下面の頂点間を結ぶ線を交点の位置が内分する比率に基づいてテクスチャ座標を求め、これを切断後の第1の多角柱オブジェクトの上面の頂点と、第2の多角柱オブジェクトの下面の頂点とにコーディネートして、切断前のテクスチャをマッピングするようにしたので、切断平面により切断された側面のテクスチャが変形することなく、切断平面に沿ってオブジェクトが切断される様子をよりリアルに表現することができる。
【0023】
また本発明は、画像生成を行う画像生成システムであって、始点と終点との間で順次連結される複数の頂点によって定義された第1のひも状オブジェクトを、切断平面が切断する切断位置を求める手段と、前記第1のひも状オブジェクトを複製して第2のひも状オブジェクトを生成する手段と、前記第1のひも状オブジェクトの終点を前記切断位置に設定し、前記第2のひも状オブジェクトの始点を前記切断位置に設定する手段と、終点が前記切断位置に設定された切断後の第1のひも状オブジェクトと、始点が前記切断位置に設定された第2のひも状オブジェクトとについて、所与の視点から見える画像を生成する手段とを含むことを特徴とする。
【0024】
また本発明に係るプログラムは、上記手段としてコンピュータを機能させることを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能な情報記憶媒体であって、上記手段としてコンピュータを機能させるプログラムを記憶することを特徴とする。
【0025】
本発明によれば、ひも状オブジェクトを、始点と終点との間で順次連結される複数の頂点によって定義したので、このひも状オブジェクトを切断平面が切断する場合、切断前のひも状オブジェクト(第1のひも状オブジェクト)の終点と、この切断前のひも状オブジェクトを複製して生成した第2のひも状オブジェクトの始点の頂点とに、その切断位置を設定するだけで、切断平面に沿って切断された2つのひも状オブジェクトを、少ない処理負荷で生成することができる。
【0026】
したがって、例えば任意の切断平面に沿ってひも状オブジェクトが切断される様子を表現するゲーム画像をリアルタイムに生成することができるようになる。
【0027】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記切断位置は、切断前の第1のひも状オブジェクトの始点と終点とを結ぶ第1の線を前記切断平面が内分する比率で、切断前の第1のひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とする。
【0028】
本発明によれば、切断平面がひも状オブジェクトを切断する切断位置を求める際に、ひも状オブジェクトの始点と終点とを結ぶ仮想的な第1の線を用いて、この第1の線を切断平面が内分する比率で、ひも状オブジェクトを構成する各頂点間のリンクの総和を内分する位置として求めるようにしたので、頂点間それぞれに切断平面が通過したか否かを判別する必要がなくなり、さらに少ない処理負荷で切断後の2つのオブジェクトを生成することができる。
【0029】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記複数の頂点を用いて、前記所与の視点の向きと正対するポリゴンを配置することを特徴とする。
【0030】
本発明によれば、少ないポリゴン数でひも状オブジェクトの画像を生成することができる。
【0031】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、切断前の第1のひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第1のひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、切断後の第1のひも状オブジェクトの終点に前記テクスチャ座標をコーディネートし、第2のひも状オブジェクトの始点に前記テクスチャ座標をコーディネートし、切断後の第1のひも状オブジェクト及び第2のひも状オブジェクトに、切断前のテクスチャをマッピングすることを特徴とする。
【0032】
本発明によれば、切断前のひも状オブジェクトにマッピングされていたテクスチャについて、切断前の第1のひも状オブジェクトの始点及び終点を結ぶ線を切断平面が内分する比率に基づいてテクスチャ座標を求め、これを切断後の第1のひも状オブジェクトの終点と、第2のひも状オブジェクトの始点とにコーディネートして、切断前のテクスチャをマッピングするようにしたので、切断平面により切断されたひも状オブジェクトのテクスチャが変形することなく、切断平面に沿ってオブジェクトが切断される様子をよりリアルに表現することができる。
【0033】
また本発明は、画像生成を行う画像生成システムであって、始点と終点との間で順次連結される複数の頂点によって定義されたひも状オブジェクトを複数配列させた第1〜第T(Tは、2以上の自然数)のひも状オブジェクトにより構成される第1の布オブジェクトを切断平面が切断する切断位置を、第1〜第Tのひも状オブジェクトごとに求める手段と、前記第1の布オブジェクトを複製して第2の布オブジェクトを生成する手段と、前記第1の布オブジェクトを構成する第R(Rは、1以上T以下の自然数)のひも状オブジェクトの終点を、第Rのひも状オブジェクトの切断位置に設定し、前記第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点を、第Rのひも状オブジェクトの切断位置に設定する手段と、各ひも状オブジェクトの終点が切断位置に設定された切断後の第1の布オブジェクトと、各ひも状オブジェクトの始点が切断位置に設定された第2の布オブジェクトとについて、所与の視点から見える画像を生成する手段とを含むことを特徴とする。
【0034】
また本発明に係るプログラムは、上記手段としてコンピュータを機能させることを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能な情報記憶媒体であって、上記手段としてコンピュータを機能させるプログラムを記憶することを特徴とする。
【0035】
本発明によれば、布オブジェクトを、始点と終点との間で順次連結される複数の頂点によって定義されたひも状オブジェクトを複数配列させた第1〜第Tのひも状オブジェクトにより構成するようにしたので、この布オブジェクトを切断平面が切断する場合、切断前の布オブジェクト(第1の布オブジェクト)を構成する第1〜第Tのひも状オブジェクトの終点と、この切断前の布オブジェクトを複製して生成した第2の布オブジェクトを構成する第1〜第Tのひも状オブジェクトの始点の頂点とに、各ひも状オブジェクトについて求められた切断位置を設定するだけで、切断平面に沿って切断された2つの布オブジェクトを、少ない処理負荷で生成することができる。
【0036】
したがって、例えば任意の切断平面に沿って布オブジェクトが切断される様子を表現するゲーム画像をリアルタイムに生成することができるようになる。
【0037】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記切断位置は、切断前の第Rのひも状オブジェクトの始点と終点とを結ぶ第2の線を前記切断平面が内分する比率で、切断前の第Rのひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とする。
【0038】
本発明によれば、切断平面が布オブジェクトを構成する各ひも状オブジェクトを切断する切断位置を求める際に、各ひも状オブジェクトについて、その始点と終点とを結ぶ仮想的な第2の線を用いて、この第2の線を切断平面が内分する比率で、各ひも状オブジェクトを構成する各頂点間のリンクの総和を内分する位置として求めるようにしたので、布オブジェクトを構成する各ひも状オブジェクトを定具する頂点間それぞれに切断平面が通過したか否かを判別する必要がなくなり、さらに少ない処理負荷で切断後の2つのオブジェクトを生成することができる。
【0039】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、切断前の第1の布オブジェクトを構成する第Rのひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第Rのひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、切断後の第1の布オブジェクトを構成する第Rのひも状オブジェクトの終点に、前記テクスチャ座標をコーディネートし、第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点に、前記テクスチャ座標をコーディネートし、切断後の第1の布オブジェクト及び第2の布オブジェクトに、切断前のテクスチャをマッピングすることを特徴とする。
【0040】
本発明によれば、切断前の布オブジェクトにマッピングされていたテクスチャについて、切断前の布オブジェクトを構成する各ひも状オブジェクトについて、その始点及び終点を結ぶ線を切断平面が内分する比率に基づいてテクスチャ座標を求め、それぞれを切断後の布オブジェクトを構成するひも状オブジェクトの終点と、第2の布オブジェクトを構成するひも状オブジェクトの始点とにコーディネートして、切断前のテクスチャをマッピングするようにしたので、切断平面により切断された布オブジェクトのテクスチャが変形することなく、切断平面に沿ってオブジェクトが切断される様子をよりリアルに表現することができる。
【0041】
【発明の実施の形態】
以下、本発明の好適な実施形態について図面を用いて説明する。
【0042】
なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を何ら限定するものではない。また本実施形態で説明される構成の全てが本発明の必須構成要件とは限らない。
【0043】
また、以下に説明する実施形態では、プレーヤによって操作される刀型コントローラ(広義には、操作入力部、被検出物)の位置等を検出して、画面上に現れる敵キャラクタと斬り合う刀ゲームに適用した場合を例にとり説明するが、本発明はこれに限定されず、種々の画像生成システムに適用することができる。
【0044】
1. 構成
図1に、本実施形態の画像生成システムを業務用のゲームシステムに適用した場合の外観斜視図を模式的に示す。
【0045】
このゲームシステム10では、本実施形態における画像生成システムにより生成された画像が、筐体20に収められた表示装置(表示部)の画面30に表示される。画面30は、所与のエリア内で操作入力部としての刀型コントローラ40を操作するプレーヤが注視できるように配置されている。以下では、画面30の横方向をx軸、画面30の縦方向をy軸、画面30に対して垂直な画面の奥行き方向をz軸とする。
【0046】
ゲームシステム10は、プレーヤが操作する刀型コントローラ40を用いて、画面30に映し出される敵キャラクタ(オブジェクト)と斬り合うゲームを実現する。このゲームシステム10は、仮想現実感を向上させるため、プレーヤが操作する(例えば、振り回す)刀型コントローラ40の操作状況をそのまま反映させて、画面30に映し出される敵キャラクタを斬りつけたり、プレーヤに対して斬りつけようとする敵キャラクタに対して防御を行ったりして、攻防の駆け引きを楽しむことができるようになっている。
【0047】
そのため、ゲームシステム10では、所与のエリア内でプレーヤによって操作される刀型コントローラ40の画面30での位置を検出し、その検出された位置に基づいてゲームのエフェクト効果(エフェクト画像(広義には、画像)、効果音(広義には、音)、振動、風、光などの各種エフェクト)を与えたり、プレーヤが操作するキャラクタの攻撃力や防御力などの能力値(広義には、エフェクト効果(画像、音、振動など)を変化させるためのパラメータ)を変化させるといったゲーム応答を変化させる処理を行う。
【0048】
そこで、ゲームシステム10は、2つのタブレットセンサ(第1及び第2のセンサ)により形成される互いに平行な2つのセンサ面(広義には、エリア)を用いて、プレーヤが操作する刀型コントローラ40の位置や向き等を検出する検出装置(入力装置)を備えている。
【0049】
この検出装置は、第1及び第2のセンサ50、60を含む。第1のセンサ50は、1組のセンサにより第1のセンサ面52を形成する。第1のセンサ面52の各位置は、画面30の各位置に1対1で対応付けられている。第2のセンサ60は、1組のセンサにより第2のセンサ面62を形成する。第2のセンサ面62の各位置は、画面30の各位置に1対1で対応付けられている。第1及び第2のセンサ面62は、所与の間隔dを置いて形成される。
【0050】
第1のセンサ50は、プレーヤによって操作される刀型コントローラ(広義には、被検出物)40が第1のセンサ面52を横切る第1の位置を特定することができる。また、第2のセンサ60は、この刀型コントローラ(広義には、被検出物)40が第2のセンサ面62を横切る第2の位置を特定することができる。
【0051】
本実施形態における画像生成システムは、第1及び第2のセンサ50、60によって特定された刀型コントローラ40の第1及び第2のセンサ面52、62における第1及び第2の位置(或いは、第1及び第2の位置を特定するための情報。広義には、検出装置からの入力情報)に基づいて、第1及び第2のセンサ面における刀型コントローラの位置に対応する画面30上での位置を特定する。そして、この特定された画面30上での位置に基づき、プレーヤに種々のエフェクト効果を与える処理等を行う。
【0052】
こうすることで、本実施形態における画像生成システムでは、プレーヤが刀型コントローラ40を振った位置(画面30上での位置)や、振る速さ(広義には、単位時間当たりの位置の変化量)、振り幅(広義には、位置の変化量の絶対値)、振る向き(広義には、位置が変化する向き)或いは第1及び第2のセンサ面における刀型コントローラ40の画面方向に対する向き等に応じて、刀(剣)を用いたゲームとしてプレーヤが仮想現実感を向上させるようなエフェクト効果を適切に与えることができるようになる。
【0053】
このように、第1及び第2のセンサ50、60により第1及び第2のセンサ面52、62を横切る第1及び第2の位置を、画面30上での位置に対応付けることができるため、プレーヤによって操作される刀型コントローラ40の各部にセンサを設ける必要がなくなる。したがって、プレーヤが操作する操作入力部としては、刀型コントローラに限定されるものではなく、センサ面を横切らせることができる物体であれば何でもよく、例えばプレーヤの身体の一部(プレーヤの拳、足、頭など)であってもよい。
【0054】
すなわち、このようなセンサを用いることで、操作入力部の低コスト化が可能となるばかりでなく、操作入力部からの検出情報を筐体20に伝送するための配線を不要とすることができる。さらに、センサ面で特定した位置と画面30上での位置を精度よく特定することができる。
【0055】
図2に、本実施形態における画像生成システムのブロック図の一例を示す。
【0056】
なお図2において、本実施形態は少なくとも処理部100を含めばよく(或いは処理部100と入力情報受付部162と記憶部170、或いは処理部100と入力情報受付部162と記憶部170と情報記憶媒体180を含めばよく)、それ以外のブロック(例えば、操作部160、表示部190、音出力部192、携帯型情報記憶装置194、通信部196)については、任意の構成要素とすることができる。
【0057】
ここで処理部100は、システム全体の制御、システム内の各ブロックへの命令の指示、ゲーム処理、画像処理、又は音処理などの各種の処理を行うものであり、その機能は、各種プロセッサ(CPU、DSP等)、或いはASIC(ゲートアレイ等)などのハードウェアや、所与のプログラム(ゲームプログラム)により実現できる。
【0058】
操作部160は、プレーヤがゲームの設定などを行う操作データを入力するためのものであり、その機能は、レバー、ボタン、筐体などのハードウェアにより実現できる。
【0059】
入力情報受付部162は、プレーヤが操作する操作部160とは別の刀型コントローラ等の操作入力部の操作状況を検出するための検出装置からの入力情報を受け付けるものであり、その機能はASICなどのハードウェアや、所与のプログラムにより実現できる。例えば図1に示す検出装置が接続される場合、入力情報として第1及び第2のセンサ50、60によって検出された第1及び第2のセンサ面52、62における第1及び第2の位置の座標(或いは、第1及び第2の位置の座標を特定するための情報)を受け付ける。
【0060】
記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどのハードウェアにより実現できる。
【0061】
情報記憶媒体(コンピュータにより読み取り可能な記憶媒体)180は、プログラムやデータなどの情報を格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などのハードウェアにより実現できる。処理部100は、この情報記憶媒体180に格納される情報に基づいて本発明(本実施形態)の種々の処理を行う。すなわち、情報記憶媒体180には、本発明(本実施形態)の手段(特に処理部100に含まれるブロック)を実行するための情報(プログラム或いはデータ)が格納される。
【0062】
なお、情報記憶媒体180に格納される情報の一部又は全部は、システムへの電源投入時等に記憶部170に転送されることになる。また情報記憶媒体180に記憶される情報は、本実施形態の処理を行うためのプログラムコード、画像データ、音データ、表示物の形状データ、テーブルデータ、リストデータ、本実施形態の処理を指示するたえの情報、その指示に従って処理を行うための情報等の少なくとも1つを含むものである。
【0063】
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、或いはHMD(ヘッドマウントディスプレイ)などのハードウェアにより実現できる。
【0064】
音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカなどのハードウェアにより実現できる。
【0065】
携帯型情報記憶装置194は、プレーヤの個人データやセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などを考えることができる。
【0066】
通信部196は、外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ、或いは通信用ASICなどのハードウェアや、プログラムなどにより実現できる。
【0067】
なお本発明(本実施形態)の手段を実行するためのプログラム或いはデータは、ホスト装置(サーバ)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180に配信するようにしてもよい。このようなホスト装置(サーバ)の情報記憶媒体の使用も本発明の範囲内に含まれる。
【0068】
処理部(プロセッサ)100は、操作部160又は入力情報受付部162からの操作データ又は入力情報やプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの各種の処理を行う。この場合、処理部100は、記憶部170内の主記憶部をワーク領域として各種の処理を行う。
【0069】
ここで、処理部100が行うゲーム処理としては、コイン(代価)の受け付け処理、各種モードの設定処理、ゲームの進行処理、プレーヤが操作するキャラクタに付与された攻撃力や防御力といった各種パラメータ(広義には、エフェクト画像を変化させるための各種パラメータ)をゲームの進行に応じて更新する処理、選択画面の設定処理、オブジェクト(1又は複数のプリミティブ面)の位置や回転角度(X、Y又はZ軸回りの回転角度)を求める処理、オブジェクトを動作させる処理(モーション処理)、視点の位置(仮想カメラの位置)や視線角度(仮想カメラの回転角度)を求める処理、マップオブジェクトなどのオブジェクトをオブジェクト空間へ配置する処理、ヒット判定処理、ゲーム結果(成果、成績)を演算する処理、複数のプレーヤが共通のゲーム空間でプレイするための処理、或いはゲームオーバ処理などを考えることができる。
【0070】
処理部100は、位置演算部110、パラメータ設定部130、オブジェクト生成部132、画像生成部140、音生成部150を含む。なお、処理部100に、これらの全ての機能ブロック110〜150を含ませる必要はなく、一部の機能ブロックを省略する構成にしてもよい。
【0071】
ここで位置演算部110は、入力情報受付部162によって受け付けられた検出装置からの入力情報に基づいて、表示部190の画面上での位置等を求める処理を行う。より具体的には、位置演算部110は、検出装置で検出された被検出物(図1では、刀型コントローラ40)の第1及び第2のセンサ面における第1及び第2の位置の座標に基づいて、第1及び第2のセンサ面と対応付けられている表示部190の画面上での位置を求める。さらに、位置演算部110は、求められた画面上での位置の単位時間当たりの変化量(絶対値)、画面上での位置の変化量(絶対値)、画面上での位置の変化する向き、第1及び第2のセンサ面における被検出物の画面方向に対する向きを求める。
【0072】
パラメータ設定部130は、位置演算部110によって求められた画面30上での位置等に基づいて行われるゲーム処理の結果を反映して、エフェクト画像を変化させるためのパラメータを更新する処理を行う。より具体的には、パラメータ設定部130は、例えばプレーヤが操作するキャラクタに付与される体力値や攻撃力、防御力といったパラメータを更新し、その結果としてエフェクト画像や効果音を変化させる。
【0073】
オブジェクト生成部132は、位置演算部110によって求められた画面30上での位置に基づいて、オブジェクトを生成する処理を行う。より具体的には、オブジェクト生成部132は、プレーヤが斬る動作を行って画面30に表示されるオブジェクトを切断する処理を行う場合に、切断前のオブジェクトから、切断後の2つのオブジェクトを生成する処理を行う。そのため、本実施形態では、切断対象のオブジェクトを定義するデータ構造を工夫し、少ない処理負荷で切断後の2つのオブジェクトを生成することができるようになっている。その際、オブジェクト生成部132は、切断後の2つのオブジェクトに対して、切断されたイメージが効果的になるようなテクスチャのマッピングを行う。
【0074】
このようなオブジェクト生成部132は、切断位置演算部134、頂点補正部136を含む。
【0075】
切断位置演算部134は、プレーヤが刀型コントローラ40により入力した刀の軌跡に基づいて、切断対象のオブジェクトの切断位置を求める。より具体的には、刀の軌跡は、位置演算部110によって求められた画面30上での位置の軌跡として特定することができるため、刀の軌跡から切断平面を求めることができるようになっている。そこで、切断位置演算部134は、求めた切断平面と、切断対象のオブジェクトとの交点を切断位置として求める。
【0076】
なお、上述した切断平面は、プレーヤが操作する刀型コントローラ40の画面30に対する向きを考慮して特定することも可能である。
【0077】
切断位置演算部134は、オブジェクト空間において切断位置を求めることは処理負荷の増大となる場合に、切断平面を、オブジェクト基準のローカル座標系(切断対象のオブジェクトのローカル座標系)に座標変換し、このローカル座標系で切断位置を求めることで処理負荷の軽減を図ることができる。
【0078】
頂点補正部136は、1又は複数の頂点座標により定義されるオブジェクトに対して、切断位置演算部134により求められた切断位置を反映させることで、切断後のオブジェクトの頂点座標を設定(補正)する処理行う。
【0079】
こうすることで、例えば、対向する多角形の上面の頂点と下面の頂点とにより定義される多角柱オブジェクトにおいて、その側面が切断された場合、多角柱オブジェクトを複製して2つのオブジェクトを生成し、一方の多角柱オブジェクトは上面として定義された頂点座標を切断位置の座標に設定し、他方の多角柱オブジェクトは下面として定義された頂点情報を切断位置の座標に設定する処理が可能となる。これにより、オブジェクトを構成するポリゴンごとに切断の有無を判定する必要がなくなり、少ない処理負荷でプレーヤの動作を反映させた任意の切断方向で切断されたオブジェクトの画像を生成することができるようになる。
【0080】
画像生成部140は、ゲーム処理結果等に基づいて、オブジェクト空間内において所与の視点(仮想カメラ)から見える画像を生成し、表示部190に出力する。
【0081】
より具体的には、画像生成部140では、まず座標変換、クリッピング処理、透視変換、或いは光源計算等のジオメトリ処理が行われ、その処理結果に基づいて、描画データ(頂点に付与される位置座標、テクスチャ座標、色(輝度)データ、法線ベクトル或いはα値等を含むデータ)が作成される。
【0082】
そして、画像生成部140は、この描画データに基づいて、ジオメトリ処理後のオブジェクト(1又は複数のプリミティブ面)の画像を、記憶部170内の描画領域(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できる領域)に描画する。この際、画像生成部140は、テクスチャをオブジェクトにマッピング処理等も行う。
【0083】
画像生成部140は、さらに位置演算部110によって求められた第1及び第2のセンサ面における被検出物の位置に対応する画面30上での位置等に基づいて、エフェクトとしての画像を生成する処理を行う。すなわち、より効果的なエフェクト画像を生成して画面30に表示させることにより、操作入力部としての刀型コントローラ40を駆使して画面30に映し出される敵キャラクタと攻防を繰り返すプレーヤの仮想現実感を向上させる。さらに、画像生成部140は、オブジェクト生成部132によって生成された切断後の2つのオブジェクトの画像を生成する処理を行う。
【0084】
音生成部150は、ゲーム処理結果等に基づいて、各種の音処理を行い、BGM、効果音、又は音声などの音を生成し、音出力部192に出力する。
【0085】
本実施形態における音生成部150は、さらに位置演算部110によって求められた画面30上での位置等に基づいて、エフェクトとしての音を生成する処理を行う。すなわち、より効果的なエフェクト音を生成して出力させることにより、操作入力部としての刀型コントローラ40を駆使して画面30に映し出される敵キャラクタと攻防を繰り返すプレーヤの仮想現実感を向上させる。
【0086】
なお、本実施形態の画像生成システムを適用したゲームシステムについては、1人のみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、このようなシングルプレーヤモードのみならず、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。
【0087】
また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて生成してもよい。
【0088】
2. 検出装置
本実施形態における画像生成システムは、図1に示した検出装置により形成されたセンサ面における操作入力部(被検出物)の位置から、表示部の画面上での位置を求め、その位置又はその位置から求められる位置の変化に基づいて、画像生成を行う。さらに、プレーヤが操作する操作入力部を介して入力された画面上での位置の軌跡により特定される切断平面に基づいて、画面上に表示される物体を切断し、切断後の2つの物体の画像を生成する。
【0089】
そのため、まず、画像生成システムにおいて、プレーヤによって操作される操作入力部の位置等を検出する原理について説明する。
【0090】
2.1 操作入力部の位置の検出
本実施形態では、画像生成システムが生成する画像を表示する画面上の各位置と、上述した検出装置により形成されるセンサ面上の各位置とを1対1に対応付けている。したがって、操作入力部がセンサ面上を横切る位置が検出できれば、操作入力部の画面上での位置を容易に特定することができる。
【0091】
図3(A)、(B)に、上述した検出装置により形成されるセンサ面における操作入力部の位置の検出原理について説明するための図を示す。
【0092】
ここでは、第1のセンサ50による第1の位置の検出原理ついてのみ説明するが、第2のセンサ60による第2の位置の検出原理についても同様である。
【0093】
第1のセンサ50は、図3(A)に示すように、第1のセンサ面形成枠200内に、2次元の第1のセンサ面52を形成する。第1のセンサ面形成枠200の第1の辺SD1の両角部には、1組のセンサS1、S2が設けられている。
【0094】
センサS1は、発光部と受光部とを有している。発光部は、角度θが0度〜90度の間で赤外線を出力し、その戻り光を受光部で受光するようになっている。
そのため、第1のセンサ面形成枠200の各辺SD1〜SD4には、反射板を配置し、センサの発光部からの赤外線を受光部に反射させるようにしている。
【0095】
センサS2も、センサS1と同様に発光部と受光部とを有し、角度θが0度〜90度の間で自ら発光した赤外線の戻り光を受光する。
【0096】
このようなセンサS1、S2は、角度θが0度となる方向が、互いに逆方向になるように設けられている。こうすることで、センサS1、S2により2次元平面の第1のセンサ面52が第1のセンサ面形成枠200内に形成される。
【0097】
センサS1によって角度θが0度〜90度の間で受光された結果は、第1のセンサ50において結像IM1として得られる。センサS2によって角度θが0度〜90度の間で受光された結果は、第1のセンサ50において結像IM2として得られる。
【0098】
結像IM1、IM2では、プレーヤによって操作される操作入力部が被検出物として第1のセンサ面52を横切ると、被検出物により発光した赤外線が遮られない部分は各辺に設けられた反射板により反射して受光部で受光されるが、被検出物により発光した赤外線が遮られる部分は各辺に設けられた反射板により反射されることがない。したがって、結像IM1、IM2では、被検出物の部分のみが影となって表現される。すなわち、結像IM1、IM2において、影となった部分を、角度θ1、θ2として判別することができる。
【0099】
なお、第1のセンサ面形成枠200の各辺に反射板を設けずに、操作入力部の方に反射板を設けるようにしてもよい。この場合、結像IM1、IM2では、被検出物として操作入力部が第1のセンサ面52を横切ると、被検出物に遮られない部分が影となって表現されるので、結像IM1、IM2において、影とならない部分を、角度θ1、θ2として判別することができる。
【0100】
センサS1、S2の位置が固定されているため、角度θ1、θ2から操作入力部が第1のセンサ面52を横切る位置をP(x,y)を特定することができる。
【0101】
ここで、図3(B)に示すように第1のセンサ面形成枠200の第1の辺SD1の中点を原点O(0,0)とし、第1の辺SD1の長さを2×Lとし、センサS1、S2の座標をそれぞれ(−L,0)、(L,0)とする。この場合、Pの座標(x,y)は(1)式、(2)式より求めることができる。
【0102】
tanθ1=y/(x+L) ・・・(1)
tanθ2=y/(L−x) ・・・(2)
以上より、操作入力部が第1のセンサ面52を横切る位置Pの座標を特定することができる。同様に、操作入力部が第2のセンサ面62を横切る位置も特定することができる。
【0103】
したがって、第1のセンサ面形成枠200内に形成される第1のセンサ面52の各位置と、本実施形態において生成される画像が表示される画面の各位置とを1対1に対応付けておくことで、本実施形態における画像生成システムは操作入力部が第1のセンサ面52を横切る位置に対応した画面上での位置を容易に特定することができる。
【0104】
なお、本実施形態では、第1及び第2のセンサ50、60により、第1及び第2のセンサ面52、62における第1及び第2の位置を特定し、その位置を入力情報として画像生成システムに供給するものとして説明したが、これに限定されるものではない。例えば、第1及び第2のセンサ50、60における結像IM1、IM2から求められる角度θ1、θ2を入力情報として画像生成システムに供給し、画像生成システムにおいて、上述したように第1及び第2のセンサ面52、62における位置を求めた後、画面上での位置を特定するようにしてもよい。
【0105】
また、操作入力部の画面上での位置の特定は、上述した1つのセンサ面のみで可能となるため、第1及び第2のセンサ面52、62のいずれかの検出された位置を代表値として用いることができる。本実施形態では、第1のセンサ面52における位置を代表値として用いる。
【0106】
2.2 操作入力部が移動する速さの検出
図4に、本実施形態において、上述した検出装置により形成されるセンサ面における操作入力部が移動する速さの検出原理について説明するための図を示す。
【0107】
本実施形態では、リアルタイムに画像を生成し、例えば所与のフレーム周期(例えば、1/60秒、1/30秒)で画像を生成する。したがって、このフレーム周期を単位時間とすることで、所与のフレームf1において求められた第1のセンサ面52における位置Pf1(x1,y1)と、次のフレームf2(=f1+1)において求められた第1のセンサ面52におけるPf2(x2,y2)の変化量を求めることで、第1のセンサ面52における単位時間当たりの変化量を求めることができる。
【0108】
この単位時間当たりの変化量を、操作入力部が移動する速さ(例えば、刀型コントローラの振る速さ)とすることができる。
【0109】
また、第1のセンサ面52における位置Pf1(x1,y1)から、次のフレームf2(=f1+1)において求められた第1のセンサ面52におけるPf2(x2,y2)の変化する向きを求めることで、操作入力部が移動する向き(例えば、刀型コントローラの振る向き)とすることができる。
【0110】
さらに、第1のセンサ面52における位置Pf1(x1,y1)から、次のフレーム(f1+1)において求められた第1のセンサ面52におけるPf2(x2,y2)の変化する量の絶対値を求めることで、操作入力部の移動距離(例えば、刀型コントローラの振り幅)とすることができる。
【0111】
また、操作入力部の移動する速さ、向き及び距離は、上述した1つのセンサ面のみで可能となるため、第1及び第2のセンサ面52、62のいずれかのみを用いて求めるようにしてもよい。第1及び第2のセンサ面52、62を用いる場合は、いずれかのセンサ面で求められた値を代表値として用いることができる。本実施形態では、第1のセンサ面52における値を代表値として用いる。
【0112】
2.3 操作入力部の画面に対する向きの検出
図5(A)、(B)に、上述した検出装置による操作入力部の画面に対する向きの検出原理について説明するための図を示す。
【0113】
図5(A)に示すように、検出装置の2つのタブレットセンサにより、間隔dをおいて第1及び第2のセンサ面52、62が形成される。ここで、プレーヤによって操作される操作入力部が、第1のセンサ面52を横切る位置をPS1、第2のセンサ面62を横切る位置をPS2とする。
【0114】
このとき、操作入力部の画面に対する向きは、第1のセンサ面52を横切る位置をPS1と第2のセンサ面62を横切る位置をPS2とを結ぶ線が、第1又は第2のセンサ面52、62となす角となる。
【0115】
すなわち、第1のセンサ面52を横切る位置PS1(xs1,ys1)、第2のセンサ面62を横切る位置PS2(xs2,ys2)とすると、図5(B)に示すように、操作入力部の画面に対する向きφのx成分をφx、y成分をφyは、次の(3)式、(4)式により求められる。
【0116】
tanφx=(xs1−xs2)/d ・・・(3)
tanφy=(ys1−ys2)/d ・・・(4)
このように、センサ面における操作入力部が横切る位置が特定できれば、第1及び第2のセンサ面における位置から、操作入力部の画面に対する向きを容易に求めることができるようになる。
【0117】
3. 本実施形態の特徴
このような検出装置からの入力情報に基づいて、プレーヤによって操作される操作入力部の画面上での位置等を特定することができる画像生成システムでは、オブジェクトを定義するデータ構造を工夫することで、その軌跡によって特定される切断平面で切断されたオブジェクトの画像を少ない処理で生成することができ、より一層の仮想現実感を向上させることができる。
【0118】
以下では、オブジェクト空間内をプレーヤが移動するゲームにおいて、プレーヤが一人称視点位置から見た画像が表示される画面を見ながら、画面上に現れる敵キャラクタ(オブジェクト)やその他の物体(オブジェクト)を操作入力部としての刀型コントローラを振り回して斬っていくゲームを考える。ここで、一人称視点とは、プレーヤが操作するキャラクタ自身の目の位置に、視点位置および視線方向を設定したものをいう。ちなみに、キャラクタに対し相対的に固定された位置(キャラクタを含めた景色を第3者的に見える位置)に視点位置および視線方向を設定したものを三人称視点という。
【0119】
また、以下では、切断対象のオブジェクトとして、棒オブジェクト(広義には、多角柱オブジェクト)、板オブジェクト、ひも状オブジェクト及び布オブジェクトについて説明するが、これらに限定されるものではなく、種々の形態のオブジェクトに適用することができる。
【0120】
3.1 棒オブジェクト(多角柱オブジェクト)
棒オブジェクト(広義には、多角柱オブジェクト)は、例えば木や竹、敵キャラクタが所持している棒状の武器などを表現することができる。以下では、理解を容易にするために、棒状オブジェクトとして6角柱について説明するが、これ以外の多角柱オブジェクトでも原理的には同じである。
【0121】
図6に、棒オブジェクトとして6角柱オブジェクトを切断平面に沿って切断した場合における切断後の2つのオブジェクトの生成原理を説明するための図を示す。
【0122】
本実施形態では、6角柱オブジェクトOBJ1を、例えば対向する6角形の上面USと下面DSの各頂点UP1〜UP6、DP1〜DP6で定義する。これにより、6角柱オブジェクトOBJ1の6つの側面を、上面US及び下面DSの対応する頂点で特定することができ、例えば6角柱オブジェクトOBJ1の1つの側面は頂点UP1、UP2、DP2、DP1で特定される。
【0123】
切断平面SSは、操作入力部の画面上での位置の軌跡を含む画面奥行き方向にできたワールド座標系若しくはカメラ座標系における平面として求めることができる。この場合、代表点Aの座標と法線ベクトルnとを求め、これらのパラメータで切断平面SSを一意に定義することもできる。
【0124】
6角柱オブジェクトOBJ1の側面を切断平面SSが切断する位置は、上面の各頂点と、これに対応する下面の各頂点を結ぶ線と、切断平面SSとの交点Pとして求めることができる。
【0125】
本実施形態では、ワールド座標系若しくはカメラ座標系で交点PのX、Y、Z座標を求めると処理負荷が増大するため、切断平面SSをオブジェクト基準のローカル座標系に変換するようにしている。すなわち、切断平面SSを、6角柱オブジェクトOBJ1が定義されるローカル座標系に変換し、このローカル座標系で交点Pを求める。こうすることで、ローカル座標系の1軸の座標のみを求めればよいことになる。特に、ワールド座標系若しくはカメラ座標系で切断平面SSと6角柱オブジェクトOBJ1とのヒット判定を行う場合を考慮すると、処理負荷を大幅に軽減することができる。
【0126】
オブジェクト基準のローカル座標系では、例えば6角柱オブジェクトの高さ方向をy軸、上面及び下面がxz座標系で定義され、座標変換後の切断平面SSの代表点A(ax,ay,az)、法線ベクトルn(nx,ny,nz)とする。交点PP(x,y,z)の各座標位置は、点PPのx座標(第1の座標軸)、z座標(第2の座標軸)が既知であるため、次の(5)式でy座標(第3の座標軸)を求めればよいことになる。
【0127】
y=ay+(ax−x)(nx/ny)+(az−z)(nz/ny)
・・・(5)
この結果、上面若しくは下面の頂点数だけ、切断平面SSとの交点P1〜P6が求められる。
【0128】
次に、切断前の6角柱オブジェクトOBJ1(広義には、第1の多角柱オブジェクト)を複製して、6角柱オブジェクトOBJ1と6角柱オブジェクトOBJ2(広義には、第2の多角柱オブジェクト)を用意する。
【0129】
そして、切断後のオブジェクトを生成するために、6角柱オブジェクトOBJ1の上面を定義する頂点座標を、(5)式で求められた交点P1〜P6に設定する。これにより、新たに上面US´が定義される。
【0130】
また、6角柱オブジェクトOBJ2の下面を定義する頂点座標を、(5)式で求められた交点P1〜P6に設定する。これにより、新たに下面DS´が定義される。
【0131】
以上のように、上面及び下面の頂点により定義される多角柱オブジェクトの側面を任意の切断平面が切断した場合でも、その切断位置に応じて、切断後の2つの多角柱オブジェクトを、少ない処理負荷で生成することができる。
【0132】
3.1.1 側面のテクスチャ
ところで、切断前の6角柱オブジェクトOBJ1にマッピングされていたテクスチャを、切断後の6角柱オブジェクトOBJ1、OBJ2にそのままマッピングした場合、テクスチャが変形してしまう。
【0133】
そこで、以下のように、切断後のオブジェクトの各頂点にコーディネート(cordinate)するテクスチャ座標を設定することで、テクスチャが変形することなく、より一層リアルな切断画像を表現することができる。
【0134】
図7に、6角柱オブジェクトOBJ1、OBJ2の側面にマッピングされるテクスチャのテクスチャ座標の一例を示す。
【0135】
ここで、点UP1〜UP6は、6角柱オブジェクトOBJ2の上面USの各頂点に対応する。点DP1〜DP6は、6角柱オブジェクトOBJ1の下面DSの各頂点に対応する。点P1〜P6は、切断平面SSによる切片であり、6角柱オブジェクトOBJ1の上面US´及び6角柱オブジェクトOBJ2の下面DS´の各頂点に対応する。
【0136】
例えば、点UP1には、(u,v)=(0,1.00)のテクスチャ座標がコーディネートされる。点DP1には、(u,v)=(1.00,0)のテクスチャ座標がコーディネートされる。
【0137】
本実施形態では、点Pk(k=1〜6、kは自然数)に、点UPkと点DPkとを結ぶ線を内分するテクスチャ座標をコーディネートする。
【0138】
このように、上面及び下面の対応する頂点間を結ぶ線を、切断平面SSが内分する比率に応じて、テクスチャ座標を変更することにより、切断前のテクスチャを、切断後の6角柱オブジェクトOBJ1、OBJ2にマッピングしても、テクスチャが変形することがなくなる。
【0139】
3.1.2 切断後のオブジェクトの切断面のテクスチャ
これに対して、竹のようにどこを斬っても切断面が同じものを表現する場合には、切断後の上面及び下面にマッピングするテクスチャ座標は変更しない。
【0140】
図8に、6角柱オブジェクトOBJ1、OBJ2の上面及び下面にマッピングされるテクスチャのテクスチャ座標の一例を示す。
【0141】
このように、切断後の6角柱オブジェクトOBJ1の上面US´若しくは6角柱オブジェクトOBJ2の下面DS´の各頂点には、切断前の6角柱オブジェクトOBJ1の上面及び下面にマッピングされていたテクスチャのテクスチャ座標をそのままコーディネートする。したがって、切断前のテクスチャがそのままマッピングされることになる。
【0142】
この場合、切断平面SSが上面及び下面と平行ではない場合、切断後のオブジェクトの切断面の画像は切り口にあわせて変形することになる。
【0143】
こうして、図9に示すように、切断の前後で、側面にマッピングされたテクスチャの変形を防止するとともに、切断面の画像をより少ない処理負荷で生成することができるようになる。
【0144】
3.1.3 本実施形態の処理例
次に、本実施形態において、切断平面に応じて棒オブジェクト(N角柱オブジェクト、Nは3以上の自然数)を切断する処理について、より詳細に説明する。
【0145】
図10に、本実施形態における棒オブジェクト(多角柱オブジェクト)を定義する構造体の構成の一例について説明するための図を示す。
【0146】
棒オブジェクトの構造体210は、棒オブジェクトの基準点の位置212、基準点の向き214、基準点の速度216、上面及び下面の各頂点座標群220、テクスチャ座標222を含む。各頂点座標群220は、オブジェクト座標系(ローカル座標系)の下面のi番目(N角柱オブジェクトの場合、iは1以上N以下の自然数)の頂点のy座標としてymin(i)、オブジェクト座標系(ローカル座標系)の上面のi番目の頂点のy座標としてymax(i)を含む。
【0147】
このようなデータ構造の棒オブジェクトMについては、以下のようにして切断後のオブジェクトを生成することができる。
【0148】
図11、図12及び図13に、本実施形態における棒オブジェクトMを切断した画像を生成する処理の一例を示すフローチャートを示す。
【0149】
まず、切断前の棒オブジェクトMの初期化(ステップS10)をした後、オブジェクト空間において仮想カメラの位置及び向きを設定するとともに、上述した検出装置からの入力情報を読み込む(ステップS11)。
【0150】
次に、プレーヤによって操作され、カメラ座標系で画面上に表示される刀が、棒オブジェクトMに届く範囲にあるか否かの判定を行うために、まず棒オブジェクトMの基準点をカメラ座標系に変換し、そのZ座標を求める(ステップS12)。
【0151】
続いて、ステップS12で求められたZ座標を用いて、プレーヤによって画面上での位置が移動させられる刀の届く範囲として設定された範囲に、棒オブジェクトMがあるか否かを判別する(ステップS13)。ここでは、図14に示すように、プレーヤが操作する刀が届く範囲として、カメラ座標系のZ座標の範囲が0より大きくZ0より小さい範囲であるものとする。
【0152】
ステップS13で、棒オブジェクトMの基準点250のカメラ座標系におけるZ座標が、0より大きくZ0より小さいと判定されたとき(ステップS13:Y)、棒オブジェクトMが刀の届く範囲にあると判断し、棒オブジェクトMの切断処理を行う(ステップS14)。この切断処理では、棒オブジェクトMと刀とのヒット判定も行われる。
【0153】
そして、切断処理後の棒オブジェクト(ヒットミス判定後の棒オブジェクト、又はヒット判定後に切断処理された2つの棒オブジェクト)、或いはステップS13で刀が届く範囲にないと判定されたとき(ステップS13:N)の棒オブジェクトMについて、移動処理を行う(ステップS15)。
【0154】
次に、これらオブジェクトを所与の視点から見た画像として生成し、表示部に表示させる(ステップS16)。
【0155】
ゲームオーバなどの所与の終了条件を満たしたとき(ステップS17:Y)、一連の処理を終了する(エンド)。一方、所与の終了条件を満たしていないとき(ステップS17:N)、ステップS11に戻って再度入力情報の読み込み等を行う。
【0156】
ステップS14における切断処理では、入力情報に基づいて求められた刀型コントローラの画面上での位置等から刀の軌跡を求める。
【0157】
そして、刀の軌跡と棒オブジェクトMとの交差判定を行う(ステップS20)。
【0158】
より具体的には、図15に示すように、例えばプレーヤによって操作される刀型コントローラの画面上での位置とその変化する向きとを用いて、軌跡を特定することができる。したがって、透視変換後の棒オブジェクトMの基準軸(縦軸)260と、特定された軌跡262とが交差するか否かを判定することができる。
【0159】
ステップS20で、刀の軌跡が棒オブジェクトMの基準軸と交差しないと判定されたとき(ステップS20:N)、一連の切断処理を終了する(エンド)。
【0160】
一方、ステップS20で、刀の軌跡が棒オブジェクトMの基準軸と交差すると判定されたとき(ステップS20:Y)、画面上の刀の軌跡262から、切断平面SSを求める(ステップS21)。この結果、切断平面SSのパラメータとして、代表点AAとその法線ベクトルn0とが求められる。
【0161】
次に、この切断平面SSのパラメータを、オブジェクト基準の座標系である棒オブジェクトMのローカル座標系に座標変換し、図6に示すように、座標変換後の代表点A(ax,ay,az)と座標変換後の法線ベクトルn(nx,ny,nz)を求める(ステップS22)。
【0162】
次に、法線ベクトルnのny成分が0か否かを判別する(ステップS23)。
ここで、法線ベクトルnのny成分が0である切断平面SSは、側面と平行な平面となるため、棒オブジェクトの側面を切断することができなくなる。これは、棒オブジェクトを上面及び下面の頂点により定義することで、切断後のオブジェクト生成を容易にした本実施形態を適用することができなくなることを意味する。したがって、ステップS23で、法線ベクトルnのny成分が0のとき(ステップS23:Y)を除外し、切断処理を終了させている(エンド)。
【0163】
ここで、プレーヤが斬る動作を行ったにも関わらず、その切断平面が棒オブジェクトMの側面と平行になったために、棒オブジェクトMの切断処理が行われないという不自然さを解消するために、例えばオブジェクト基準の座標系での法線ベクトルnのny成分が0のとき、切断平面SSの法線ベクトルnのny成分を補正して、切断処理を強制的に行うようにしてもよい。リアルタイムな画像生成が要求される場合、プレーヤがどの方向に斬った動作を行ったかについては正確に反映させる必要がないため、仮想現実感の向上のためにはむしろ好ましい。
【0164】
ステップS23で、法線ベクトルnのny成分が0ではないとき(ステップS23:N)、変数iを「1」に、変数fを「0」に設定する(ステップS24)。ここで変数iは、上面及び下面の頂点を指定するための1以上N以下の自然数である。また、変数fは、切断平面SSが棒オブジェクトMの上側若しくは下側を通過した頂点数を数えるための判別カウント変数である。この変数fは、各頂点ごとに上述した判別を行ってインクリメント若しくはデクリメントが行われる。こうすることで、変数fが「+N」若しくは「−N」のとき、棒オブジェクトMの上側若しくは下側のみを通過したと判断することができるので、切断されたか否かを判別することができる。
【0165】
続いて、上面のi番目の頂点と、これに対応する下面のi番目の頂点とを通る辺と、切断平面SSとの交点のy座標y(i)を(5)式を用いて求める(ステップS25)。上述したように、オブジェクト基準の座標系で交点を求めるようにしたので、例えば図6に示すように、求めるべき座標はy座標のみである。
【0166】
そして、求めたy(i)と、ymax(i)とを比較する(ステップS26)。
【0167】
y(i)が、ymax(i)より小さくないとき(ステップS26:N)、切断平面SSが棒オブジェクトMの上面より上側を通過したと判断し、変数fをインクリメントするとともに、y(i)にymax(i)を代入する(ステップS27)。
【0168】
ステップS26で、y(i)がymax(i)より小さいとき(ステップS26:Y)、或いはステップS27で変数fのインクリメント等が行われたとき、y(i)とymin(i)とを比較する(ステップS28)。
【0169】
y(i)が、ymin(i)より大きくないとき(ステップS28:N)、切断平面SSが棒オブジェクトMの下面より下側を通過したと判断し、変数fをデクリメントするとともに、y(i)にymin(i)を代入する(ステップS29)。
【0170】
ステップS28で、y(i)がymin(i)より大きいとき(ステップS28:Y)、或いはステップS29で変数fのデクリメント等が行われたとき、次の頂点について同様の判別を行うために、変数iをインクリメントする(ステップS30)。
【0171】
インクリメントした変数iが棒オブジェクトMの上面若しくは下面の頂点数N以下のとき(ステップS31:Y)、ステップS25に戻って、次の辺の交点のy座標を求める。
【0172】
一方、ステップS31で、インクリメントした変数iが棒オブジェクトMの上面若しくは下面の頂点数N以下ではないとき(ステップS31:N)、変数fが「−N」より大きく、かつ「+N」より小さいか否かを判別する(ステップS32)。
【0173】
変数fが「−N」より大きく、かつ「+N」より小さいとは判別されなかったとき(ステップS32:N)、棒オブジェクトMの上側若しくは下側のみを通過したと判断し、一連の切断処理を終了する(エンド)。
【0174】
一方、変数fが「−N」より大きく、かつ「+N」より小さいと判別されたとき(ステップS32:Y)、棒オブジェクトM(広義には、第1の多角柱オブジェクト)の図10に示す構造体を複製して、棒オブジェクトM´(広義には、第2の多角柱オブジェクト)を作成する(ステップS33)。
【0175】
続いて、棒オブジェクトM(広義には、第1の多角柱オブジェクト)の上面の頂点座標のy座標を、上述したように求めた交点のy座標y(i)に書き換える(ステップS34)。この際、図7で説明したように、図6に示す棒オブジェクトMの構造体において、切断位置である交点にコーディネートされるテクスチャ座標も同様に書き換える。
【0176】
また、棒オブジェクトM´(広義には、第2の多角柱オブジェクト)の下面の頂点座標のy座標を、上述したように求めた交点のy座標y(i)に書き換える(ステップS35)。この際、図7で説明したように、図6に示す構造体において、切断位置である交点にコーディネートされるテクスチャ座標も同様に書き換える。
【0177】
そして、切断後に2つの棒オブジェクトM、M´がずれて落ちる様を表現するために、所与の初速度を与える(ステップS36)。この場合、互いの初速度が異なっていることが望ましい。こうすることで、切断前のオブジェクトから、斬る動作によって、2つのオブジェクトが切断されていく様をよりリアルに表現することができる。
【0178】
最後に、一連の切断処理を終了する(エンド)。
【0179】
以上のようにすることで、棒オブジェクトMに対して任意の切断平面に沿って切断された2つの棒オブジェクトを、より少ない処理負荷で生成することができる。
【0180】
図16(A)、(B)、(C)に、ゲーム画像の一例を示す。
【0181】
図16(A)に示すゲーム画像において、検出装置からの入力情報に基づいて、プレーヤによって操作される刀型コントローラの画面300上での位置や、その位置の変化する向きなどに応じて、一人称視点で刀オブジェクト302が表示されている。このとき、プレーヤが画面300に対して画面の横軸方向に斬る動作を行うと、図16(B)に示すように刀の軌跡304が生成される。
【0182】
ここで、画面300に表示される棒状の竹オブジェクト306は、多角柱オブジェクトで構成されており、竹オブジェクト306がカメラ座標系において刀の届く範囲にあるものとすると、刀の軌跡304と、竹オブジェクト306の図示しない基準軸との交差判定が行われる。そして、竹オブジェクト306のローカル座標系で交点が求められ、もう1つの竹オブジェクト308が生成される。一方の竹オブジェクト306は、図6に示したように上面の頂点座標が交点に設定され、他方の竹オブジェクト308は、図6に示したように下面の頂点座標が交点に設定される。
【0183】
そして、両竹オブジェクト306、308は、それぞれ所与の初速度が与えられ、図16(C)に示すように、互いに別々に落下していくことになる。
【0184】
なお、以上の説明では、切断前のオブジェクトの上面の頂点座標を、切断後の切断位置の座標に設定し、新たに複製されたオブジェクトの下面の頂点座標を切断後の切断位置の座標に設定するように説明したが、これに限定されるものではない。例えば、切断前のオブジェクトの下面の頂点座標を、切断後の切断位置の座標に設定し、新たに複製されたオブジェクトの上面の頂点座標を切断後の切断位置の座標に設定するようにしてもよい。
【0185】
3.2 板オブジェクト
板オブジェクトは、厚さ方向が薄い4角柱オブジェクトと考えれば、基本的には上述した多角柱オブジェクトと同様に処理することができる。
【0186】
しかしながら、カメラ座標系における板オブジェクトBOBJでは、刀の軌跡(切断平面)が板オブジェクトと交差する位置によって、オブジェクト基準のローカル座標系への座標変換の向きを変える必要がある。
【0187】
図17に、板オブジェクトを切断平面に沿って切断する場合の説明図を示す。
【0188】
カメラ座標系における板オブジェクトBOBJに対して、刀の軌跡320に沿って切断平面を生成する場合と、刀の軌跡322に沿って切断平面を生成する場合とでは、上述したように多角柱オブジェクトの切断処理を用いて少ない処理負荷で切断後のオブジェクトを生成するための処理方法を変える必要がある。
【0189】
刀の軌跡320に沿って板オブジェクトBOBJを切断する処理を行う場合、より少ない処理負荷で切断位置を求めるためには、例えば図18(A)に示すようなオブジェクト座標系に座標変換を行う必要がある。この場合、図6に示したように、上面US1及び下面DS1のxz座標は既知であるため、刀の軌跡320によって特定される切断平面SS1と、上面及び下面の頂点を結ぶ線との交点PP´のy座標のみを求めればよい。
【0190】
一方、刀の軌跡322に沿って板オブジェクトBOBJを切断する処理を行う場合、より少ない処理負荷で切断位置を求めるためには、例えば図18(B)に示すようなオブジェクト座標系に座標変換を行う必要がある。この場合、上面US2及び下面DS2のyz座標は既知であるため、刀の軌跡322によって特定される切断平面SS2と、上面及び下面の頂点を結ぶ線との交点PP´のx座標のみを求めればよい。
【0191】
3.2.1 本実施形態の処理
このような板オブジェクトBOBJに対する刀の軌跡(切断平面)の交差位置の判別は、切断処理に先立って行うことができる。
【0192】
また、図12及び図13に示した切断処理では、板オブジェクトBOBJと刀とのヒット判定が行われるので、例えば図18(A)に示す向きで切断されなかったときに、図18(B)に示す向きで切断処理を行うようにしてもよい。
【0193】
図19に、本実施形態における板オブジェクトを切断した画像を生成する処理の一例のフローチャートを示す。
【0194】
ここでは、図12及び図13に示した切断処理において、板オブジェクトBOBJと刀とのヒット判定が行われる場合の処理例を示す。
【0195】
まず、切断前の板オブジェクトの初期化(ステップS40)をした後、オブジェクト空間において仮想カメラの位置及び向きを設定するとともに、上述した検出装置からの入力情報を読み込む(ステップS41)。
【0196】
次に、プレーヤによって操作され、カメラ座標系で画面上に表示される刀が、板オブジェクトに届く範囲にあるか否かの判定を行うために、まず板オブジェクトの基準点をカメラ座標系に変換し、そのZ座標を求める(ステップS42)。
【0197】
続いて、ステップS42で求められたZ座標を用いて、プレーヤによって画面上での位置が移動させられる刀の届く範囲として設定された範囲に、板オブジェクトがあるか否かを判別する(ステップS43)。ここでは、図14と同様に、プレーヤが操作する刀が届く範囲として、カメラ座標系のZ座標の範囲が0より大きくZ0より小さい範囲であるものとする。
【0198】
ステップS43で、板オブジェクトの基準点のカメラ座標系におけるZ座標が、0より大きくZ0より小さいと判定されたとき(ステップS43:Y)、板オブジェクトが刀の届く範囲にあると判断し、まず図18(B)に示す縦軸方向に対して板オブジェクトの切断処理を行う(ステップS44)。この切断処理は、図12及び図13で示した棒オブジェクトの切断処理と同様のため、説明を省略する。
【0199】
そして、ステップS44において、板オブジェクトの切断処理が行われたか否かを判別し(ステップS45)、板オブジェクトの切断処理が行われなかったと判別されたとき(ステップS45:N)、次は図18(A)に示す横軸方向に対して板オブジェクトの切断処理を行う(ステップS46)。この切断処理は、図12及び図13で示した棒オブジェクトの切断処理と同様のため、説明を省略する。
【0200】
ステップS45で、板オブジェクトの切断処理が行われたと判別されたとき(ステップS45:Y)、或いはステップS46で横軸方向に対して切断処理が行われると、切断処理後の板オブジェクト(ヒットミス判定後の板オブジェクト、又はヒット判定後に切断処理された2つの板オブジェクト)について、移動処理を行う(ステップS47)。
【0201】
次に、これらオブジェクトを所与の視点から見た画像として生成し、表示部に表示させる(ステップS48)。
【0202】
ゲームオーバなどの所与の終了条件を満たしたとき(ステップS49:Y)、一連の処理を終了する(エンド)。一方、所与の終了条件を満たしていないとき(ステップS49:N)、ステップS41に戻って再度入力情報の読み込み等を行う。
【0203】
以上のようにすることで、板オブジェクトBOBJを任意の向きの任意の切断平面に沿って切断される画像を、より少ない処理負荷で生成することができる。
【0204】
なお、板オブジェクトの厚さ方向が薄い場合には、上面及び下面の各頂点を結ぶ線と切断平面との4交点を求める必要はなく、例えば図18(A)に示すように、交点PP´、PP1´の2点だけを求め、手前側と奥側のy座標を同じとして扱うことで、より処理負荷の軽減を図ることができる。
【0205】
3.3 ひも状オブジェクト
ひも状オブジェクトは、例えば垂れ下がる木の枝や、縄、蛇などを表現することができる。
【0206】
図20に、ひも状オブジェクトを切断平面に沿って切断した場合における切断後の2つのオブジェクトの生成原理を説明するための図を示す。
【0207】
本実施形態では、ひも状のオブジェクトSOBJを、順次リンクされる1又は複数の頂点のワールド座標系での座標で定義する。そして、各頂点の座標を用いて、常に仮想カメラの向きと正対する2次元のポリゴンを表示させるようにする。こうすることで、節となる頂点の座標を管理するだけでよいため、ポリゴン数を消費することなく、より少ない処理負荷でひも状オブジェクトの画像生成を行うことができる。
【0208】
このようなひも状オブジェクトSOBJは、例えば風になびいて状態を表現するため、揺れて表現されることがある。本実施形態では、ひも状オブジェクトSOBJの揺れが小さいという前提で、各頂点間について切断平面が通過したか否かを判別することなく、以下のように処理している。なお、リアルタイム処理が要求されるゲーム画像では、ひも状オブジェクトSOBJの揺れが大きい場合であっても、プレーヤがどの位置を切断したかといった正確さは要求されず、むしろ切断平面によって異なる切断が行われる方が、仮想現実感を向上させることができる。
【0209】
そのため、本実施形態では、ひも状オブジェクトSOBJと切断平面SS4とのヒット判定を行うために、ひも状オブジェクトSOBJの始点と終点とを結ぶ仮想的な直線VLを考える。
【0210】
例えばひも状オブジェクトSOBJが、始点をA0、終点をA4とした頂点A0〜A4で定義されている場合、頂点A0、A4を結ぶ仮想的な直線VLを考える。そして、この直線VLと、切断平面SS4とのヒット判定を行う。
【0211】
さらに、直線VLと切断平面SS4の交点P´´を求め、この交点P´´が直線VLを内分する比率に基づいて、ひも状オブジェクトSOBJの切断位置Qを特定する。より具体的には、交点P´´が直線VLを内分する比率がα:βであるものとすると、ひも状オブジェクトSOBJの各頂点間の距離の総和L(=w1+w2+w3+w4)をα:βに内分する点Qを求め、切断位置とする。
【0212】
この切断位置が、例えば頂点A2と頂点A3との間にあるものとすると、ひも状オブジェクトSOBJ(広義には、第1のひも状オブジェクト)を複製して、ひも状オブジェクトSOBJ2(広義には、第2のひも状オブジェクト)を生成する。
【0213】
そして、ひも状オブジェクトSOBJの終点を頂点A3として設定するとともに、頂点A3の座標に切断位置Qの座標を設定する。また、ひも状オブジェクトSOBJ2の始点を頂点A2として設定するとともに、頂点A2の座標に切断位置Qの座標を設定する。
【0214】
以上のように、1又は複数の頂点で定義されるひも状オブジェクトが、任意の切断平面で切断された場合でも、非常に簡素な処理で切断後の2つのひも状オブジェクトを生成することができる。
【0215】
ところで、切断前のひも状オブジェクトSOBJにマッピングされていたテクスチャを、切断後のひも状オブジェクトSOBJ、SOBJ2にそのままマッピングした場合、テクスチャが変形してしまう。
【0216】
そこで、以下のように、切断後のオブジェクトの各頂点にコーディネートするテクスチャ座標を設定することで、テクスチャが変形することなく、より一層リアルな切断画像を表現することができる。
【0217】
図21に、ひも状オブジェクトSOBJにマッピングされるテクスチャのテクスチャ座標の一例を示す。
【0218】
ここで、点A0〜A4は、ひも状オブジェクトSOBJを定義する各頂点に対応する。本実施形態では、各頂点の座標を用いて、常に仮想カメラの向きに正対するポリゴンを表示するようにし、図21に示すテクスチャがマッピングされる。そのため、頂点A0〜A4について、一定の幅を有するテクスチャを用意する。
【0219】
本実施形態では、図22に示すように、例えば各頂点間を結ぶリンクと仮想カメラの向きに垂直な方向の線上に、頂点A0〜A4それぞれから長さw/2の位置に、点L0〜L4、R0〜R4を設ける。点L0〜L4、R0〜R4には、図21に示す対応するテクスチャ座標をコーディネートする。
【0220】
したがって、切断位置Qが求められると、切断後のひも状オブジェクトSOBJの終点A3には点Qが設定されるため、これに対応する点LQ、RQには、図21に示すテクスチャ座標をコーディネートすることができる。
【0221】
このように、切断平面SS4が、ひも状オブジェクトを切断する位置がその始点と終点を結ぶ仮想的な直線を内分する比率に応じて、テクスチャ座標を変更することにより、切断前のテクスチャを切断後のひも状オブジェクトSOBJ、SOBJ2にマッピングしても、テクスチャが変形することがない。
【0222】
3.3.1 本実施形態の処理例
次に、本実施形態において、切断平面に応じてひも状オブジェクトを切断する処理について、より詳細に説明する。
【0223】
図23に、本実施形態におけるひも状オブジェクトを定義する構造体の構成の一例について説明するための図を示す。
【0224】
ひも状オブジェクトの構造体400は、各頂点A0〜ANのワールド座標系における座標410、使用頂点情報420、各頂点間を結ぶリンクの長さ430を含む。
【0225】
使用頂点情報420は、頂点A0〜ANのうち使用する頂点の最小番号m、頂点A0〜ANのうち使用する頂点の最大番号nを含む。ひも状オブジェクトSOBJは、最小番号mに設定された頂点が始点となり、最大番号nに設定された頂点が終点となる。
【0226】
各頂点間を結ぶリンクの長さ430は、リンクごとの長さw(0)〜w(N−1)を含む。
【0227】
このようなデータ構造のひも状オブジェクトについては、以下のようにして切断後のオブジェクトを生成することができる。
【0228】
図24及び図25に、本実施形態におけるひも状オブジェクトを切断した画像を生成する処理の一例を示すフローチャートを示す。
【0229】
ここで、ひも状オブジェクトを定義する各頂点間を結ぶリンクの最大数をN、刀の届く最大距離をZ0としている。
【0230】
まず、切断前のひも状オブジェクトM1の初期化(ステップS50)を行う。
より具体的には、使用する頂点の最大番号nを0に、使用する頂点の最小番号mをNに設定する。
【0231】
次に、オブジェクト空間において仮想カメラの位置及び向きを設定するとともに、上述した検出装置からの入力情報を読み込む(ステップS51)。
【0232】
次に、プレーヤによって操作され、カメラ座標系で画面上に表示される刀が、ひも状オブジェクトに届く範囲にあるか否かの判定を行うために、まずひも状オブジェクトの基準点をカメラ座標系に変換し、そのZ座標を求める(ステップS52)。
【0233】
続いて、ステップS52で求められたZ座標を用いて、プレーヤによって画面上での位置が移動させられる刀の届く範囲として設定された範囲に、ひも状オブジェクトがあるか否かを判別する(ステップS53)。
【0234】
ステップS53で、ひも状オブジェクトの基準点のカメラ座標系におけるZ座標が、0より大きくZ0より小さいと判定されたとき(ステップS53:Y)、ひも状オブジェクトが刀の届く範囲にあると判断し、画面上の刀の軌跡から切断平面SS4を求め(ステップS54)、この切断平面SS4を用いてひも状オブジェクトの切断処理を行う(ステップS55)。
【0235】
そして、切断処理後のひも状オブジェクト、或いはステップS53で刀が届く範囲にないと判定されたとき(ステップS53:N)、ひも状オブジェクトについて、移動処理を行う(ステップS56)。
【0236】
続いて、各頂点間を結ぶリンクの長さがw(i)になるように各頂点を補正する(ステップS57)。このリンクの長さは、ステップS54で求められた切断平面SS4により切断された場合には、ステップS55で切断位置に応じた長さに更新されている。
【0237】
次に、これらオブジェクトを所与の視点から見た画像として生成し、表示部に表示させる(ステップS58)。
【0238】
ゲームオーバなどの所与の終了条件を満たしたとき(ステップS59:Y)、一連の処理を終了する(エンド)。一方、所与の終了条件を満たしていないとき(ステップS59:N)、ステップS51に戻って再度入力情報の読み込み等を行う。
【0239】
ステップS55における切断処理では、入力情報に基づいて求められた刀型コントローラの画面上での位置等から刀の軌跡を求める。
【0240】
そして、ひも状オブジェクトの始点Amと終点Anとを結ぶ線分AmAnと、刀の軌跡との交点P´´を求める(ステップS60)。
【0241】
ステップS60で求められた交点P´´が、線分AmAn上にないと判定されたとき(ステップS61:N)、一連の切断処理を終了する(エンド)。
【0242】
一方、ステップS60で求められた交点P´´が、線分AmAn上にあると判定されたとき(ステップS61:Y)、リンクの全長Lを求める(ステップS62)。
【0243】
続いて、線分AmAnの長さに対する線分AmP´´の比率を用いて、ひも状オブジェクトの始点Amから切断位置までの長さKを求める(ステップS63)。
【0244】
そして、まず変数iに、始点の番号mを代入し(ステップS64)、長さKとw(i)を比較する(ステップS65)。Kがw(i)より小さいときは当該リンクが切断されると判断され、Kがw(i)以上のとき次のリンク以降で切断されると判断される。
【0245】
したがって、ステップS65で、Kがw(i)以上であると判定されたとき(ステップS65:Y)、Kをw(i)だけ減算した値をKに代入するとともに、変数iをインクリメントして(ステップS66)、再びKとw(i)とを比較する(ステップS65)。
【0246】
そして、Kがw(i)より小さいと判定されたとき(ステップS65:N)、ひも状オブジェクトM1の構造体を複製して、ひも状オブジェクトM1´を作成する(ステップS67)。
【0247】
さらに、ひも状オブジェクトM1については、リンクを書き換えるために、各頂点を補正する(ステップS68)。すなわち、頂点の最大番号nを「i+1」に設定するとともに、w(i)をKに設定する。この際、上述したように、ひも状オブジェクトM1について、テクスチャ座標も同様に書き換える。
【0248】
また、ひも状オブジェクトM1´については、リンクを書き換えるために、各頂点を補正する(ステップS69)。すなわち、頂点の最小番号mをiに設定するとともに、w(i)に「w(i)−K」を設定する。この際、上述したように、ひも状オブジェクトM1について、テクスチャ座標も同様に書き換える。
【0249】
そして、切断後に2つのひも状オブジェクトM1、M1´がずれて落ちる様を表現するために、所与の初速度を与える(ステップS70)。この場合、互いの初速度が異なっていることが望ましい。こうすることで、切断前のオブジェクトから、斬る動作によって、2つのオブジェクトが切断されていく様をよりリアルに表現することができる。
【0250】
最後に、一連の切断処理を終了する(エンド)。
【0251】
以上のようにすることで、ひも状オブジェクトM1に対して任意の切断平面に沿って切断された2つの棒オブジェクトを、より少ない処理負荷で生成することができる。
【0252】
3.4 布オブジェクト
布オブジェクトは、上述したひも状オブジェクトが複数配列したものと考えれば、上述したひも状オブジェクトと同様に処理することができる。
【0253】
図26に、本実施形態における布オブジェクトのモデルの一例を示す。
【0254】
このように本実施形態における布オブジェクトCOBJは、上述したひも状オブジェクトを単位として複数配列された、第1〜第T(Tは、2以上の自然数)のひも状オブジェクトの集合体として定義することができる。
【0255】
例えば図26では、布状オブジェクトCOBJは、始点が頂点A00で終点が頂点A04である頂点A00〜A04で定義されるひも状オブジェクトSOBJ0、始点が頂点A10で終点が頂点A14である頂点A10〜A14で定義されるひも状オブジェクトSOBJ1、始点が頂点A20で終点が頂点A24である頂点A20〜A24で定義されるひも状オブジェクトSOBJ2、始点が頂点A30で終点が頂点A34である頂点A30〜A34で定義されるひも状オブジェクトSOBJ3、始点が頂点A40で終点が頂点A44である頂点A40〜A44で定義されるひも状オブジェクトSOBJ4を含む。
【0256】
なお、図26では5つのひも状オブジェクトで布オブジェクトを定義するものとして説明したが、その数には限定されるものではなく複数のひも状オブジェクトを用いて、任意の布オブジェクトをモデル化することが可能である。
【0257】
このようにモデル化された布オブジェクトを任意の切断平面SS5で切断する場合、切断平面SS5と各ひも状オブジェクトSOBJ0〜SOBJ4それぞれについて、上述したようにリンクを切断して始点及び終点の頂点座標を補正する。これにより、切断平面に応じた切断後の2つのオブジェクトを、より少ない処理負荷で生成することができる。
【0258】
また、このような布オブジェクトは、ひも状オブジェクトの各頂点に、ポリゴンメッシュを割り当て、対応するテクスチャをマッピングすることができる。
【0259】
図27に、本実施形態における布オブジェクトにマッピングされるテクスチャのテクスチャ座標の一例を示す。
【0260】
ここで、点A00〜A44は、布オブジェクトCOBJを構成する各ひも状オブジェクトの構成頂点に対応する。
【0261】
例えば、点A00には、(u,v)=(0,1.00)のテクスチャ座標がコーディネートされる。点A44には、(u,v)=(1.00,0)のテクスチャ座標がコーディネートされる。
【0262】
このようなテクスチャがマッピングされた布オブジェクトは、例えば図26に示すものとなる。
【0263】
また、切断後の布オブジェクトにマッピングされるテクスチャについても、ひも状オブジェクトと同様に切断位置に対応するテクスチャ座標をコーディネートすることで、切断後の布オブジェクトにマッピングされるテクスチャが変形することがない。
【0264】
3.4.1 本実施形態の処理例
次に、本実施形態において、切断平面に応じて布オブジェクトを切断する処理について、より詳細に説明する。
【0265】
図28に、本実施形態における布オブジェクトを切断した画像を生成する処理の一例のフローチャートを示す。
【0266】
まず、切断前の布オブジェクトの初期化(ステップS80)をした後、オブジェクト空間において仮想カメラの位置及び向きを設定するとともに、上述した検出装置からの入力情報を読み込む(ステップS81)。
【0267】
次に、プレーヤによって操作され、カメラ座標系で画面上に表示される刀が、布オブジェクトに届く範囲にあるか否かの判定を行うために、まず布オブジェクトの基準点をカメラ座標系に変換し、そのZ座標を求める(ステップS82)。
【0268】
続いて、ステップS82で求められたZ座標を用いて、プレーヤによって画面上での位置が移動させられる刀の届く範囲として設定された範囲に、布オブジェクトがあるか否かを判別する(ステップS83)。
【0269】
ステップS83で、布オブジェクトの基準点のカメラ座標系におけるZ座標が、0より大きくZ0より小さいと判定されたとき(ステップS83:Y)、布オブジェクトが刀が届く範囲にあると判断し、画面上の刀の軌跡から切断平面SS5を求める(ステップS84)。
【0270】
そして、布オブジェクトを構成するひも状オブジェクトを特定するための変数jに1を設定して(ステップS85)、変数jで特定されるひも状オブジェクトについて切断処理を行う(ステップS86)。この切断処理は、図25で示したひも状オブジェクトの切断処理と同様のため、説明を省略する。
【0271】
続いて、変数jをインクリメントして(ステップS87)、変数jが布オブジェクトを構成するひも状オブジェクトの数dd以下であるか否かを判定する(ステップS88)。
【0272】
変数jがdd以下と判定されたとき(ステップS88:Y)、ステップS86に戻って、ステップS87でインクリメントされた変数jで特定されるひも状オブジェクトについて切断処理を行う。
【0273】
一方、変数jがdd以下ではない判定されたとき(ステップS88:N)は切断後の2つの布オブジェクトを構成するひも状オブジェクトについて、或いはステップS53で刀が届く範囲にないと判定されたとき(ステップS83:N)は各ひも状オブジェクトについて、移動処理を行う(ステップS89)。
【0274】
続いて、各頂点間を結ぶリンクの長さを補正し(ステップS90)、これらオブジェクトを所与の視点から見た画像として生成し、表示部に表示させる(ステップS91)。
【0275】
ゲームオーバなどの所与の終了条件を満たしたとき(ステップS92:Y)、一連の処理を終了する(エンド)。一方、所与の終了条件を満たしていないとき(ステップS92:N)、ステップS81に戻って再度入力情報の読み込み等を行う。
【0276】
以上のようにすることで、布オブジェクトを任意の向きの任意の切断平面に沿って切断される画像を、より少ない処理負荷で生成することができる。
【0277】
4. ハードウェア構成
次に、本実施形態を実現できるハードウェア構成の一例について図29を用いて説明する。
【0278】
メインプロセッサ900は、CD982(情報記憶媒体)に格納されたプログラム、通信インタフェース990を介して転送されたプログラム、或いはROM950(情報記憶媒体の1つ)に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などの種々の処理を実行する。
【0279】
コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、オブジェクトを移動させたり動作(モーション)させるための物理シミュレーションに、マトリクス演算などの処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
【0280】
ジオメトリプロセッサ904は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ900で動作するプログラムが、その処理をジオメトリプロセッサ904に指示する。
【0281】
データ伸張プロセッサ906は、圧縮された画像データや音データを伸張するデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする処理を行う。これにより、オープニング画面、インターミッション画面、エンディング画面、或いはゲーム画面などにおいて、MPEG方式等で圧縮された動画像を表示できるようになる。なお、デコード処理の対象となる画像データや音データは、ROM950、CD982に格納されたり、或いは通信インタフェース990を介して外部から転送される。
【0282】
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ(プリミティブ面)で構成されるオブジェクトの描画(レンダリング)処理を高速に実行するものである。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970の機能を利用して、オブジェクトデータを描画プロセッサ910に渡すとともに、必要であればテクスチャ記憶部924にテクスチャを転送する。すると、描画プロセッサ910は、これらのオブジェクトデータやテクスチャに基づいて、Zバッファなどを利用した陰面消去を行いながら、オブジェクトをフレームバッファ922に高速に描画する。また、描画プロセッサ910は、痺uレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行うことができる。そして、1フレーム分の画像がフレームバッファ922に書き込まれると、その画像はディスプレイ912に表示される。
【0283】
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などの高品位のゲーム音を生成する。生成されたゲーム音は、スピーカ932から出力される。
【0284】
ゲームコントローラ942(レバー、ボタン、筺体、パッド型コントローラ又はガン型コントローラ等)からの操作データや、メモリカード944からのセーブデータ、個人データは、シリアルインターフェース940を介してデータ転送される。
【0285】
ROM950にはシステムプログラムなどが格納される。なお、業務用ゲームシステムの場合には、ROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納されることになる。なお、ROM950の代わりにハードディスクを利用するようにしてもよい。
【0286】
RAM960は、各種プロセッサの作業領域として用いられる。
【0287】
DMAコントローラ970は、プロセッサ、メモリ(RAM、VRAM、ROM等)間でのDMA転送を制御するものである。
【0288】
CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。
【0289】
通信インタフェース990は、ネットワークを介して外部との間でデータ転送を行うためのインタフェースである。この場合に、通信インタフェース990に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどを考えることができる。そして、通信回線を利用することでインターネットを介したデータ転送が可能になる。また、高速シリアルバスを利用することで、他の画像生成システムとの間でのデータ転送が可能になる。
【0290】
或いは通信インタフェース990を介して、図示しない検出装置におけるセンサ面における操作入力部の位置等を特定するための入力情報を受け付けるようにすることが考えられる。
【0291】
なお、本発明の各手段は、その全てを、ハードウェアのみにより実現(実行)してもよいし、情報記憶媒体に格納されるプログラムや通信インタフェースを介して配信されるプログラムのみにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。
【0292】
そして、本発明の各手段をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、本発明の各手段をハードウェアを利用して実現するためのプログラムが格納されることになる。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930等に処理を指示するとともに、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930等は、その指示と渡されたデータとに基づいて、本発明の各手段を実現することになる。
【0293】
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。
【0294】
例えば、検出装置は図1、図3乃至図5で説明した検出手法に限定されない。
検出装置としては、赤外線を超音波に替えて操作入力部の位置を検出するようにしてもよいし、画像認識や、モーションキャプチャリングの原理を用いて、操作入力部の位置を検出するようにしてもよい。要は、表示部の画面上の位置に各位置が1対1に対応付けられた所与の空間(エリア)において、プレーヤの身体の一部又はプレーヤによって操作される操作入力部の位置若しくは位置を特定するための情報を検出できる検出装置であればよい。
【0295】
また本実施形態では、操作入力部として刀型コントローラを例に説明したがこれに限定されるものではなく、槍やこん棒などの武器に限らず、指揮棒やゴルフクラブ、料理に使う包丁などを考えることができる。
【0296】
また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【0297】
また、本発明は種々のゲーム(格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。
【0298】
また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード等の種々の画像生成システム(ゲームシステム)に適用できる。
【図面の簡単な説明】
【図1】本実施形態の画像生成システムを業務用のゲームシステムに適用した場合の模式的な外観斜視図である。
【図2】本実施形態における画像生成システムのブロック図の一例である。
【図3】図3(A)、(B)は、検出装置により形成されるセンサ面における操作入力部の位置の検出原理について説明するための説明図である。
【図4】本実施形態において、検出装置により形成されるセンサ面における操作入力部が移動する速さの検出原理について説明するための説明図である。
【図5】図5(A)、(B)は、検出装置による操作入力部の画面に対する向きの検出原理について説明するための説明図である。
【図6】6角柱オブジェクトを切断平面に沿って切断した場合における切断後の2つのオブジェクトの生成原理を説明するための説明図である。
【図7】6角柱オブジェクトの側面にマッピングされるテクスチャのテクスチャ座標の一例を示す説明図である。
【図8】6角柱オブジェクトの上面及び下面にマッピングされるテクスチャのテクスチャ座標の一例を示す説明図である。
【図9】本実施形態における6角柱オブジェクトの切断前後のイメージを説明するための説明図である。
【図10】本実施形態における多角柱オブジェクトを定義する構造体の構成の一例について説明するための図である。
【図11】本実施形態における多角柱オブジェクトを切断した画像を生成する処理の一例を示すフローチャートである。
【図12】本実施形態における多角柱オブジェクトの切断処理の一例の前半部を示すフローチャートである。
【図13】本実施形態における多角柱オブジェクトの切断処理の一例の後半部を示すフローチャートである。
【図14】カメラ座標系における刀の届く範囲と多角柱オブジェクトの位置関係を説明するための説明図である。
【図15】本実施形態における刀の軌跡を説明するための説明図である。
【図16】図16(A)、(B)、(C)は、ゲーム画像の一例を示す図である。
【図17】本実施形態における板オブジェクトを切断平面に沿って切断する場合の説明図である。
【図18】図18(A)、(B)は、切断平面の向きと板オブジェクトとの関係を説明するための図である。
【図19】本実施形態における板オブジェクトを切断した画像を生成する処理の一例のフローチャートである。
【図20】本実施形態におけるひも状オブジェクトを切断平面に沿って切断した場合における切断後の2つのオブジェクトの生成原理を説明するための説明図である。
【図21】本実施形態におけるひも状オブジェクトにマッピングされるテクスチャのテクスチャ座標の一例を示す説明図である。
【図22】本実施形態におけるひも状オブジェクトにマッピングされたテクスチャと切断位置との関係を説明するための説明図である。
【図23】本実施形態におけるひも状オブジェクトを定義する構造体の構成の一例について説明するための図である。
【図24】本実施形態におけるひも状オブジェクトを切断した画像を生成する処理の一例を示すフローチャートである。
【図25】本実施形態におけるひも状オブジェクトの切断処理の一例を示すフローチャートである。
【図26】本実施形態における布オブジェクトのモデル化の一例を示す説明図である。
【図27】本実施形態における布オブジェクトにマッピングされるテクスチャのテクスチャ座標の一例を示す説明図である。
【図28】本実施形態における布オブジェクトを切断した画像を生成する処理の一例を示すフローチャートである。
【図29】本実施形態を実現できるハードウェアの構成の一例を示す図である。
【符号の説明】
10 ゲームシステム
20 筐体
30 画面
40 刀型コントローラ
50 第1のセンサ
52 第1のセンサ面
60 第2のセンサ
62 第2のセンサ面
100 処理部
110 位置演算部
130 パラメータ設定部
132 オブジェクト生成部
134 切断位置演算部
136 頂点補正部
140 画像生成部
150 音生成部
160 操作部
162 入力情報受付部
170 記憶部
180 情報記憶媒体
190 表示部
192 音出力部
194 携帯型情報記憶装置
196 通信部
A 代表点
DS、DS´ 下面
DP1〜DP6 下面の頂点
n 法線ベクトル
OBJ1 6角柱オブジェクト(第1の多角柱オブジェクト)
OBJ2 6角柱オブジェクト(第2の多角柱オブジェクト)
PP、P1〜P6 交点
SS 切断平面
US、US´ 上面
UP1〜UP6 上面の頂点
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image generation system, a program, and an information storage medium.
[0002]
[Background Art and Problems to be Solved by the Invention]
Conventionally, an image generation system (game system) that generates an image that can be seen from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known. Popular. Taking an image generation system that can enjoy a gun game as an example, a player uses a gun-type controller (shooting device) that mimics a gun and the like to display enemy characters (objects) displayed on the screen. By shooting the target object, enjoy a three-dimensional game that can repeat the attack and defense with the enemy character.
[0003]
In addition to the gun-type controller, it can be considered that a player enjoys a three-dimensional game by using a weapon such as a sword or a sword as an operation input unit and slashing with an enemy character appearing on the screen. In this case, in order to improve the virtual reality of the player, it is desirable to be able to input a realistic slashing action against enemy characters on the screen. If an image in which an object such as an enemy character is cut can be generated according to how the player cuts, virtual reality can be further improved.
[0004]
As a method of generating such a cutting plane of the object, a method of cutting the object according to the trajectory of the operation input unit can be considered. However, when an object is composed of a plurality of polygons, it is difficult to generate a game image or the like that requires real-time characteristics because the process of determining whether or not a cutting plane has passed for each polygon is performed. There is a problem that.
[0005]
The present invention has been made in view of the above-described problems, and an object of the present invention is to generate an image for cutting an object at an arbitrary cutting plane in real time without applying a processing load. Another object is to provide an image generation system, a program, and an information storage medium.
[0006]
[Means for Solving the Problems]
In order to solve the above-described problem, the present invention is an image generation system for generating an image, and cuts a side surface of a first polygonal column object defined by the top vertex and the bottom vertex of an opposing polygon. Means for obtaining an intersection of a cutting plane and a line connecting the vertex of the upper surface and the vertex of the lower surface corresponding to the upper surface; and a second polygonal column object by duplicating the first polygonal column object And means for setting the position of the vertex on the upper surface of the first polygonal column object as the position of the intersection and the position of the vertex on the lower surface of the second polygonal column object as the position of the intersection And a first polygonal column object whose top vertex position is set to the position of the intersection point and a second polygonal column object whose bottom vertex position is set to the position of the intersection point. Perspective Characterized in that it comprises a means for generating an image viewed.
[0007]
A program according to the present invention causes a computer to function as the above means. An information storage medium according to the present invention is a computer-readable information storage medium, and stores a program that causes the computer to function as the above-described means.
[0008]
According to the present invention, the polygonal column object is defined by the vertexes of the upper surface and the lower surface of the opposing polygon. Therefore, when the cutting plane cuts the side surface of the polygonal column object, it corresponds to the vertex of the upper surface. The intersection between the line connecting the bottom vertex and the cutting plane is obtained, and the top vertex of the polygonal column object (first polygonal column object) before cutting and the polygonal column object before cutting are duplicated and generated. By simply setting the obtained intersection at the vertex of the lower surface of the second polygonal column object, two polygonal column objects cut along the cutting plane can be generated with a small processing load.
[0009]
Therefore, for example, it is possible to generate a game image that expresses how a polygonal prism object is cut along an arbitrary cutting plane in real time.
[0010]
Note that the present invention is not limited to the case where the top vertex of the first polygonal column object before cutting and the bottom vertex of the second polygonal column object are respectively set to the obtained intersection positions. It is also possible to set the vertex of the lower surface of the first polygonal column object and the vertex of the upper surface of the second polygonal column object to the obtained intersection positions.
[0011]
The image generation system, the program, and the information storage medium according to the present invention include means for converting the cutting plane into a local coordinate system of the first polygonal column object, and the intersection is obtained in the local coordinate system. It is characterized by being able to.
[0012]
Here, it is not limited to the coordinate system of the cutting plane before the coordinate conversion to the local coordinate system. In the local coordinate system of the first polygonal column object, the coordinates of the vertices of the upper surface and the lower surface are in a known state. Therefore, according to the present invention, by converting the cutting plane into the local coordinate system, the coordinate axes for obtaining the position of the intersection to be obtained can be limited, and the processing load can be reduced.
[0013]
In the image generation system, the program, and the information storage medium according to the present invention, the local coordinate system has first to third coordinate axes orthogonal to each other, and the first and second coordinate axes are on the upper surface and the lower surface. And a third coordinate axis is set in a direction perpendicular to the upper surface and the lower surface.
[0014]
According to the present invention, the vertex coordinates of the upper surface and the lower surface that define the polygonal column object are already known on the first and second coordinate axes, so that the position of the intersection to be obtained is obtained only for the third coordinate axis. Therefore, the processing load can be reduced.
[0015]
The present invention is also an image generation system for generating an image, the cutting plane for cutting a side surface of a first polygonal column object defined by the top vertex and the bottom vertex of the opposing polygon, and the first Means for transforming the cutting plane into the local coordinate system of the first polygonal column object determined according to the positional relationship with the polygonal column object, and in the local coordinate system, the cutting plane and the top surface Means for obtaining an intersection of a vertex and a line connecting the vertex of the lower surface corresponding to the upper surface; means for replicating the first polygonal column object to generate a second polygonal column object; Means for setting the position of the top vertex of the first polygonal column object to the position of the intersection, and setting the position of the vertex of the bottom surface of the second polygonal column object to the position of the intersection; A given viewpoint for a first polygonal column object after cutting with its vertex position set to the position of the intersection and a second polygonal column object with its bottom vertex position set to the position of the intersection Means for generating an image visible from the image.
[0016]
A program according to the present invention causes a computer to function as the above means. An information storage medium according to the present invention is a computer-readable information storage medium, and stores a program that causes the computer to function as the above-described means.
[0017]
Here, it is not limited to the coordinate system of the cutting plane before the coordinate conversion to the local coordinate system.
[0018]
According to the present invention, the polygonal column object is defined by the top vertex and the bottom vertex of the opposing polygon, and can be determined according to the positional relationship between the polygonal column object and the cutting plane that cuts the side surface thereof. Since the cutting plane is coordinate-transformed into the local coordinate system of the polygonal column object, the intersection of the line connecting the top vertex and the corresponding bottom vertex and the cutting plane is obtained, and this intersection is cut. Just set the vertex on the upper surface of the previous polygonal column object (first polygonal column object) and the vertex on the lower surface of the second polygonal column object generated by duplicating this polygonal column object before cutting. Two polygonal column objects cut along the plane can be generated with a small processing load.
[0019]
Therefore, although it can be processed as a polygonal prism object, for example, a plate object, even if the directions of the cutting planes are various, processing with fewer intersection points at which the cutting plane cuts in the optimal coordinate system It can be determined by load. Therefore, for example, it is possible to generate a game image that expresses how a plate object is cut along an arbitrary cutting plane in real time.
[0020]
Note that the present invention is not limited to the case where the top vertex of the first polygonal column object before cutting and the bottom vertex of the second polygonal column object are respectively set to the obtained intersection positions. It is also possible to set the vertex of the lower surface of the first polygonal column object and the vertex of the upper surface of the second polygonal column object to the obtained intersection positions.
[0021]
The image generation system, the program, and the information storage medium according to the present invention have a ratio that the position of the intersection internally divides a line connecting the vertices of the upper surface and the lower surface constituting the side surface of the first polygonal column object before cutting. Based on the texture coordinates in the texture mapped to the side surface, the vertex position of the upper surface is set to the position of the intersection point, the side surface of the first polygonal column object after cutting is set to the position of the intersection point. The texture coordinates are coordinated with the set vertex, the texture coordinates are coordinated with the vertex set at the position of the intersection on the side surface of the second polygonal column object, and the first polygonal column object after cutting and A texture before cutting is mapped to the side surface of the second polygonal column object.
[0022]
According to the present invention, with respect to the texture mapped to the side surface of the first polygonal column object before cutting, the line connecting the vertices of the upper surface and the lower surface constituting the side surface of the first polygonal column object before cutting is crossed. The texture coordinates are obtained based on the ratio of the position of the internal part, and this is coordinated with the top vertex of the first polygonal column object after cutting and the bottom vertex of the second polygonal column object before cutting. Since the texture is mapped, the texture of the object cut along the cutting plane can be expressed more realistically without deformation of the texture of the side cut by the cutting plane.
[0023]
The present invention is also an image generation system for generating an image, wherein a cutting plane at which a cutting plane cuts a first string-like object defined by a plurality of vertices sequentially connected between a start point and an end point. Means for determining, means for replicating the first string-like object to generate a second string-like object, setting an end point of the first string-like object as the cutting position, and the second string-like shape Means for setting the starting point of the object to the cutting position, the first string object after cutting whose end point is set to the cutting position, and the second string object whose starting point is set to the cutting position And means for generating an image visible from a given viewpoint.
[0024]
A program according to the present invention causes a computer to function as the above means. An information storage medium according to the present invention is a computer-readable information storage medium, and stores a program that causes the computer to function as the above-described means.
[0025]
According to the present invention, the string-like object is defined by a plurality of vertices sequentially connected between the start point and the end point. Therefore, when this string-like object is cut by the cutting plane, the string-like object before cutting (first Just by setting the cutting position at the end point of the first string-like object) and the vertex of the start point of the second string-like object generated by duplicating the string-like object before cutting, along the cutting plane Two cut string-like objects can be generated with a small processing load.
[0026]
Therefore, for example, it is possible to generate a game image representing a state in which the string-like object is cut along an arbitrary cutting plane in real time.
[0027]
In the image generation system, the program, and the information storage medium according to the present invention, the cutting position is a ratio at which the cutting plane internally divides the first line connecting the start point and the end point of the first string object before cutting. Thus, it is obtained as a position between vertices obtained by internally dividing the sum of lengths between the vertices constituting the first string-like object before cutting.
[0028]
According to the present invention, when the cutting plane obtains the cutting position at which the string-like object is cut, the first line is cut using the virtual first line connecting the start point and the end point of the string-like object. Since the sum of the links between the vertices that make up the string-like object is determined as the position to internally divide by the ratio that the plane is internally divided, it is necessary to determine whether or not the cutting plane has passed between the vertices. The two objects after cutting can be generated with a smaller processing load.
[0029]
The image generation system, the program, and the information storage medium according to the present invention are characterized in that a polygon that faces the direction of the given viewpoint is arranged using the plurality of vertices.
[0030]
According to the present invention, an image of a string object can be generated with a small number of polygons.
[0031]
Further, the image generation system, the program, and the information storage medium according to the present invention provide the first pre-cutting based on the ratio that the cutting plane internally divides the line connecting the start point and the end point of the first string object before cutting. Find the texture coordinates in the texture mapped to the string object, coordinate the texture coordinates to the end point of the first string object after cutting, and coordinate the texture coordinates to the start point of the second string object The texture before cutting is mapped to the first string-like object and the second string-like object after cutting.
[0032]
According to the present invention, with respect to the texture mapped to the string object before cutting, the texture coordinates are calculated based on the ratio at which the cutting plane internally divides the line connecting the start point and end point of the first string object before cutting. Since this is coordinated with the end point of the first string object after cutting and the start point of the second string object to map the texture before cutting, the string cut by the cutting plane The state in which the object is cut along the cutting plane can be expressed more realistically without the texture of the object being deformed.
[0033]
Further, the present invention is an image generation system that performs image generation, and includes a first to Tth (T is a T) in which a plurality of string-like objects defined by a plurality of vertices sequentially connected between a start point and an end point are arranged. Means for determining, for each of the first to T-th string objects, a cutting position at which a cutting plane cuts a first cloth object composed of two or more natural-numbered string-like objects, and the first cloth object , The second cloth object, and the end point of the Rth (R is a natural number between 1 and T) string objects constituting the first cloth object, and the Rth string shape. Means for setting the cutting position of the object, setting the starting point of the R-th string object constituting the second cloth object to the cutting position of the R-th string object, and each string-like object Generate an image that can be seen from a given viewpoint for the first cloth object after cutting whose end point is set to the cutting position and the second cloth object whose starting point of each string-like object is set to the cutting position. Means.
[0034]
A program according to the present invention causes a computer to function as the above means. An information storage medium according to the present invention is a computer-readable information storage medium, and stores a program that causes the computer to function as the above-described means.
[0035]
According to the present invention, the cloth object is configured by the first to Tth string-like objects in which a plurality of string-like objects defined by a plurality of vertices sequentially connected between the start point and the end point are arranged. Therefore, when the cutting plane cuts the cloth object, the end points of the first to T-th string objects constituting the cloth object (first cloth object) before cutting and the cloth object before cutting are duplicated. Cut along the cutting plane just by setting the cutting position obtained for each string-like object at the apex of the start point of the first to T-th string-like objects constituting the second cloth object generated in this way These two cloth objects can be generated with a small processing load.
[0036]
Therefore, for example, it is possible to generate a game image that expresses how the cloth object is cut along an arbitrary cutting plane in real time.
[0037]
In the image generation system, the program, and the information storage medium according to the present invention, the cutting position is a ratio at which the cutting plane internally divides the second line connecting the start point and the end point of the R-th string object before cutting. Thus, it is obtained as a position between vertices obtained by internally dividing the sum of lengths between the vertices constituting the R-th string object before cutting.
[0038]
According to the present invention, when obtaining the cutting position at which the cutting plane cuts each string-like object constituting the cloth object, the virtual second line connecting the start point and the end point is used for each string-like object. Thus, the second line is obtained as a position to internally divide the sum of the links between the vertices constituting each string-like object at a ratio at which the cutting plane internally divides each string-like object. It is no longer necessary to determine whether or not the cutting plane has passed between the vertices defining the shape object, and two objects after cutting can be generated with a smaller processing load.
[0039]
Further, the image generation system, the program, and the information storage medium according to the present invention have a ratio in which the cutting plane internally divides a line connecting the start point and the end point of the R-th string object constituting the first cloth object before cutting. Based on this, the texture coordinates in the texture mapped to the R-th string object before cutting are obtained, and the texture coordinates are coordinated with the end points of the R-th string object constituting the first cloth object after cutting. Then, the texture coordinates are coordinated with the start point of the R-th string-like object constituting the second cloth object, and the texture before cutting is mapped to the first cloth object and the second cloth object after cutting. It is characterized by that.
[0040]
According to the present invention, with respect to the texture mapped to the cloth object before cutting, for each string-like object constituting the cloth object before cutting, based on the ratio at which the cutting plane internally divides the line connecting the start point and the end point The texture coordinates are obtained and coordinated with the end point of the string object constituting the cloth object after cutting and the start point of the string object forming the second cloth object to map the texture before cutting. Since the texture of the cloth object cut by the cutting plane is not deformed, it is possible to more realistically represent how the object is cut along the cutting plane.
[0041]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0042]
In addition, this embodiment demonstrated below does not limit the content of this invention described in the claim at all. Also, not all of the configurations described in the present embodiment are essential constituent requirements of the present invention.
[0043]
In the embodiment described below, a sword game that detects the position of a sword-type controller (in a broad sense, an operation input unit, an object to be detected) and the like, and slashes with an enemy character appearing on the screen. However, the present invention is not limited to this, and can be applied to various image generation systems.
[0044]
1. Constitution
FIG. 1 schematically shows an external perspective view when the image generation system of the present embodiment is applied to a business game system.
[0045]
In the game system 10, an image generated by the image generation system in the present embodiment is displayed on the screen 30 of a display device (display unit) housed in the housing 20. The screen 30 is arranged so that a player who operates the sword-type controller 40 as an operation input unit in a given area can watch. In the following, the horizontal direction of the screen 30 is the x axis, the vertical direction of the screen 30 is the y axis, and the depth direction of the screen perpendicular to the screen 30 is the z axis.
[0046]
The game system 10 uses a sword-type controller 40 operated by the player to realize a game that slashes with an enemy character (object) displayed on the screen 30. In order to improve the virtual reality, the game system 10 reflects the operation state of the sword-type controller 40 operated by the player (for example, swings) as it is to cut off the enemy character displayed on the screen 30 or You can enjoy the battle of offense and defense by defending against enemy characters that you want to slash.
[0047]
Therefore, the game system 10 detects the position on the screen 30 of the sword-type controller 40 operated by the player in a given area, and based on the detected position, the game effect effect (effect image (in a broad sense) Image), sound effects (sound in a broad sense), vibration, wind, light, etc.), and the ability values (effects in a broad sense) such as the attack power and defense power of the character operated by the player A process of changing the game response such as changing an effect (a parameter for changing an image, sound, vibration, etc.) is performed.
[0048]
Therefore, the game system 10 uses a sword-type controller 40 operated by the player using two parallel sensor surfaces (area in a broad sense) formed by two tablet sensors (first and second sensors). A detection device (input device) for detecting the position, orientation, etc. is provided.
[0049]
The detection device includes first and second sensors 50 and 60. The first sensor 50 forms the first sensor surface 52 by a set of sensors. Each position of the first sensor surface 52 is associated with each position on the screen 30 on a one-to-one basis. The second sensor 60 forms the second sensor surface 62 by a set of sensors. Each position of the second sensor surface 62 is associated with each position on the screen 30 on a one-to-one basis. The first and second sensor surfaces 62 are formed with a given distance d.
[0050]
The first sensor 50 can specify a first position where the sword-type controller (object to be detected in a broad sense) 40 operated by the player crosses the first sensor surface 52. Further, the second sensor 60 can specify the second position where the sword-shaped controller (detected object in a broad sense) 40 crosses the second sensor surface 62.
[0051]
The image generation system according to the present embodiment includes first and second positions (or alternatively) on the first and second sensor surfaces 52 and 62 of the sword-type controller 40 identified by the first and second sensors 50 and 60. On the screen 30 corresponding to the position of the sword-shaped controller on the first and second sensor surfaces based on information for specifying the first and second positions (in a broad sense, input information from the detection device). Specify the position of. Then, based on the specified position on the screen 30, processing for giving various effects to the player is performed.
[0052]
By doing so, in the image generation system according to the present embodiment, the position at which the player swings the sword-shaped controller 40 (position on the screen 30) and the speed at which the player swings (in a broad sense, the amount of change in position per unit time). ), Swing width (in a broad sense, the absolute value of the amount of change in position), swing direction (in a broad sense, the direction in which the position changes), or the orientation of the first and second sensor surfaces with respect to the screen direction of the sword controller 40 Accordingly, the player can appropriately give an effect that improves the virtual reality as a game using a sword (sword).
[0053]
Thus, the first and second sensors 50, 60 can associate the first and second positions across the first and second sensor surfaces 52, 62 with the positions on the screen 30, There is no need to provide a sensor in each part of the sword controller 40 operated by the player. Therefore, the operation input unit operated by the player is not limited to the sword-type controller, and may be any object that can cross the sensor surface, for example, a part of the player's body (player's fist, Foot, head, etc.).
[0054]
That is, by using such a sensor, not only can the cost of the operation input unit be reduced, but also wiring for transmitting detection information from the operation input unit to the housing 20 can be eliminated. . Furthermore, the position specified on the sensor surface and the position on the screen 30 can be specified with high accuracy.
[0055]
FIG. 2 shows an example of a block diagram of the image generation system in the present embodiment.
[0056]
2, at least the processing unit 100 may be included in this embodiment (or the processing unit 100, the input information receiving unit 162, and the storage unit 170, or the processing unit 100, the input information receiving unit 162, the storage unit 170, and the information storage). The medium 180 may be included, and the other blocks (for example, the operation unit 160, the display unit 190, the sound output unit 192, the portable information storage device 194, and the communication unit 196) may be optional components. it can.
[0057]
Here, the processing unit 100 performs various processing such as control of the entire system, instruction instruction to each block in the system, game processing, image processing, or sound processing, and functions thereof are various processors ( CPU, DSP, etc.) or hardware such as ASIC (gate array, etc.) or a given program (game program).
[0058]
The operation unit 160 is used for the player to input operation data for setting a game, and the function can be realized by hardware such as a lever, a button, and a housing.
[0059]
The input information receiving unit 162 receives input information from a detection device for detecting an operation status of an operation input unit such as a sword-type controller different from the operation unit 160 operated by the player, and its function is ASIC. It can be realized by hardware such as, or a given program. For example, when the detection device shown in FIG. 1 is connected, the first and second positions on the first and second sensor surfaces 52 and 62 detected by the first and second sensors 50 and 60 as input information. Coordinates (or information for specifying the coordinates of the first and second positions) are received.
[0060]
The storage unit 170 serves as a work area such as the processing unit 100 or the communication unit 196, and its function can be realized by hardware such as a RAM.
[0061]
An information storage medium (a computer-readable storage medium) 180 stores information such as programs and data, and functions thereof are an optical disk (CD, DVD), a magneto-optical disk (MO), a magnetic disk, and a hard disk. It can be realized by hardware such as a magnetic tape or a memory (ROM). The processing unit 100 performs various processes of the present invention (this embodiment) based on information stored in the information storage medium 180. That is, the information storage medium 180 stores information (program or data) for executing the means of the present invention (this embodiment) (particularly, the blocks included in the processing unit 100).
[0062]
Part or all of the information stored in the information storage medium 180 is transferred to the storage unit 170 when the system is powered on. The information stored in the information storage medium 180 instructs program code, image data, sound data, shape data of display objects, table data, list data, and processing of the present embodiment for performing the processing of the present embodiment. Including at least one of information, information for processing according to the instruction, and the like.
[0063]
The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by hardware such as a CRT, LCD, or HMD (head mounted display).
[0064]
The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by hardware such as a speaker.
[0065]
The portable information storage device 194 stores player personal data, save data, and the like. As the portable information storage device 194, a memory card, a portable game device, and the like can be considered.
[0066]
The communication unit 196 performs various controls for communicating with the outside (for example, a host device or other image generation system), and functions as hardware such as various processors or a communication ASIC. Or by a program.
[0067]
The program or data for executing the means of the present invention (this embodiment) may be distributed from the information storage medium of the host device (server) to the information storage medium 180 via the network and the communication unit 196. Good. Use of such an information storage medium of the host device (server) is also included in the scope of the present invention.
[0068]
The processing unit (processor) 100 performs various processes such as a game process, an image generation process, and a sound generation process based on operation data or input information from the operation unit 160 or the input information receiving unit 162, a program, and the like. In this case, the processing unit 100 performs various processes using the main storage unit in the storage unit 170 as a work area.
[0069]
Here, as the game process performed by the processing unit 100, various parameters such as a coin (price) acceptance process, various mode setting processes, a game progress process, and attack power and defense power given to the character operated by the player ( In a broad sense, a process for updating various parameters for changing an effect image) according to the progress of the game, a setting process for a selection screen, and a position or rotation angle (X, Y or Processing to obtain the rotation angle around the Z axis), processing to move the object (motion processing), processing to obtain the viewpoint position (virtual camera position) and line-of-sight angle (virtual camera rotation angle), and objects such as map objects Processing to place in the object space, hit determination processing, processing to calculate game results (results, results), It is possible to think of a process for players to play in a common game space, or the game over processing and the like.
[0070]
The processing unit 100 includes a position calculation unit 110, a parameter setting unit 130, an object generation unit 132, an image generation unit 140, and a sound generation unit 150. Note that it is not necessary for the processing unit 100 to include all of these functional blocks 110 to 150, and some of the functional blocks may be omitted.
[0071]
Here, the position calculation unit 110 performs a process of obtaining the position of the display unit 190 on the screen based on the input information from the detection device received by the input information receiving unit 162. More specifically, the position calculation unit 110 is the coordinates of the first and second positions on the first and second sensor surfaces of the detected object (the sword controller 40 in FIG. 1) detected by the detection device. Based on the above, the position on the screen of the display unit 190 associated with the first and second sensor surfaces is obtained. Further, the position calculation unit 110 calculates the change amount (absolute value) per unit time of the obtained position on the screen, the change amount (absolute value) of the position on the screen, and the direction in which the position changes on the screen. Then, the orientation of the detected object on the first and second sensor surfaces with respect to the screen direction is obtained.
[0072]
The parameter setting unit 130 performs a process of updating parameters for changing the effect image, reflecting the result of the game process performed based on the position on the screen 30 obtained by the position calculation unit 110. More specifically, the parameter setting unit 130 updates parameters such as a physical strength value, an attack power, and a defense power given to the character operated by the player, and changes the effect image and the sound as a result.
[0073]
The object generation unit 132 performs processing for generating an object based on the position on the screen 30 obtained by the position calculation unit 110. More specifically, the object generation unit 132 generates two objects after cutting from the object before cutting when the player performs a cutting operation to cut the object displayed on the screen 30. Process. For this reason, in the present embodiment, the data structure that defines the object to be cut is devised, and the two cut objects can be generated with a small processing load. At that time, the object generation unit 132 performs texture mapping so that the cut image is effective for the two cut objects.
[0074]
Such an object generation unit 132 includes a cutting position calculation unit 134 and a vertex correction unit 136.
[0075]
The cutting position calculation unit 134 obtains the cutting position of the object to be cut based on the path of the sword input by the player using the sword controller 40. More specifically, since the trajectory of the sword can be specified as the trajectory of the position on the screen 30 obtained by the position calculation unit 110, the cutting plane can be obtained from the trajectory of the sword. Yes. Therefore, the cutting position calculation unit 134 obtains the intersection between the obtained cutting plane and the object to be cut as a cutting position.
[0076]
Note that the above-described cutting plane can be specified in consideration of the orientation of the sword-type controller 40 operated by the player with respect to the screen 30.
[0077]
The cutting position calculation unit 134 converts the cutting plane into the object-based local coordinate system (the local coordinate system of the object to be cut) when obtaining the cutting position in the object space increases the processing load, By obtaining the cutting position in this local coordinate system, the processing load can be reduced.
[0078]
The vertex correction unit 136 sets (corrects) the vertex coordinates of the object after cutting by reflecting the cutting position obtained by the cutting position calculation unit 134 on the object defined by one or more vertex coordinates. To do the process.
[0079]
In this way, for example, when the side of a polygonal column object defined by the top and bottom vertices of the opposing polygon is cut, the polygonal column object is duplicated to generate two objects. For one polygonal column object, the vertex coordinates defined as the upper surface can be set as the coordinates of the cutting position, and for the other polygonal column object, the vertex information defined as the lower surface can be set as the coordinates of the cutting position. As a result, it is not necessary to determine the presence or absence of cutting for each polygon constituting the object, and an image of an object cut in an arbitrary cutting direction reflecting the player's operation can be generated with a small processing load. Become.
[0080]
The image generation unit 140 generates an image that can be seen from a given viewpoint (virtual camera) in the object space based on the game processing result and the like, and outputs the generated image to the display unit 190.
[0081]
More specifically, in the image generation unit 140, first, geometric processing such as coordinate transformation, clipping processing, perspective transformation, or light source calculation is performed, and based on the processing result, drawing data (positional coordinates given to vertices) , Texture coordinates, color (luminance) data, normal vector, or data including α value).
[0082]
Then, based on the drawing data, the image generation unit 140 displays an image of the object (one or more primitive surfaces) after the geometry processing in units of pixels such as a drawing area (frame buffer, work buffer, etc.) in the storage unit 170. Draw in the area where image information can be stored. At this time, the image generation unit 140 also performs a process of mapping the texture to the object.
[0083]
The image generation unit 140 further generates an image as an effect based on the position on the screen 30 corresponding to the position of the detection object on the first and second sensor surfaces obtained by the position calculation unit 110. Process. That is, by generating a more effective effect image and displaying it on the screen 30, the virtual character of the player who repeats the offense and defense with the enemy character displayed on the screen 30 by making full use of the sword-type controller 40 as the operation input unit. Improve. Further, the image generation unit 140 performs processing for generating images of the two objects after cutting generated by the object generation unit 132.
[0084]
The sound generation unit 150 performs various types of sound processing based on the game processing result and the like, generates a sound such as BGM, sound effect, or sound, and outputs the sound to the sound output unit 192.
[0085]
The sound generation unit 150 in the present embodiment further performs a process of generating a sound as an effect based on the position on the screen 30 obtained by the position calculation unit 110. That is, by generating and outputting a more effective effect sound, the virtual reality of the player who repeats the battle with the enemy character displayed on the screen 30 by using the sword-type controller 40 as the operation input unit is improved.
[0086]
Note that the game system to which the image generation system of the present embodiment is applied may be a system dedicated to the single player mode that can be played by only one person, and not only such a single player mode but also a plurality of players can play. A system having a multiplayer mode that can be used may also be used.
[0087]
Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated using a plurality of terminals (game machine, mobile phone).
[0088]
2. Detection device
The image generation system in the present embodiment obtains the position on the screen of the display unit from the position of the operation input unit (detected object) on the sensor surface formed by the detection device shown in FIG. Image generation is performed based on a change in position obtained from the position. Furthermore, the object displayed on the screen is cut based on the cutting plane specified by the locus of the position on the screen input through the operation input unit operated by the player, and the two objects after cutting are cut. Generate an image.
[0089]
Therefore, first, the principle of detecting the position of the operation input unit operated by the player in the image generation system will be described.
[0090]
2.1 Detection of operation input position
In the present embodiment, each position on the screen that displays an image generated by the image generation system is associated with each position on the sensor surface formed by the above-described detection device in a one-to-one correspondence. Therefore, if the position where the operation input unit crosses the sensor surface can be detected, the position of the operation input unit on the screen can be easily specified.
[0091]
FIGS. 3A and 3B are views for explaining the principle of detecting the position of the operation input unit on the sensor surface formed by the above-described detection device.
[0092]
Here, only the principle of detection of the first position by the first sensor 50 will be described, but the principle of detection of the second position by the second sensor 60 is also the same.
[0093]
As shown in FIG. 3A, the first sensor 50 forms a two-dimensional first sensor surface 52 in the first sensor surface forming frame 200. A pair of sensors S <b> 1 and S <b> 2 is provided at both corners of the first side SD <b> 1 of the first sensor surface forming frame 200.
[0094]
The sensor S1 has a light emitting part and a light receiving part. The light emitting unit outputs infrared rays when the angle θ is between 0 ° and 90 °, and the light receiving unit receives the return light.
Therefore, a reflecting plate is arranged on each side SD1 to SD4 of the first sensor surface forming frame 200 so that infrared rays from the light emitting part of the sensor are reflected to the light receiving part.
[0095]
Similarly to the sensor S1, the sensor S2 has a light emitting part and a light receiving part, and receives infrared return light emitted by itself when the angle θ is between 0 degrees and 90 degrees.
[0096]
Such sensors S1 and S2 are provided such that directions in which the angle θ is 0 degrees are opposite to each other. By doing so, a first sensor surface 52 of a two-dimensional plane is formed in the first sensor surface forming frame 200 by the sensors S1 and S2.
[0097]
A result of light received by the sensor S1 at an angle θ between 0 degrees and 90 degrees is obtained as an image IM1 in the first sensor 50. A result of light received by the sensor S2 at an angle θ between 0 degrees and 90 degrees is obtained as an imaging IM2 in the first sensor 50.
[0098]
In the imaging IM1 and IM2, when the operation input unit operated by the player crosses the first sensor surface 52 as an object to be detected, the portions where the infrared rays emitted by the object to be detected are not blocked are reflected on each side. Although the light is reflected by the plate and received by the light receiving unit, the portion where the infrared light emitted by the detection object is blocked is not reflected by the reflection plate provided on each side. Therefore, in the imaging IM1 and IM2, only the portion to be detected is represented as a shadow. That is, in the imaging IM1 and IM2, shadowed portions can be determined as the angles θ1 and θ2.
[0099]
In addition, you may make it provide a reflecting plate in the direction of an operation input part, without providing a reflecting plate in each edge | side of the 1st sensor surface formation frame 200. FIG. In this case, in the imaging IM1 and IM2, when the operation input unit crosses the first sensor surface 52 as an object to be detected, a portion that is not obstructed by the object to be detected is represented as a shadow. In IM2, a portion that does not become a shadow can be determined as the angles θ1 and θ2.
[0100]
Since the positions of the sensors S1 and S2 are fixed, it is possible to specify P (x, y) as a position where the operation input unit crosses the first sensor surface 52 from the angles θ1 and θ2.
[0101]
Here, as shown in FIG. 3B, the midpoint of the first side SD1 of the first sensor surface forming frame 200 is the origin O (0, 0), and the length of the first side SD1 is 2 ×. Let L be the coordinates of the sensors S1 and S2, respectively (-L, 0) and (L, 0). In this case, the coordinates (x, y) of P can be obtained from equations (1) and (2).
[0102]
tan θ1 = y / (x + L) (1)
tan θ2 = y / (L−x) (2)
As described above, the coordinates of the position P at which the operation input unit crosses the first sensor surface 52 can be specified. Similarly, the position where the operation input unit crosses the second sensor surface 62 can also be specified.
[0103]
Therefore, each position of the first sensor surface 52 formed in the first sensor surface forming frame 200 is associated with each position of the screen on which the image generated in the present embodiment is displayed in a one-to-one correspondence. Thus, the image generation system according to the present embodiment can easily specify the position on the screen corresponding to the position where the operation input unit crosses the first sensor surface 52.
[0104]
In the present embodiment, the first and second sensors 50 and 60 identify the first and second positions on the first and second sensor surfaces 52 and 62, and generate the image using the positions as input information. Although described as supplying to a system, it is not limited to this. For example, the angles θ1 and θ2 obtained from the imaging images IM1 and IM2 in the first and second sensors 50 and 60 are supplied as input information to the image generation system, and the first and second in the image generation system as described above. After the positions on the sensor surfaces 52 and 62 are obtained, the positions on the screen may be specified.
[0105]
In addition, since the position of the operation input unit on the screen can be specified by only one of the sensor surfaces described above, the detected position of one of the first and second sensor surfaces 52 and 62 is a representative value. Can be used as In the present embodiment, the position on the first sensor surface 52 is used as a representative value.
[0106]
2.2 Detection of the speed at which the operation input unit moves
FIG. 4 is a diagram for explaining the detection principle of the speed at which the operation input unit moves on the sensor surface formed by the above-described detection device in the present embodiment.
[0107]
In the present embodiment, an image is generated in real time, for example, an image is generated at a given frame period (for example, 1/60 seconds, 1/30 seconds). Therefore, by setting this frame period as a unit time, the position P on the first sensor surface 52 obtained in the given frame f1 is obtained. f1 (X1, y1) and P in the first sensor surface 52 obtained in the next frame f2 (= f1 + 1) f2 By obtaining the amount of change in (x2, y2), the amount of change per unit time in the first sensor surface 52 can be obtained.
[0108]
The amount of change per unit time can be the speed at which the operation input unit moves (for example, the speed at which the sword-type controller swings).
[0109]
In addition, the position P on the first sensor surface 52 f1 From (x1, y1), P in the first sensor surface 52 determined in the next frame f2 (= f1 + 1) f2 By obtaining the direction in which (x2, y2) changes, the direction in which the operation input unit moves (for example, the direction in which the sword-type controller swings) can be obtained.
[0110]
Furthermore, the position P on the first sensor surface 52 f1 From (x1, y1), P in the first sensor surface 52 obtained in the next frame (f1 + 1) f2 By obtaining the absolute value of the amount of change in (x2, y2), the movement distance of the operation input unit (for example, the swing width of the sword controller) can be obtained.
[0111]
Further, since the speed, direction, and distance of movement of the operation input unit can be obtained by only one of the sensor surfaces described above, only one of the first and second sensor surfaces 52, 62 is used. May be. When using the 1st and 2nd sensor surfaces 52 and 62, the value calculated | required in either sensor surface can be used as a representative value. In the present embodiment, the value on the first sensor surface 52 is used as a representative value.
[0112]
2.3 Detecting the orientation of the operation input unit with respect to the screen
5A and 5B are diagrams for explaining the principle of detecting the orientation of the operation input unit with respect to the screen by the above-described detection device.
[0113]
As shown in FIG. 5A, the first and second sensor surfaces 52 and 62 are formed at an interval d by the two tablet sensors of the detection device. Here, the position where the operation input unit operated by the player crosses the first sensor surface 52 is defined as P S1 , The position across the second sensor surface 62 is P S2 And
[0114]
At this time, the direction of the operation input unit with respect to the screen is the position where the first sensor surface 52 is crossed. S1 And the position across the second sensor surface 62 P S2 The angle between the first sensor surface 52 and the second sensor surface 62 is a line connecting the two.
[0115]
That is, the position P across the first sensor surface 52 S1 (Xs1, ys1), a position P across the second sensor surface 62 S2 Assuming that (xs2, ys2), as shown in FIG. 5 (B), the x component of the orientation φ with respect to the screen of the operation input unit is φx, and the y component is φy according to the following equations (3) and (4): Desired.
[0116]
tan φx = (xs1−xs2) / d (3)
tanφy = (ys1-ys2) / d (4)
Thus, if the position where the operation input unit crosses on the sensor surface can be identified, the direction of the operation input unit relative to the screen can be easily obtained from the positions on the first and second sensor surfaces.
[0117]
3. Features of this embodiment
In an image generation system that can specify the position on the screen of the operation input unit operated by the player based on the input information from such a detection device, the data structure defining the object can be devised. The image of the object cut by the cutting plane specified by the trajectory can be generated with less processing, and the virtual reality can be further improved.
[0118]
In the following, in a game in which the player moves in the object space, the player manipulates enemy characters (objects) and other objects (objects) that appear on the screen while viewing the screen on which the image viewed from the first person viewpoint is displayed. Consider a game in which a sword-type controller as an input unit is swung and cut. Here, the first-person viewpoint refers to a position in which the viewpoint position and the line-of-sight direction are set at the eyes of the character itself operated by the player. By the way, a third person viewpoint is defined by setting the viewpoint position and the line-of-sight direction at a position relatively fixed with respect to the character (a position where the scenery including the character can be seen by a third party).
[0119]
In the following, a bar object (polygonal column object in a broad sense), a plate object, a string object, and a cloth object will be described as objects to be cut. However, the present invention is not limited to these, and various forms are possible. Can be applied to objects.
[0120]
3.1 Bar object (polygonal object)
A stick object (in a broad sense, a polygonal column object) can represent, for example, a tree or bamboo, a stick-shaped weapon possessed by an enemy character, or the like. Hereinafter, a hexagonal column will be described as a rod-like object for easy understanding, but the principle is the same for other polygonal column objects.
[0121]
FIG. 6 shows a diagram for explaining the generation principle of two objects after cutting when a hexagonal prism object is cut as a stick object along the cutting plane.
[0122]
In the present embodiment, the hexagonal column object OBJ1 is defined by, for example, the vertices UP1 to UP6 and DP1 to DP6 of the opposing hexagonal upper surface US and lower surface DS. As a result, the six side surfaces of the hexagonal column object OBJ1 can be specified by the corresponding vertices of the upper surface US and the lower surface DS. For example, one side surface of the hexagonal column object OBJ1 is specified by the vertices UP1, UP2, DP2, and DP1. The
[0123]
The cutting plane SS can be obtained as a plane in the world coordinate system or the camera coordinate system formed in the screen depth direction including the locus of the position on the screen of the operation input unit. In this case, the coordinates of the representative point A and the normal vector n can be obtained, and the cutting plane SS can be uniquely defined by these parameters.
[0124]
The position at which the cutting plane SS cuts the side surface of the hexagonal column object OBJ1 can be obtained as an intersection P between the cutting plane SS and a line connecting each vertex of the upper surface and each corresponding vertex of the lower surface.
[0125]
In the present embodiment, since the processing load increases when the X, Y, and Z coordinates of the intersection P are obtained in the world coordinate system or the camera coordinate system, the cutting plane SS is converted into an object-based local coordinate system. That is, the cutting plane SS is converted into a local coordinate system in which the hexagonal prism object OBJ1 is defined, and the intersection point P is obtained in this local coordinate system. In this way, only the coordinates of one axis in the local coordinate system need be obtained. In particular, the processing load can be greatly reduced when considering the case of performing hit determination between the cutting plane SS and the hexagonal prism object OBJ1 in the world coordinate system or the camera coordinate system.
[0126]
In the local coordinate system based on the object, for example, the height direction of the hexagonal prism object is defined by the y-axis, the upper surface and the lower surface are defined by the xz coordinate system, and the representative point A (ax, ay, az) of the cutting plane SS after coordinate conversion is defined. It is assumed that the normal vector n (nx, ny, nz). Each coordinate position of the intersection point PP (x, y, z) is known by the following equation (5) because the x coordinate (first coordinate axis) and z coordinate (second coordinate axis) of the point PP are known. What is necessary is to obtain (third coordinate axis).
[0127]
y = ay + (ax−x) (nx / ny) + (az−z) (nz / ny)
... (5)
As a result, the intersection points P1 to P6 with the cutting plane SS are obtained by the number of vertices on the upper surface or the lower surface.
[0128]
Next, the hexagonal column object OBJ1 (first polygonal column object in a broad sense) before cutting is duplicated to prepare a hexagonal column object OBJ1 and a hexagonal column object OBJ2 (second polygonal column object in a broad sense). To do.
[0129]
And in order to produce | generate the object after a cutting | disconnection, the vertex coordinate which defines the upper surface of the hexagonal prism object OBJ1 is set to the intersections P1-P6 calculated | required by (5) Formula. As a result, a new upper surface US ′ is defined.
[0130]
Further, the vertex coordinates defining the lower surface of the hexagonal prism object OBJ2 are set at the intersections P1 to P6 obtained by the equation (5). Thereby, the lower surface DS ′ is newly defined.
[0131]
As described above, even when an arbitrary cutting plane cuts the side surface of the polygonal column object defined by the top and bottom vertices, the two polygonal column objects after cutting are reduced in processing load according to the cutting position. Can be generated.
[0132]
3.1.1 Side texture
By the way, when the texture mapped to the hexagonal column object OBJ1 before cutting is directly mapped to the hexagonal column objects OBJ1 and OBJ2 after cutting, the texture is deformed.
[0133]
Therefore, by setting texture coordinates that coordinate to each vertex of the cut object as described below, a more realistic cut image can be expressed without deformation of the texture.
[0134]
FIG. 7 shows an example of texture coordinates of the texture mapped to the side surfaces of the hexagonal column objects OBJ1 and OBJ2.
[0135]
Here, the points UP1 to UP6 correspond to the vertices of the upper surface US of the hexagonal prism object OBJ2. The points DP1 to DP6 correspond to the vertices of the lower surface DS of the hexagonal column object OBJ1. Points P1 to P6 are intercepts by the cutting plane SS, and correspond to the vertices of the upper surface US ′ of the hexagonal column object OBJ1 and the lower surface DS ′ of the hexagonal column object OBJ2.
[0136]
For example, texture coordinates of (u, v) = (0, 1.00) are coordinated with the point UP1. The texture coordinates of (u, v) = (1.00, 0) are coordinated with the point DP1.
[0137]
In this embodiment, texture coordinates that internally divide a line connecting the point UPk and the point DPk are coordinated with the point Pk (k = 1 to 6, k is a natural number).
[0138]
In this way, by changing the texture coordinates of the line connecting the corresponding vertices on the upper surface and the lower surface according to the ratio that the cutting plane SS internally divides, the texture before cutting is converted into the hexagonal column object OBJ1 after cutting. Even when mapping to OBJ2, the texture is not deformed.
[0139]
3.1.2 Texture of the cut surface of the object after cutting
On the other hand, when the same cut surface is expressed regardless of where it is cut like bamboo, the texture coordinates mapped on the upper and lower surfaces after cutting are not changed.
[0140]
FIG. 8 shows an example of texture coordinates of textures mapped to the upper and lower surfaces of the hexagonal prism objects OBJ1 and OBJ2.
[0141]
As described above, the texture coordinates of the texture mapped to the upper surface and the lower surface of the hexagonal column object OBJ1 before cutting are respectively present at the vertices of the upper surface US ′ of the hexagonal column object OBJ1 or the lower surface DS ′ of the hexagonal column object OBJ2. Coordinate as is. Therefore, the texture before cutting is mapped as it is.
[0142]
In this case, when the cutting plane SS is not parallel to the upper surface and the lower surface, the image of the cut surface of the object after cutting is deformed according to the cut edge.
[0143]
In this way, as shown in FIG. 9, it is possible to prevent deformation of the texture mapped to the side surface before and after cutting, and to generate an image of the cut surface with a smaller processing load.
[0144]
3.1.3 Processing example of this embodiment
Next, in the present embodiment, processing for cutting a bar object (N prism object, N is a natural number of 3 or more) according to the cutting plane will be described in more detail.
[0145]
FIG. 10 is a diagram for explaining an example of the structure of a structure that defines a stick object (polygonal prism object) in the present embodiment.
[0146]
The bar object structure 210 includes a bar object reference point position 212, a reference point direction 214, a reference point speed 216, top and bottom vertex coordinate groups 220, and texture coordinates 222. Each vertex coordinate group 220 includes ymin (i) as the y coordinate of the i-th vertex (in the case of an N prism object, i is a natural number between 1 and N) on the lower surface of the object coordinate system (local coordinate system), and the object coordinate system. Ymax (i) is included as the y coordinate of the i-th vertex on the upper surface of the (local coordinate system).
[0147]
For the bar object M having such a data structure, a cut object can be generated as follows.
[0148]
11, 12, and 13 are flowcharts illustrating an example of processing for generating an image obtained by cutting the stick object M in the present embodiment.
[0149]
First, after initialization of the bar object M before cutting (step S10), the position and orientation of the virtual camera are set in the object space, and input information from the detection device described above is read (step S11).
[0150]
Next, in order to determine whether or not the sword operated by the player and displayed on the screen in the camera coordinate system is within the range reaching the stick object M, first, the reference point of the stick object M is set to the camera coordinate system. And the Z coordinate is obtained (step S12).
[0151]
Subsequently, using the Z coordinate obtained in step S12, it is determined whether or not the stick object M is in the range set as the reach of the sword whose position on the screen is moved by the player (step S12). S13). Here, as shown in FIG. 14, it is assumed that the Z coordinate range of the camera coordinate system is larger than 0 and smaller than Z0 as the range where the sword operated by the player can reach.
[0152]
When it is determined in step S13 that the Z coordinate in the camera coordinate system of the reference point 250 of the stick object M is greater than 0 and smaller than Z0 (step S13: Y), it is determined that the stick object M is within the reach of the sword. Then, the bar object M is cut (step S14). In this cutting process, hit determination between the stick object M and the sword is also performed.
[0153]
Then, when it is determined that the bar object after the cutting process (the bar object after the hit error determination or the two bar objects cut after the hit determination) or not within the reach of the sword in step S13 (step S13: The movement process is performed for the stick object M of N) (step S15).
[0154]
Next, these objects are generated as images viewed from a given viewpoint and displayed on the display unit (step S16).
[0155]
When a given end condition such as game over is satisfied (step S17: Y), a series of processing ends (end). On the other hand, when the given end condition is not satisfied (step S17: N), the process returns to step S11 and the input information is read again.
[0156]
In the cutting process in step S14, the trajectory of the sword is obtained from the position on the screen of the sword-type controller obtained based on the input information.
[0157]
Then, the intersection of the sword trajectory and the stick object M is determined (step S20).
[0158]
More specifically, as shown in FIG. 15, for example, the trajectory can be specified by using the position on the screen of the sword-type controller operated by the player and the changing direction thereof. Therefore, it can be determined whether or not the reference axis (vertical axis) 260 of the rod object M after the perspective transformation intersects the specified locus 262.
[0159]
When it is determined in step S20 that the trajectory of the sword does not intersect the reference axis of the stick object M (step S20: N), the series of cutting processes is ended (end).
[0160]
On the other hand, when it is determined in step S20 that the trajectory of the sword intersects the reference axis of the stick object M (step S20: Y), the cutting plane SS is obtained from the trajectory 262 of the sword on the screen (step S21). As a result, the representative point AA and its normal vector n0 are obtained as parameters of the cutting plane SS.
[0161]
Next, the parameters of the cutting plane SS are coordinate-transformed into the local coordinate system of the bar object M, which is the object-based coordinate system, and the representative points A (ax, ay, az after the coordinate transformation are converted as shown in FIG. ) And a normal vector n (nx, ny, nz) after coordinate transformation are obtained (step S22).
[0162]
Next, it is determined whether or not the ny component of the normal vector n is 0 (step S23).
Here, since the cutting plane SS in which the ny component of the normal vector n is 0 is a plane parallel to the side surface, the side surface of the bar object cannot be cut. This means that by defining the bar object with the vertices of the upper surface and the lower surface, it is not possible to apply the present embodiment that facilitates the generation of the object after cutting. Therefore, in step S23, when the ny component of the normal vector n is 0 (step S23: Y), the cutting process is terminated (end).
[0163]
Here, in order to eliminate the unnaturalness that the cutting process of the bar object M is not performed because the cutting plane is parallel to the side surface of the bar object M even though the player performs the cutting operation. For example, when the ny component of the normal vector n in the object reference coordinate system is 0, the ny component of the normal vector n of the cutting plane SS may be corrected to forcibly perform the cutting process. When real-time image generation is required, it is not preferable to accurately reflect in which direction the player has performed the cut action, which is preferable for improving virtual reality.
[0164]
In step S23, when the ny component of the normal vector n is not 0 (step S23: N), the variable i is set to “1” and the variable f is set to “0” (step S24). Here, the variable i is a natural number between 1 and N for designating the top and bottom vertices. The variable f is a discrimination count variable for counting the number of vertices that the cutting plane SS has passed above or below the bar object M. The variable f is incremented or decremented by performing the above-described determination for each vertex. By doing so, when the variable f is “+ N” or “−N”, it can be determined that only the upper side or the lower side of the bar object M has been passed, so it is possible to determine whether or not the bar object has been cut. .
[0165]
Subsequently, the y-coordinate y (i) of the intersection of the side passing through the i-th vertex on the upper surface and the corresponding i-th vertex on the lower surface and the cutting plane SS is obtained using equation (5) ( Step S25). As described above, since the intersection point is obtained in the object-based coordinate system, for example, as shown in FIG. 6, the coordinate to be obtained is only the y coordinate.
[0166]
Then, the obtained y (i) is compared with ymax (i) (step S26).
[0167]
When y (i) is not smaller than ymax (i) (step S26: N), it is determined that the cutting plane SS has passed above the upper surface of the bar object M, the variable f is incremented, and y (i) Is substituted for ymax (i) (step S27).
[0168]
When y (i) is smaller than ymax (i) at step S26 (step S26: Y), or when variable f is incremented at step S27, y (i) is compared with ymin (i). (Step S28).
[0169]
When y (i) is not larger than ymin (i) (step S28: N), it is determined that the cutting plane SS has passed below the lower surface of the bar object M, the variable f is decremented, and y (i ) Is substituted for ymin (i) (step S29).
[0170]
In step S28, when y (i) is larger than ymin (i) (step S28: Y), or when variable f is decremented in step S29, the same determination is performed for the next vertex. The variable i is incremented (step S30).
[0171]
When the incremented variable i is less than or equal to the number N of vertices on the upper or lower surface of the bar object M (step S31: Y), the process returns to step S25 to obtain the y coordinate of the intersection of the next side.
[0172]
On the other hand, if the incremented variable i is not less than or equal to the number N of vertices on the upper or lower surface of the bar object M in step S31 (step S31: N), is the variable f greater than “−N” and smaller than “+ N”? It is determined whether or not (step S32).
[0173]
When it is not determined that the variable f is larger than “−N” and smaller than “+ N” (step S32: N), it is determined that only the upper side or the lower side of the bar object M has been passed, and a series of cutting processes is performed. End (end).
[0174]
On the other hand, when it is determined that the variable f is larger than “−N” and smaller than “+ N” (step S32: Y), the bar object M (first polygonal column object in a broad sense) is shown in FIG. The structure is duplicated to create a rod object M ′ (second polygonal column object in a broad sense) (step S33).
[0175]
Subsequently, the y coordinate of the vertex coordinate on the upper surface of the bar object M (first polygonal column object in a broad sense) is rewritten to the y coordinate y (i) of the intersection obtained as described above (step S34). At this time, as described in FIG. 7, in the structure of the bar object M shown in FIG. 6, the texture coordinates coordinated with the intersection as the cutting position are similarly rewritten.
[0176]
Further, the y coordinate of the vertex coordinate on the lower surface of the bar object M ′ (second polygonal column object in a broad sense) is rewritten to the y coordinate y (i) of the intersection obtained as described above (step S35). At this time, as described in FIG. 7, in the structure shown in FIG. 6, the texture coordinates coordinated with the intersection as the cutting position are similarly rewritten.
[0177]
Then, a given initial speed is given in order to express that the two bar objects M and M ′ are shifted and fall after cutting (step S36). In this case, it is desirable that the initial velocities are different from each other. By doing this, it is possible to more realistically express how two objects are cut by the action of cutting from the object before cutting.
[0178]
Finally, a series of cutting processes is terminated (end).
[0179]
By doing as described above, two bar objects cut along an arbitrary cutting plane with respect to the bar object M can be generated with a smaller processing load.
[0180]
FIGS. 16A, 16B, and 16C show examples of game images.
[0181]
In the game image shown in FIG. 16A, based on the input information from the detection device, the first person according to the position on the screen 300 of the sword-type controller operated by the player, the changing direction of the position, and the like. A sword object 302 is displayed from the viewpoint. At this time, when the player performs an operation of cutting the screen 300 in the horizontal axis direction of the screen, a sword locus 304 is generated as shown in FIG.
[0182]
Here, the rod-shaped bamboo object 306 displayed on the screen 300 is composed of a polygonal column object, and if the bamboo object 306 is within the reach of the sword in the camera coordinate system, the sword locus 304 and the bamboo The intersection determination with the reference axis (not shown) of the object 306 is performed. Then, an intersection point is obtained in the local coordinate system of the bamboo object 306, and another bamboo object 308 is generated. One bamboo object 306 has the vertex coordinates of the upper surface set as intersections as shown in FIG. 6, and the other bamboo object 308 has the vertex coordinates of the lower surface set as intersections as shown in FIG.
[0183]
Both bamboo objects 306 and 308 are given a given initial velocity, and fall separately from each other as shown in FIG.
[0184]
In the above description, the vertex coordinates of the upper surface of the object before cutting are set to the coordinates of the cutting position after cutting, and the vertex coordinates of the lower surface of the newly copied object are set to the coordinates of the cutting position after cutting. However, the present invention is not limited to this. For example, the vertex coordinates of the lower surface of the object before cutting are set to the coordinates of the cutting position after cutting, and the vertex coordinates of the upper surface of the newly copied object are set to the coordinates of the cutting position after cutting. Good.
[0185]
3.2 Board object
If a plate object is considered as a quadrangular prism object with a thin thickness direction, it can be processed basically in the same manner as the polygonal prism object described above.
[0186]
However, in the plate object BOBJ in the camera coordinate system, it is necessary to change the direction of coordinate conversion to the object-based local coordinate system depending on the position where the trajectory of the sword (cutting plane) intersects the plate object.
[0187]
FIG. 17 is an explanatory diagram for cutting the plate object along the cutting plane.
[0188]
For the plate object BOBJ in the camera coordinate system, when the cutting plane is generated along the sword locus 320 and when the cutting plane is generated along the sword locus 322, as described above, It is necessary to change a processing method for generating a cut object with a small processing load by using the cutting process.
[0189]
When performing the process of cutting the plate object BOBJ along the sword trajectory 320, in order to obtain the cutting position with a smaller processing load, for example, it is necessary to perform coordinate conversion to the object coordinate system as shown in FIG. There is. In this case, as shown in FIG. 6, since the xz coordinates of the upper surface US1 and the lower surface DS1 are known, the intersection PP between the cutting plane SS1 specified by the trajectory 320 of the sword and the line connecting the vertices of the upper surface and the lower surface Only the y coordinate of ′ has to be obtained.
[0190]
On the other hand, in the case of performing the process of cutting the board object BOBJ along the sword locus 322, in order to obtain the cutting position with a smaller processing load, for example, coordinate conversion is performed on the object coordinate system as shown in FIG. There is a need to do. In this case, since the yz coordinates of the upper surface US2 and the lower surface DS2 are known, only the x coordinate of the intersection point PP ′ between the cutting plane SS2 specified by the trajectory 322 of the sword and the line connecting the vertices of the upper surface and the lower surface is obtained. Good.
[0191]
3.2.1 Processing of this embodiment
Such determination of the intersection position of the sword trajectory (cutting plane) with respect to the plate object BOBJ can be performed prior to the cutting process.
[0192]
Further, in the cutting process shown in FIGS. 12 and 13, since the hit determination between the board object BOBJ and the sword is performed, for example, when the cutting is not performed in the direction shown in FIG. 18A, FIG. The cutting process may be performed in the direction shown in FIG.
[0193]
FIG. 19 shows a flowchart of an example of processing for generating an image obtained by cutting a plate object in the present embodiment.
[0194]
Here, an example of processing in the case where the hit determination between the board object BOBJ and the sword is performed in the cutting processing shown in FIGS.
[0195]
First, after initialization of the plate object before cutting (step S40), the position and orientation of the virtual camera are set in the object space, and input information from the above-described detection device is read (step S41).
[0196]
Next, in order to determine whether the sword operated by the player and displayed on the screen in the camera coordinate system is within the reach of the plate object, first, the reference point of the plate object is converted into the camera coordinate system. Then, the Z coordinate is obtained (step S42).
[0197]
Subsequently, using the Z coordinate obtained in step S42, it is determined whether or not there is a plate object in the range set as the reach of the sword whose position on the screen is moved by the player (step S43). ). Here, as in FIG. 14, it is assumed that the range of the Z coordinate in the camera coordinate system is greater than 0 and less than Z0 as the range that the sword operated by the player can reach.
[0198]
If it is determined in step S43 that the Z coordinate of the reference point of the plate object in the camera coordinate system is greater than 0 and less than Z0 (step S43: Y), it is determined that the plate object is within the reach of the sword. The board object is cut in the vertical axis direction shown in FIG. 18B (step S44). Since this cutting process is the same as the bar object cutting process shown in FIGS. 12 and 13, the description thereof will be omitted.
[0199]
Then, in step S44, it is determined whether or not the plate object cutting process has been performed (step S45). When it is determined that the plate object cutting process has not been performed (step S45: N), the next is FIG. The board object is cut in the horizontal axis direction shown in FIG. Since this cutting process is the same as the bar object cutting process shown in FIGS. 12 and 13, the description thereof will be omitted.
[0200]
When it is determined in step S45 that the cutting process of the plate object has been performed (step S45: Y), or when the cutting process is performed in the horizontal axis direction in step S46, the board object after the cutting process (hit miss) The movement process is performed on the board object after the determination or the two board objects cut after the hit determination (step S47).
[0201]
Next, these objects are generated as images viewed from a given viewpoint and displayed on the display unit (step S48).
[0202]
When a given end condition such as game over is satisfied (step S49: Y), a series of processing ends (end). On the other hand, when the given end condition is not satisfied (step S49: N), the process returns to step S41 to read the input information again.
[0203]
By doing as described above, an image in which the plate object BOBJ is cut along an arbitrary cutting plane in an arbitrary direction can be generated with a smaller processing load.
[0204]
When the thickness direction of the plate object is thin, it is not necessary to obtain four intersection points between the line connecting the vertices of the upper surface and the lower surface and the cutting plane. For example, as shown in FIG. , PP 1 The processing load can be further reduced by obtaining only the two points ′ and treating the y-coordinate on the near side and the far side as the same.
[0205]
3.3 String objects
A string-like object can represent, for example, a hanging tree branch, a rope, or a snake.
[0206]
FIG. 20 is a diagram for explaining the generation principle of two objects after cutting when a string-like object is cut along the cutting plane.
[0207]
In the present embodiment, a string-like object SOBJ is defined by the coordinates in the world coordinate system of one or more vertices that are sequentially linked. Then, the coordinates of each vertex are used to always display a two-dimensional polygon that faces the direction of the virtual camera. By doing this, it is only necessary to manage the coordinates of the vertices that become nodes, so that it is possible to generate an image of a string object with less processing load without consuming the number of polygons.
[0208]
Such a string-like object SOBJ may be expressed in a swaying manner, for example, in order to express the state in the wind. In the present embodiment, on the premise that the string-like object SOBJ has a small fluctuation, the following processing is performed without determining whether or not the cutting plane has passed between the vertices. Note that, in a game image that requires real-time processing, even if the string-like object SOBJ is greatly shaken, accuracy such as which position the player cuts is not required, but rather, cutting that differs depending on the cutting plane is performed. As a result, virtual reality can be improved.
[0209]
Therefore, in this embodiment, in order to perform hit determination between the string object SOBJ and the cutting plane SS4, a virtual straight line VL connecting the start point and the end point of the string object SOBJ is considered.
[0210]
For example, when the string-like object SOBJ is defined by vertices A0 to A4 having a start point A0 and an end point A4, a virtual straight line VL connecting the vertices A0 and A4 is considered. Then, hit determination between the straight line VL and the cutting plane SS4 is performed.
[0211]
Further, an intersection P ″ between the straight line VL and the cutting plane SS4 is obtained, and the cutting position Q of the string-like object SOBJ is specified based on the ratio of the intersection P ″ internally dividing the straight line VL. More specifically, if the ratio at which the intersection P ″ internally divides the straight line VL is α: β, the total distance L (= w1 + w2 + w3 + w4) between the vertices of the string object SOBJ is α: β. A point Q to be internally divided is obtained and set as a cutting position.
[0212]
If this cutting position is between the vertex A2 and the vertex A3, for example, the string-like object SOBJ (first string-like object in a broad sense) is duplicated, and the string-like object SOBJ2 (in a broad sense, A second string-like object) is generated.
[0213]
Then, the end point of the string object SOBJ is set as the vertex A3, and the coordinates of the cutting position Q are set as the coordinates of the vertex A3. Further, the starting point of the string object SOBJ2 is set as the vertex A2, and the coordinates of the cutting position Q are set as the coordinates of the vertex A2.
[0214]
As described above, even when a string object defined by one or a plurality of vertices is cut at an arbitrary cutting plane, it is possible to generate two string objects after cutting by a very simple process. .
[0215]
By the way, when the texture mapped to the string object SOBJ before cutting is directly mapped to the string objects SOBJ and SOBJ2 after cutting, the texture is deformed.
[0216]
Therefore, by setting texture coordinates coordinated to each vertex of the object after cutting as described below, a more realistic cut image can be expressed without deformation of the texture.
[0217]
FIG. 21 shows an example of texture coordinates of the texture mapped to the string object SOBJ.
[0218]
Here, the points A0 to A4 correspond to the vertices that define the string object SOBJ. In the present embodiment, using the coordinates of each vertex, a polygon that faces the direction of the virtual camera is always displayed, and the texture shown in FIG. 21 is mapped. Therefore, textures having a certain width are prepared for the vertices A0 to A4.
[0219]
In the present embodiment, as shown in FIG. 22, for example, points L0 to L2 are located at positions of length w / 2 from the vertices A0 to A4 on a line perpendicular to the direction of the virtual camera and the link connecting the vertices. L4 and R0 to R4 are provided. The points L0 to L4 and R0 to R4 are coordinated with corresponding texture coordinates shown in FIG.
[0220]
Therefore, when the cutting position Q is obtained, the point Q is set at the end point A3 of the string object SOBJ after cutting, and the texture coordinates shown in FIG. 21 are coordinated with the corresponding points LQ and RQ. be able to.
[0221]
In this way, the cutting plane SS4 cuts the texture before cutting by changing the texture coordinates according to the ratio at which the cutting position of the string-like object internally divides a virtual straight line connecting the starting point and the ending point. Even if mapping is performed on the subsequent string-like objects SOBJ and SOBJ2, the texture is not deformed.
[0222]
3.3.1 Processing example of this embodiment
Next, in the present embodiment, the process of cutting the string object according to the cutting plane will be described in more detail.
[0223]
FIG. 23 is a diagram for explaining an example of the structure of a structure that defines a string-like object in the present embodiment.
[0224]
The string-like object structure 400 includes coordinates 410 of the vertices A0 to AN in the world coordinate system, used vertex information 420, and a length 430 of a link connecting the vertices.
[0225]
The used vertex information 420 includes a minimum vertex number m to be used among the vertices A0 to AN, and a maximum vertex number n to be used among the vertices A0 to AN. In the string-like object SOBJ, the vertex set to the minimum number m is the start point, and the vertex set to the maximum number n is the end point.
[0226]
The length 430 of the links connecting the vertices includes the lengths w (0) to w (N-1) for each link.
[0227]
For a string-like object having such a data structure, a cut object can be generated as follows.
[0228]
24 and 25 are flowcharts showing an example of processing for generating an image obtained by cutting a string-like object in this embodiment.
[0229]
Here, the maximum number of links connecting the vertices that define the string-like object is N, and the maximum distance that the sword can reach is Z0.
[0230]
First, the string object M1 before cutting is initialized (step S50).
More specifically, the maximum vertex number n used is set to 0, and the minimum vertex number m used is set to N.
[0231]
Next, the position and orientation of the virtual camera are set in the object space, and input information from the above-described detection apparatus is read (step S51).
[0232]
Next, in order to determine whether or not the sword operated by the player and displayed on the screen in the camera coordinate system is within the reach of the string-like object, the reference point of the string-like object is first set to the camera coordinate system. And the Z coordinate is obtained (step S52).
[0233]
Subsequently, using the Z coordinate obtained in step S52, it is determined whether or not there is a string-like object in the range set as the reach of the sword whose position on the screen is moved by the player (step S52). S53).
[0234]
If it is determined in step S53 that the Z coordinate of the reference point of the string object in the camera coordinate system is greater than 0 and less than Z0 (step S53: Y), it is determined that the string object is within the reach of the sword. The cutting plane SS4 is obtained from the trajectory of the sword on the screen (step S54), and the string-like object is cut using the cutting plane SS4 (step S55).
[0235]
Then, when it is determined that the string-like object after the cutting process or the sword is not within the reachable range in step S53 (step S53: N), the string-like object is moved (step S56).
[0236]
Subsequently, each vertex is corrected so that the length of the link connecting each vertex is w (i) (step S57). When the link is cut by the cutting plane SS4 obtained in step S54, the length of the link is updated to a length corresponding to the cutting position in step S55.
[0237]
Next, these objects are generated as images viewed from a given viewpoint and displayed on the display unit (step S58).
[0238]
When a given end condition such as game over is satisfied (step S59: Y), a series of processing ends (end). On the other hand, when the given end condition is not satisfied (step S59: N), the process returns to step S51 to read the input information again.
[0239]
In the cutting process in step S55, the locus of the sword is obtained from the position on the screen of the sword-type controller obtained based on the input information.
[0240]
Then, an intersection P ″ between the line segment AmAn connecting the start point Am and the end point An of the string object and the trajectory of the sword is obtained (step S60).
[0241]
When it is determined that the intersection point P ″ obtained in step S60 is not on the line segment AmAn (step S61: N), the series of cutting processes is ended (end).
[0242]
On the other hand, when it is determined that the intersection P ″ obtained in step S60 is on the line segment AmAn (step S61: Y), the total length L of the link is obtained (step S62).
[0243]
Subsequently, by using the ratio of the line segment AmP ″ to the length of the line segment AmAn, the length K from the starting point Am of the string-like object to the cutting position is obtained (step S63).
[0244]
First, the starting point number m is substituted into the variable i (step S64), and the lengths K and w (i) are compared (step S65). When K is smaller than w (i), it is determined that the link is disconnected. When K is equal to or greater than w (i), it is determined that the link is disconnected after the next link.
[0245]
Therefore, when it is determined in step S65 that K is greater than or equal to w (i) (step S65: Y), a value obtained by subtracting K from w (i) is substituted for K, and variable i is incremented. (Step S66), K is again compared with w (i) (Step S65).
[0246]
When it is determined that K is smaller than w (i) (step S65: N), the string object M1 is duplicated to create a string object M1 ′ (step S67).
[0247]
Further, for the string-like object M1, each vertex is corrected in order to rewrite the link (step S68). That is, the maximum vertex number n is set to “i + 1”, and w (i) is set to K. At this time, as described above, the texture coordinates of the string-like object M1 are similarly rewritten.
[0248]
For the string-like object M1 ′, each vertex is corrected in order to rewrite the link (step S69). That is, the minimum vertex number m is set to i, and “w (i) −K” is set to w (i). At this time, as described above, the texture coordinates of the string-like object M1 are similarly rewritten.
[0249]
Then, a given initial speed is given in order to express how the two string-like objects M1 and M1 ′ are shifted and fall after cutting (step S70). In this case, it is desirable that the initial velocities are different from each other. By doing this, it is possible to more realistically express how two objects are cut by the action of cutting from the object before cutting.
[0250]
Finally, a series of cutting processes is terminated (end).
[0251]
As described above, two bar objects cut along an arbitrary cutting plane with respect to the string-like object M1 can be generated with a smaller processing load.
[0252]
3.4 Cloth object
If the cloth object is considered as a plurality of the above-described string-like objects arranged, it can be processed in the same manner as the above-described string-like object.
[0253]
FIG. 26 shows an example of a cloth object model in the present embodiment.
[0254]
As described above, the cloth object COBJ in the present embodiment is defined as an aggregate of the first to Tth (T is a natural number of 2 or more) string-like objects arranged in plural in units of the above-described string-like objects. Can do.
[0255]
For example, in FIG. 26, the cloth-like object COBJ is a string-like object SOBJ0 defined by vertices A00 to A04 whose start point is a vertex A00 and end point is a vertex A04, and vertices A10 to A14 whose start point is a vertex A10 and whose end point is a vertex A14. A string-like object SOBJ1 defined by, a string-like object SOBJ2 defined by vertices A20 to A24 whose start point is a vertex A20 and an end point is a vertex A24, and defined by vertices A30 to A34 whose start point is a vertex A30 and whose end point is a vertex A34 And a string object SOBJ4 defined by vertices A40 to A44 whose start point is the vertex A40 and whose end point is the vertex A44.
[0256]
In FIG. 26, the cloth object is defined by five string objects. However, the number is not limited, and an arbitrary cloth object can be modeled using a plurality of string objects. Is possible.
[0257]
When the cloth object modeled in this way is cut at an arbitrary cutting plane SS5, for the cutting plane SS5 and each of the string objects SOBJ0 to SOBJ4, the link coordinates are cut as described above, and the vertex coordinates of the start point and the end point are obtained. to correct. Thereby, the two objects after cutting according to the cutting plane can be generated with a smaller processing load.
[0258]
Moreover, such a cloth object can assign a polygon mesh to each vertex of a string-like object and map a corresponding texture.
[0259]
FIG. 27 shows an example of texture coordinates of the texture mapped to the cloth object in the present embodiment.
[0260]
Here, the points A00 to A44 correspond to the constituent vertices of each string-like object constituting the cloth object COBJ.
[0261]
For example, the texture coordinates of (u, v) = (0, 1.00) are coordinated with the point A00. The texture coordinates of (u, v) = (1.00, 0) are coordinated with the point A44.
[0262]
The cloth object to which such a texture is mapped is, for example, as shown in FIG.
[0263]
In addition, the texture mapped to the cloth object after cutting is also not deformed by coordinating the texture coordinates corresponding to the cutting position in the same manner as the string object. .
[0264]
3.4.1 Processing example of this embodiment
Next, in the present embodiment, a process for cutting the cloth object according to the cutting plane will be described in more detail.
[0265]
FIG. 28 shows a flowchart of an example of processing for generating an image obtained by cutting a cloth object in the present embodiment.
[0266]
First, after initializing the cloth object before cutting (step S80), the position and orientation of the virtual camera are set in the object space, and input information from the above-described detection device is read (step S81).
[0267]
Next, in order to determine whether the sword operated by the player and displayed on the screen in the camera coordinate system is within the reach of the cloth object, the reference point of the cloth object is first converted to the camera coordinate system. Then, the Z coordinate is obtained (step S82).
[0268]
Subsequently, using the Z coordinate obtained in step S82, it is determined whether or not there is a cloth object in the range set as the reach of the sword whose position on the screen is moved by the player (step S83). ).
[0269]
When it is determined in step S83 that the Z coordinate of the reference point of the cloth object in the camera coordinate system is greater than 0 and smaller than Z0 (step S83: Y), it is determined that the cloth object is within the reach of the sword, and the screen A cutting plane SS5 is obtained from the trajectory of the upper sword (step S84).
[0270]
Then, 1 is set in the variable j for specifying the string object constituting the cloth object (step S85), and the string object specified by the variable j is cut (step S86). The cutting process is the same as the string object cutting process shown in FIG.
[0271]
Subsequently, the variable j is incremented (step S87), and it is determined whether or not the variable j is equal to or less than the number dd of the string objects constituting the cloth object (step S88).
[0272]
When it is determined that the variable j is equal to or less than dd (step S88: Y), the process returns to step S86, and the cutting process is performed on the string-like object specified by the variable j incremented in step S87.
[0273]
On the other hand, when it is determined that the variable j is not equal to or less than dd (step S88: N), it is determined that the string object constituting the two cloth objects after cutting is not within the reach of the sword in step S53. (Step S83: N) performs a movement process for each string-like object (Step S89).
[0274]
Subsequently, the length of the link connecting the vertices is corrected (step S90), and these objects are generated as images viewed from a given viewpoint and displayed on the display unit (step S91).
[0275]
When a given end condition such as game over is satisfied (step S92: Y), a series of processing ends (end). On the other hand, when the given termination condition is not satisfied (step S92: N), the process returns to step S81 to read the input information again.
[0276]
By doing so, an image in which the cloth object is cut along an arbitrary cutting plane in an arbitrary direction can be generated with a smaller processing load.
[0277]
4). Hardware configuration
Next, an example of a hardware configuration capable of realizing the present embodiment will be described with reference to FIG.
[0278]
The main processor 900 operates based on a program stored in the CD 982 (information storage medium), a program transferred via the communication interface 990, or a program stored in the ROM 950 (one of information storage media). Various processes such as processing, image processing, and sound processing are executed.
[0279]
The coprocessor 902 assists the processing of the main processor 900, has a product-sum calculator and a divider capable of high-speed parallel calculation, and executes matrix calculation (vector calculation) at high speed. For example, if a physical simulation for moving or moving an object requires processing such as matrix operation, a program operating on the main processor 900 instructs (requests) the processing to the coprocessor 902. )
[0280]
The geometry processor 904 performs geometry processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation, has a product-sum calculator and a divider capable of high-speed parallel computation, and performs matrix computation (vector computation). Run fast. For example, when processing such as coordinate transformation, perspective transformation, and light source calculation is performed, a program operating on the main processor 900 instructs the geometry processor 904 to perform the processing.
[0281]
The data decompression processor 906 performs a decoding process for decompressing the compressed image data and sound data, and a process for accelerating the decoding process of the main processor 900. As a result, a moving image compressed by the MPEG method or the like can be displayed on the opening screen, the intermission screen, the ending screen, or the game screen. Note that image data and sound data to be decoded are stored in the ROM 950 and the CD 982 or transferred from the outside via the communication interface 990.
[0282]
The drawing processor 910 performs drawing (rendering) processing of an object composed of primitives (primitive surfaces) such as polygons and curved surfaces at high speed. When drawing an object, the main processor 900 uses the function of the DMA controller 970 to pass the object data to the drawing processor 910 and transfer the texture to the texture storage unit 924 if necessary. Then, the rendering processor 910 renders the object in the frame buffer 922 at high speed while performing hidden surface removal using a Z buffer or the like based on the object data and texture. In addition, the drawing processor 910 can perform numb lending (translucent processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. When an image for one frame is written in the frame buffer 922, the image is displayed on the display 912.
[0283]
The sound processor 930 includes a multi-channel ADPCM sound source and the like, and generates high-quality game sounds such as BGM, sound effects, and sounds. The generated game sound is output from the speaker 932.
[0284]
Operation data from the game controller 942 (lever, button, chassis, pad type controller, gun type controller, etc.), save data from the memory card 944, and personal data are transferred via the serial interface 940.
[0285]
The ROM 950 stores system programs and the like. In the case of an arcade game system, the ROM 950 functions as an information storage medium, and various programs are stored in the ROM 950. A hard disk may be used instead of the ROM 950.
[0286]
The RAM 960 is used as a work area for various processors.
[0287]
The DMA controller 970 controls DMA transfer between the processor and memory (RAM, VRAM, ROM, etc.).
[0288]
The CD drive 980 drives a CD 982 (information storage medium) in which programs, image data, sound data, and the like are stored, and enables access to these programs and data.
[0289]
The communication interface 990 is an interface for performing data transfer with the outside via a network. In this case, as the network connected to the communication interface 990, a communication line (analog telephone line, ISDN), a high-speed serial bus, and the like can be considered. By using a communication line, data transfer via the Internet becomes possible. Further, by using the high-speed serial bus, data transfer with other image generation systems becomes possible.
[0290]
Alternatively, it is conceivable to receive input information for specifying the position of the operation input unit on the sensor surface of the detection device (not shown) via the communication interface 990.
[0291]
Each means of the present invention may be realized (executed) only by hardware, or only by a program stored in an information storage medium or a program distributed via a communication interface. Also good. Alternatively, it may be realized by both hardware and a program.
[0292]
When each means of the present invention is realized by both hardware and a program, the information storage medium stores a program for realizing each means of the present invention using hardware. Become. More specifically, the program instructs the processors 902, 904, 906, 910, 930, etc., which are hardware, and passes data if necessary. Each of the processors 902, 904, 906, 910, 930 and the like implements each unit of the present invention based on the instruction and the passed data.
[0293]
The present invention is not limited to that described in the above embodiment, and various modifications can be made.
[0294]
For example, the detection apparatus is not limited to the detection method described with reference to FIGS. 1 and 3 to 5.
As the detection device, the position of the operation input unit may be detected by replacing infrared rays with ultrasonic waves, or the position of the operation input unit may be detected using the principle of image recognition or motion capturing. May be. In short, the position or position of a part of the player's body or the operation input unit operated by the player in a given space (area) in which each position is associated with the position on the screen of the display unit on a one-to-one basis. Any detection device that can detect information for identifying the device is acceptable.
[0295]
In this embodiment, the sword-type controller has been described as an example of the operation input unit. However, the operation input unit is not limited to this, and is not limited to weapons such as spears and clubs. Can think.
[0296]
In the invention according to the dependent claims of the present invention, a part of the constituent features of the dependent claims can be omitted. Moreover, the principal part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.
[0297]
The present invention can be applied to various games (such as fighting games, shooting games, robot fighting games, sports games, competitive games, role playing games, music playing games, dance games, etc.).
[0298]
The present invention is also applicable to various image generation systems (game systems) such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, and a system board for generating game images. Applicable.
[Brief description of the drawings]
FIG. 1 is a schematic external perspective view when an image generation system according to an embodiment is applied to an arcade game system.
FIG. 2 is an example of a block diagram of an image generation system in the present embodiment.
FIGS. 3A and 3B are explanatory diagrams for explaining the principle of detecting the position of the operation input unit on the sensor surface formed by the detection device. FIGS.
FIG. 4 is an explanatory diagram for explaining a detection principle of a speed at which an operation input unit moves on a sensor surface formed by a detection device in the present embodiment.
FIGS. 5A and 5B are explanatory diagrams for explaining the principle of detecting the orientation of the operation input unit with respect to the screen by the detection device.
FIG. 6 is an explanatory diagram for explaining a generation principle of two objects after cutting when a hexagonal prism object is cut along a cutting plane;
FIG. 7 is an explanatory diagram illustrating an example of texture coordinates of a texture mapped to a side surface of a hexagonal prism object.
FIG. 8 is an explanatory diagram illustrating an example of texture coordinates of a texture mapped to the upper surface and the lower surface of a hexagonal prism object.
FIG. 9 is an explanatory diagram for explaining images before and after cutting a hexagonal prism object in the present embodiment;
FIG. 10 is a diagram for describing an example of a configuration of a structure that defines a polygonal prism object in the present embodiment.
FIG. 11 is a flowchart illustrating an example of processing for generating an image obtained by cutting a polygonal column object in the present embodiment.
FIG. 12 is a flowchart showing the first half of an example of a polygonal column object cutting process in the present embodiment;
FIG. 13 is a flowchart illustrating the latter half of an example of the polygonal column object cutting process in the present embodiment;
FIG. 14 is an explanatory diagram for explaining a positional relationship between a range where a sword reaches in a camera coordinate system and a polygonal prism object;
FIG. 15 is an explanatory diagram for explaining a locus of a sword in the present embodiment.
FIGS. 16A, 16B, and 16C are diagrams illustrating an example of a game image.
FIG. 17 is an explanatory diagram for cutting a plate object along a cutting plane in the present embodiment.
FIGS. 18A and 18B are diagrams for explaining the relationship between the orientation of the cutting plane and the plate object.
FIG. 19 is a flowchart of an example of a process for generating an image obtained by cutting a plate object in the present embodiment.
FIG. 20 is an explanatory diagram for explaining a generation principle of two objects after cutting when a string-like object is cut along a cutting plane in the present embodiment;
FIG. 21 is an explanatory diagram showing an example of texture coordinates of a texture mapped to a string object in the present embodiment.
FIG. 22 is an explanatory diagram for explaining a relationship between a texture mapped to a string-like object and a cutting position in the present embodiment.
FIG. 23 is a diagram for describing an example of a configuration of a structure that defines a string-like object in the present embodiment;
FIG. 24 is a flowchart showing an example of processing for generating an image obtained by cutting a string-like object in the present embodiment.
FIG. 25 is a flowchart showing an example of a string object cutting process in the present embodiment;
FIG. 26 is an explanatory diagram showing an example of cloth object modeling in the present embodiment.
FIG. 27 is an explanatory diagram showing an example of texture coordinates of a texture mapped to a cloth object in the present embodiment.
FIG. 28 is a flowchart illustrating an example of processing for generating an image obtained by cutting a cloth object in the present embodiment.
FIG. 29 is a diagram illustrating an example of a hardware configuration capable of realizing the present embodiment.
[Explanation of symbols]
10 Game system
20 housing
30 screens
40 Sword controller
50 First sensor
52 First sensor surface
60 second sensor
62 Second sensor surface
100 processor
110 Position calculator
130 Parameter setting section
132 Object generator
134 Cutting position calculator
136 Vertex correction unit
140 Image generator
150 sound generator
160 Operation unit
162 Input information reception part
170 Storage unit
180 Information storage medium
190 Display
192 sound output section
194 Portable information storage device
196 Communication Department
A representative point
DS, DS 'Bottom
DP1-DP6 Bottom vertex
n normal vector
OBJ1 hexagonal column object (first polygonal column object)
OBJ2 hexagonal column object (second polygonal column object)
PP, P1-P6 Intersection
SS cutting plane
US, US 'top surface
UP1 to UP6 Top vertex

Claims (25)

画像生成を行う画像生成システムであって、
対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、
前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、
前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、
上面の頂点の位置が前記交点の位置に設定された第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトとについて、所与の視点から見える画像を生成する手段と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image,
The cutting plane that cuts the side surface of the first polygonal column object defined by the top vertex and the bottom vertex of the opposing polygon is connected to the top vertex and the bottom vertex corresponding to the top surface. Means for determining the intersection of the line and
Means for duplicating the first polygonal column object to generate a second polygonal column object;
Means for setting the position of the top vertex of the first polygonal column object to the position of the intersection, and setting the position of the vertex of the bottom surface of the second polygonal column object to the position of the intersection;
From a given viewpoint, a first polygonal column object in which the position of the top vertex is set to the position of the intersection, and a second polygonal column object in which the position of the bottom vertex is set to the position of the intersection Means for generating a visible image;
An image generation system comprising:
請求項1において、
前記切断平面を、前記第1の多角柱オブジェクトのローカル座標系に座標変換する手段を含み、
前記交点は、前記ローカル座標系において求められることを特徴とする画像生成システム。
In claim 1,
Means for transforming the cutting plane into a local coordinate system of the first polygonal column object;
The image generation system according to claim 1, wherein the intersection point is obtained in the local coordinate system.
請求項2において、
前記ローカル座標系は、
互いに直交する第1〜第3の座標軸を有し、
前記上面及び前記下面に第1及び第2の座標軸が設定され、前記上面及び前記下面に対して垂直な方向に第3の座標軸が設定されることを特徴とする画像生成システム。
In claim 2,
The local coordinate system is
Having first to third coordinate axes orthogonal to each other;
An image generation system, wherein first and second coordinate axes are set on the upper surface and the lower surface, and a third coordinate axis is set in a direction perpendicular to the upper surface and the lower surface.
画像生成を行う画像生成システムであって、
対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記第1の多角柱オブジェクトとの位置関係に応じて決められる前記第1の多角柱オブジェクトのローカル座標系に、前記切断平面を座標変換する手段と、
前記ローカル座標系において、前記切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、
前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、
前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、
上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトについて、所与の視点から見える画像を生成する手段と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image,
The first determined in accordance with the positional relationship between a cutting plane that cuts the side surface of the first polygonal column object defined by the top vertex and the bottom vertex of the opposing polygon, and the first polygonal column object. Means for transforming the cutting plane into the local coordinate system of the polygonal prism object of
Means for obtaining an intersection of the cutting plane and a line connecting the vertex of the upper surface and the vertex of the lower surface corresponding to the upper surface in the local coordinate system;
Means for duplicating the first polygonal column object to generate a second polygonal column object;
Means for setting the position of the top vertex of the first polygonal column object to the position of the intersection, and setting the position of the vertex of the bottom surface of the second polygonal column object to the position of the intersection;
For a first polygonal column object after cutting in which the position of the top vertex is set to the position of the intersection, and a second polygonal column object in which the position of the bottom vertex is set to the position of the intersection, a given Means for generating an image that is visible from a viewpoint;
An image generation system comprising:
請求項1乃至4のいずれかにおいて、
切断前の第1の多角柱オブジェクトの側面を構成する上面及び下面の頂点間を結ぶ線を前記交点の位置が内分する比率に基づいて、前記側面にマッピングされていたテクスチャにおけるテクスチャ座標を求め、
上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、
第2の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、
切断後の第1の多角柱オブジェクト及び第2の多角柱オブジェクトの当該側面に、切断前のテクスチャをマッピングすることを特徴とする画像生成システム。
In any one of Claims 1 thru | or 4,
The texture coordinates in the texture mapped to the side surface are obtained based on the ratio at which the position of the intersection point internally divides the line connecting the vertices of the upper surface and the lower surface constituting the side surface of the first polygonal column object before cutting. ,
In the side surface of the first polygonal column object after cutting where the position of the vertex on the upper surface is set to the position of the intersection, the texture coordinates are coordinated with the vertex set to the position of the intersection,
In the side surface of the second polygonal column object, coordinate the texture coordinates to the vertex set at the position of the intersection,
An image generation system, wherein a texture before cutting is mapped to the side surfaces of the first polygonal column object and the second polygonal column object after cutting.
画像生成を行う画像生成システムであって、
始点と終点との間で順次連結される複数の頂点によって定義された第1のひも状オブジェクトを、切断平面が切断する切断位置を求める手段と、
前記第1のひも状オブジェクトを複製して第2のひも状オブジェクトを生成する手段と、
前記第1のひも状オブジェクトの終点を前記切断位置に設定し、前記第2のひも状オブジェクトの始点を前記切断位置に設定する手段と、
終点が前記切断位置に設定された切断後の第1のひも状オブジェクトと、始点が前記切断位置に設定された第2のひも状オブジェクトとについて、所与の視点から見える画像を生成する手段と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image,
Means for determining a cutting position at which a cutting plane cuts a first string-like object defined by a plurality of vertices sequentially connected between a start point and an end point;
Means for duplicating the first string object to generate a second string object;
Means for setting an end point of the first string-like object at the cutting position and setting a start point of the second string-like object at the cutting position;
Means for generating an image viewed from a given viewpoint with respect to the first string-like object after cutting whose end point is set at the cutting position and the second string-like object whose starting point is set at the cutting position; ,
An image generation system comprising:
請求項6において、
前記切断位置は、
切断前の第1のひも状オブジェクトの始点と終点とを結ぶ第1の線を前記切断平面が内分する比率で、切断前の第1のひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とする画像生成システム。
In claim 6,
The cutting position is
The length between the vertices constituting the first string-like object before cutting is a ratio in which the cutting plane internally divides the first line connecting the start point and the end point of the first string-like object before cutting. An image generation system characterized by being obtained as a position between vertices obtained by dividing the sum total.
請求項6又は7において、
前記複数の頂点を用いて、前記所与の視点の向きと正対するポリゴンを配置することを特徴とする画像生成システム。
In claim 6 or 7,
An image generation system, wherein a polygon that faces the direction of the given viewpoint is arranged using the plurality of vertices.
請求項8において、
切断前の第1のひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第1のひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、
切断後の第1のひも状オブジェクトの終点に前記テクスチャ座標をコーディネートし、
第2のひも状オブジェクトの始点に前記テクスチャ座標をコーディネートし、切断後の第1のひも状オブジェクト及び第2のひも状オブジェクトに、切断前のテクスチャをマッピングすることを特徴とする画像生成システム。
In claim 8,
Based on the ratio by which the cutting plane internally divides the line connecting the start point and end point of the first string object before cutting, obtain texture coordinates in the texture mapped to the first string object before cutting,
Coordinate the texture coordinates to the end point of the first string-like object after cutting,
An image generation system, wherein the texture coordinates are coordinated with a starting point of a second string-like object, and the texture before cutting is mapped to the first string-like object and the second string-like object after being cut.
画像生成を行う画像生成システムであって、
始点と終点との間で順次連結される複数の頂点によって定義されたひも状オブジェクトを複数配列させた第1〜第T(Tは、2以上の自然数)のひも状オブジェクトにより構成される第1の布オブジェクトを切断平面が切断する切断位置を、第1〜第Tのひも状オブジェクトごとに求める手段と、
前記第1の布オブジェクトを複製して第2の布オブジェクトを生成する手段と、
前記第1の布オブジェクトを構成する第R(Rは、1以上T以下の自然数)のひも状オブジェクトの終点を、第Rのひも状オブジェクトの切断位置に設定し、前記第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点を、第Rのひも状オブジェクトの切断位置に設定する手段と、
各ひも状オブジェクトの終点が切断位置に設定された切断後の第1の布オブジェクトと、各ひも状オブジェクトの始点が切断位置に設定された第2の布オブジェクトとについて、所与の視点から見える画像を生成する手段と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image,
A first composed of first to Tth (T is a natural number of 2 or more) string-like objects in which a plurality of string-like objects defined by a plurality of vertices sequentially connected between a start point and an end point are arranged. Means for obtaining a cutting position at which the cutting plane cuts the cloth object for each of the first to T-th string objects;
Means for replicating the first cloth object to generate a second cloth object;
An end point of an R-th string object (R is a natural number between 1 and T) constituting the first cloth object is set as a cutting position of the R-string object, and the second cloth object is Means for setting the starting point of the R-th string object to be configured as the cutting position of the R-th string object;
The first cloth object after cutting in which the end point of each string-like object is set to the cutting position and the second cloth object in which the starting point of each string-like object is set to the cutting position are visible from a given viewpoint. Means for generating an image;
An image generation system comprising:
請求項10において、
前記切断位置は、
切断前の第Rのひも状オブジェクトの始点と終点とを結ぶ第2の線を前記切断平面が内分する比率で、切断前の第Rのひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とする画像生成システム。
In claim 10,
The cutting position is
The length between the vertices constituting the R string object before cutting is a ratio in which the cutting plane internally divides the second line connecting the start point and end point of the R string object before cutting. An image generation system characterized by being obtained as a position between vertices obtained by dividing the sum.
請求項10又は11において、
切断前の第1の布オブジェクトを構成する第Rのひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第Rのひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、
切断後の第1の布オブジェクトを構成する第Rのひも状オブジェクトの終点に、前記テクスチャ座標をコーディネートし、
第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点に、前記テクスチャ座標をコーディネートし、
切断後の第1の布オブジェクト及び第2の布オブジェクトに、切断前のテクスチャをマッピングすることを特徴とする画像生成システム。
In claim 10 or 11,
Based on the ratio at which the cutting plane internally divides the line connecting the start point and end point of the R-th string object constituting the first cloth object before cutting, it is mapped to the R-th string object before cutting. Find the texture coordinates in the texture
Coordinates the texture coordinates to the end point of the R-th string object constituting the first cloth object after cutting,
Coordinating the texture coordinates to the starting point of the Rth string-like object constituting the second cloth object,
An image generation system, wherein a texture before cutting is mapped to a first cloth object and a second cloth object after cutting.
対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、
前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、
前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、
上面の頂点の位置が前記交点の位置に設定された第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトとについて、所与の視点から見える画像を生成する手段としてコンピュータに機能させることを特徴とするプログラム。
The cutting plane that cuts the side surface of the first polygonal column object defined by the top vertex and the bottom vertex of the opposing polygon is connected to the top vertex and the bottom vertex corresponding to the top surface. Means for determining the intersection of the line and
Means for duplicating the first polygonal column object to generate a second polygonal column object;
Means for setting the position of the top vertex of the first polygonal column object to the position of the intersection, and setting the position of the vertex of the bottom surface of the second polygonal column object to the position of the intersection;
From a given viewpoint, a first polygonal column object in which the position of the top vertex is set to the position of the intersection, and a second polygonal column object in which the position of the bottom vertex is set to the position of the intersection A program that causes a computer to function as means for generating a visible image.
請求項13において、
前記切断平面を、前記第1の多角柱オブジェクトのローカル座標系に座標変換する手段を含み、
前記交点は、前記ローカル座標系において求められることを特徴とするプログラム。
In claim 13,
Means for transforming the cutting plane into a local coordinate system of the first polygonal column object;
The intersection point is obtained in the local coordinate system.
請求項14において、
前記ローカル座標系は、
互いに直交する第1〜第3の座標軸を有し、
前記上面及び前記下面に第1及び第2の座標軸が設定され、前記上面及び前記下面に対して垂直な方向に第3の座標軸が設定されることを特徴とするプログラム。
In claim 14,
The local coordinate system is
Having first to third coordinate axes orthogonal to each other;
A program in which first and second coordinate axes are set on the upper surface and the lower surface, and a third coordinate axis is set in a direction perpendicular to the upper surface and the lower surface.
対向する多角形の上面の頂点及び下面の頂点により定義される第1の多角柱オブジェクトの側面を切断する切断平面と、前記第1の多角柱オブジェクトとの位置関係に応じて決められる前記第1の多角柱オブジェクトのローカル座標系に、前記切断平面を座標変換する手段と、
前記ローカル座標系において、前記切断平面と、前記上面の頂点と該上面に対応する前記下面の頂点との間を結ぶ線と、の交点を求める手段と、
前記第1の多角柱オブジェクトを複製して第2の多角柱オブジェクトを生成する手段と、
前記第1の多角柱オブジェクトの上面の頂点の位置を前記交点の位置に設定し、前記第2の多角柱オブジェクトの下面の頂点の位置を前記交点の位置に設定する手段と、
上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトと、下面の頂点の位置が前記交点の位置に設定された第2の多角柱オブジェクトについて、所与の視点から見える画像を生成する手段としてコンピュータを機能させることを特徴とするプログラム。
The first determined in accordance with the positional relationship between a cutting plane that cuts the side surface of the first polygonal column object defined by the top vertex and the bottom vertex of the opposing polygon, and the first polygonal column object. Means for transforming the cutting plane into the local coordinate system of the polygonal prism object of
Means for obtaining an intersection of the cutting plane and a line connecting the vertex of the upper surface and the vertex of the lower surface corresponding to the upper surface in the local coordinate system;
Means for duplicating the first polygonal column object to generate a second polygonal column object;
Means for setting the position of the top vertex of the first polygonal column object to the position of the intersection, and setting the position of the vertex of the bottom surface of the second polygonal column object to the position of the intersection;
For a first polygonal column object after cutting in which the position of the top vertex is set to the position of the intersection, and a second polygonal column object in which the position of the bottom vertex is set to the position of the intersection, a given A program that causes a computer to function as means for generating an image that can be seen from a viewpoint.
請求項13乃至16のいずれかにおいて、
切断前の第1の多角柱オブジェクトの側面を構成する上面及び下面の頂点間を結ぶ線を前記交点の位置が内分する比率に基づいて、前記側面にマッピングされていたテクスチャにおけるテクスチャ座標を求め、
上面の頂点の位置が前記交点の位置に設定された切断後の第1の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、
第2の多角柱オブジェクトの当該側面において、前記交点の位置に設定された頂点に前記テクスチャ座標をコーディネートし、
切断後の第1の多角柱オブジェクト及び第2の多角柱オブジェクトの当該側面に、切断前のテクスチャをマッピングすることを特徴とするプログラム。
In any of claims 13 to 16,
The texture coordinates in the texture mapped to the side surface are obtained based on the ratio at which the position of the intersection point internally divides the line connecting the vertices of the upper surface and the lower surface constituting the side surface of the first polygonal column object before cutting. ,
In the side surface of the first polygonal column object after cutting where the position of the vertex on the upper surface is set to the position of the intersection, the texture coordinates are coordinated with the vertex set to the position of the intersection,
In the side surface of the second polygonal column object, coordinate the texture coordinates to the vertex set at the position of the intersection,
A program that maps a texture before cutting on the side surfaces of the first polygonal column object and the second polygonal column object after cutting.
始点と終点との間で順次連結される複数の頂点によって定義された第1のひも状オブジェクトを、切断平面が切断する切断位置を求める手段と、
前記第1のひも状オブジェクトを複製して第2のひも状オブジェクトを生成する手段と、
前記第1のひも状オブジェクトの終点を前記切断位置に設定し、前記第2のひも状オブジェクトの始点を前記切断位置に設定する手段と、
終点が前記切断位置に設定された切断後の第1のひも状オブジェクトと、始点が前記切断位置に設定された第2のひも状オブジェクトとについて、所与の視点から見える画像を生成する手段としてコンピュータを機能させることを特徴とするプログラム。
Means for determining a cutting position at which a cutting plane cuts a first string-like object defined by a plurality of vertices sequentially connected between a start point and an end point;
Means for duplicating the first string object to generate a second string object;
Means for setting an end point of the first string-like object at the cutting position and setting a start point of the second string-like object at the cutting position;
As means for generating an image that can be seen from a given viewpoint with respect to the first string object after cutting whose end point is set to the cutting position and the second string object whose starting point is set to the cutting position. A program characterized by causing a computer to function.
請求項18において、
前記切断位置は、
切断前の第1のひも状オブジェクトの始点と終点とを結ぶ第1の線を前記切断平面が内分する比率で、切断前の第1のひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とするプログラム。
In claim 18,
The cutting position is
The length between the vertices constituting the first string-like object before cutting is a ratio in which the cutting plane internally divides the first line connecting the start point and the end point of the first string-like object before cutting. A program characterized in that it is obtained as a position between vertices obtained by dividing the sum total.
請求項18又は19において、
前記複数の頂点を用いて、前記所与の視点の向きと正対するポリゴンを配置することを特徴とするプログラム。
In claim 18 or 19,
A program which arranges a polygon which faces the direction of the given viewpoint using the plurality of vertices.
請求項20において、
切断前の第1のひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第1のひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、
切断後の第1のひも状オブジェクトの終点に前記テクスチャ座標をコーディネートし、
第2のひも状オブジェクトの始点に前記テクスチャ座標をコーディネートし、切断後の第1のひも状オブジェクト及び第2のひも状オブジェクトに、切断前のテクスチャをマッピングすることを特徴とするプログラム。
In claim 20,
Based on the ratio by which the cutting plane internally divides the line connecting the start point and end point of the first string object before cutting, obtain texture coordinates in the texture mapped to the first string object before cutting,
Coordinate the texture coordinates to the end point of the first string-like object after cutting,
A program characterized by coordinating the texture coordinates to the starting point of a second string-like object, and mapping the texture before cutting to the first string-like object and the second string-like object after being cut.
始点と終点との間で順次連結される複数の頂点によって定義されたひも状オブジェクトを複数配列させた第1〜第T(Tは、2以上の自然数)のひも状オブジェクトにより構成される第1の布オブジェクトを切断平面が切断する切断位置を、第1〜第Tのひも状オブジェクトごとに求める手段と、
前記第1の布オブジェクトを複製して第2の布オブジェクトを生成する手段と、
前記第1の布オブジェクトを構成する第R(Rは、1以上T以下の自然数)のひも状オブジェクトの終点を、第Rのひも状オブジェクトの切断位置に設定し、前記第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点を、第Rのひも状オブジェクトの切断位置に設定する手段と、
各ひも状オブジェクトの終点が切断位置に設定された切断後の第1の布オブジェクトと、各ひも状オブジェクトの始点が切断位置に設定された第2の布オブジェクトとについて、所与の視点から見える画像を生成する手段としてコンピュータを機能させることを特徴とするプログラム。
A first composed of first to Tth (T is a natural number of 2 or more) string-like objects in which a plurality of string-like objects defined by a plurality of vertices sequentially connected between a start point and an end point are arranged. Means for obtaining a cutting position at which the cutting plane cuts the cloth object for each of the first to T-th string objects;
Means for replicating the first cloth object to generate a second cloth object;
An end point of an R-th string object (R is a natural number between 1 and T) constituting the first cloth object is set as a cutting position of the R-string object, and the second cloth object is Means for setting the starting point of the R-th string object to be configured as the cutting position of the R-th string object;
The first cloth object after cutting in which the end point of each string-like object is set to the cutting position and the second cloth object in which the starting point of each string-like object is set to the cutting position are visible from a given viewpoint. A program for causing a computer to function as means for generating an image.
請求項22において、
前記切断位置は、
切断前の第Rのひも状オブジェクトの始点と終点とを結ぶ第2の線を前記切断平面が内分する比率で、切断前の第Rのひも状オブジェクトを構成する各頂点間の長さの総和を内分した頂点間の位置として求められることを特徴とするプログラム。
In claim 22,
The cutting position is
The length between the vertices constituting the R-string object before cutting is a ratio at which the cutting plane internally divides the second line connecting the start point and the end point of the R-string object before cutting. A program characterized in that it is obtained as a position between vertices that internally divides the sum.
請求項22又は23において、
切断前の第1の布オブジェクトを構成する第Rのひも状オブジェクトの始点及び終点を結ぶ線を前記切断平面が内分する比率に基づいて、切断前の第Rのひも状オブジェクトにマッピングされていたテクスチャにおけるテクスチャ座標を求め、
切断後の第1の布オブジェクトを構成する第Rのひも状オブジェクトの終点に、前記テクスチャ座標をコーディネートし、
第2の布オブジェクトを構成する第Rのひも状オブジェクトの始点に、前記テクスチャ座標をコーディネートし、
切断後の第1の布オブジェクト及び第2の布オブジェクトに、切断前のテクスチャをマッピングすることを特徴とするプログラム。
In claim 22 or 23,
Based on the ratio at which the cutting plane internally divides the line connecting the start point and end point of the R-th string object constituting the first cloth object before cutting, it is mapped to the R-th string object before cutting. Find the texture coordinates in the texture
Coordinates the texture coordinates to the end point of the R-th string object constituting the first cloth object after cutting,
Coordinating the texture coordinates to the starting point of the Rth string-like object constituting the second cloth object,
A program for mapping a texture before cutting to a first cloth object and a second cloth object after cutting.
コンピュータにより読み取り可能な情報記憶媒体であって、請求項13乃至24のいずれかのプログラムを記憶することを特徴とする情報記憶媒体。An information storage medium readable by a computer, wherein the program according to any one of claims 13 to 24 is stored.
JP2001273538A 2001-09-10 2001-09-10 Image generation system, program, and information storage medium Expired - Fee Related JP4632596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001273538A JP4632596B2 (en) 2001-09-10 2001-09-10 Image generation system, program, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001273538A JP4632596B2 (en) 2001-09-10 2001-09-10 Image generation system, program, and information storage medium

Publications (2)

Publication Number Publication Date
JP2003085585A JP2003085585A (en) 2003-03-20
JP4632596B2 true JP4632596B2 (en) 2011-02-16

Family

ID=19098737

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001273538A Expired - Fee Related JP4632596B2 (en) 2001-09-10 2001-09-10 Image generation system, program, and information storage medium

Country Status (1)

Country Link
JP (1) JP4632596B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5030132B2 (en) * 2006-01-17 2012-09-19 任天堂株式会社 GAME PROGRAM AND GAME DEVICE
JP2009146276A (en) * 2007-12-17 2009-07-02 Sumitomo Forestry Co Ltd Three-dimensional image drawing device and three-dimensional image drawing program
JP5558008B2 (en) * 2009-01-26 2014-07-23 株式会社バンダイナムコゲームス Program, information storage medium, and game system
JP5241536B2 (en) * 2009-01-26 2013-07-17 株式会社バンダイナムコゲームス Program, information storage medium, and game system
JP4989697B2 (en) * 2009-08-19 2012-08-01 株式会社コナミデジタルエンタテインメント GAME DEVICE, GAME PROCESSING METHOD, AND PROGRAM
JP4815521B2 (en) * 2009-09-18 2011-11-16 株式会社コナミデジタルエンタテインメント Image processing apparatus, image processing method, and program
JP5758085B2 (en) * 2010-05-19 2015-08-05 任天堂株式会社 GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME PROCESSING METHOD
KR102311957B1 (en) * 2015-07-29 2021-10-13 주식회사 넥슨코리아 Apparatus for providing game and method thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0471082A (en) * 1990-07-12 1992-03-05 Mitsubishi Electric Corp Three-dimensional display device
JPH07192144A (en) * 1993-12-27 1995-07-28 Nissan Motor Co Ltd Method and device for cutting and editing polyhedral solid
JPH10230626A (en) * 1997-02-18 1998-09-02 Toray Ind Inc Printer and printing method
JPH11175767A (en) * 1997-09-19 1999-07-02 Mitsubishi Electric Inf Technol Center America Inc Graphic representation generation method using computer
JPH11259672A (en) * 1998-03-13 1999-09-24 Mitsubishi Electric Corp Three-dimensional virtual space display device
JPH11265176A (en) * 1997-11-07 1999-09-28 Canon Inf Syst Res Australia Pty Ltd Modification for font with automatic mesh matching
JP2000298734A (en) * 1999-04-12 2000-10-24 Mitsubishi Electric Corp Cross section generating device for three-dimensional model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0471082A (en) * 1990-07-12 1992-03-05 Mitsubishi Electric Corp Three-dimensional display device
JPH07192144A (en) * 1993-12-27 1995-07-28 Nissan Motor Co Ltd Method and device for cutting and editing polyhedral solid
JPH10230626A (en) * 1997-02-18 1998-09-02 Toray Ind Inc Printer and printing method
JPH11175767A (en) * 1997-09-19 1999-07-02 Mitsubishi Electric Inf Technol Center America Inc Graphic representation generation method using computer
JPH11265176A (en) * 1997-11-07 1999-09-28 Canon Inf Syst Res Australia Pty Ltd Modification for font with automatic mesh matching
JPH11259672A (en) * 1998-03-13 1999-09-24 Mitsubishi Electric Corp Three-dimensional virtual space display device
JP2000298734A (en) * 1999-04-12 2000-10-24 Mitsubishi Electric Corp Cross section generating device for three-dimensional model

Also Published As

Publication number Publication date
JP2003085585A (en) 2003-03-20

Similar Documents

Publication Publication Date Title
JP4974319B2 (en) Image generation system, program, and information storage medium
JP2006285509A (en) Program, information storage medium, and image generation system
JP3249955B2 (en) Image generation system and information storage medium
JP4632596B2 (en) Image generation system, program, and information storage medium
JP4305903B2 (en) Image generation system, program, and information storage medium
JP2001319244A (en) Game system and information storage medium
US7129945B2 (en) Image generation method, program and information storage medium
JP2006323512A (en) Image generation system, program, and information storage medium
JP4651204B2 (en) Image generation system, program, and information storage medium
JP2001229403A (en) Game system and information storage medium
JP4187192B2 (en) Image generation system, program, and information storage medium
JP4528008B2 (en) Program, information storage medium, and image generation system
JP2003085592A (en) Image generating system, program, and information storage medium
JP4574058B2 (en) Image generation system, program, and information storage medium
JP4577968B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2002216167A (en) Image generation system, program and information storage medium
JP3377490B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4159060B2 (en) Image generating apparatus and information storage medium
JP4229316B2 (en) Image generation system, program, and information storage medium
JP2000102675A (en) Object display, and storage medium readable out with computer and memorizing game system and game program
JP4641602B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4162125B2 (en) Image generation system, program, and information storage medium
JP4592043B2 (en) Image generation system, program, and information storage medium
JP2002032790A (en) Game system and information storage medium
JP4480322B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101025

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101116

R150 Certificate of patent or registration of utility model

Ref document number: 4632596

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131126

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131126

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

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