Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3760341B2 - Program, recording medium, image generation apparatus, and image generation method - Google Patents
[go: Go Back, main page]

JP3760341B2 - Program, recording medium, image generation apparatus, and image generation method - Google Patents

Program, recording medium, image generation apparatus, and image generation method Download PDF

Info

Publication number
JP3760341B2
JP3760341B2 JP2001334010A JP2001334010A JP3760341B2 JP 3760341 B2 JP3760341 B2 JP 3760341B2 JP 2001334010 A JP2001334010 A JP 2001334010A JP 2001334010 A JP2001334010 A JP 2001334010A JP 3760341 B2 JP3760341 B2 JP 3760341B2
Authority
JP
Japan
Prior art keywords
character
dimensional
drawn
virtual camera
data
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
JP2001334010A
Other languages
Japanese (ja)
Other versions
JP2003141560A (en
Inventor
順平 津田
則彰 坂入
Original Assignee
株式会社光栄
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社光栄 filed Critical 株式会社光栄
Priority to JP2001334010A priority Critical patent/JP3760341B2/en
Publication of JP2003141560A publication Critical patent/JP2003141560A/en
Application granted granted Critical
Publication of JP3760341B2 publication Critical patent/JP3760341B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明はプログラム、記録媒体、画像生成装置及び画像生成方法に係り、特に、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラム、該プログラムを記録した記録媒体、該画像生成装置及び該画像生成方法に関する。
【0002】
【従来の技術】
今日、各社から販売されているビデオゲームは、ゲーム装置本体(コンピュータ)の高速化等と相俟って、一般に表示装置のディスプレイ上にリアルな3次元(以下、3Dと略称する。)キャラクタを表示するものが多い。3Dポリゴンデータでキャラクタ(以下、3Dキャラクタという。)を表示するには、立体的な単一の3Dモデルをオブジェクト空間内に配置し、3D座標変換を行って仮想カメラ(視点)から見える画像を自動生成することにより行われる(3D画像処理)。3Dポリゴンデータは、頂点座標、頂点テクスチャ座標、法線ベクトル等のデータで構成されている。一度、1つの3Dモデルを用意してしまえば、仮想カメラで様々の方向からこの3Dモデルを見た場合にも矛盾のない画像を生成することができる。このような3D画像処理に関する技術は、例えば、昭和61年5月20日に株式会社昭晃堂から発行された、中前栄八郎、西田友是著「3次元コンピュータグラフィックス」(ISBN4−7856−3064−7)や平成4年7月15日に株式会社昭晃堂から発行された、安居院猛、中嶋正之著「コンピュータグラフィクス」(ISBN4−7856−2075−7)等に詳しい。
【0003】
一方、ビデオゲームに登場する全てのキャラクタを3Dで描画しようとすると、3Dキャラクタ描画のための演算量が膨大となりゲーム展開に必要な演算量が圧迫される。この問題を解決するために、例えば、特開平11−203504号公報には、ゲーム場面に応じて、ディスプレイ上に表示されるキャラクタをゲーム構成上比較的重要度の高いゲームキャラクタと比較的重要度の低いサポーティングキャラクタとに分け、ゲームキャラクタについては3D画像処理を行い、サポーティングキャラクタについては主として2次元(以下、2Dと略称する。)画像処理を行う技術が開示されている。従って、3D画像処理によるキャラクタと2D画像処理によるキャラクタ(以下、2Dキャラクタという。)とを3D仮想空間上に混在・表示させる技術は既に存在している。
【0004】
なお、本発明に関連する技術として、特開2001−084402号公報には、1のキャラクタを表示するためにそのキャラクタに対応した画像データを複数持ち、その複数の画像データの中間画像を補完処理により求めて表示する技術が開示されている。また、特開2001−70634号公報には、3D仮想空間上に配した各3Dキャラクタに対して、輪郭線又は稜線を付加する強調処理と色づけ処理を施したデータを2D画像としてディスプレイに動画表示する技術が開示されている。更に、特開2001−056870号公報には多数キャラクタについて集団で移動させる技術が、特開2001−149655号公報には多数のキャラクタについて索敵、戦闘等を行わせる技術がそれぞれ開示されている。
【0005】
【発明が解決しようとする課題】
しかしながら、上述した特開平11−203504号公報では、キャラクタの一部を2D画像処理を行うことで3D画像処理の演算量を大幅に軽減することができるものの、3Dキャラクタと2Dキャラクタとの混在による違和感を惹起する、という問題がある。この傾向はディスプレイ上に表示されるキャラクタ数、換言すれば、ゲームに登場するキャラクタ数が多くなるにつれて著しく強調される。すなわち、ゲームに登場する多数(例えば、100以上)のキャラクタの動的変化に対応するには、3D画像処理の演算量を軽減する必要があるが、3Dキャラクタと2Dキャラクタとが混在する3D仮想空間において両者の整合性を図らなければ強い違和感のある画像となる。
【0006】
この違和感を解消するには、以下の3点を解決する必要がある。(1)ゲーム中に視点となる仮想カメラは近傍から遠方まで自由に移動可能である。従って、2Dキャラクタと3Dキャラクタとが切り替わる境界があり、単純な切り替えではディスプレイ上での両者の表示が不連続性となり強い違和感を招く。なお、仮想カメラはキャラクタを全天周どの位置からも観察できるため、単純な(例えば、単に8方向程度の)2Dスプライトでは視点の変化に対応できない。(2)ゲーム中に3Dキャラクタはキャラクタ自体の向きも動的に変化するので、2Dキャラクタの動きも3Dキャラクタと同様に動的に表現しなければ均衡がとれず、特に両者の切り換え時に極端な違和感を生ずる。更に、(3)3Dキャラクタにはキャラクタ自身の陰影変化が発生するので、2Dキャラクタにも同等の処理を行わないと違和感を生ずる。
【0007】
本発明は上記事案に鑑み、多数の3Dキャラクタ、2Dキャラクタが違和感なく混在可能なプログラム、該プログラムを記録した記録媒体、画像生成装置及び画像生成方法を提供することを課題とする。
【0010】
課題を解決するための手段
上記課題を解決するために、本発明の第の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、として機能させ、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とする
【0011】
本態様では、決定手段が、仮想カメラの位置及び方向情報とオブジェクトキャラクタの位置情報とに基づいて、仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを3次元ポリゴンデータで描画される3次元キャラクタで、仮想カメラの視界内かつ所定距離の外に位置するか又は所定数を越えるオブジェクトキャラクタを2次元スプライトデータで描画される2次元キャラクタと決定する。そして、描画手段が、3次元仮想空間上のオブジェクトキャラクタの位置に、オブジェクトキャラクタの位置と仮想カメラの位置とを結ぶ方向と、オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、3次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元キャラクタを描画し、2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して仮想カメラから相対角度でオブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを相対角度の垂直成分方向がなす角度に応じてせん断変形して2次元キャラクタを描画し、3次元キャラクタと2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するが、全天周多数方向は、幅の変化量の大きい方向間が幅の変化量の小さい方向間に比べて細かく区分されている
【0012】
の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタ、すなわち、仮想カメラに近いオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタ、すなわち、仮想カメラから遠方のオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、2次元キャラクタについて、オブジェクトキャラクタの位置と仮想カメラの位置とを結ぶ方向と、オブジェクトキャラクタの正面方向とがなす相対角度の水平方向成分角度から予め用意された全天周多数方向のうち最も近い2つの2次元スプライトデータを選択して該相対角度でオブジェクトキャラクタをみたときの幅となるように合成し、該相対角度の垂直方向成分角度に応じて合成した2次元スプライトデータをせん断変形するようにしたので、仮想カメラから遠方の2次元キャラクタを見たときに水平及び垂直方向に適正な幅、高さが反映され、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を低減させることができ、更に、全天周多数方向について、幅の変化量の大きい方向間を幅の変化量の小さい方向間に比べて細かく区分したので、細長い(奥行きのある)2Dスプライトを合成しても適正な合成画像を得ることができる。
【0013】
本態様において、描画手段が2つの2次元スプライトデータの一方を半透明にして合成すれば、仮想カメラから遠方の2次元キャラクタを見たときに水平方向に違和感のない適正な幅を反映することができる。また、全天周多数方向の各象限における方向間の角度が異なるようにすれば、細長い(奥行きのある)オブジェクトキャラクタについても適正な2次元キャラクタを描画することができる。描画手段は、オブジェクトキャラクタの正面方向ベクトルを、該オブジェクトキャラクタの位置と仮想カメラの位置とを結ぶベクトルを垂線とする仮想平面に投影したときの方向ベクトルと、仮想平面での水平方向とのなす角度の正接値を求め、該求めた正接値に基づいて合成された2次元スプライトデータを垂直方向にせん断変形して行うようにしてもよい。更に、予め用意された全天周多数方向の2次元スプライトデータを、3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備してもよく、この場合に、準備されるべきアニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータを省くことが望ましい。
【0014】
また、本発明の第2の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、として機能させ、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とする。第2の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、予め用意された全天周多数方向の2次元スプライトデータを、手足又は足を有する3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されているため、オブジェクトキャラクタの描画が3次元キャラクタから2次元キャラクタに又はその逆に切り換えられても、切り換えの瞬間における両者間の姿勢、方向等の不一致・不連続性を解消することができ、3次元キャラクタ及び2次元キャラクタが混在する動的画像の違和感をなくすことができ、更に、準備されるべきアニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータを省くため、2次元スプライトデータのための記憶容量を軽減することができる。
更に、本発明の第3の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータ を選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、として機能させ、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とする。第3の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、2次元スプライトデータに、3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むようにしたので、2次元スプライトの頂点の疑似法線ベクトルによりシェーディング(陰影処理)を行うことが可能となり、2次元キャラクタを3次元キャラクタらしく見せることができる。このとき、疑似法線ベクトルの方向について、対応する3次元ポリゴンデータを構成する頂点の法線ベクトルの方向を維持するようにすれば、2次元キャラクタの頂点のシェーディングが3次元キャラクタと同様に処理され、2次元キャラクタに応じて法線ベクトルの方向を修正することで2次元キャラクタをより3次元キャラクタらしく見せることが可能となる。
本発明の第の態様は、上述した第1〜第3の態様のプログラムを記録したコンピュータ読取可能な記録媒体である。また、本発明の第の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置であり、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、を備え、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とし、本発明の第6の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置において、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェク トキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、を備え、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とし、本発明の第7の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置において、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、を備え、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とする。そして、本発明の第の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、ステップを含み、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とし、本発明の第9の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて 、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定し、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、ステップを含み、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とし、本発明の第10の態様は、3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定し、前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、ステップを含み、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とする。
【0015】
【発明の実施の形態】
以下、図面を参照して本発明を家庭用ビデオゲーム装置に適用した実施の形態について説明する。
【0016】
(構成)
図1に示すように、本実施形態の家庭用ビデオゲーム装置10は、ゲーム装置本体2に、スピーカ5を内蔵したテレビモニタ4及びコントローラパッド等の入力装置3が接続されている。ゲーム装置本体2は、CD−ROM等の記録媒体1を装着可能な媒体読取部(図3参照)を有している。この媒体読取部に記録媒体を装着することにより記録媒体1に記録されたゲームプログラムやゲームデータが自動的にゲーム装置本体2内の記憶メモリにロードされる。
【0017】
図2(A)(B)に示すように、入力装置3には、集団戦闘ゲーム等のビデオゲームを開始するためのスタートボタン30やゲームキャラクタを操作したり、ゲーム装置本体2からの選択問い合わせに応答するための□ボタン31、△ボタン32、○ボタン33、×ボタン34で構成されるボタンセット、及び、↑ボタン35、→ボタン36、←ボタン37、↓ボタン38で構成される十字方向ボタン等の種々のボタンが配置されている。また、ボタンセット及び十字方向ボタンの斜め下側(プレイヤの手前側)には、左アナログスティック39、右アナログスティック40が配置されている。
【0018】
図3に示すように、ゲーム装置本体2は装置全体の制御を行う、決定手段及び描画手段の一部としてのCPUブロック20を備えている。CPUブロック20は、ゲーム装置本体2内の各部とのデータ転送を主に制御するSCU(System Control Unit)、中央演算処理装置として高速クロックで作動するCPU、ゲーム装置本体2の基本制御動作が記憶されたROM、CPUのワークエリアとして働くと共に記録媒体1に記録されたゲームプログラム及び種々のデータを一時的に記憶するRAM及びこれらを接続する内部バスで構成されている。
【0019】
SCUには外部バス25が接続されている。外部バス25は、入力装置3からの入力を受信してCPUブロック20へ入力情報を転送する入力受信部21、図示しないサブCPUを備え記録媒体1に記録されたゲームプログラムを読み取りCPUブロック20へ転送するCD−ROMドライブ等の媒体読取部22、図示しないサブCPU及びVRAMを備えCPUブロック20から転送された情報に従って画像を描画する描画手段の一部としての画像処理部23、及び、図示しないサブCPUを備え、例えば、バックミュージックやキャラクタの戦闘音等の音響を処理する音響処理部24、に接続されている。また、入力受信部21は入力装置3に、画像処理部23はテレビモニタ4に、音響処理部24はテレビモニタ4に内蔵されたスピーカ5にそれぞれ接続されている。なお、画像処理部23は、座標変換、透視変換、光源演算、曲面生成等のジオメトリ処理を行うジオメトリ処理部、座標変換等のマトリクス演算を高速並行処理する演算部、圧縮された画像データを伸張する伸張部、1フレーム分の画像表示のためのフレームバッファへのレンダリング(描画)処理を高速に実行するレンダリング部等を含んで構成されている。
【0020】
(動作)
次に、フローチャートを参照して、本実施形態の家庭用ビデオゲーム装置10の動作について、プレイヤ側に属する250体のキャラクタとコンピュータ(CPUブロック20)側に属する250体のキャラクタとがそれぞれ敵味方に分かれて戦闘する戦闘ゲームを想定して説明する。なお、ゲーム装置本体2には既に電源が投入されており、記録媒体1が装着されると、記録媒体1からゲームプログラム、ゲームデータを読み取って、図4に示す戦闘処理ルーチンが実行される。
【0021】
戦闘処理ルーチンでは、まず、ステップ102において、プレイヤにテレビモニタ4に表示された複数の武将のアイコンのいずれかにカーソル合わさせクリックさせることで、プレイヤが好みの武将を部隊長として選択し(コンピュータ側もランダムに部隊長を選択し)、他の敵味方のキャラクタ(騎馬兵士、兵士)をゲーム開始前の整列位置に配置してテレビモニタ4に表示する等の初期設定処理を行い、プレイヤからスタートボタン30が押下されるまで待機する(図4では図示省略)。
【0022】
スタートボタン30が押下されると、次のステップ104において、テレビモニタ4の垂直帰線周期と一致した、1/60秒(16.6ミリ秒)に一度の周期で実行される垂直帰線割込(Vsync)がなされたか否かを判断する。否定判断のときは、次のステップ106において、入力受信部21から転送された入力情報に対する処理やゲーム効果音を音響処理部24に合成させるための音響処理等のメイン処理を実行して、ステップ110へ進む。
【0023】
ここで、右アナログスティック40の操作と仮想カメラ(視点)の位置との関係について説明する。プレイヤが右アナログスティック40を傾けることにより、入力受信部21からCPUブロック20に転送される右アナログスティック40の入力情報(x,y)は0≦x≦255、0≦y≦255の値をとる。図7(A)に示すように、CPUはステップ106でのメイン処理において、仮想カメラの位置を中心O(0,0)に変換するために(x,y)から共に127を引いて(x’,y’)=(x−127,y−127)=(a,b)として、r=(a+b1/2を演算し、r<48か否かの判断を行う。肯定判断のときは右アナログスティック40から入力がなかったものとして扱い(仮想カメラの位置を移動させず)、否定判断のときは、a、b共に1.5倍してRAMに格納する。
【0024】
仮想カメラの位置は、実際にはワールド座標系の座標値で演算されるが、仮にスクリーン座標系で考えた場合には、図7(B)に示すように、1Vsync毎にx方向に1.5a、y方向に1.5bだけ現在の仮想カメラの位置(中心O(0,0))からO’に移動し(k=1.5)、仮想カメラの向きもa、bで定まる方向に傾けられることとなる(スクリーン座標系もその角度で傾く。)。従って、右アナログスティック40の傾きの程度によりa、bの大きさが変化し、移動速度及び仮想カメラの傾きが変化する。具体的には、右アナログスティック40を上方向に倒すと仮想カメラ(視点)は前方に移動し、下方向に倒すと後方に、右方向に倒すと右回りに、左方向に倒すと左回りに移動し、更に、右上方向、右下方向、左上方向、左下方向に倒し続けると、右に大回り、右に小回り、左に大回り、左に小回りでそれぞれ仮想カメラ(視点)が移動する。なお、本実施形態では、a、bの単位はそれぞれ3D仮想空間上で1cmに対応しており、仮想カメラの高さ方向(z方向)の成分は一定(例えば、3D仮想空間上で3m)とされている。
【0025】
一方、ステップ104で肯定判断がなされると、ステップ108において、仮想カメラの視界内のキャラクタについて3Dキャラクタ、2Dキャラクタを混在させた画像を生成するための3D2D処理サブルーチンが実行される。
【0026】
図5に示すように、この3D2D処理サブルーチンでは、まず、ステップ122において、ステップ106でRAMに格納した(ka,kb)を読み出して、ワールド座標系で仮想カメラ(視点)の位置、方向を算出し、仮想カメラのスクリーン座標系を算出する。次のステップ124では、3D処理対象のキャラクタ数を所定数内(後述するように、50体内)とするために、カウンタCnを0とする。
【0027】
次にステップ126において、全キャラクタが処理済みか否かを判断し、否定判断のときは、ステップ128で1Vsync前にRAMに格納した対象キャラクタのワールド座標系での位置、方向を読み出して、次のステップ130において対象キャラクタの現在のワールド座標系での位置、方向を演算してRAMに格納する。このような対象キャラクタの位置、方向の演算については公知の技術を用いることができるが、本例のように100体以上の多数キャラクタを処理する場合には、例えば、上述した特開2001−056870号公報や特開2001−149655号公報の技術を用いることができる。次のステップ132では、スクリーン座標系で仮想カメラの方向と対象キャラクタの位置とから対象キャラクタが仮想カメラの視界内(例えば、3D仮想空間上で200m×200m内)に存在するか否かを判断し、否定判断のときはステップ134で対象キャラクタが仮想カメラの視界内に位置するか否かを表す視界フラグsfを0とし、肯定判断のときはステップ136で視界フラグsfを1としてステップ126へ戻る。従って、例えば、図8に示すように、複数のキャラクタで構成される部隊Fと部隊Eとが対峙し500体のキャラクタを処理する場合に、視界フラグsfが1に設定されるのは、視界S内に位置するキャラクタのみとなる。
【0028】
一方、ステップ126で肯定判断されたときは、ステップ138において、視界フラグsfが1のキャラクタについてのみ、仮想カメラの位置から各キャラクタまでの距離を演算し、仮想カメラから近い順に処理の順番を決定する。次にステップ140では、仮想カメラの視界内の(視界フラグsf=1の)全キャラクタについて処理が終了したか否かを判断し、否定判断のときは、次のステップ142において、対象キャラクタが仮想カメラの位置から50m以内に位置するか否かを判断し、肯定判断のときは次のステップ144でカウンタCnが50以下か否かを判断する。ステップ144での判断が肯定のときには、続くステップ146においてカウンタCnを1インクリメントして、次のステップ148において当該対象キャラクタを3Dキャラクタとして表示するための3D処理を行ってステップ140へ戻る。
【0029】
この3D処理では、キャラクタの位置と仮想カメラの位置とを結ぶ方向と、キャラクタの正面方向とがなす相対角度を演算して、モーションキャプチャー等を利用して得られたアニメーションのためのモーションデータを複数組予め用意しておき、キャラクタの状態(例えば、移動、戦闘等の状態)に応じてそれらのモーションデータの中から1組のモーションデータの中の何れか1つのフレームを選択する。すなわち、キャラクタは移動、戦闘等の種々の状態を採るので、CPUはキャラクタの現在の状態を表す状態フラグの値をRAMから読み出し、そのフラグ値で特定される1組のモーションデータを選択する。1組のモーションデータは、時系列的には、図10(A)に示すように、複数のフレームで構成さるため、CPUは対象キャラクタが複数のフレームのうち1Vsync前にどのフレームまで描画されているかを把握しており、現時点で描画すべきフレームを特定することができる。このようなフレームの特定については、例えば、上述した特開2001−149655の技術のようにカウンタを用いるようにしてもよい。
【0030】
ここで、キャラクタのモーションとは、画素の変位をリアルタイムに直接演算して行うのではなく、キャラクタのリアルな動きを表現するために、予め騎馬兵士、兵士、騎馬等の動きをサンプリングしたデータ数列を使用する。一般的な3Dモーションデータのデータ構造は、キャラクタの各関節について、大きさを表すスケール値、xyzの各軸に対する回転角、原点からの移動距離を示すxyz毎の座標値を持ち、これらを1組の関節データとして、1又は複数の関節データにより構成されるキャラクタ全体の関節データ群を各モーション毎にそのモーションのフレームの数だけ持つことで、モーションデータが構成される(図10(A)も参照)。ここでいうフレームとは画像処理の時間的単位で、いわゆる「コマ」のことである。なお、3Dキャラクタを表示する場合に、CPUはSCUを介してワールド座標系における対象キャラクタの位置、方向、対象キャラクタのモーション等の情報を画像処理部23に転送し、画像処理部23で対象キャラクタを3D表示するためにジオメトリ処理等の種々の処理が行われ仮想カメラから見える3Dキャラクタが生成される。
【0031】
一方、ステップ142又はステップ144で否定判断されたときは、ステップ150において、後述するように、当該対象キャラクタを2Dキャラクタとして表示するための2D処理サブルーチンを実行する。従って、ステップ122〜150では、仮想カメラの視界内のキャラクタのうち、仮想カメラから50m以内でかつ仮想カメラから近い順に50体のキャラクタについて3D処理を行い、それ以外は2D処理を行って、仮想カメラの視界外のキャラクタはこれらの処理を行わない。
【0032】
2D処理サブルーチンについて説明する前に、予め準備された(CPUブロック20を介して画像処理部23のVRAMに格納された)2Dキャラクタの画像データ(以下、2Dスプライトという。)について詳述する。本実施形態では、戦闘ゲームに登場するキャラクタについて、上述したキャラクタの状態の数に対応して複数組、当該キャラクタの3Dモデルを多数方向から見たときの2Dスプライトが準備されている。図9(A)に示すように、例えば、1組の2Dスプライトは、3Dモデルを全天周16方向(0)〜(15)(以下、これらの方向をレンダリング方向という。)から見たときの16の画像データ(例えば、ビットマップ)で構成されている。従って、画像処理部23のVRAMには、1キャラクタにつき(16×当該キャラクタがとる状態の数)の画像データが格納されることとなるが、武将を除く兵士や騎馬については共通の2Dスプライトを使用することで、VRAMに格納すべき画像データ数を少なくすることができる。
【0033】
図9(B)に示すように、キャラクタをレンダリング方向(0)(正面から見たときの方向)の幅をW、キャラクタをレンダリング方向(4)(真横から見たときの方向)の幅をWとし、幅W及び幅Wのうち大きい方をWmax、小さい方をWminとすると、キャラクタの横幅増加率Exは下式(1)で求めることができ、図9(A)の第4象限(0〜90度)におけるレンダリング角度R(図9(A)に示したレンダリング方向(k)とレンダリング方向(0)とのなす角度)は下式(2)で求めることができる。なお、Rは0である。
【0034】
【数1】

Figure 0003760341
【0035】
【数2】
Figure 0003760341
【0036】
また、式(2)で得られたレンダリング角度から、他の象限(90〜360°)におけるレンダリング角度R〜R15は下式(3)で求めることができる。
【0037】
【数3】
Figure 0003760341
【0038】
図9(A)(B)に示すように、各象限におけるレンダリング角度間は一定角度ではなく異なっており、例えば、レンダリング方向(0)(1)間、(1)(2)間のキャラクタの幅は異なっている。騎馬のように細長い(奥行きのある)キャラクタの幅は、レンダリング方向(0)(3)の間で3倍以上となり、レンダリング方向(3)(4)の間では2倍に満たないので、後述する2Dスプライトの合成上、画像変化量(幅の変化量)の大きい範囲は細かくレンダリング方向を設定し、画像変化量の小さい範囲は粗くレンダリング方向を設定することが好ましい。
【0039】
また、戦闘ゲーム中に3Dキャラクタ自体の動作や向きが動的に変化するので、2Dキャラクタもこのような動的変化に対応して準備する必要がある。本実施形態では、図10(B)に示すように、図10(A)に示した3Dキャラクタのモーションに対応するように、各モーションデータに基づいて2Dアニメーションデータが準備されている。なお、図10(B)に示した2Dアニメーションデータはキャラクタ(騎馬)が移動状態の場合であり、他の状態についても同様の2Dアニメーションデータが準備されている(例えば、あるキャラクタが4種類の状態をとりうる場合には、3Dキャラクタの4種類のモーションに対応するように全天周16方向の各方向毎に2Dスプライトが準備されている。)。また、3Dキャラクタで表示するとした場合に動的変化が少ない部分については、準備すべき2Dスプライトを省略することができる。例えば、図10(B)に示すような場合には、本来第3Vsync、第4Vsyncのタイミングで表示する第3Vsync、第4Vsyncの2Dスプライトは第2Vsyncの2Dスプライトとの変化が大きくないので、これら第3Vsync、第4Vsyncの2Dスプライトを保持せず、第2Vsyncの2Dスプライトデータを続けて使用するようにしてもよい。
【0040】
図6に示すように、2D処理サブルーチンでは、まず、ステップ162において、ステップ122でRAMに格納した仮想カメラの位置及びステップ130でRAMに格納した対象キャラクタの位置を読み出し、対象キャラクタの位置と仮想カメラの位置とを結ぶベクトルと、対象キャラクタの正面方向とがなす相対角度を演算する。
【0041】
次のステップ164では、2つの2Dスプライトを合成する合成処理を行う。この合成処理では、まず、合成すべき2つの2Dスプライトを特定する。すなわち、3D描画の場合と同様に、キャラクタの状態フラグの値や1Vsync前にどこまでのモーションが描画されているかの情報を参照して、各モーション毎に準備されている全天周16方向の2Dスプライトのうち、上述した相対角度の水平方向成分がなす角度を挟む(水平方向成分がなす角度に最も近い)2つの2Dスプライトを特定する。例えば、図9(A)に示すように、仮想カメラが対象キャラクタを見る方向が矢印A方向であるとすると、合成すべき2つの2Dスプライトとしてレンダリング方向(1)(2)の2Dスプライトが特定される(図9(B)も参照)。時系列的なモーションとの関係について付言すれば、図10(B)に示すように、1Vsync前にどこまでのモーションが描画されているかの情報を参照して、2つの2Dスプライトが特定される。
【0042】
次に、合成すべき2Dスプライトの幅Wsprtを下式(4)により演算する。なお、式(4)において、角度RRは、予め定められたキャラクタ(3Dモデル)の正面方向の方向ベクトルVfrontと、キャラクタの位置から仮想カメラの位置方向への方向ベクトルとがなす角度の水平方向成分(角度)を表している。ここに、方向ベクトルとは、大きさ(長さ)について意味を持たない単位ベクトルで、方向だけが意味を持つベクトルをいう。式(4)は、仮想カメラから楕円状のキャラクタ(3Dモデル)を見たときに、ステップ162で演算した相対角度でみるとどの程度の幅になるかを算出するものである。
【0043】
【数4】
Figure 0003760341
【0044】
次いで2つの2Dスプライトの透明度を演算する。この透明度演算では、合成すべき2つの2Dスプライトのうち、角度RRに近い方の2Dスプライトの透明度Aaを完全に不透明に設定する(Aa=1.0)。このように角度RRに近い方の2Dスプライトを完全に不透明とするのは、合成処理の都合上、半透明の2Dスプライト同士を合成すると、合成画像のぼやけが増大することを防止すると共に、背景が透けて見えてしまう不都合を回避するためである。角度RRに近い方の2Dスプライトのレンダリング角度をRa(図9(A)に示した例に則していえばR)、他方の(角度RRから遠い方の)2Dスプライトのレンダリング角度をRb(図9(A)に示した例に則していえばR)とすると、他方の2Dスプライトの透明度Abは下式(5)により得ることができる。式(5)は、2つの2Dスプライトのレンダリング角度の差と、角度RRから片方のレンダリング角度を引いた差分との比を長さに換算して、その比を他方の2Dスプライトの透明度に直接反映させるものであり、2つの2Dスプライトの角度の比から透明度が演算されることとなる。式(5)で演算された透明度Abを他方の2Dスプライトの透明度として設定する。なお、透明度Abは0.0〜0.5の値をとる(透明度は最大値1.0で完全に不透明、最小値0.0で完全に透明)。
【0045】
【数5】
Figure 0003760341
【0046】
そして、透明度が1.0及び透明度Abに設定された2つの2Dスプライトを合成した後(同じ場所に重ね合わせた後)、合成した2Dスプライトの水平方向の幅を上記式(4)で演算した幅Wsprtとなるように左右に(水平方向に)伸縮して合成処理された2Dスプライトを得る。なお、CPUはSCUを介して2つの2Dスプライトの特定、透明度Ab及び幅Wsprtの情報を画像処理部23へ転送し、透明度変換、2Dスプライトの合成及び伸縮等の処理は画像処理部23で行われる。
【0047】
次にステップ166では、キャラクタに回転がかかっているか否かを判断するために角度φが0か否かを判断する。この角度φは、図11(A)(B)に示すように、予め定められた3DモデルMの上方向ベクトルVupを、仮想カメラの視点と3Dモデルとを結んだ方向のベクトルを垂線とする仮想平面Cに投影し、図11(B)に示すように、仮想平面Cに投影後の3DモデルM’の上方向ベクトルCVupと垂直上方向Vrとのなす角度である。
【0048】
肯定判断のときは、次のステップ168において、ステップ164で合成された2Dスプライトを垂直方向にせん断変形するためのせん断変形処理を行う。図12(A)に示すように、このせん断変形処理では、予め定められた3DモデルMの正面方向のベクトルVfrontを、仮想カメラの視点と3Dモデルとを結んだ方向のベクトルを垂線とする仮想平面Cに投影し、図12(B)に示すように、仮想平面Cに投影後の3DモデルM’の正面方向の方向ベクトルCVfrontと水平方向Hrとのなす角度θの正接をせん断変形係数Shとして演算する(せん断変形係数Sh=tanθ)。なお、せん断変形係数Shが大きすぎるとき(キャラクタによって異なり、例えば、騎馬の場合にはShが0.4を超えるとき)は予め定められた最大値(例えば、騎馬の場合にはSh=0.4)に、せん断変形係数Shが不定値をとるとき(θ=90°)には、せん断変形係数Sh=0とすることで、異常値の処理を行うことができる。また、キャラクタが騎馬に比べて奥行きのない(細長くない)兵士のときやキャラクタを正面から見たときは、2Dキャラクタは仮想カメラから遠方にあるので違和感が生じず、必ずしも本ステップでのせん断変形を行わなくてもよい。図13(A)(B)にせん断変形処理前後の騎馬の2Dスプライトを示す。
【0049】
2Dスプライトには後述するように10個の頂点V1〜V10(図14(B)参照)が定められている。2Dスプライトの各頂点を透視変換して得られるスクリーン座標値は、3Dモデルの(中心)位置を透視変換して得られたスクリーン座標値を(Xx,Yx)とすると、それぞれ、(Xx+X1,Yx+Y1)、(Xx+X2,Yx+Y2)、・・・(Xx+X10,Yx+Y10)と表すことができ、Y1〜Y10に対して下式(6)の演算を行って2Dスプライトの各頂点の最終的なスクリーン座標値(Xx+X1,Yx+Y1x)、(Xx+X2,Yx+Y2x)、・・・(Xx+X10,Yx+Y10x)を得ている。なお、CPUはSCUを介してせん断変形係数の情報を画像処理部23へ転送し、合成された2Dスプライトのせん断変形や透視変換は画像処理部23で行われる。
【0050】
【数6】
Figure 0003760341
【0051】
一方、ステップ166で否定判断のときは、ステップ170において、ステップ164で合成処理された2Dスプライトを角度φだけ垂直方向Vrから回転させるための回転処理が行われる。図13(C)(D)に回転処理前後の兵士の2Dスプライトを示す。本戦闘ゲームでこのような回転処理が行われるのは、例えば、竜巻が発生しキャラクタが自己の脚力で地上に立脚できない宙に浮いた状態等を表現するときである。なお、CPUはSCUを介して角度φの情報を画像処理部23へ転送し、合成された2Dスプライトの回転は画像処理部23でアフィン変換(affine-transformation)により行われる。
【0052】
次にステップ172では、2Dキャラクタに陰影を施すための陰影処理を行う。この陰影処理は、いわゆるシェーディング処理のことで、2Dキャラクタに対して影を付けるものではなく、光源位置や周囲環境条件により定まる明るさを決定する処理である。
【0053】
ここで、ステップ172での陰影処理に関連して、本実施形態の2Dスプライトの疑似法線ベクトルについて説明する。図14(A)に示すように、3Dモデルとして兵士の外形形状に近い円柱について考えると、円柱の輪郭に任意に頂点を定めることができる。例えば、頂点V1では、垂直方向ベクトルと水平方向ベクトルとを合成した法線ベクトルを得ることができる(V2〜V10でも同じ。)。図14(B)に示すように、上述した16方向の2Dスプライトを作成する際に、3Dモデルの頂点に対応した2Dスプライトの頂点(本例では10個)に3Dモデルの頂点に設定された法線ベクトルを疑似法線ベクトルとしてそのまま反映させる。このとき、2Dスプライトのシェーディングに違和感が生じないように若干の修正を加えるようにしてもよい。例えば、キャラクタとして高さ(背)の違う2頭の騎馬を想定する場合に、一方の疑似法線ベクトルを修正することで2頭の騎馬が並んだときに背の高い騎馬と背の低い騎馬とのシェーディングのコントラストを得ることができる。なお、図14(C)は図14(B)を上から見たことを想定した場合の疑似法線ベクトルの方向を示している。例えば、平行光源が上部に存在し、光が上部から下部に向かって一様にふりそそぐ場合、2Dスプライトの疑似法線ベクトルが上向きの場合には、3Dモデルの場合と同様に、シェーディングにおいてその頂点が明るくなり(V1〜V5)、下向きの場合(V6〜V10)には暗くなる。光源の方向と疑似法線ベクトルの相対角度によって明るい部分が変わる。従って、ステップ172での陰影処理では、2Dスプライトの各頂点において、3Dモデルの法線ベクトルに基づいて予め疑似法線ベクトルを決定しておき、3Dモデルに施すシェーディングと同様の処理を行う。
【0054】
図14(B)を参照して、更に詳述すれば、2Dスプライトの頂点V1、V2・・・V10での疑似法線ベクトルの値を下式(7)に示すようにN1、N2・・・N10、2Dスプライトに影響を与える平行光源の方向ベクトルを下式(8)に示すようにCdir、平行光源のカラー(RGB)値を下式(9)に示すようにCcol、アンビエント(環境光)カラー(RGB)値を下式(10)に示すようにCambとし、疑似法線ベクトルNに対して各頂点Vにおけるカラー値の演算を行う。
【0055】
【数7】
Figure 0003760341
【0056】
【数8】
Figure 0003760341
【0057】
まず、疑似法線ベクトルN1に対して下式(11)によりNN1を演算し、下式(12)により頂点V1のカラー(RGB)値Vcol1を得る。
【0058】
【数9】
Figure 0003760341
【0059】
【数10】
Figure 0003760341
【0060】
同様の処理を疑似法線ベクトルN2〜N10に対しても行い、全ての頂点のカラー値を演算する。2Dキャラクタの頂点とそれらの付近のカラー値はリニアに変化するが、このような処理については画像処理部23で行われる。
【0061】
ステップ172で対象キャラクタについての陰影処理、2D処理サブルーチンを終了すると、図5に示すステップ140へ戻る。ステップ140で肯定判断がなされると、すなわち、視界内の全キャラクタの処理が終了すると、次のステップ152において、仮想カメラの視界内の全キャラクタを3D、2Dを混在させて描画させるために、上述した種々の情報を画像処理部23に転送して3D2D処理サブルーチンを終了し図4のステップ110へ進む。画像処理部23は、転送された情報に従って、次の1Vsyncの間に、上述したように3D処理対象のキャラクタについては3Dポリゴンデータにより描画処理を行い、2D処理対象のキャラクタについては2Dスプライトにより描画処理を行って、画像処理部23のフレームバッファに3D2Dキャラクタ混在画像を描画して、描画した画像をテレビモニタ4へ送出する。これにより、テレビモニタ4には1/60秒毎に3D2Dキャラクタが混在した戦闘ゲームの状態が表示される(図15参照)。
【0062】
ステップ110では、戦闘ゲームが終了したか(例えば、部隊E、Fのうち一方の部隊の部隊長が死亡した場合)、又は、プレイヤが入力装置3のゲーム終了用の所定ボタンを押下したかを判断し(このような入力の取り込みはステップ106のメイン処理で行われる。)、否定判断のときはステップ104へ戻り、肯定判断のときは次のステップ112において、例えば、プレイヤの部隊が勝利したときに勝ちどきをあげる等の戦闘ゲームのエンディング処理を行って戦闘処理ルーチンを終了する。
【0063】
(作用等)
以上のように本実施形態では、仮想カメラから3D仮想空間上で50m内に位置するキャラクタについては3Dキャラクタで描画し、仮想カメラから3D仮想空間上で50mより遠い位置のキャラクタについては2Dキャラクタで描画するようにしたので(ステップ142〜ステップ150)、3D、2Dキャラクタが混在する画像の違和感を緩和することができる。また、本実施形態では、2Dキャラクタについて、キャラクタの位置と仮想カメラの位置とを結ぶ方向と、キャラクタの正面方向とがなす相対角度の水平方向成分角度から予め用意された全天周16方向のうち最も近い2つの2Dスプライトを選択して相対角度で当該キャラクタをみたときの幅Wsprtとなるように合成し(ステップ162、164)、相対角度の垂直方向成分角度に応じて合成した2Dスプライトをせん断変形するようにしたので(ステップ168)、仮想カメラから遠方の2Dキャラクタを見たときに水平及び垂直方向に適正な幅、高さが反映され、3Dキャラクタ及び2Dキャラクタが混在する画像の違和感を低減させることができる。すなわち、仮想カメラから遠方の2Dキャラクタを見たときに水平及び垂直方向に適正な幅、高さが反映されるので、仮想カメラで全天周どの方向からキャラクタを観察する場合にも3D、2Dの視点の変化に対応することができると共に、仮想カメラから50mの仮想の境界線を境とする強い違和感を低減させることができる。しかも、本実施形態では、単純な8方向程度ではなく16方向の2Dスプライトを準備し、一方の2Dスプライトを半透明にしたので、キャラクタの幅方向(水平方向)の合成を適正に行うことができると共に、全天周16方向の各象限のレンダリング方向について、幅の変化量の大きい方向間を幅の変化量の小さい方向間に比べて細かく区分したので、細長い(奥行きのある)2Dスプライトを合成しても適正な合成画像を得ることができる。更に、本実施形態では、仮想カメラから近い順に(ステップ138)50体以内のキャラクタのみを3Dキャラクタで描画するので(ステップ124、144、146、148)、3D画像処理の演算量を軽減してゲーム展開に必要な演算量を相対的に増加させることができる。
【0064】
また、本実施形態では、2Dスプライトを3Dポリゴンデータのレンダリング画像に基づいて作成・準備する際に、キャラクタの3D表示時のモーションに対応するように、各モーションデータに基づいて2Dスプライトのアニメーションデータを作成・準備したので(図10参照)、キャラクタの描画が3Dから2Dへ又は2Dから3Dへ逐次切り換えられても、切り換えの瞬間における両者間の姿勢、方向等の不一致・不連続性を解消することができるので、3D、2Dキャラクタが混在する動的画像の違和感をなくすことができ、高い描画品質を確保することができる。この場合に、本実施形態では、準備された2Dスプライトのうち動的変化の少ないフレームに対応する2Dスプライトの準備を省略することも可能なため、画像処理部23のVRAMの使用領域を小さくすることができる。
【0065】
更に、本実施形態では、図10(B)に示したように、2Dスプライトの頂点に3Dポリゴンデータに対応するように疑似法線ベクトルを予め形成しておいて、その陰影処理をリアルタイムに行って描画するようにしたので(ステップ172)、仮想カメラから遠方にあっても本来2D表示としか見えないキャラクタを3D表示らしく見せることができる。従って、本実施形態では、このような陰影処理により、3D、2Dキャラクタの混在画像の違和感を消極的に解消するばかりでなく、2Dキャラクタを積極的に3Dキャラクタに近づける処理がなされている。
【0066】
なお、本実施形態では、相対角度をキャラクタの位置と仮想カメラの位置とを結ぶ方向と、キャラクタの正面方向とがなす角度とした例を示したが、簡易な方法として、仮想カメラの方向とキャラクタの正面方向とがなす角度(スクリーン座標系でのキャラクタの正面方向の角度)を相対角度としてもよい。
【0067】
また、本実施形態では、1Vsync毎に3D、2Dによる画像を切換可能な例を示したが、3Dモデルのモーションのレンダリング画像を作成する際に、2Dスプライトデータとしてサンプリングする時間をそのまま利用するようにしてもよい。この場合に、サンプリングした時間(例えば、1、2、5フレーム)をデータとして控えておき、2Dスプライトの描画の際にそのサンプリング時間が経過した場合に描画を切り換えるようにしてもよい。このような態様では、3D、2Dキャラクタについていずれの描画を行うかの決定は、対象キャラクタの各モーションのサンプリング時間経過毎に行うようにすればよい。また、3Dキャラクタのモーションで動き(姿勢変化)の少ない時間帯は粗くサンプリングし、動きの多い時間帯は細かくサンプリングするようにしてもよい。
【0068】
更に、本実施形態では、右アナログスティック40から入力がある場合に仮想カメラの位置、方向を変更する例を示したが、例えば、3秒間プレイヤからの入力がなければ、仮想カメラの位置、方向を動かすようにしてもよく、特定のイベントが発生する場合に仮想カメラを当該イベントが発生する位置、方向に動かすようにしてもよい。また、仮想カメラを動かす場合にも、位置だけ移動させたり、方向だけ変化させるようにしてもよい。このような場合には、例えば、右アナログスティック40の他に左アナログスティック39も一方の入力を把握するために使用することができる。
【0069】
そして、本実施形態では、図14(A)に示したように、キャラクタとしての兵士の外形形状を円柱に見立てる例を示したが、円柱に見立てる必要がある訳ではなく、キャラクタに近似する形状に見立てることにより、疑似法線ベクトルの方向を容易に設定することが可能となる。
【0070】
【発明の効果】
以上説明したように、本発明の第1、第4、第5及び第8の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタ、すなわち、仮想カメラに近いオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタ、すなわち、仮想カメラから遠方のオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、2次元キャラクタについて、オブジェクトキャラクタの位置と仮想カメラの位置とを結ぶ方向と、オブジェクトキャラクタの正面方向とがなす相対角度の水平方向成分角度から予め用意された全天周多数方向のうち最も近い2つの2次元スプライトデータを選択して該相対角度でオブジェクトキャラクタをみたときの幅となるように合成し、該相対角度の垂直方向成分角度に応じて合成した2次元スプライトデータをせん断変形するようにしたので、仮想カメラから遠方の2次元キャラクタを見たときに水平及び垂直方向に適正な幅、高さが反映され、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を低減させることができ、更に、全天周多数方向について、幅の変化量の大きい方向間を幅の変化量の小さい方向間に比べて細かく区分したので、細長い2Dスプライトを合成しても適正な合成画像を得ることができる、という効果を得ることができる。
また、本発明の第2、第4、第6及び第9の態様の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、予め用意された全天周多数方向の2次元スプライトデータを、手足又は足を有する3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されているため、オブジェクトキャラクタの描画が3次元キャラクタから2次元キャラクタに又はその逆に切り換えられても、切り換えの瞬間における両者間の姿勢、方向等の不一致・不連続性を解消することができ、3次元キャラクタ及び2次元キャラクタが混在する動的画像の違和感をなくすことができ、更に、準備されるべきアニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータを省くため、2次元スプライトデータのための記憶容量を軽減することができる、という効果を得ることができる。
そして、本発明の第3、第4、第7及び第10の態様によれば、仮想カメラから所定距離内に位置するオブジェクトキャラクタについて3次元キャラクタで描画し、仮想カメラから所定距離の外に位置するオブジェクトキャラクタについて2次元キャラクタで描画するので、3次元キャラクタ及び2次元キャラクタが混在する画像の違和感を緩和することができると共に、所定距離内、所定数内のオブジェクトキャラクタについてのみ3次元キャラクタで描画するので、3次元画像処理の演算量を軽減することができ、また、2次元スプライトデータに、3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むようにしたので、2次元スプライトの頂点の疑似法線ベクトルによりシェーディング(陰影処理)を行うことが可能となり、2次元キャラクタを3次元キャラクタらしく見せることができる、という効果を得ることができる。
【図面の簡単な説明】
【図1】家庭用ゲーム装置の接続態様を示す概略斜視図である。
【図2】家庭用ゲーム装置に使用される入力装置を示し、(A)は平面図であり、(B)は(A)の矢印B方向からみたときの正面図である。
【図3】実施形態のゲーム装置本体の概略構成を示すブロック図である。
【図4】ゲーム装置本体のCPUにより実行される戦闘処理ルーチンの概略フローチャートである。
【図5】戦闘処理ルーチンのステップ108の詳細を示す3D2D処理サブルーチンのフローチャートである。
【図6】3D2D処理サブルーチンのステップ150の詳細を示す2D処理サブルーチンのフローチャートである。
【図7】右アナログスティックの傾斜位置と視点との関係を示す説明図であり、(A)は右アナログスティックを傾斜させたときの入力可能範囲を示す平面図、(B)は視点の移動方向及び向きを説明する平面図である。
【図8】仮想カメラの視界を示す説明図である。
【図9】3Dモデルを2Dスプライトにレンダリングするときの説明図であり、(A)は全天周に対するレンダリング角度を示し、(B)は(A)のレンダリング方向(0)〜(4)において3Dモデルの馬をレンダリングしたときの2Dスプライトである。
【図10】3D、2Dの画像データを示す説明図であり、(A)は3Dモーションデータを示し、(B)は2Dアニメーションデータを示す。
【図11】角度φを模式的に示す説明図であり、(A)は仮想カメラから3Dモデルを見たときを示し、(B)は仮想カメラから平面Cに投影された3Dモデルを見たときを示す。
【図12】角度θを模式的に示す説明図であり、(A)は仮想カメラから3Dモデルを見たときを示し、(B)は仮想カメラから平面Cに投影された3Dモデルを見たときを示す。
【図13】2Dスプライトのせん断変形及び回転変形を模式的に示す説明図であり、(A)はせん断変形前の2Dスプライトを示し、(B)はせん断変形後の2Dスプライトを示し、(C)は回転変形前の2Dスプライトを示し、(D)は回転変形後の2Dスプライトを示す。
【図14】2Dスプライトの頂点の疑似法線ベクトルを模式的に示す説明図であり、(A)は円柱で法線ベクトルを想定したときの法線ベクトルを示し、(B)は2Dスプライトの頂点における疑似法線ベクトルを示し、(C)は2Dスプライトの頂点における疑似法線ベクトルを上側から見たと仮定したときの方向を示す。
【図15】戦闘処理ルーチンの実行時にテレビモニタに表示される中間調画像の一例である。
【符号の説明】
1 記録媒体
2 ゲーム装置本体(画像生成装置)
20 CPUブロック(決定手段、描画手段の一部)
23 画像処理部(描画手段の一部)[0001]
BACKGROUND OF THE INVENTION
  The present inventionprogram, Recording medium, image generating apparatus, andImage generation methodIn particular, an image in which a large number of object characters including a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space is generated.programTheprogram, Recording image recording apparatus, image generating apparatus, andImage generation methodAbout.
[0002]
[Prior art]
Today, video games sold by various companies, in combination with the speeding up of the game apparatus body (computer), generally provide a realistic three-dimensional (hereinafter abbreviated as 3D) character on the display of the display device. There are many things to display. In order to display a character (hereinafter referred to as a 3D character) with 3D polygon data, a three-dimensional single 3D model is placed in the object space, and an image that can be viewed from a virtual camera (viewpoint) by performing 3D coordinate transformation is displayed. This is performed by automatic generation (3D image processing). The 3D polygon data includes data such as vertex coordinates, vertex texture coordinates, normal vectors, and the like. Once one 3D model is prepared, images that are consistent even when the 3D model is viewed from various directions with a virtual camera can be generated. Such 3D image processing technology is, for example, “3D Computer Graphics” (ISBN 4-7856-), published by Shosendo Co., Ltd. on May 20, 1986, by Eihachiro Nakamae and Tomoaki Nishida. 3064-7), and “Computer Graphics” (ISBN 4-7856-2075-7) written by Takeshi Yasui and Masayuki Nakajima, issued by Shogodo Co., Ltd. on July 15, 1992, and the like.
[0003]
On the other hand, if all characters appearing in the video game are to be drawn in 3D, the amount of calculation for drawing the 3D character becomes enormous, and the amount of calculation necessary for game development is compressed. In order to solve this problem, for example, Japanese Patent Application Laid-Open No. 11-203504 discloses that a character displayed on a display is a game character having a relatively high degree of importance and a relatively important degree in accordance with a game scene. In other words, a technique for performing 3D image processing for game characters and mainly performing two-dimensional (hereinafter abbreviated as 2D) image processing for supporting characters is disclosed. Therefore, there is already a technique for mixing and displaying a character by 3D image processing and a character by 2D image processing (hereinafter referred to as 2D character) in a 3D virtual space.
[0004]
As a technique related to the present invention, Japanese Patent Laid-Open No. 2001-084402 has a plurality of image data corresponding to a character to display one character, and an intermediate image of the plurality of image data is complemented. A technique for obtaining and displaying the above is disclosed. Japanese Patent Laid-Open No. 2001-70634 discloses a 3D character arranged in a 3D virtual space as a 2D image with animated data displayed on a display as a 2D image with data that has undergone emphasis processing and coloring processing for adding contour lines or ridge lines. Techniques to do this are disclosed. Furthermore, Japanese Patent Laid-Open No. 2001-056870 discloses a technique for moving a large number of characters in a collective manner, and Japanese Patent Laid-Open No. 2001-149655 discloses a technique for performing search, battle, etc. for a large number of characters.
[0005]
[Problems to be solved by the invention]
However, in the above-mentioned Japanese Patent Application Laid-Open No. 11-203504, although the amount of computation of 3D image processing can be greatly reduced by performing 2D image processing on a part of the character, the 3D character and 2D character are mixed. There is a problem of causing a sense of incongruity. This tendency is remarkably emphasized as the number of characters displayed on the display, in other words, the number of characters appearing in the game increases. That is, in order to cope with dynamic changes of a large number of characters (for example, 100 or more) appearing in the game, it is necessary to reduce the calculation amount of 3D image processing, but a 3D virtual in which 3D characters and 2D characters coexist. An image with a strong sense of incongruity can be obtained if the consistency between the two is not achieved in space.
[0006]
In order to eliminate this uncomfortable feeling, it is necessary to solve the following three points. (1) The virtual camera that becomes the viewpoint during the game can freely move from near to far. Therefore, there is a boundary where the 2D character and the 3D character are switched, and simple display causes discontinuity of the display on the display and causes a strong sense of incongruity. Since the virtual camera can observe the character from any position all around the sky, simple 2D sprites (for example, simply in about 8 directions) cannot cope with changes in the viewpoint. (2) Since the orientation of the 3D character changes dynamically during the game, the movement of the 2D character cannot be balanced unless it is dynamically expressed in the same manner as the 3D character, and is particularly extreme when switching between the two. Creates a sense of incongruity Further, (3) the 3D character changes its own shadow, so that the 2D character will feel uncomfortable if the same processing is not performed.
[0007]
  In view of the above case, the present invention can mix a large number of 3D characters and 2D characters without a sense of incongruity.programTheprogramRecording medium, image generating apparatus, andImage generation methodIt is an issue to provide.
[0010]
[Means for solving the problem]
  To solve the above problem,First of the present invention1The method of generating an image in which a large number of object characters including a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space.programBecauseComputerBased on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera Decided to draw an object character that is located inside and outside the predetermined distance or exceeds the predetermined number with the two-dimensional characterDecision means toBased on a relative angle formed by a direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn with the character, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. Two dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected from the dimensional sprite data and synthesized so as to have a width when the object character is viewed at the relative angle from the virtual camera. And the synthesized two-dimensional And shear deformation to render the two-dimensional character in accordance with flop write data to the angle formed by the vertical component direction of the relative angleThe omnidirectional multi-direction is functioned as a drawing means, and the direction in which the amount of change in the width is large is divided more finely than the direction in which the amount of change in the width is small..
[0011]
  In this aspect,The decision meansBased on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are three-dimensional characters drawn with three-dimensional polygon data. An object character positioned within the field of view of the virtual camera and outside a predetermined distance or exceeding a predetermined number is determined as a two-dimensional character drawn by two-dimensional sprite data.And the drawing meansAn object determined to be drawn with a three-dimensional character based on a relative angle formed by a direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character Relative angle is selected from two-dimensional sprite data of all-round multi-directional prepared in advance based on the rendering image of the three-dimensional polygon data for the object character determined to be drawn with the two-dimensional character. Two two-dimensional sprite data closest to the angle formed by the horizontal component are selected and combined so as to have a width when the object character is viewed at a relative angle from the virtual camera, and the combined two-dimensional sprite data is relative angle. The angle formed by the vertical component direction In response to shear deformation to draw a two-dimensional character, generates an image in which a mix of multiple object characters and three-dimensional character and the two-dimensional characterHowever, in the all-sky majority direction, the direction in which the width change amount is large is divided more finely than the direction in which the width change amount is small..
[0012]
  First1According to the aspect ofAn object character located within a predetermined distance from the virtual camera, that is, an object character close to the virtual camera is rendered as a three-dimensional character, and an object character located outside the predetermined distance from the virtual camera, ie, an object character far from the virtual camera. Since drawing with a two-dimensional character can alleviate the uncomfortable feeling of an image in which a three-dimensional character and a two-dimensional character are mixed, and only a predetermined number of object characters within a predetermined distance are drawn with a three-dimensional character. The amount of computation of 3D image processing can be reduced,For the two-dimensional character, the closest two of the multiple directions of the entire sky prepared in advance from the horizontal component angle of the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera and the front direction of the object character. Two two-dimensional sprite data are selected and combined so that the width of the object character is viewed at the relative angle, and the combined two-dimensional sprite data is shear-deformed according to the vertical component angle of the relative angle. As a result, when viewing a two-dimensional character far away from the virtual camera, the appropriate width and height are reflected in the horizontal and vertical directions, and it is possible to reduce the uncomfortable feeling of the mixed image of the three-dimensional character and the two-dimensional character.Furthermore, since the direction of large width variation is divided more finely than the direction of small width variation in all directions of the entire sky, it is appropriate to synthesize a long (deep) 2D sprite. You can get composite imageThe
[0013]
  In this aspect,The drawing meansIf one of the two two-dimensional sprite data is made semi-transparent and synthesized, an appropriate width without a sense of incongruity can be reflected in the horizontal direction when a two-dimensional character far from the virtual camera is viewed. In addition, if the angles between directions in the quadrants in all directions are different, an appropriate two-dimensional character can be drawn even for an elongated (depth) object character.. Drawing meansIs the angle between the direction vector when the front direction vector of the object character is projected onto a virtual plane with a vector connecting the position of the object character and the position of the virtual camera as a perpendicular and the horizontal direction on the virtual plane. A tangent value may be obtained, and the two-dimensional sprite data synthesized based on the obtained tangent value may be subjected to shear deformation in the vertical direction. In addition, two-dimensional sprite data for all directions in multiple directions prepared in advance is prepared as a plurality of animation data so as to correspond to a plurality of motions that a three-dimensional character can take.You may,In this case, the two-dimensional sprite data corresponding to the frame with little dynamic change is omitted from the animation data to be prepared.It is desirable.
[0014]
  In the second aspect of the present invention, a large number of object characters including a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space. A program for generating an image, the computer comprising: a predetermined number of object characters located within a visual field and a predetermined distance of the virtual camera based on position and direction information of the virtual camera and position information of the object character Determining means for determining that the three-dimensional character is to be drawn by the two-dimensional character within the field of view of the virtual camera and outside the predetermined distance or exceeding the predetermined number, on the three-dimensional virtual space The position of the object character and the position of the object character Based on the relative angle formed between the direction connecting the position of the virtual camera and the front direction of the object character, the three-dimensional character is drawn with respect to the object character determined to be drawn with the three-dimensional character, and the two-dimensional character For the object character determined to be drawn in step 2, the two closest to the angle formed by the horizontal component of the relative angle from the two-dimensional sprite data in all-round multidirectional directions prepared in advance based on the rendering image of the three-dimensional polygon data. Two-dimensional sprite data is selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle, and the synthesized two-dimensional sprite data is formed by the vertical component direction of the relative angle. The two-dimensional character is shear deformed according to the The two-dimensional sprite data prepared in advance in all directions in the multi-circumferential direction is a plurality of animations corresponding to a plurality of motions that can be taken by the three-dimensional character having limbs or feet. It is prepared as data, and two-dimensional sprite data corresponding to a frame with little dynamic change is omitted from the animation data. According to the second aspect, the object character located within a predetermined distance from the virtual camera is drawn with a three-dimensional character, and the object character located outside the predetermined distance from the virtual camera is drawn with a two-dimensional character. It is possible to alleviate the uncomfortable feeling of an image in which a character and a two-dimensional character are mixed, and to reduce the amount of computation of three-dimensional image processing because only three object characters are drawn within a predetermined distance and within a predetermined number. In addition, the two-dimensional sprite data prepared in advance in all directions in multiple directions is prepared as a plurality of animation data so as to correspond to a plurality of motions that a three-dimensional character having limbs or feet can take. Is the drawing of the object character a 3D character? Even when switching to a two-dimensional character or vice versa, it is possible to eliminate disagreement / discontinuity in the posture, direction, etc. between the two at the moment of switching, and a dynamic image in which a three-dimensional character and a two-dimensional character are mixed And the storage capacity for the two-dimensional sprite data can be reduced because the two-dimensional sprite data corresponding to the frame with little dynamic change is omitted from the animation data to be prepared. .
  Furthermore, in the third aspect of the present invention, a large number of object characters including a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space. A program for generating an image, the computer comprising: a predetermined number of object characters located within a visual field and a predetermined distance of the virtual camera based on position and direction information of the virtual camera and position information of the object character Determining means for determining that the three-dimensional character is to be drawn by the two-dimensional character within the field of view of the virtual camera and outside the predetermined distance or exceeding the predetermined number, on the three-dimensional virtual space The position of the object character and the position of the object character Based on the relative angle formed between the direction connecting the position of the virtual camera and the front direction of the object character, the three-dimensional character is drawn with respect to the object character determined to be drawn with the three-dimensional character, and the two-dimensional character For the object character determined to be drawn in step 2, the two closest to the angle formed by the horizontal component of the relative angle from the two-dimensional sprite data in all-round multidirectional directions prepared in advance based on the rendering image of the three-dimensional polygon data. 2D sprite data Is selected and combined so as to have a width when the object character is viewed from the virtual camera at the relative angle, and the combined two-dimensional sprite data is sheared according to an angle formed by the vertical component direction of the relative angle. The two-dimensional sprite data is preliminarily including vertex coordinates and a shading pseudo-normal vector so as to correspond to the three-dimensional polygon data. And According to the third aspect, the object character positioned within a predetermined distance from the virtual camera is rendered with a three-dimensional character, and the object character positioned outside the predetermined distance from the virtual camera is rendered with a two-dimensional character. It is possible to alleviate the uncomfortable feeling of an image in which a character and a two-dimensional character are mixed, and to reduce the amount of computation of three-dimensional image processing because only three object characters are drawn within a predetermined distance and within a predetermined number. In addition, the 2D sprite data is pre-included with the vertex coordinates and the pseudo normal vector for shading so as to correspond to the 3D polygon data, so shading with the pseudo normal vector of the vertex of the 2D sprite. (Shading process) can be performed, and 2 The original character can show ish 3-dimensional character. At this time, if the direction of the pseudo normal vector is maintained such that the direction of the normal vector of the vertex constituting the corresponding three-dimensional polygon data is maintained, shading of the vertex of the two-dimensional character is processed in the same manner as the three-dimensional character. Then, by correcting the direction of the normal vector according to the two-dimensional character, it becomes possible to make the two-dimensional character look more like a three-dimensional character.
  First of the present invention4The first aspect is the above-described first.-3rdOf aspectsprogramIs a computer-readable recording medium on which is recorded. In addition, the first of the present invention5An image generating apparatus that generates an image in which a large number of object characters, that is, a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data, are mixed in a 3D virtual space Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional character and the virtual character A determination means for determining that an object character positioned within the field of view of the camera and outside the predetermined distance or exceeding the predetermined number is drawn with the two-dimensional character, and the position of the object character in the three-dimensional virtual space, A direction connecting the position of the object character and the position of the virtual camera Based on the relative angle formed by the front direction of the object character, the three-dimensional character is drawn for the object character decided to be drawn by the three-dimensional character, and the object character decided to be drawn by the two-dimensional character is three-dimensional Two virtual two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected from the two-dimensional sprite data in all directions in multiple directions prepared based on the rendering image of the polygon data, and the virtual The two-dimensional sprite data is synthesized according to the angle formed by the vertical component direction of the relative angle by combining the two-dimensional sprite data so as to have a width when the object character is viewed from the camera at the relative angle. Drawing means for drawing a character,In the all-sky multi-direction, the direction in which the amount of change in the width is large is divided more finely than the direction in which the amount of change in the width is small, and the sixth aspect of the present invention is In an image generation apparatus for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space, a virtual camera Based on the position and direction information of the object and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional character, the visual field of the virtual camera, and It is determined that an object character that is located outside the predetermined distance or exceeds the predetermined number is drawn with the two-dimensional character. Based on a relative angle formed by a direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character. The object that is determined to be drawn with the two-dimensional character is drawn for the object character that is determined to be drawn with the three-dimensional character. The two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle from the two-dimensional sprite data in all directions of the entire sky prepared based on the rendering image of the three-dimensional polygon data for the character. Select and synthesize the object character so as to have a width when the object character is viewed from the virtual camera at the relative angle, and shear deform the synthesized two-dimensional sprite data according to the angle formed by the vertical component direction of the relative angle. And the drawing means for drawing the two-dimensional character, and the two-dimensional sprite data prepared in advance in all directions in multiple directions corresponds to a plurality of motions that the three-dimensional character having limbs or feet can take. Are prepared as a plurality of animation data, and out of the animation data The second aspect of the present invention is characterized in that a three-dimensional character and a two-dimensional object drawn with three-dimensional polygon data in a three-dimensional virtual space are characterized in that the two-dimensional sprite data corresponding to a frame with little change in the area is omitted. In an image generation apparatus for generating an image in which a large number of object characters are mixed with a two-dimensional character drawn with sprite data, the virtual camera is based on the position and direction information of the virtual camera and the position information of the object character. A predetermined number of object characters located within the predetermined field of view and within a predetermined distance are the three-dimensional characters, and object characters positioned within the predetermined field of view of the virtual camera and outside the predetermined distance or exceeding the predetermined number Determining means for determining to draw with a three-dimensional character; About an object character determined to be drawn by the three-dimensional character based on a relative angle formed by a direction connecting the position of the object character and the position of the virtual camera to the position of the object character and the front direction of the object character The relative angle is selected from two-dimensional sprite data in all directions in multiple directions prepared in advance based on the rendering image of the three-dimensional polygon data for the object character that is to be drawn with the two-dimensional character. The two two-dimensional sprite data closest to the angle formed by the horizontal direction component are selected and synthesized so as to have a width when the object character is viewed at the relative angle from the virtual camera, and the synthesized two-dimensional sprite is synthesized. Data for the relative angle Drawing means for drawing the two-dimensional character by shear deformation in accordance with an angle formed by a vertical component direction, and the two-dimensional sprite data is for vertex coordinates and shading so as to correspond to the three-dimensional polygon data. A pseudo-normal vector is included in advance.And the first of the present invention8The method of generating an image in which a large number of object characters including a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space.Image generation methodBecause, ProvisionalBased on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera Decided to draw an object character that is located inside and outside the predetermined distance or exceeds the predetermined number with the two-dimensional characterShiBased on a relative angle formed by a direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn with the character, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. Two dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected from the dimensional sprite data and synthesized so as to have a width when the object character is viewed at the relative angle from the virtual camera. And the synthesized two-dimensional And shear deformation to render the two-dimensional character in accordance with flop write data to the angle formed by the vertical component direction of the relative angleIn the ninth aspect of the present invention, in the all-sky multi-direction, the direction in which the width change amount is large is divided more finely than the direction in which the width change amount is small. An image generation method for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space And based on the position and direction information of the virtual camera and the position information of the object character A predetermined number of object characters located within a predetermined distance within the field of view of the virtual camera are objects that are located within the visual field of the virtual camera and outside the predetermined distance, or exceed the predetermined number. Determining that the character is to be drawn with the two-dimensional character, and connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space; Based on the relative angle formed by the three-dimensional character, the three-dimensional character is drawn for the object character decided to be drawn and the two-dimensional character is decided to be drawn based on the rendering image of the three-dimensional polygon data. Prepared in advance The two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected from the two-dimensional sprite data in all directions and the object character is viewed from the virtual camera at the relative angle. Combining the two-dimensional sprite data so as to be the width of time, and drawing the two-dimensional character by shearing the synthesized two-dimensional sprite data in accordance with the angle formed by the vertical component direction of the relative angle, The prepared two-dimensional sprite data for all directions in multiple directions is prepared as a plurality of animation data so as to correspond to a plurality of motions that can be taken by the three-dimensional character having limbs or feet. 2D sprite data corresponding to frames with little dynamic change is omitted. According to a tenth aspect of the present invention, an image in which a large number of object characters, that is, a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data, is mixed in a 3D virtual space. A method for generating an image, comprising: generating a plurality of object characters within a predetermined number of positions within a field of view and a predetermined distance of the virtual camera based on position and direction information of a virtual camera and position information of the object character; It is determined that an object character that is positioned within the field of view of the virtual camera and outside the predetermined distance or exceeds the predetermined number is drawn with the two-dimensional character, and the object character on the three-dimensional virtual space Connect the position of the object character and the position of the virtual camera to the position About the object character determined to draw the three-dimensional character for the object character determined to be drawn with the three-dimensional character and to be drawn with the two-dimensional character based on the relative angle formed by the direction and the front direction of the object character Select two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle from two-dimensional sprite data in all directions in multiple directions prepared based on a rendering image of three-dimensional polygon data. The two-dimensional sprite data is synthesized so as to have a width when the object character is viewed at the relative angle from the virtual camera, and the synthesized two-dimensional sprite data is subjected to shear deformation in accordance with an angle formed by a vertical component direction of the relative angle. Drawing a 2D character, including steps Said two-dimensional sprite data, characterized in that it comprises pre-pseudo-normal vector for vertex coordinates and shading to correspond to the three-dimensional polygon data.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments in which the present invention is applied to a home video game apparatus will be described below with reference to the drawings.
[0016]
(Constitution)
As shown in FIG. 1, in a home video game apparatus 10 according to the present embodiment, a game apparatus body 2 is connected to a TV monitor 4 having a speaker 5 built therein and an input device 3 such as a controller pad. The game apparatus body 2 has a medium reading unit (see FIG. 3) into which a recording medium 1 such as a CD-ROM can be mounted. By mounting the recording medium on the medium reading unit, the game program and game data recorded on the recording medium 1 are automatically loaded into the storage memory in the game apparatus body 2.
[0017]
As shown in FIGS. 2A and 2B, the input device 3 is operated with a start button 30 or a game character for starting a video game such as a group battle game, or a selection inquiry from the game device main body 2. A button set composed of a □ button 31, a △ button 32, a ○ button 33, and a x button 34, and a cross direction composed of an ↑ button 35, a → button 36, a ← button 37, and a ↓ button 38. Various buttons such as buttons are arranged. In addition, a left analog stick 39 and a right analog stick 40 are arranged obliquely below (a player's front side) of the button set and the cross direction button.
[0018]
As shown in FIG. 3, the game apparatus body 2 includes a CPU block 20 as a part of a determination unit and a drawing unit that controls the entire apparatus. The CPU block 20 stores an SCU (System Control Unit) that mainly controls data transfer with each unit in the game apparatus body 2, a CPU that operates as a central processing unit with a high-speed clock, and a basic control operation of the game apparatus body 2 ROM, which functions as a work area for the CPU and a game program recorded on the recording medium 1 and a RAM for temporarily storing various data, and an internal bus connecting them.
[0019]
An external bus 25 is connected to the SCU. The external bus 25 includes an input receiving unit 21 that receives input from the input device 3 and transfers input information to the CPU block 20, a sub CPU (not shown), reads a game program recorded on the recording medium 1, and reads it to the CPU block 20. A medium reading unit 22 such as a CD-ROM drive to be transferred, a sub CPU and a VRAM (not shown), an image processing unit 23 as a part of a drawing unit that draws an image according to information transferred from the CPU block 20, and not shown For example, the sound processing unit 24 includes a sub CPU and processes sound such as back music and battle sound of a character. The input receiving unit 21 is connected to the input device 3, the image processing unit 23 is connected to the television monitor 4, and the acoustic processing unit 24 is connected to the speaker 5 built in the television monitor 4. The image processing unit 23 is a geometry processing unit that performs geometric processing such as coordinate transformation, perspective transformation, light source computation, and curved surface generation, a computation unit that performs high-speed parallel processing of matrix computation such as coordinate transformation, and decompresses compressed image data. The decompression unit includes a rendering unit that executes a rendering (drawing) process on a frame buffer for displaying an image for one frame at a high speed.
[0020]
(Operation)
Next, with reference to the flowchart, regarding the operation of the home video game apparatus 10 according to the present embodiment, 250 characters belonging to the player side and 250 characters belonging to the computer (CPU block 20) side are enemy ally, respectively. The explanation will be made assuming that the battle game is divided into two. When the game apparatus body 2 is already turned on and the recording medium 1 is loaded, the game program and game data are read from the recording medium 1 and the battle process routine shown in FIG. 4 is executed.
[0021]
In the battle processing routine, first, at step 102, the player selects a favorite military commander as a unit chief by moving the cursor to one of the icons of the plurality of military commanders displayed on the TV monitor 4 and clicking (computer). The player also randomly selects a unit leader), and performs initial setting processing such as arranging other enemy characters (equestrian soldiers, soldiers) at the alignment positions before the game start and displaying them on the TV monitor 4. Wait until the start button 30 is pressed (not shown in FIG. 4).
[0022]
When the start button 30 is pressed, in the next step 104, the vertical blanking is executed at a cycle of 1/60 seconds (16.6 milliseconds), which coincides with the vertical blanking cycle of the television monitor 4. It is determined whether or not (sync) has been performed. In the case of negative determination, in the next step 106, main processing such as processing for input information transferred from the input receiving unit 21 and acoustic processing for causing the sound processing unit 24 to synthesize game sound effects is executed. Proceed to 110.
[0023]
Here, the relationship between the operation of the right analog stick 40 and the position of the virtual camera (viewpoint) will be described. When the player tilts the right analog stick 40, the input information (x, y) of the right analog stick 40 transferred from the input receiving unit 21 to the CPU block 20 has values of 0 ≦ x ≦ 255 and 0 ≦ y ≦ 255. Take. As shown in FIG. 7A, in the main processing in step 106, the CPU subtracts 127 from both (x, y) in order to convert the position of the virtual camera to the center O (0, 0) (x ', Y') = (x-127, y-127) = (a, b), r = (a2+ B2)1/2To determine whether r <48. When the determination is affirmative, it is treated as if there was no input from the right analog stick 40 (the position of the virtual camera is not moved). When the determination is negative, both a and b are multiplied by 1.5 and stored in the RAM.
[0024]
The position of the virtual camera is actually calculated by the coordinate value of the world coordinate system. However, if considered in the screen coordinate system, as shown in FIG. 5a, move from the current virtual camera position (center O (0,0)) to O ′ by 1.5b in the y direction (k = 1.5), and the orientation of the virtual camera is also determined by a and b. It will be tilted (the screen coordinate system will also tilt at that angle). Therefore, the magnitudes of a and b change depending on the degree of inclination of the right analog stick 40, and the moving speed and the inclination of the virtual camera change. Specifically, the virtual camera (viewpoint) moves forward when the right analog stick 40 is tilted upward, backward when tilted downward, clockwise when tilted right, and counterclockwise when tilted counterclockwise. And then continue to tilt down in the upper right direction, lower right direction, upper left direction, and lower left direction, the virtual camera (viewpoint) moves in the right direction, the small direction to the right, the large amount to the left, and the small direction to the left. In this embodiment, the units a and b each correspond to 1 cm in the 3D virtual space, and the height direction (z direction) component of the virtual camera is constant (for example, 3 m in the 3D virtual space). It is said that.
[0025]
On the other hand, if an affirmative determination is made in step 104, in step 108, a 3D2D processing subroutine for generating an image in which 3D characters and 2D characters are mixed for characters in the field of view of the virtual camera is executed.
[0026]
As shown in FIG. 5, in this 3D2D processing subroutine, first, in step 122, (ka, kb) stored in the RAM in step 106 is read, and the position and direction of the virtual camera (viewpoint) are calculated in the world coordinate system. Then, the screen coordinate system of the virtual camera is calculated. In the next step 124, the counter Cn is set to 0 in order to keep the number of characters subject to 3D processing within a predetermined number (as described later, 50 bodies).
[0027]
Next, in step 126, it is determined whether or not all characters have been processed. If the determination is negative, the position and direction in the world coordinate system of the target character stored in the RAM 1 Vsync before in step 128 are read, and the next In step 130, the position and direction of the target character in the current world coordinate system are calculated and stored in the RAM. For such calculation of the position and direction of the target character, a known technique can be used. However, in the case where a large number of characters of 100 bodies or more are processed as in this example, for example, the above-described Japanese Patent Application Laid-Open No. 2001-056870 described above. And Japanese Patent Application Laid-Open No. 2001-149655 can be used. In the next step 132, it is determined whether or not the target character exists in the field of view of the virtual camera (for example, 200 m × 200 m in the 3D virtual space) from the direction of the virtual camera and the position of the target character in the screen coordinate system. If the determination is negative, the visibility flag sf indicating whether or not the target character is located within the field of view of the virtual camera is set to 0 in step 134. If the determination is affirmative, the visibility flag sf is set to 1 in step 136 and the process proceeds to step 126. Return. Therefore, for example, as shown in FIG. 8, when a unit F and a unit E composed of a plurality of characters face each other and process 500 characters, the view flag sf is set to 1 Only the character located in S will be.
[0028]
On the other hand, when an affirmative determination is made in step 126, in step 138, the distance from the position of the virtual camera to each character is calculated only for the character with the visibility flag sf of 1, and the processing order is determined in the order from the virtual camera. To do. Next, in step 140, it is determined whether or not the processing has been completed for all characters in the field of view of the virtual camera (with a visibility flag sf = 1). If the determination is negative, in step 142, the target character is a virtual character. It is determined whether or not the position is within 50 m from the camera position. If the determination is affirmative, it is determined in the next step 144 whether or not the counter Cn is 50 or less. If the determination in step 144 is affirmative, the counter Cn is incremented by 1 in the following step 146, and in the next step 148, 3D processing for displaying the target character as a 3D character is performed, and the process returns to step 140.
[0029]
In this 3D processing, the relative angle formed by the direction connecting the character position and the virtual camera position and the front direction of the character is calculated, and motion data for animation obtained using motion capture or the like is obtained. A plurality of sets are prepared in advance, and any one frame in one set of motion data is selected from the motion data according to the state of the character (for example, the state of movement, battle, etc.). That is, since the character takes various states such as movement and battle, the CPU reads the value of the state flag indicating the current state of the character from the RAM and selects a set of motion data specified by the flag value. Since one set of motion data is composed of a plurality of frames in a time series as shown in FIG. 10A, the CPU draws up to which frame the target character is drawn before 1 Vsync among the plurality of frames. It is possible to identify the frame to be drawn at the present time. For the specification of such a frame, for example, a counter may be used as in the technique of Japanese Patent Application Laid-Open No. 2001-149655 described above.
[0030]
Here, the character motion is not a direct calculation of pixel displacement in real time, but a sequence of data obtained by sampling the movements of horse soldiers, soldiers, horses, etc. in advance in order to express the realistic movement of the character. Is used. The data structure of general 3D motion data has a scale value indicating the size, a rotation angle with respect to each axis of xyz, and a coordinate value for each xyz indicating a moving distance from the origin for each joint of the character. As a set of joint data, motion data is configured by having as many joint data groups of the entire character composed of one or a plurality of joint data as the number of frames of the motion for each motion (FIG. 10A). See also). A frame here is a time unit of image processing and is a so-called “frame”. When displaying a 3D character, the CPU transfers information such as the position and direction of the target character in the world coordinate system, and the motion of the target character to the image processing unit 23 via the SCU. In order to display a 3D image, various processes such as a geometry process are performed to generate a 3D character visible from the virtual camera.
[0031]
On the other hand, if a negative determination is made in step 142 or 144, a 2D processing subroutine for displaying the target character as a 2D character is executed in step 150 as described later. Therefore, in steps 122 to 150, 3D processing is performed on 50 characters within the visual field of the virtual camera within 50 m from the virtual camera and in order from the virtual camera, and 2D processing is performed for the other characters. Characters outside the camera's field of view do not perform these processes.
[0032]
Before describing the 2D processing subroutine, the 2D character image data (hereinafter referred to as 2D sprite) prepared in advance (stored in the VRAM of the image processing unit 23 via the CPU block 20) will be described in detail. In the present embodiment, a plurality of sets of characters appearing in the battle game are prepared corresponding to the number of character states described above, and 2D sprites when the 3D models of the characters are viewed from many directions are prepared. As shown in FIG. 9A, for example, in a set of 2D sprites, the 3D model is viewed from all directions 16 (0) to (15) (hereinafter, these directions are referred to as rendering directions). 16 image data (for example, bitmap). Therefore, the VRAM of the image processing unit 23 stores image data for each character (16 × the number of states taken by the character), but a common 2D sprite is used for soldiers and horses except for military commanders. By using it, the number of image data to be stored in the VRAM can be reduced.
[0033]
As shown in FIG. 9B, the width of the character in the rendering direction (0) (the direction when viewed from the front) is W.1, The width of the character in the rendering direction (4) (the direction when seen from the side) is W2And width W1And width W2If the larger one is Wmax and the smaller one is Wmin, the character width increase rate Ex can be obtained by the following equation (1), and the rendering angle in the fourth quadrant (0 to 90 degrees) in FIG. Rk(An angle formed by the rendering direction (k) and the rendering direction (0) shown in FIG. 9A) can be obtained by the following equation (2). R0Is 0.
[0034]
[Expression 1]
Figure 0003760341
[0035]
[Expression 2]
Figure 0003760341
[0036]
Further, the rendering angle R in the other quadrant (90 to 360 °) is calculated from the rendering angle obtained by Expression (2).5~ R15Can be obtained by the following equation (3).
[0037]
[Equation 3]
Figure 0003760341
[0038]
As shown in FIGS. 9A and 9B, the rendering angle in each quadrant is not a fixed angle, but is different, for example, between the rendering directions (0) (1) and (1) (2). The width is different. The width of an elongate (depth) character like a horse is more than three times between rendering directions (0) and (3) and less than twice between rendering directions (3) and (4). In the synthesis of 2D sprites, it is preferable to set the rendering direction finely for a range where the image change amount (width change amount) is large, and to set the rendering direction coarsely for a range where the image change amount is small.
[0039]
In addition, since the motion and orientation of the 3D character itself dynamically change during the battle game, the 2D character needs to be prepared in response to such a dynamic change. In the present embodiment, as shown in FIG. 10B, 2D animation data is prepared based on each motion data so as to correspond to the motion of the 3D character shown in FIG. Note that the 2D animation data shown in FIG. 10B is a case where the character (equestrian) is in a moving state, and similar 2D animation data is prepared for other states (for example, a certain character has four types of data). When the state can be taken, 2D sprites are prepared for each of the 16 directions of the entire sky so as to correspond to the four types of motion of the 3D character. In addition, 2D sprites to be prepared can be omitted for portions with little dynamic change when displayed as 3D characters. For example, in the case shown in FIG. 10B, the 3D Vsync 2D sprite that is originally displayed at the timing of the 3rd Vsync and 4th Vsync does not greatly change from the 2D sprite of the 2nd Vsync. The 2D sprite data of the second Vsync may be continuously used without holding the 3D sync and the 4th Vsync 2D sprite.
[0040]
As shown in FIG. 6, in the 2D processing subroutine, first, in step 162, the position of the virtual camera stored in the RAM in step 122 and the position of the target character stored in the RAM in step 130 are read. The relative angle formed by the vector connecting the camera position and the front direction of the target character is calculated.
[0041]
In the next step 164, a synthesis process for synthesizing two 2D sprites is performed. In this synthesis process, first, two 2D sprites to be synthesized are specified. That is, as in the case of 3D rendering, referring to the value of the state flag of the character and information on how far the motion is rendered before 1 Vsync, 2D in 16 directions of the entire sky prepared for each motion Among the sprites, two 2D sprites that sandwich the angle formed by the horizontal component of the relative angle described above (closest to the angle formed by the horizontal component) are specified. For example, as shown in FIG. 9A, if the direction in which the virtual camera views the target character is the arrow A direction, the 2D sprites in the rendering directions (1) and (2) are specified as two 2D sprites to be synthesized. (See also FIG. 9B). If it adds about the relationship with a time-sequential motion, as shown to FIG. 10 (B), with reference to the information of how much motion is drawn before 1Vsync, two 2D sprites are specified.
[0042]
Next, the width Wsprt of the 2D sprite to be synthesized is calculated by the following equation (4). In Expression (4), the angle RR is a horizontal direction of an angle formed by a predetermined direction vector Vfront of the character (3D model) in the front direction and a direction vector from the character position to the virtual camera position direction. It represents the component (angle). Here, the direction vector is a unit vector having no meaning with respect to the size (length), and means a vector in which only the direction has meaning. Equation (4) is used to calculate the width when the elliptical character (3D model) is viewed from the virtual camera when viewed from the relative angle calculated in step 162.
[0043]
[Expression 4]
Figure 0003760341
[0044]
Next, the transparency of the two 2D sprites is calculated. In this transparency calculation, the transparency Aa of the 2D sprite closer to the angle RR out of the two 2D sprites to be synthesized is set to be completely opaque (Aa = 1.0). The reason why the 2D sprite closer to the angle RR is made completely opaque is that, for the sake of the compositing process, when the translucent 2D sprites are combined, the blur of the composite image is prevented from increasing, and the background This is for avoiding the inconvenience of being seen through. If the rendering angle of the 2D sprite closer to the angle RR is set to Ra (in accordance with the example shown in FIG. 9A), R1) On the other hand, the rendering angle of the other 2D sprite (distant from the angle RR) is Rb (in accordance with the example shown in FIG. 9A).2), The transparency Ab of the other 2D sprite can be obtained by the following equation (5). Equation (5) converts the ratio of the difference between the rendering angle of two 2D sprites and the difference obtained by subtracting one of the rendering angles from the angle RR into a length, and directly converts the ratio to the transparency of the other 2D sprite. It is reflected, and the transparency is calculated from the ratio of the angles of the two 2D sprites. The transparency Ab calculated by Expression (5) is set as the transparency of the other 2D sprite. The transparency Ab takes a value of 0.0 to 0.5 (the transparency is completely opaque at a maximum value of 1.0 and completely transparent at a minimum value of 0.0).
[0045]
[Equation 5]
Figure 0003760341
[0046]
Then, after synthesizing two 2D sprites with transparency of 1.0 and transparency Ab (overlapping in the same place), the horizontal width of the synthesized 2D sprite was calculated by the above equation (4). A combined 2D sprite is obtained by expanding and contracting left and right (horizontal direction) so as to have a width Wsprt. The CPU transfers two 2D sprite identification, transparency Ab and width Wsprt information to the image processing unit 23 via the SCU, and the image processing unit 23 performs processing such as transparency conversion, 2D sprite composition and expansion / contraction. Is called.
[0047]
Next, in step 166, it is determined whether or not the angle φ is 0 in order to determine whether or not the character is rotating. As shown in FIGS. 11A and 11B, this angle φ has a predetermined upward vector Vup of the 3D model M as a perpendicular to a vector in the direction connecting the viewpoint of the virtual camera and the 3D model. As shown in FIG. 11B, the angle formed between the upward vector CVup of the 3D model M ′ after projection onto the virtual plane C and the vertical upward direction Vr, as shown in FIG.
[0048]
If the determination is affirmative, in the next step 168, a shear deformation process is performed to shear the 2D sprite synthesized in step 164 in the vertical direction. As shown in FIG. 12A, in this shear deformation processing, a predetermined vector Vfront in the front direction of the 3D model M is a virtual vector in which the vector in the direction connecting the viewpoint of the virtual camera and the 3D model is a perpendicular line. As shown in FIG. 12B, the tangent of the angle θ formed by the direction vector CVfront in the front direction of the 3D model M ′ after projection onto the virtual plane C and the horizontal direction Hr as shown in FIG. (Shear deformation coefficient Sh = tan θ). When the shear deformation coefficient Sh is too large (depending on the character, for example, when Sh exceeds 0.4 in the case of a horse), a predetermined maximum value (for example, Sh = 0. 4) When the shear deformation coefficient Sh takes an indefinite value (θ = 90 °), the abnormal value can be processed by setting the shear deformation coefficient Sh = 0. Also, when the character is a soldier that is not deep (not slender) compared to a horse or when the character is viewed from the front, the 2D character is far from the virtual camera, so there is no sense of incongruity, and shear deformation is not necessarily performed in this step. It is not necessary to perform. FIGS. 13A and 13B show 2D sprites of the horse before and after the shear deformation process.
[0049]
As will be described later, ten vertices V1 to V10 (see FIG. 14B) are defined in the 2D sprite. The screen coordinate values obtained by perspective-transforming each vertex of the 2D sprite are (Xx + X1, Yx + Y1), where (Xx, Yx) is the screen coordinate value obtained by perspective-transforming the (center) position of the 3D model. ), (Xx + X2, Yx + Y2),... (Xx + X10, Yx + Y10), and the final screen coordinate values of the vertices of the 2D sprite are calculated by performing the following expression (6) on Y1 to Y10. (Xx + X1, Yx + Y1x), (Xx + X2, Yx + Y2x),... (Xx + X10, Yx + Y10x) are obtained. The CPU transfers the information on the shear deformation coefficient to the image processing unit 23 via the SCU, and the image processing unit 23 performs shear deformation and perspective transformation of the synthesized 2D sprite.
[0050]
[Formula 6]
Figure 0003760341
[0051]
On the other hand, when a negative determination is made in step 166, in step 170, a rotation process for rotating the 2D sprite synthesized in step 164 from the vertical direction Vr by an angle φ is performed. FIGS. 13C and 13D show soldier 2D sprites before and after the rotation process. Such a rotation process is performed in this battle game, for example, when a tornado occurs and the character is floating in the air and cannot stand on the ground with his own leg power. Note that the CPU transfers information on the angle φ to the image processing unit 23 via the SCU, and rotation of the synthesized 2D sprite is performed by the image processing unit 23 by affine transformation.
[0052]
Next, in step 172, a shading process for shading the 2D character is performed. This shading process is a so-called shading process, and does not add a shadow to the 2D character, but is a process of determining the brightness determined by the light source position and the ambient environment conditions.
[0053]
Here, the pseudo-normal vector of the 2D sprite of this embodiment will be described in relation to the shading process in step 172. FIG. As shown in FIG. 14A, when a cylinder close to the outer shape of a soldier is considered as a 3D model, a vertex can be arbitrarily defined in the outline of the cylinder. For example, at the vertex V1, a normal vector obtained by synthesizing a vertical vector and a horizontal vector can be obtained (the same applies to V2 to V10). As shown in FIG. 14B, when creating the 16-directional 2D sprite described above, the vertexes of the 2D sprite corresponding to the vertices of the 3D model (10 in this example) are set as the vertices of the 3D model. The normal vector is reflected as it is as a pseudo-normal vector. At this time, a slight correction may be made so as not to cause a sense of incongruity in the shading of the 2D sprite. For example, assuming two horses with different heights (heights) as characters, a tall horse and a short horse when two horses are lined up by correcting one pseudo-normal vector And shading contrast. Note that FIG. 14C shows the direction of the pseudo-normal vector assuming that FIG. 14B is viewed from above. For example, when a parallel light source is present at the top and the light is uniformly swept from the top to the bottom, when the 2D sprite's pseudo-normal vector is upward, its vertex in shading is the same as in the 3D model. Becomes brighter (V1 to V5), and becomes darker when facing downward (V6 to V10). The bright part changes depending on the direction of the light source and the relative angle of the pseudo-normal vector. Therefore, in the shading process in step 172, a pseudo normal vector is determined in advance at each vertex of the 2D sprite based on the normal vector of the 3D model, and the same process as the shading applied to the 3D model is performed.
[0054]
More specifically with reference to FIG. 14B, the values of the pseudo normal vectors at the vertices V1, V2,... V10 of the 2D sprite are represented by N1, N2,. The direction vector of the parallel light source that affects the N10, 2D sprite is Cdir as shown in the following equation (8), and the color (RGB) value of the parallel light source is shown as Ccol, ambient (environment light) as shown in the following equation (9). ) The color (RGB) value is Camb as shown in the following expression (10), and the color value at each vertex V is calculated for the pseudo-normal vector N.
[0055]
[Expression 7]
Figure 0003760341
[0056]
[Equation 8]
Figure 0003760341
[0057]
First, NN1 is calculated from the pseudo-normal vector N1 by the following equation (11), and the color (RGB) value Vcol1 of the vertex V1 is obtained by the following equation (12).
[0058]
[Equation 9]
Figure 0003760341
[0059]
[Expression 10]
Figure 0003760341
[0060]
Similar processing is performed on the pseudo-normal vectors N2 to N10, and the color values of all the vertices are calculated. The vertices of the 2D character and the color values near them change linearly, but such processing is performed by the image processing unit 23.
[0061]
When the shadow processing and 2D processing subroutine for the target character is completed in step 172, the process returns to step 140 shown in FIG. When an affirmative determination is made in step 140, that is, when the processing of all characters in the field of view is completed, in order to draw all characters in the field of view of the virtual camera in 3D and 2D mixed in the next step 152, The various information described above is transferred to the image processing unit 23, the 3D2D processing subroutine is terminated, and the process proceeds to step 110 in FIG. In accordance with the transferred information, during the next 1 Vsync, the image processing unit 23 performs the rendering process on the 3D processing target character with the 3D polygon data as described above, and the 2D processing target character with the 2D sprite. Processing is performed to draw a 3D2D character mixed image in the frame buffer of the image processing unit 23, and the drawn image is sent to the television monitor 4. Thereby, the state of the battle game in which 3D2D characters are mixed is displayed on the TV monitor 4 every 1/60 seconds (see FIG. 15).
[0062]
In step 110, it is determined whether the battle game has ended (for example, when the head of one of the units E and F has died) or whether the player has pressed a predetermined button for ending the game on the input device 3. (Such input input is performed in the main process of step 106.) If a negative determination is made, the process returns to step 104. If an affirmative determination is made, in the next step 112, for example, the player's unit wins. The ending process of the battle game such as sometimes winning is performed and the battle process routine is ended.
[0063]
(Action etc.)
As described above, in the present embodiment, a character positioned within 50 m on the 3D virtual space from the virtual camera is drawn with a 3D character, and a character farther than 50 m on the 3D virtual space from the virtual camera is displayed with a 2D character. Since the drawing is performed (steps 142 to 150), the uncomfortable feeling of the image in which 3D and 2D characters are mixed can be alleviated. Further, in this embodiment, for a 2D character, the direction of connecting the position of the character and the position of the virtual camera and the horizontal component angle of the relative angle formed by the front direction of the character are prepared in 16 directions of the entire sky. The two closest 2D sprites are selected and synthesized so as to have the width Wsprt when the character is viewed at a relative angle (steps 162 and 164), and the synthesized 2D sprite is synthesized according to the vertical component angle of the relative angle. Since the shear deformation is performed (step 168), when the 2D character far away from the virtual camera is viewed, the appropriate width and height are reflected in the horizontal and vertical directions, and the 3D character and the 2D character are mixed. Can be reduced. That is, when viewing a 2D character far away from the virtual camera, the appropriate width and height are reflected in the horizontal and vertical directions. It is possible to cope with a change in the viewpoint of the camera, and it is possible to reduce a strong sense of incongruity at the virtual boundary line of 50 m from the virtual camera. In addition, in this embodiment, 16D 2D sprites are prepared instead of simple eight directions, and one of the 2D sprites is translucent, so that the character width direction (horizontal direction) can be appropriately combined. In addition, since the rendering direction of each quadrant in the 16 directions of the sky is divided into the direction where the width change amount is large compared to the direction where the width change amount is small, the elongated (depth) 2D sprite can be Even if they are combined, an appropriate combined image can be obtained. Furthermore, in this embodiment, since only the characters within 50 characters are drawn as 3D characters in order from the virtual camera (step 138) (steps 124, 144, 146, 148), the calculation amount of 3D image processing is reduced. The amount of calculation required for game development can be relatively increased.
[0064]
In this embodiment, when creating and preparing a 2D sprite based on a rendering image of 3D polygon data, animation data of the 2D sprite is generated based on each motion data so as to correspond to the motion of the character during 3D display. Is created and prepared (see Fig. 10), so even if the character drawing is switched from 3D to 2D or from 2D to 3D sequentially, the disagreement and discontinuity of the posture, direction, etc. between the two at the moment of switching are eliminated. Therefore, the uncomfortable feeling of the dynamic image in which 3D and 2D characters are mixed can be eliminated, and high drawing quality can be ensured. In this case, in the present embodiment, since it is possible to omit the preparation of 2D sprites corresponding to frames with little dynamic change among the prepared 2D sprites, the VRAM usage area of the image processing unit 23 is reduced. be able to.
[0065]
Furthermore, in this embodiment, as shown in FIG. 10B, pseudo normal vectors are formed in advance at the vertices of the 2D sprite so as to correspond to the 3D polygon data, and the shading process is performed in real time. (Step 172), it is possible to make a character that can only be seen as a 2D display even if it is far from the virtual camera look like a 3D display. Accordingly, in the present embodiment, such shading processing not only passively eliminates the sense of incongruity of the mixed image of 3D and 2D characters, but also performs processing to make the 2D character closer to the 3D character.
[0066]
In this embodiment, an example in which the relative angle is an angle formed by the direction connecting the character position and the virtual camera position and the front direction of the character is shown, but as a simple method, the direction of the virtual camera and An angle formed by the front direction of the character (an angle in the front direction of the character in the screen coordinate system) may be used as a relative angle.
[0067]
Further, in the present embodiment, an example in which 3D and 2D images can be switched for each 1 Vsync has been shown. However, when creating a 3D model motion rendering image, the sampling time as 2D sprite data is used as it is. It may be. In this case, the sampling time (for example, 1, 2, 5 frames) may be recorded as data, and the drawing may be switched when the sampling time elapses when the 2D sprite is drawn. In such an aspect, the determination as to which of the 3D and 2D characters should be drawn may be made every time the sampling time of each motion of the target character elapses. In addition, the time zone in which the motion (posture change) is small in the motion of the 3D character may be sampled roughly, and the time zone in which the motion is large may be sampled finely.
[0068]
Furthermore, in this embodiment, the example in which the position and direction of the virtual camera are changed when there is an input from the right analog stick 40 has been shown. However, for example, if there is no input from the player for 3 seconds, the position and direction of the virtual camera The virtual camera may be moved in the position and direction where the event occurs when a specific event occurs. Also, when moving the virtual camera, only the position may be moved or only the direction may be changed. In such a case, for example, the left analog stick 39 in addition to the right analog stick 40 can be used to grasp one input.
[0069]
And in this embodiment, as shown to FIG. 14 (A), although the example which assumed the external shape of the soldier as a character as a cylinder was shown, it does not necessarily need to be considered as a cylinder, The shape approximated to a character This makes it possible to easily set the direction of the pseudo normal vector.
[0070]
【The invention's effect】
  As explained above, the present inventionFirst, fourth, fifth and eighth aspectsAccording to the above, an object character located within a predetermined distance from the virtual camera, that is, an object character close to the virtual camera is drawn with a three-dimensional character, and an object character located outside the predetermined distance from the virtual camera, ie, from the virtual camera. Since a distant object character is drawn with a two-dimensional character, the sense of discomfort of an image in which the three-dimensional character and the two-dimensional character are mixed can be alleviated, and only a predetermined number of object characters within a predetermined distance can be reduced with a three-dimensional character. Since it is drawn, the amount of computation of 3D image processing can be reduced.In addition, for a two-dimensional character, a total number of omnidirectional directions prepared in advance from a horizontal component angle of a relative angle formed by the direction connecting the position of the object character and the position of the virtual camera and the front direction of the object character. The two closest 2D sprite data are selected and combined so that the width of the object character is viewed at the relative angle, and the combined 2D sprite data is sheared and deformed according to the vertical component angle of the relative angle. As a result, when a two-dimensional character far away from the virtual camera is viewed, the appropriate width and height are reflected in the horizontal and vertical directions, reducing the sense of incongruity of the image in which the three-dimensional character and the two-dimensional character are mixed. In addition, for all directions in the whole sky, between directions with a large amount of change in width, between directions with a small amount of change in width Having classified finer than can be synthesized elongate 2D sprite obtain a proper composite imageThe effect that can be obtained.
  Further, according to the aspects of the second, fourth, sixth and ninth aspects of the present invention, an object character positioned within a predetermined distance from the virtual camera is drawn with a three-dimensional character, and the object character outside the predetermined distance from the virtual camera is drawn. Since the object character positioned at 2 is drawn with a two-dimensional character, the sense of discomfort of the image in which the three-dimensional character and the two-dimensional character are mixed can be alleviated, and only the object character within a predetermined distance and within a predetermined number can be reduced. In this case, the calculation amount of the three-dimensional image processing can be reduced, and a plurality of two-dimensional sprite data prepared in advance in all directions can be taken by a three-dimensional character having limbs or legs. Since it is prepared as multiple animation data corresponding to the motion, Even if the drawing of the character is switched from the 3D character to the 2D character or vice versa, the disagreement / discontinuity of the posture, direction, etc. between the two at the moment of switching can be eliminated. It is possible to eliminate a sense of incongruity in a dynamic image in which two-dimensional characters are mixed, and to eliminate two-dimensional sprite data corresponding to a frame with little dynamic change from animation data to be prepared. The storage capacity can be reduced.
  According to the third, fourth, seventh and tenth aspects of the present invention, an object character positioned within a predetermined distance from the virtual camera is rendered as a three-dimensional character, and is positioned outside the predetermined distance from the virtual camera. Since the object character to be drawn is drawn with a two-dimensional character, the sense of discomfort of the image in which the three-dimensional character and the two-dimensional character are mixed can be alleviated, and the object character within a predetermined distance and within a predetermined number is drawn with the three-dimensional character. Therefore, the calculation amount of 3D image processing can be reduced, and the vertex coordinates and the shading pseudo-normal vector are included in advance in the 2D sprite data so as to correspond to the 3D polygon data. So, shading by the quasi-normal vector of the vertex of 2D sprite It is possible to perform shading), the two-dimensional character can show ish three-dimensional character, it is possible to obtain an effect that.
[Brief description of the drawings]
FIG. 1 is a schematic perspective view showing a connection mode of a consumer game device.
FIGS. 2A and 2B show an input device used in a home game device, in which FIG. 2A is a plan view and FIG. 2B is a front view when viewed from the direction of arrow B in FIG.
FIG. 3 is a block diagram illustrating a schematic configuration of the game apparatus main body according to the embodiment.
FIG. 4 is a schematic flowchart of a battle processing routine executed by the CPU of the game apparatus main body.
FIG. 5 is a flowchart of a 3D2D processing subroutine showing details of step 108 of the battle processing routine.
FIG. 6 is a flowchart of a 2D processing subroutine showing details of step 150 of the 3D2D processing subroutine.
FIGS. 7A and 7B are explanatory diagrams showing the relationship between the tilt position of the right analog stick and the viewpoint, in which FIG. 7A is a plan view showing a possible input range when the right analog stick is tilted, and FIG. It is a top view explaining a direction and direction.
FIG. 8 is an explanatory diagram showing a field of view of a virtual camera.
9A and 9B are explanatory diagrams when rendering a 3D model into a 2D sprite, where FIG. 9A shows a rendering angle with respect to the whole sky, and FIG. 9B shows a rendering direction (0) to (4) in FIG. This is a 2D sprite when a 3D model horse is rendered.
10A and 10B are explanatory diagrams showing 3D and 2D image data, in which FIG. 10A shows 3D motion data, and FIG. 10B shows 2D animation data.
11A and 11B are explanatory views schematically showing an angle φ, where FIG. 11A shows a 3D model viewed from a virtual camera, and FIG. 11B shows a 3D model projected onto a plane C from the virtual camera. Show the time.
FIGS. 12A and 12B are explanatory diagrams schematically showing an angle θ, where FIG. 12A shows the 3D model viewed from the virtual camera, and FIG. 12B shows the 3D model projected onto the plane C from the virtual camera; Show the time.
13A and 13B are explanatory views schematically showing shear deformation and rotational deformation of 2D sprites, in which FIG. 13A shows 2D sprites before shear deformation, FIG. 13B shows 2D sprites after shear deformation, and (C ) Shows a 2D sprite before rotational deformation, and (D) shows a 2D sprite after rotational deformation.
14A and 14B are explanatory diagrams schematically showing pseudo-normal vectors at the vertices of a 2D sprite. FIG. 14A shows a normal vector when a normal vector is assumed to be a cylinder, and FIG. 14B shows a 2D sprite. The pseudo normal vector at the vertex is shown, and (C) shows the direction when it is assumed that the pseudo normal vector at the vertex of the 2D sprite is viewed from above.
FIG. 15 is an example of a halftone image displayed on a television monitor when a battle processing routine is executed.
[Explanation of symbols]
1 Recording medium
2 Game console (image generator)
20 CPU block (part of determination means and drawing means)
23 Image processing unit (part of drawing means)

Claims (16)

3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、
として機能させ、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とするプログラム。
A program for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space, ,
Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is drawn by the two-dimensional character;
Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan Drawing means for drawing the two-dimensional character and shear deformation in response to write data to the angle formed by the vertical component direction of the relative angle,
In the all-sky multi-direction, the direction in which the amount of change in the width is large is divided more finely than the direction in which the amount of change in the width is small .
前記描画手段は、前記2つの2次元スプライトデータの一方を半透明にして合成することを特徴とする請求項に記載のプログラム2. The program according to claim 1 , wherein the drawing unit synthesizes one of the two two-dimensional sprite data by making it semitransparent. 3. 前記全天周多数方向の各象限における方向間の角度が異なることを特徴とする請求項又は請求項に記載のプログラムThe program according to claim 1 or 2 , wherein the angles between directions in each quadrant of all directions in the whole sky are different. 前記描画手段は、前記オブジェクトキャラクタの正面方向ベクトルを、該オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶベクトルを垂線とする仮想平面に投影したときの方向ベクトルと、前記仮想平面での水平方向とのなす角度の正接値を求め、該求めた正接値に基づいて前記合成された2次元スプライトデータを垂直方向にせん断変形することを特徴とする請求項乃至請求項のいずれか1項に記載のプログラムThe drawing means includes a direction vector obtained by projecting the front direction vector of the object character onto a virtual plane with a vector connecting the position of the object character and the position of the virtual camera as a perpendicular, and a horizontal direction on the virtual plane. obtains a tangent value of the angle between the direction, either one of claims 1 to 3, characterized in the shear deformation child 2D sprite data the synthesized based on the obtained tangent value in the vertical direction The program according to item 1. 前記予め用意された全天周多数方向の2次元スプライトデータは、前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されていることを特徴とする請求項乃至請求項のいずれか1項に記載のプログラム2-dimensional sprite data of said total Tenshu many directions prepared in advance is 1 to claim, characterized in that it is prepared as a plurality of animation data so as to correspond to the plurality of motion the three-dimensional character can take The program according to claim 4 . 前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とする請求項に記載のプログラム6. The program according to claim 5 , wherein two-dimensional sprite data corresponding to a frame with little dynamic change is omitted from the animation data. 3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、A program for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space, ,
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is drawn by the two-dimensional character;
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is rendered for the object character determined to be rendered in step S3, and the three-dimensional polygon data rendering image is rendered for the object character determined to be rendered with the two-dimensional character. 像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、Two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected from the two-dimensional sprite data of all-round multi-directional prepared in advance based on the image, and the relative camera is selected from the virtual camera. The two-dimensional character is drawn by combining the two-dimensional sprite data with an angle formed by the angle of the vertical component direction of the relative angle. Drawing means,
として機能させ、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とするプログラム。The two-dimensional sprite data in all directions prepared in advance is prepared as a plurality of animation data so as to correspond to a plurality of motions that can be taken by the three-dimensional character having limbs or feet. A program characterized in that two-dimensional sprite data corresponding to a frame with little dynamic change is omitted from the animation data.
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成するプログラムであって、コンピュータを、
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段、
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段、
として機能させ、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とするプログラム
A program for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space, ,
Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is drawn by the two-dimensional character;
Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan Drawing means for drawing the two-dimensional character and shear deformation in response to write data to the angle formed by the vertical component direction of the relative angle,
To function as the two-dimensional sprite data, the program characterized by comprising pre pseudo-normal vector for vertex coordinates and shading to correspond to the three-dimensional polygon data.
前記疑似法線ベクトルの方向は、前記3次元ポリゴンデータを構成する頂点の法線ベクトルの方向が維持されるか又は修正されたことを特徴とする請求項に記載のプログラムThe program according to claim 8 , wherein the direction of the pseudo-normal vector is maintained or corrected as a direction of a normal vector of a vertex constituting the three-dimensional polygon data. 請求項1乃至請求項のいずれか1項に記載のプログラムを記録したコンピュータ読取可能な記録媒体。The computer-readable recording medium which recorded the program of any one of Claim 1 thru | or 9 . 3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置において、
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、
を備え、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とする画像生成装置。
In an image generation apparatus that generates an image in which a large number of object characters, a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data, are mixed in a 3D virtual space,
Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is to be drawn by the two-dimensional character;
Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And drawing means for drawing the two-dimensional character and shear deformation in response to write data to the angle formed by the vertical component direction of the relative angle,
An image generating apparatus comprising: a plurality of all sky directions, wherein a direction in which the width change amount is large is divided more finely than a direction in which the width change amount is small .
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置において、In an image generation apparatus that generates an image in which a large number of object characters, a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data, are mixed in a 3D virtual space,
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、  Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is to be drawn by the two-dimensional character;
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And drawing means for drawing the two-dimensional character and shear deformation in response to write data to the angle formed by the vertical component direction of the relative angle,
を備え、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とする画像生成装置。The prepared two-dimensional sprite data for all directions in all directions is prepared as a plurality of animation data so as to correspond to a plurality of motions that can be taken by the three-dimensional character having limbs or feet, An image generating apparatus, wherein two-dimensional sprite data corresponding to a frame with little dynamic change is omitted from the animation data.
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成装置において、In an image generation apparatus that generates an image in which a large number of object characters, a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data, are mixed in a 3D virtual space,
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定する決定手段と、  Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera A determining means for determining that an object character positioned inside and outside the predetermined distance or exceeding the predetermined number is to be drawn by the two-dimensional character;
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する描画手段と、Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And drawing means for drawing the two-dimensional character and shear deformation in response to write data to the angle formed by the vertical component direction of the relative angle,
を備え、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とする画像生成装置。And the two-dimensional sprite data includes vertex coordinates and a pseudo-normal vector for shading so as to correspond to the three-dimensional polygon data.
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定し、
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、
ステップを含み、前記全天周多数方向は、前記幅の変化量の大きい方向間が前記幅の変化量の小さい方向間に比べて細かく区分されていることを特徴とする画像生成方法。
An image generation method for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space,
Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera Determining that an object character positioned within and outside the predetermined distance or exceeding the predetermined number is to be drawn with the two-dimensional character;
Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn in step 2, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And shear deformation to render the two-dimensional character in accordance with write data to the angle formed by the vertical component direction of the relative angle,
Step only contains the entire Tenshu many directions, the image generation method characterized by inter direction of larger amount of change in the width is finely divided than between small direction-changing amount of said width.
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、An image generation method for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space,
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決定し、Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera Determining that an object character positioned within and outside the predetermined distance or exceeding the predetermined number is to be drawn with the two-dimensional character;
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn with the two-dimensional character, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and combined so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And shear deformation to render the two-dimensional character in accordance with write data to the angle formed by the vertical component direction of the relative angle,
ステップを含み、前記予め用意された全天周多数方向の2次元スプライトデータは、手足又は足を有する前記3次元キャラクタがとり得る複数のモーションに対応するように複数のアニメーションデータとして準備されており、前記アニメーションデータのうち動的変化の少ないフレームに対応する2次元スプライトデータが省かれたことを特徴とする画像生成方法。The two-dimensional sprite data in all directions including the steps is prepared as a plurality of animation data so as to correspond to a plurality of motions that can be taken by the three-dimensional character having limbs or feet. An image generation method, wherein two-dimensional sprite data corresponding to a frame with little dynamic change is omitted from the animation data.
3次元仮想空間上に3次元ポリゴンデータで描画される3次元キャラクタと2次元スプライトデータで描画される2次元キャラクタとの多数のオブジェクトキャラクタを混在させた画像を生成する画像生成方法であって、An image generation method for generating an image in which a large number of object characters of a 3D character drawn with 3D polygon data and a 2D character drawn with 2D sprite data are mixed in a 3D virtual space,
仮想カメラの位置及び方向情報と前記オブジェクトキャラクタの位置情報とに基づいて、前記仮想カメラの視界内かつ所定距離内に位置する所定数内のオブジェクトキャラクタを前記3次元キャラクタで、前記仮想カメラの視界内かつ前記所定距離の外に位置するか又は前記所定数を越えるオブジェクトキャラクタを前記2次元キャラクタで描画すると決Based on the position and direction information of the virtual camera and the position information of the object character, a predetermined number of object characters located within the visual field of the virtual camera and within a predetermined distance are the three-dimensional characters, and the visual field of the virtual camera It is determined that an object character that is located outside the predetermined distance or exceeds the predetermined number is drawn with the two-dimensional character. 定し、And
前記3次元仮想空間上の前記オブジェクトキャラクタの位置に、前記オブジェクトキャラクタの位置と前記仮想カメラの位置とを結ぶ方向と、前記オブジェクトキャラクタの正面方向とがなす相対角度に基づいて、前記3次元キャラクタで描画すると決定したオブジェクトキャラクタについて前記3次元キャラクタを描画し、前記2次元キャラクタで描画すると決定したオブジェクトキャラクタについて3次元ポリゴンデータのレンダリング画像に基づいて予め用意された全天周多数方向の2次元スプライトデータの中から前記相対角度の水平方向成分がなす角度に最も近い2つの2次元スプライトデータを選択して前記仮想カメラから前記相対角度で前記オブジェクトキャラクタをみたときの幅となるように合成し、該合成された2次元スプライトデータを前記相対角度の垂直成分方向がなす角度に応じてせん断変形して前記2次元キャラクタを描画する、Based on the relative angle formed by the direction connecting the position of the object character and the position of the virtual camera to the position of the object character in the three-dimensional virtual space and the front direction of the object character, The three-dimensional character is drawn with respect to the object character determined to be drawn with the two-dimensional character, and the object character determined to be drawn with the two-dimensional character is preliminarily prepared based on the rendering image of the three-dimensional polygon data. From the sprite data, two two-dimensional sprite data closest to the angle formed by the horizontal component of the relative angle are selected and synthesized so as to have a width when the object character is viewed from the virtual camera at the relative angle. , The synthesized two-dimensional scan And shear deformation to render the two-dimensional character in accordance with write data to the angle formed by the vertical component direction of the relative angle,
ステップを含み、前記2次元スプライトデータは、前記3次元ポリゴンデータに対応するように頂点座標及びシェーディング用の疑似法線ベクトルを予め含むことを特徴とする画像生成方法。An image generating method, wherein the two-dimensional sprite data includes vertex coordinates and a pseudo-normal vector for shading in advance so as to correspond to the three-dimensional polygon data.
JP2001334010A 2001-10-31 2001-10-31 Program, recording medium, image generation apparatus, and image generation method Expired - Fee Related JP3760341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001334010A JP3760341B2 (en) 2001-10-31 2001-10-31 Program, recording medium, image generation apparatus, and image generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001334010A JP3760341B2 (en) 2001-10-31 2001-10-31 Program, recording medium, image generation apparatus, and image generation method

Publications (2)

Publication Number Publication Date
JP2003141560A JP2003141560A (en) 2003-05-16
JP3760341B2 true JP3760341B2 (en) 2006-03-29

Family

ID=19149203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001334010A Expired - Fee Related JP3760341B2 (en) 2001-10-31 2001-10-31 Program, recording medium, image generation apparatus, and image generation method

Country Status (1)

Country Link
JP (1) JP3760341B2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4528008B2 (en) * 2004-03-24 2010-08-18 株式会社バンダイナムコゲームス Program, information storage medium, and image generation system
JP4180065B2 (en) * 2005-05-13 2008-11-12 株式会社スクウェア・エニックス Image generation method, image generation apparatus, and image generation program
JP4177381B2 (en) 2006-03-01 2008-11-05 株式会社スクウェア・エニックス Image generation method, image generation apparatus, and image generation program
JP2007312938A (en) * 2006-05-24 2007-12-06 Aruze Corp Game machine and simulation program
JP5320334B2 (en) * 2009-09-24 2013-10-23 株式会社東芝 Image processing apparatus and program
US8411092B2 (en) * 2010-06-14 2013-04-02 Nintendo Co., Ltd. 2D imposters for simplifying processing of plural animation objects in computer graphics generation
JP6960214B2 (en) * 2016-01-29 2021-11-05 グリー株式会社 Programs, game control methods, and information processing equipment
JP6208785B2 (en) * 2016-01-29 2017-10-04 グリー株式会社 Program, game control method, and information processing apparatus
JP6823946B2 (en) * 2016-06-13 2021-02-03 三菱プレシジョン株式会社 How to draw figures, drawing devices and simulators
JP7335695B2 (en) * 2018-12-28 2023-08-30 株式会社バンダイナムコエンターテインメント Image generation system and program
JP7740241B2 (en) * 2020-07-01 2025-09-17 ソニーグループ株式会社 Information processing device, information processing method, and program
CN116440495A (en) * 2022-01-07 2023-07-18 腾讯科技(深圳)有限公司 Scene picture display method and device, terminal and storage medium
CN117919704A (en) * 2024-02-19 2024-04-26 网易(杭州)网络有限公司 Virtual scene rendering method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JP2003141560A (en) 2003-05-16

Similar Documents

Publication Publication Date Title
US7116329B2 (en) Image processing method
US5966132A (en) Three-dimensional image synthesis which represents images differently in multiple three dimensional spaces
US20090244064A1 (en) Program, information storage medium, and image generation system
JPWO1995035139A1 (en) Three-dimensional simulator device and image synthesis method
US7277571B2 (en) Effective image processing, apparatus and method in virtual three-dimensional space
JP3760341B2 (en) Program, recording medium, image generation apparatus, and image generation method
JP4305903B2 (en) Image generation system, program, and information storage medium
JP4161613B2 (en) Image processing method
JP3748451B1 (en) Program, information storage medium, and image generation system
JP4717622B2 (en) Program, information recording medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JPH1074270A (en) Three-dimensional game device and information storage medium
JP4749198B2 (en) Program, information storage medium, and image generation system
JP2010033297A (en) Program, information storage medium, and image generation system
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4786389B2 (en) Program, information storage medium, and image generation system
JP2006252426A (en) Program, information storage medium, and image generation system
JP2011215724A (en) Program, information storage medium, and image generation system
JP2011095937A (en) Program, information storage medium and image generation system
JP4806578B2 (en) Program, information storage medium, and image generation system
JP4913399B2 (en) Program, information storage medium, and image generation system
JP4662260B2 (en) Program, information storage medium, and image generation system
JP4624527B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4641831B2 (en) Program, information storage medium, and image generation system
JP2010033285A (en) Program, information storage medium, and image generation system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050802

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050921

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051222

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120120

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20150120

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees