JP3795580B2 - Drawing apparatus and drawing method - Google Patents

Drawing apparatus and drawing method Download PDF

Info

Publication number
JP3795580B2
JP3795580B2 JP16430296A JP16430296A JP3795580B2 JP 3795580 B2 JP3795580 B2 JP 3795580B2 JP 16430296 A JP16430296 A JP 16430296A JP 16430296 A JP16430296 A JP 16430296A JP 3795580 B2 JP3795580 B2 JP 3795580B2
Authority
JP
Japan
Prior art keywords
dimensional
polygon
rule
data
unit
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
JP16430296A
Other languages
Japanese (ja)
Other versions
JPH1011611A (en
Inventor
禎治 豊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Interactive Entertainment Inc
Original Assignee
Sony Computer Entertainment Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Computer Entertainment Inc filed Critical Sony Computer Entertainment Inc
Priority to JP16430296A priority Critical patent/JP3795580B2/en
Publication of JPH1011611A publication Critical patent/JPH1011611A/en
Application granted granted Critical
Publication of JP3795580B2 publication Critical patent/JP3795580B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、描画装置および描画方法に関し、特に、例えば、ビデオゲーム機や、グラフィックコンピュータシステム、エフェクタなどにおいて、共有頂点型や独立頂点型などの異なるデータ形式で表現される単位図形(ポリゴン)が混在している画像を、その画質を損ねることなく描画することができるようにする描画装置および描画方法に関する。
【0002】
【従来の技術】
従来の、例えばビデオゲーム機などにおいては、3次元のオブジェクト(画像)を表示する場合に、そのオブジェクトを複数のポリゴン(単位図形)に分解し、これらのポリゴンそれぞれを描画することで、オブジェクト全体を描画するようになされている。従って、このようにして描画される画像は、ポリゴンの組合せにより定義されているということができる。
【0003】
ところで、ポリゴンのデータの表現形式には、例えば、共有頂点型や独立頂点型などがあり、共有頂点型で表現されたポリゴン(以下、適宜、3次元ポリゴンという)は、図9(A)に示すように、隣接するポリゴンと、境界を共有して描画され、独立頂点型で表現されたポリゴン(以下、適宜、2次元スプライトという)は、図9(B)に示すように、隣接するポリゴンと、境界を共有せずに描画される。
【0004】
なお、図9は、4角形(正方形)のポリゴンをメッシュ状に並べた様子を示している。また、3次元ポリゴンは、3次元空間における図形を透視変換することにより生成され、2次元スプライトは、2次元空間(2次元平面)における図形を平行移動することにより生成される。
【0005】
3次元ポリゴンは、隣接するポリゴンとの境界を共有するため、例えば、4角形の3次元ポリゴンは、図10(A)または図10(B)に点線で示すように、その右および下の境界、または右上および右下の境界は描画しないという描画規則(以下、適宜、共有頂点描画規則という)にしたがって描画される。なお、図10(後述する図11においても同様)におけるTの向きは、テクスチャの向きを表している。
【0006】
一方、2次元スプライトは、隣接するポリゴンとの境界を共有しないため、例えば、四角形の2次元スプライトは、図11に示すように、いずれの境界も省略せずに描画するという描画規則(以下、適宜、独立頂点描画規則という)にしたがって描画される。
【0007】
従って、例えば、5×5ピクセルの4角形の3次元ポリゴンを、横に3個、縦に2個だけメッシュ状に並べたものを、共有頂点描画規則にしたがって描画した場合、図12に示すような画像が得られる。なお、図12において、実線の小さな四角形(正方形)が、画素を表しており、その中に数字(この数字は16進数で表してある)を記載してあるものが、描画が行われた画素を表している。
【0008】
図12では、点線で囲んである四角形が、1つの3次元ポリゴンを表している。例えば、最も左上の3次元ポリゴンの描画が行われる場合においては、その右および下の境界の、番号04,14,24、34、および40乃至44の画素は描画されないが、番号04,14,24、34、および44の画素は、その右に隣接する3次元ポリゴンが描画されるときに、また、番号40乃至44の画素は、その下に隣接する3次元ポリゴンが描画されるときに、それぞれ描画される。他のポリゴンについても同様にして描画が行われる。
【0009】
また、図12においては、上から2つめの3次元ポリゴンの下に隣接するポリゴンは存在しないので、上から9行目の画素への描画は行われない。即ち、上から2つめの3次元ポリゴンが描画されるときには、共有頂点描画規則にしたがい、その右および下の境界は描画されず、また、その下に隣接するポリゴンも存在しないため、上から9行目の画素への描画は行われない。同様に、左から3番目の3次元ポリゴンの右に隣接するポリゴンも存在しないので、左から13列目の画素への描画も行われない。
【0010】
従って、図12では、上から5行目の、番号40乃至4Bの画素、および左から5列目と9列目の、番号04,14,24,34,44,54,64,74,08,18,28,38,48,58,68,78の画素が、3次元ポリゴンどうしで共有されている。
【0011】
一方、例えば、4×4ピクセルの4角形の2次元スプライトを、図12における場合と同様に、横に3個、縦に2個だけメッシュ状に並べたものを、独立頂点描画規則にしたがって描画した場合、図13に示すような画像が得られる。なお、図13においても、実線の小さな四角形が、画素を表しており、その中に数字(この数字は16進数で表してある)を記載してあるものが、描画が行われた画素を表している。
【0012】
図13では、点線で囲んである四角形が、1つの2次元スプライトを表している。2次元スプライトは、隣接するポリゴン(2次元スプライト)と境界を共有せず、また、独立頂点描画規則によれば、境界の描画は省略されないから、図13に示すように、12×8(=(4×3)×(4×2))の長方形の範囲に描画がなされた画像が得られる。
【0013】
【発明が解決しようとする課題】
ところで、例えば、3次元ポリゴンにより画像を描画するビデオゲーム機などにおいて、3次元ポリゴンと2次元スプライトとが混在する画像を描画した場合、いずれも共有頂点描画規則にしたがって描画されることになる。このため、3次元ポリゴンによる画像は、図12に示したように描画されるが、2次元スプライトによる画像は、その2次元スプライトの境界(エッジ)がかけたものとなる課題があった。
【0014】
即ち、2次元スプライトは、隣接するポリゴンと境界を共有しないため、例えば、4×4ピクセルの4角形の2次元スプライトを、横に3個、縦に2個だけメッシュ状に並べたものを、独立頂点描画規則ではなく、共有頂点描画規則にしたがって描画すると、図14に示すように、各2次元スプライトの右および下の境界が描画されず、いわばエッジ欠けした画像が得られる課題があった。
【0015】
また、2次元スプライトを、共有頂点描画規則にしたがって描画すると、テクスチャに不自然さが生じる場合があった。
【0016】
即ち、例えば、図15(A)は、4×4の四角形の2次元スプライトを独立頂点描画規則にしたがって描画した場合を示している。なお、図15においては、実線の小さな四角形が、画素を表している。また、その中の数字(この数字は16進数で表してある)は、テクスチャマッピングのためのテクスチャアドレスを表しているものとする。
【0017】
いま、図15(A)において、2次元スプライトの最も左上、右上、左下、または右下の画素の座標が、それぞれ(0,0),(3,0),(0,3)、または(3,3)であるとし、このような4頂点を有する2次元スプライトを、横方向に2倍するとする。この場合、独立頂点描画規則にしたがえば、例えば、図15(B)に示すように、(0,0),(7,0),(0,3)、および(7,3)を4頂点とする2次元スプライトが得られる。
【0018】
ここで、2次元スプライトを横方向に2倍したことに伴い、テクスチャアドレスも変更する必要がある。即ち、図15(A)において、横方向のテクスチャアドレスの変化量は3であり、図15(B)において、2次元スプライトの横方向の変化量は7であるから、2次元スプライトを横方向に2倍した場合、テクスチャアドレスが3/7ずつ変化して行くようにする必要がある。このため、図15(B)において、例えば、最上行のテクスチャアドレスは、最も左の画素から、0/7,3/7,6/7,9/7,12/7,15/7,18/7,21/7となるが、テクスチャアドレスは、小数点以下を四捨五入して用いられるため、実際には、0,0,1,1,2,2,3,3となる。
【0019】
従って、この場合、図15(A)に示した、元の2次元スプライトについてのテクスチャアドレス以外は出現しない。
【0020】
一方、図16(A)は、例えば、5×5の四角形の2次元スプライトを共有頂点描画規則にしたがって描画した場合を示している。なお、図16においても、実線の小さな四角形が、画素を表しており、また、その中の数字(この数字は16進数で表してある)は、テクスチャマッピングのためのテクスチャアドレスを表しているものとする。
【0021】
いま、図15(B)において、2次元スプライトの最も左上、右上、左下、または右下の画素の座標が、それぞれ(0,0),(4,0),(0,4)、または(4,4)であるとし、このような4頂点を有する2次元スプライトを、横方向に2倍するとする。この場合、共有頂点描画規則にしたがうと、例えば、図16(B)に示すように、(0,0),(8,0),(0,4)、および(8,4)を4頂点とする2次元スプライトが得られる。
【0022】
ここで、この場合も、2次元スプライトを横方向に2倍したことに伴い、テクスチャアドレスも変更する必要がある。即ち、図16(A)において、横方向のテクスチャアドレスの変化量は4であり(図16(A)においては、上から4行目と左から4列目のテクスチャアドレス04,14,24,34、および40乃至44が記載されていないが、これは、共有頂点描画規則にしたがい、上から4行目と左から4列目の画素への描画が行われないためである)、図16(B)において、2次元スプライトの横方向の変化量は8であるから、2次元スプライトを横方向に2倍した場合、テクスチャアドレスが4/8ずつ変化して行くようにする必要がある。
【0023】
このため、図16(B)において、例えば、最上行のテクスチャアドレスは、最も左の画素から、0/8,4/8,8/8,12/8,16/8,20/8,24/8,28/8となるが、テクスチャアドレスは、小数点以下を四捨五入して用いられるため、実際には、0,1,1,2,2,3,3,4,4となる(但し、共有頂点描画規則にしたがい、最後のテクスチャアドレス4に対応する画素(最も右の画素)への描画は行われない)。
【0024】
従って、この場合、図16(A)に示した、元の2次元スプライトについてのテクスチャアドレス以外に、テクスチャアドレス04,14,24,34が出現する。
【0025】
以上のように、2次元スプライトを、共有頂点描画規則にしたがって描画すると、元の2次元スプライトにないテクスチャが現れ、画像が不自然なものとなることがあった。
【0026】
本発明は、このような状況に鑑みてなされたものであり、複数のデータ形式のポリゴンが混在していても、自然で、画質の劣化(エッジ欠け)のない画像を得ることができるようにするものである。
【0027】
【課題を解決するための手段】
請求項1に記載の描画装置は、単位図形を描画するための描画規則を選択する選択手段と、選択手段により選択された描画規則にしたがって、単位図形を描画する描画手段とを備えることを特徴とする。
【0028】
請求項4に記載の描画方法は、単位図形を描画するための描画規則を選択し、その描画規則にしたがって、単位図形を描画することを特徴とする。
【0029】
請求項1に記載の描画装置および請求項4に記載の描画方法においては、単位図形を描画するための描画規則を選択し、その描画規則にしたがって、単位図形を描画するようになされている。
【0030】
【発明の実施の形態】
図1は、本発明を適用したビデオゲーム機の一実施例の構成を示す平面図である。なお、図2に、その正面図(図1において、下方向から見た図)を、図3に、その右側面の側面図(図1において、向かって右方向から見た側面図)を、それぞれ示す。
【0031】
ビデオゲーム機は、ゲーム機本体2、このゲーム機本体2と接続される略四角形状をなした接続端子部26を備えた操作装置17、および同じくゲーム機本体2と接続される記録装置38とから構成されている。
【0032】
ゲーム機本体2は、略四角形状に形成され、その中央の位置に、ゲームを行うためのプログラムやデータが記録されたゲーム用記録媒体を装着するディスク装着部3が設けられている。なお、本実施例では、ディスク装着部3には、例えば、図4に示すようなCD(Compact Disc)−ROM51がゲーム用記録媒体として着脱可能になされている。但し、ゲーム用記録媒体は、ディスクに限定されるものではない。
【0033】
ディスク装着部3の左側には、ゲームをリセットするときなどに操作されるリセットスイッチ4と、電源のオン/オフをするときに操作される電源スイッチ5とが設けられており、その右側には、ディスク装着部3を開閉するときに操作されるディスク操作スイッチ6が設けられている。さらに、ゲーム機本体2の正面には、操作装置17および記録装置38を1組として接続することのできる接続部7A,7Bが設けられている。なお、本実施例では、2組の操作装置17および記録装置38を接続することができるように、接続部7A,7Bが設けられているが、接続部は、2組以外の組数の操作装置17および記録装置38を接続することができる数だけ設けるようにすることが可能である。
【0034】
接続部7A,7Bは、図2および図3に示すように、2段に形成され、上段には記録装置38と接続する記録挿入部8を設け、下段には操作装置17の接続端子部26と接続する接続端子挿入部12を設けた構造となっている。
【0035】
記録挿入部8の挿入孔は、横方向に長い長方形状に形成し、その下側の両端のコーナーを上側の両端のコーナーに比べて丸みを多くして、記録装置38が逆に挿入できない構造となっている。さらに、記録挿入部8には、内部の電気的接続を得る接続端子(図示せず)を保護するためのシャッタ9が設けられている。
【0036】
シャッタ9は、例えば、コイルねじりバネ状に形成されたスプリングなどの弾性体(図示せず)により常時外側に向けて付勢された状態で取り付けられている。従って、シャッタ9は、記録装置38を差し込む時には記録装置38を挿入する先端側で奥側に開けられ、記録装置38を抜いた時には弾性体の付勢力により戻され、自動的に閉じた状態となって、内部の接続端子の防埃の役目をし、さらに外部の衝撃から守る役目をする。
【0037】
接続端子挿入部12は、図2および図3に示すように、横方向に長い長方形状をした挿入孔の下側の両端のコーナーを上側の両端のコーナーに比べて丸みを多くした形状にして操作装置17の接続端子部26が逆に入らない構造であり、且つ記録装置38も入らないように挿入孔の形状を異にした構造となっている。このようにして、記録装置38と操作装置17の挿入孔の大きさ及び形状を異にして互いに入れ間違いのないようにした構造となっている。
【0038】
操作装置17は、図1に示すように、両手の掌で挟持して5本の指が自由自在に動いて操作できる構造をしており、左右対象に連設した丸型形状に形成された第1及び第2の操作部18,19、この第1及び第2の操作部18,19から角状に突出形成した第1及び第2の支持部20,21、第1及び第2の操作部18,19の中間位置の括れた部分に設けたセレクトスイッチ22およびスタートスイッチ23、第1及び第2の操作部18,19の前面側に突出形成した第3及び第4の操作部24,25、並びにゲーム機本体2とケーブル27を介して電気的接続をする接続端子部26とから構成されている。尚、ケーブル27を介さなくともよい構成とすることもできる。
【0039】
接続端子部26は、ゲーム機本体2と電気的接続をするためのケーブル27の先端に取り付けられており、図3に示すように、その左右の両側面には、凹凸状のある形状にして、いわゆるギザギザ模様にした滑り止め加工(例えば、ローレット加工など)が施されている把持部が設けられている。なお、接続端子部26に設けられた把持部は、いわゆる抜き差し部を形成し、その大きさ、即ち、その幅Wと長さLは、例えば、後述する記録装置38の把持部と同一とされている。
【0040】
記録装置38は、例えばフラッシュメモリなどの不揮発性メモリを内蔵しており、その両側面には、例えば、接続端子部26における場合と同様に構成される把持部(図3)が設けられ、ゲーム機本体2に対し、容易に着脱することができるようになされている。なお、記録装置38には、例えば、ゲームを一時的に中断する場合に、そのときの状態が記憶されるようになされており、これにより、再起動の際に、そこからデータを読み出すことで、そのデータに対応した状態、即ち、中断時の状態から、ゲームを再開することができるようになされている。
【0041】
以上のように構成されるビデオゲーム機によりゲームを行う場合においては、ユーザは、例えば、操作装置17を、ゲーム機本体2に接続し、さらに、必要に応じて、記録装置38も、ゲーム機本体2に接続する。また、ユーザは、ディスク操作スイッチ6を操作することにより、ゲーム用記録媒体としてのCD−ROM51を、ディスク装着部3にセットし、電源スイッチ5を操作することにより、ゲーム機本体2の電源をオンにする。これにより、ゲーム機本体2においては、ゲームのための画像および音声が再生されるので、ユーザは、操作装置17を操作することによりゲームを行う。
【0042】
次に、図5は、図1のゲーム機本体2の電気的構成例を示している。
【0043】
このゲーム機本体2は、各ブロックにおいてデータをやりとりするためのバスとして、メインバス101およびサブバス102の2種類のバスを有しており、このメインバス101とサブバス102とは、バスコントローラ116を介して接続されている。
【0044】
メインバス101には、バスコントローラ116の他、例えばマイクロプロセッサなどからなるメインCPU(Central Processing Unit)111、例えばRAM(Random Access Memory)などでなるメインメモリ112、メインDMAC(Direct Memory Access Controller)113、MDEC(MPEG Decorder)、GPU115(選択手段)(描画手段)、およびPPP(Programable Preprocessor)120が接続されている。
【0045】
サブバス102には、バスコントローラ116の他、GPU115、例えばメインCPU111と同様に構成されるサブCPU121、例えばメインメモリ112と同様に構成されるサブメモリ122、サブDMAC123、オペレーティングシステムなどが格納されたROM(Read Only Memory)124、SPU(Sound Processing Unit)125、ATM(Asynchronous Transmission Mode)通信部126、補助記憶装置127、および入力デバイス用I/F(Interface)128が接続されている。
【0046】
なお、ここでは、メインバス101では、高速でデータのやりとりが行われるようになされており、サブバス102では、低速でデータのやりとりが行われるようになされている。即ち、低速でやりとりが可能なデータについては、サブバス102を用いることで、メインバス101の高速性を確保するようになされている。
【0047】
バスコントローラ116は、メインバス101とサブバス102とを切り離したり、メインバス101にサブバス102を接続したりするようになされている。メインバス101とサブバス102とが切り離された場合、メインバス101上からは、メインバス101に接続されたデバイスのみにしかアクセスできず、また、サブバス102上からも、サブバスに接続されたデバイスのみにしかアクセスすることができないが、メインバス101にサブバス102が接続された場合には、メインバス101およびサブバス102のいずれからであっても、いずれのデバイスにもアクセスすることができる。なお、例えば、装置の電源がオンにされた直後などの初期状態においては、バスコントローラ116はオープン状態になっている(メインバス101とサブバス102とが接続された状態となっている)。
【0048】
メインCPU111は、メインメモリ112に記憶されたプログラムにしたがって各種の処理を行うようになされている。即ち、メインCPU111は、例えば、装置が起動されると、バスコントローラ116を介して、サブバス102上にある(サブバス102に接続された)ROM124からブートプログラムを読み出して実行する。これにより、メインCPU111は、補助記憶装置127からアプリケーションプログラム(ここでは、ゲームのプログラム)および必要なデータ(例えば、ポリゴンなどのデータ)を、メインメモリ112やサブメモリ112にロードさせる。そして、メインCPU111は、このようにしてメインメモリ112にロードさせたプログラムを実行する。
【0049】
メインCPU111は、GTE(Geometry Transfer Engine)117を内蔵しており、このGTE117は、例えば複数の演算を並列に実行する並列演算機構を備え、メインCPU111からの要求に応じて、座標変換や、光源計算、3次元ポリゴンの透視変換、2次元スプライトの回転、拡大、縮小処理などのジオメトリ処理を高速に行うようになされている。このように、GTE117は、メインCPU111からの要求にしたがった処理(ジオメトリ処理)を行うことにより、表示すべき画像を構成するポリゴン(本明細書中では、3点以上の頂点を有する多角形の他、直線(線分)や点も含まれるものとする)のデータ(以下、適宜、ポリゴンデータという)を生成し、メインCPU111に供給する。
【0050】
メインCPU111は、GTE117からポリゴンデータを受信すると、そのポリゴンデータをパケット化し、メインバス101を介してPPP120またはGPU115に転送するようになされている。また、メインCPU111は、必要に応じて、後述するGPU115において用いられる描画規則を指示するためのコマンド(以下、適宜、描画コマンドという)もパケット化して、GPU115に送信するようになされている。
【0051】
なお、メインCPU111は、キャッシュメモリ(Cache)119を内蔵しており、メインメモリ112にアクセスする代わりに、このキャッシュメモリ119にアクセスすることで、処理の高速化を図るようになされている。
【0052】
メインメモリ112は、上述したように、プログラムやデータなどを記憶するになされている。メインDMAC113は、メインバス101上のデバイスを対象に、DMA転送の制御を行うようになされている。但し、バスコントローラ116がオープン状態にあるときは、メインDMAC113は、サブバス102上のデバイスをも対象として制御を行うようになされている。MDEC114は、メインCPU111と並列に動作可能なI/Oデバイスで、画像伸張エンジンとして機能するようになされている。即ち、MDEC114は、MPEG(Moving Picture Experts Group)符号化されて圧縮された画像データを復号化するようになされている。
【0053】
GPU115は、レンダリングプロセッサとして機能するようになされている。即ち、GPU115は、メインCPU111またはPPP120から送信されてくるパケットを受信し、そのパケットにポリゴンデータとして配置されている、例えば、ポリゴンの頂点の色データと奥行き(視点からの深さ)を示すZ値に基づいて、ポリゴンに対応する画像データを、グラフィックメモリ118に書き込む(描画する)レンダリング処理を行うようになされている。さらに、GPU115は、グラフィックメモリ118に書き込んだ画像データを読み出し、ビデオ信号として出力するようにもなされている。
【0054】
なお、GPU115は、必要に応じて、メインDMAC113、あるいはサブバス102上のデバイスからもパケットを受信し、そのパケットに配置されているポリゴンデータにしたがってレンダリング処理を行うようになされている。
【0055】
また、GPU115は、例えば、共有頂点描画規則や、独立頂点描画規則などを含む複数の描画規則を記憶しており、その中から所定のものを選択し、その選択した描画規則にしたがって、ポリゴンの描画(テクスチャマッピングその他のレンダリング処理)を行うようになされている。なお、描画規則の選択は、メインCPU111から送信されてくる描画コマンドにしたがって行われるようになされている。
【0056】
グラフィックメモリ118は、例えば、DRAMなどで構成され、GPU115から供給される画像データを一時記憶するようになされている。なお、グラフィックメモリ118は、例えば、2画面(2フレーム)分の画像データを記憶することができる領域を有しており、これにより、一方の領域に書き込みが行われている場合には、他方の領域から読み出しを行うことができるようになされている。
【0057】
PPP120は、メインCPU111またはメインDMAC113から送信されてくるパケットを受信し、GTE111におけるジオメトリ処理の一部を負担するようになされている。なお、PPP120において処理されたパケットは、メインバス101を介さず、GPU115に、直接転送されるようになされている。
【0058】
サブCPU121は、サブメモリ122に記憶されたプログラムを読み出して実行することにより、各種の処理を行うようになされている。サブメモリ122には、メインメモリ112と同様に、プログラムや必要なデータが記憶されるようになされている。サブDMAC123は、サブバス102上のデバイスを対象として、DMA転送の制御を行うようになされている。なお、サブDMAC123は、バスコントローラ116がクローズ状態にあるとき(メインバス101とサブバス102とが切り離されている状態にあるとき)のみ、バス権を獲得するようになされている。ROM124は、上述したようにブートプログラムや、オペレーティングシステムなどを記憶している。なお、ROM124には、メインCPU111およびサブCPU121の両方のプログラムが記憶されている。また、ROM124は、ここでは、アクセス速度の遅いものが用いられており、そのため、サブバス102上に設けられている。
【0059】
SPU125は、サブCPU121またはサブDMAC123から送信されてくるパケットを受信し、そのパケットに配置されているサウンドコマンドにしたがって、サウンドメモリ129から音声データを読み出すようになされている。そして、SPU25は、読み出した音声データを、図示せぬスピーカに供給して出力させるようになされている。ATM通信部126は、例えば、図示せぬ公衆回線を介して行われる通信の制御(ATM通信の制御)を行うようになされている。これにより、ビデオゲーム機のユーザは、他のビデオゲーム機のユーザと直接、あるいは所定のセンタ局を介してデータのやりとりをすることで対戦することができるようになされている。
【0060】
補助記憶装置127は、例えば、ディスクドライブなどで、CD−ROM51(図1、図4)に記録されている情報(プログラム、データ)を再生するようになされている。また、補助記憶装置127は、記録装置38(図1)に対する情報の記録や読み出しも行うようになされている。入力デバイス用I/F128は、コントロールパッドとしての操作装置17(図1)の操作に対応する信号や、他の装置によって再生された画像や音声などの外部入力を受け付けるためのインターフェイスで、外部からの入力に応じた信号を、サブバス102上に出力するようになされている。サウンドメモリ129は、音声データを記憶している。
【0061】
以上のように構成されるゲーム機本体2においては、装置の電源がオンにされると、メインCPU111において、ブートプログラムがROM124から読み出されて実行されることにより、補助記憶装置127にセットされたCD−ROM51からプログラムおよびデータが読み出され、メインメモリ112およびサブメモリ122に展開される。そして、メインCPU111またはサブCPU121それぞれにおいて、メインメモリ112またはサブメモリ122に展開されたプログラムが実行されることにより、ゲームの画像、音声が再生される。
【0062】
即ち、例えば、メインCPU111において、メインメモリ112に記憶されたデータにしたがって、所定の3次元画像を構成するポリゴンを描画するためのポリゴンデータが生成される。このポリゴンデータは、パケット化され、例えば、GPU115に供給される。GPU115は、メインCPU111からのパケットを受信し、そのパケットに配置されているポリゴンデータにしたがって、レンダリング処理を行い、これにより、画像データを、グラフィックメモリ118に書き込む。そして、GPU115は、グラフィックメモリ118から、既に書き込んだフレームの画像データを読み出し、ビデオ信号として出力する。これにより、ゲームの画面(画像)が表示される。
【0063】
一方、サブCPU121では、サブメモリ122に記憶されたデータにしたがって、音声の生成を指示するサウンドコマンドが生成される。このサウンドコマンドは、パケット化され、サブバス102を介して、SPU125に供給される。SPU125は、サブCPU121からのサウンドコマンドにしたがって、サウンドメモリ129から音声データを読み出して出力する。これにより、ゲームのBGM(Background Music)その他の音声が出力される。
【0064】
次に、図6のフローチャートを参照して、図5のゲーム機本体2におけるポリゴンの描画処理について、さらに説明する。なお、CD−ROM51(図1、図4)には、3次元ポリゴンと2次元スプライトのデータが混在して記憶されており、メインCPU111からGPU115に転送されるパケットに配置されたポリゴンデータとしては、この3次元ポリゴンと2次元スプライトとの2種類があるものとする。
【0065】
ポリゴンの描画が行われる場合においては、まず最初に、ステップS1において、そのポリゴンが、3次元ポリゴンであるか、または2次元スプライトであるかが判定され、3次元ポリゴンまたは2次元スプライトであると判定された場合、ステップS2またはS3に進み、描画規則が共有頂点描画規則または独立頂点描画規則にそれぞれ設定される。そして、ステップS4に進み、その設定された描画規則にしたがって、ポリゴンの描画が行われる。
【0066】
即ち、メインCPU111は、ステップS1において、GPU115に転送するパケットが、3次元ポリゴンまたは2次元スプライトのうちのいずれのデータが配置されたパケットであるかを判定し、3次元ポリゴンまたは2次元スプライトのデータが配置されたパケットを、GPU115に転送する場合、その転送に先立って、共有頂点描画規則または独立頂点描画規則を用いるべきことを指示する描画コマンドを、GPU115に転送する。
【0067】
GPU115は、メインCPU111から転送されてきた描画コマンドにしたがい、ステップS3またはS4において、用いるべき描画規則として、共有頂点描画規則または独立頂点描画規則をそれぞれ選択し、その後、ステップS4において、その選択した描画規則にしたがって、メインCPU111から転送されてくるパケットに配置されたデータに対応するポリゴンを描画する。
【0068】
従って、このゲーム機本体2においては、3次元ポリゴンは共有頂点描画規則にしたがって、また、2次元スプライトは独立頂点描画規則にしたがって描画されるので、即ち、ゲーム機本体2によれば、3次元ポリゴンは、前述の図12と同様の図7に示すように描画され、2次元スプライトは、前述の図13と同様の図8に示すように描画されるので、3次元ポリゴンと2次元スプライトとが混在していても、画質の劣化のない画像を得ることができる。また、テクスチャに不自然さが生じることも防止することができる。
【0069】
なお、メインCPU111において、ポリゴンデータが配置されたパケットを送信するたびに、描画コマンドを送信するのは、処理が繁雑になるので、メインCPU111には、2次元スプライトのデータが配置されたパケットを送信した後に、3次元ポリゴンのデータが配置されたパケットを送信するときに、共有頂点描画規則を用いるべきことを指示する描画コマンドを送信させるとともに、3次元ポリゴンのデータが配置されたパケットを送信した後に、2次元スプライトのデータが配置されたパケットを送信するときに、独立頂点描画規則を用いるべきことを指示する描画コマンドを送信させるようにするのが望ましい。
【0070】
以上、本発明を、ビデオゲーム機に適用した場合について説明したが、本発明は、ビデオゲーム機の他、ポリゴン単位で画像の描画を行う、例えば、ビデオエフェクタや、コンピュータグラフィックシステム、その他の画像処理装置に適用可能である。
【0071】
なお、本実施例においては、3次元ポリゴンと2次元スプライトとが混在している場合を対象としたが、本発明は、その他のデータ形式のポリゴンが混在している場合にも適用可能である。
【0072】
また、上述したように、描画するポリゴンが、3次元ポリゴンから2次元スプライトに、または2次元スプライトから3次元ポリゴンに切り替わるときに、描画コマンドを送信するようにした場合には、3次元ポリゴンと、2次元スプライトとは、それぞれまとめて描画するようにするのが望ましい。この場合、描画コマンドの送信回数を低減することができる。
【0073】
さらに、本実施例では、ポリゴンデータが配置されたパケットとは別に、描画コマンドを送信するようにしたが、描画コマンドは、例えば、ポリゴンデータが配置されたパケットに含めて送信するようにすることも可能である。
【0074】
また、本発明は、例えば、ポリゴンの形状や、頂点の位置関係、その描画順に無関係に適用可能である。
【0075】
【発明の効果】
請求項1に記載の描画装置および請求項4に記載の描画方法によれば、単位図形を描画するための描画規則が選択され、その描画規則にしたがって、単位図形が描画される。従って、自然で、かつ画質の劣化のない画像を得ることが可能となる。
【図面の簡単な説明】
【図1】本発明を適用したビデオゲーム機の一実施例の構成を示す平面図である。
【図2】図1のビデオゲーム機の正面図である。
【図3】図1のビデオゲーム機の側面図である。
【図4】CD−ROM51を示す平面図である。
【図5】図1のゲーム機本体2の電気的構成例を示すブロック図である。
【図6】図5のゲーム機本体2におけるポリゴンの描画処理を説明するためのフローチャートである。
【図7】図5のゲーム機本体2による3次元ポリゴンの描画結果を示す図である。
【図8】図5のゲーム機本体2による2次元スプライトの描画結果を示す図である。
【図9】3次元ポリゴンおよび2次元スプライトを説明するための図である。
【図10】共有頂点描画規則を説明するための図である。
【図11】独立頂点描画規則を説明するための図である。
【図12】3次元ポリゴンを共有頂点描画規則にしたがって描画した場合の描画結果を示す図である。
【図13】2次元スプライトを独立頂点描画規則にしたがって描画した場合の描画結果を示す図である。
【図14】2次元スプライトを共有頂点描画規則にしたがって描画した場合の描画結果を示す図である。
【図15】2次元スプライトを横方向に2倍して、独立頂点描画規則にしたがって描画した場合の描画結果を示す図である。
【図16】2次元スプライトを横方向に2倍して、共有頂点描画規則にしたがって描画した場合の描画結果を示す図である。
【符号の説明】
111 メインCPU, 112 メインメモリ, 115 GPU(選択手段)(描画手段), 117 GTE, 118 グラフィックメモリ, 120 PPP
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a drawing apparatus and a drawing method, and in particular, unit graphics (polygons) expressed in different data formats such as a shared vertex type and an independent vertex type in, for example, video game machines, graphic computer systems, and effectors. The present invention relates to a drawing apparatus and a drawing method capable of drawing a mixed image without impairing the image quality.
[0002]
[Prior art]
In a conventional video game machine, for example, when a three-dimensional object (image) is displayed, the object is decomposed into a plurality of polygons (unit figures), and each of these polygons is drawn, whereby the whole object Has been made to draw. Therefore, it can be said that the image drawn in this way is defined by a combination of polygons.
[0003]
By the way, there are, for example, a shared vertex type and an independent vertex type in the polygon data expression format. Polygons expressed in the shared vertex type (hereinafter, appropriately referred to as three-dimensional polygons) are shown in FIG. As shown in FIG. 9B, a polygon drawn by sharing a boundary with an adjacent polygon and expressed as an independent vertex type (hereinafter referred to as a two-dimensional sprite as appropriate) And rendered without sharing boundaries.
[0004]
FIG. 9 shows a state where quadrangular (square) polygons are arranged in a mesh shape. A three-dimensional polygon is generated by perspective-transforming a graphic in the three-dimensional space, and a two-dimensional sprite is generated by translating the graphic in the two-dimensional space (two-dimensional plane).
[0005]
Since the three-dimensional polygon shares the boundary with the adjacent polygon, for example, the quadrangular three-dimensional polygon has its right and lower boundaries as shown by the dotted lines in FIG. 10 (A) or FIG. 10 (B). Or the upper right and lower right borders are drawn according to a drawing rule that does not draw (hereinafter referred to as a shared vertex drawing rule as appropriate). Note that the direction of T in FIG. 10 (also in FIG. 11 described later) represents the direction of the texture.
[0006]
On the other hand, since a two-dimensional sprite does not share a boundary with an adjacent polygon, for example, a rectangular two-dimensional sprite is drawn without omitting any boundary as shown in FIG. The drawing is performed according to an independent vertex drawing rule as appropriate.
[0007]
Therefore, for example, when a 3 × 5 pixel quadrangular three-dimensional polygon arranged in a mesh shape with three horizontally and two vertically is drawn according to the shared vertex drawing rule, as shown in FIG. Images can be obtained. In FIG. 12, a small square (square) with a solid line represents a pixel, and a number (the number is represented in hexadecimal) is written in the pixel on which drawing has been performed. Represents.
[0008]
In FIG. 12, a quadrangle surrounded by a dotted line represents one three-dimensional polygon. For example, when the upper left three-dimensional polygon is drawn, the pixels with the numbers 04, 14, 24, 34, and 40 to 44 at the right and lower boundaries are not drawn, but the numbers 04, 14, Pixels 24, 34, and 44 are displayed when a three-dimensional polygon adjacent to the right is drawn, and pixels 40 to 44 are displayed when a three-dimensional polygon adjacent thereto is drawn. Each drawn. Other polygons are similarly drawn.
[0009]
In FIG. 12, since there is no polygon adjacent below the second three-dimensional polygon from the top, drawing is not performed on the pixels in the ninth row from the top. That is, when the second three-dimensional polygon from the top is drawn, the right and bottom borders are not drawn according to the shared vertex drawing rule, and there are no polygons below it, so that the top 9 Drawing on the pixels on the line is not performed. Similarly, since there is no polygon adjacent to the right of the third three-dimensional polygon from the left, drawing is not performed on the pixels in the thirteenth column from the left.
[0010]
Accordingly, in FIG. 12, the pixels of the numbers 40 to 4B in the fifth row from the top, and the numbers 04, 14, 24, 34, 44, 54, 64, 74, 08 in the fifth and ninth columns from the left. , 18, 28, 38, 48, 58, 68, 78 are shared by the three-dimensional polygons.
[0011]
On the other hand, for example, a quadrilateral two-dimensional sprite of 4 × 4 pixels is drawn according to the independent vertex drawing rule in the same manner as in FIG. In such a case, an image as shown in FIG. 13 is obtained. In FIG. 13 as well, a small square with a solid line represents a pixel, and a numeral (the numeral is represented in hexadecimal) is a pixel on which drawing has been performed. ing.
[0012]
In FIG. 13, a quadrangle surrounded by a dotted line represents one two-dimensional sprite. The two-dimensional sprite does not share a boundary with an adjacent polygon (two-dimensional sprite), and the drawing of the boundary is not omitted according to the independent vertex drawing rule. Therefore, as shown in FIG. 13, 12 × 8 (= An image drawn in a rectangular range of (4 × 3) × (4 × 2)) is obtained.
[0013]
[Problems to be solved by the invention]
By the way, for example, in a video game machine that draws an image with a three-dimensional polygon, when an image in which a three-dimensional polygon and a two-dimensional sprite are mixed is drawn, both are drawn according to the shared vertex drawing rule. For this reason, the image by the three-dimensional polygon is drawn as shown in FIG. 12, but the image by the two-dimensional sprite has a problem that the boundary (edge) of the two-dimensional sprite is applied.
[0014]
That is, since the two-dimensional sprite does not share the boundary with the adjacent polygon, for example, a 4 × 4 pixel quadrangular two-dimensional sprite arranged in a mesh shape by three horizontally and two vertically. If drawing is performed according to the shared vertex drawing rule instead of the independent vertex drawing rule, the right and lower boundaries of each two-dimensional sprite are not drawn as shown in FIG. .
[0015]
In addition, when a two-dimensional sprite is drawn according to the shared vertex drawing rule, the texture may be unnatural.
[0016]
That is, for example, FIG. 15A shows a case where a 4 × 4 rectangular two-dimensional sprite is drawn according to the independent vertex drawing rule. In FIG. 15, a small square with a solid line represents a pixel. In addition, it is assumed that a number (this number is expressed in hexadecimal) represents a texture address for texture mapping.
[0017]
In FIG. 15A, the coordinates of the upper left, upper right, lower left, or lower right pixels of the two-dimensional sprite are (0, 0), (3, 0), (0, 3), or ( 3), and suppose that such a two-dimensional sprite having four vertices is doubled in the horizontal direction. In this case, according to the independent vertex drawing rule, for example, (0,0), (7,0), (0,3), and (7,3) are changed to 4 as shown in FIG. A two-dimensional sprite with vertices is obtained.
[0018]
Here, it is necessary to change the texture address as the two-dimensional sprite is doubled in the horizontal direction. That is, in FIG. 15A, the change amount of the texture address in the horizontal direction is 3, and in FIG. 15B, the change amount in the horizontal direction of the two-dimensional sprite is 7, so that the two-dimensional sprite is changed in the horizontal direction. When it is doubled, the texture address must be changed by 3/7. Therefore, in FIG. 15B, for example, the texture address of the top row is 0/7, 3/7, 6/7, 9/7, 12/7, 15/7, 18 from the leftmost pixel. However, since the texture address is used after rounding off after the decimal point, it is actually 0, 0, 1, 1, 2, 2, 3, 3.
[0019]
Therefore, in this case, only the texture address for the original two-dimensional sprite shown in FIG.
[0020]
On the other hand, FIG. 16A shows a case where, for example, a 5 × 5 square two-dimensional sprite is drawn according to the shared vertex drawing rule. In FIG. 16 as well, a small square with a solid line represents a pixel, and a number (the number is represented in hexadecimal) represents a texture address for texture mapping. And
[0021]
Now, in FIG. 15B, the coordinates of the upper left, upper right, lower left, or lower right pixels of the two-dimensional sprite are respectively (0, 0), (4, 0), (0, 4), or ( 4 and 4), it is assumed that such a two-dimensional sprite having four vertices is doubled in the horizontal direction. In this case, according to the shared vertex drawing rule, for example, as shown in FIG. 16 (B), (0, 0), (8, 0), (0, 4), and (8, 4) are changed to 4 vertices. A two-dimensional sprite is obtained.
[0022]
Here, also in this case, it is necessary to change the texture address as the two-dimensional sprite is doubled in the horizontal direction. That is, in FIG. 16 (A), the amount of change in the texture address in the horizontal direction is 4 (in FIG. 16 (A), texture addresses 04, 14, 24, 4th row from the top and 4th column from the left side, 34 and 40 to 44 are not described because the drawing is not performed on the pixels in the fourth row from the top and the fourth column from the left according to the shared vertex drawing rule), FIG. In (B), since the amount of change in the horizontal direction of the two-dimensional sprite is 8, when the two-dimensional sprite is doubled in the horizontal direction, it is necessary to change the texture address by 4/8.
[0023]
Therefore, in FIG. 16B, for example, the texture address of the top row is 0/8, 4/8, 8/8, 12/8, 16/8, 20/8, 24 from the leftmost pixel. / 8, 28/8, but since the texture address is used by rounding off the decimal point, it is actually 0, 1, 1, 2, 2, 3, 3, 4, 4 (however, According to the shared vertex drawing rule, drawing is not performed on the pixel corresponding to the last texture address 4 (rightmost pixel).
[0024]
Therefore, in this case, texture addresses 04, 14, 24, and 34 appear in addition to the texture address for the original two-dimensional sprite shown in FIG.
[0025]
As described above, when a two-dimensional sprite is drawn according to the shared vertex drawing rule, a texture that does not exist in the original two-dimensional sprite appears, and the image may become unnatural.
[0026]
The present invention has been made in view of such a situation, and it is possible to obtain a natural image without deterioration in image quality (edge missing) even when polygons of a plurality of data formats are mixed. To do.
[0027]
[Means for Solving the Problems]
The drawing apparatus according to claim 1, further comprising a selection unit that selects a drawing rule for drawing the unit graphic, and a drawing unit that draws the unit graphic according to the drawing rule selected by the selection unit. And
[0028]
The drawing method according to claim 4 is characterized in that a drawing rule for drawing a unit graphic is selected and the unit graphic is drawn according to the drawing rule.
[0029]
In the drawing apparatus according to the first aspect and the drawing method according to the fourth aspect, a drawing rule for drawing the unit graphic is selected, and the unit graphic is drawn according to the drawing rule.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a plan view showing the configuration of an embodiment of a video game machine to which the present invention is applied. 2 is a front view thereof (viewed from below in FIG. 1), and FIG. 3 is a side view of its right side surface (side view viewed from the right direction in FIG. 1). Each is shown.
[0031]
The video game machine includes a game machine main body 2, an operation device 17 including a connection terminal portion 26 having a substantially square shape connected to the game machine main body 2, and a recording device 38 that is also connected to the game machine main body 2. It is composed of
[0032]
The game machine main body 2 is formed in a substantially square shape, and a disc mounting portion 3 for mounting a game recording medium on which a program and data for playing a game are recorded is provided at the center. In this embodiment, for example, a CD (Compact Disc) -ROM 51 as shown in FIG. 4 is detachably attached to the disc mounting portion 3 as a game recording medium. However, the game recording medium is not limited to a disc.
[0033]
A reset switch 4 that is operated when resetting the game and a power switch 5 that is operated when turning on / off the power are provided on the left side of the disc mounting unit 3. A disk operation switch 6 is provided which is operated when the disk mounting portion 3 is opened and closed. Further, on the front surface of the game machine main body 2, there are provided connection portions 7A and 7B to which the operation device 17 and the recording device 38 can be connected as a set. In the present embodiment, the connecting portions 7A and 7B are provided so that two sets of the operating device 17 and the recording device 38 can be connected. However, the connecting portion has a number of operations other than two sets. It is possible to provide as many devices 17 and recording devices 38 as can be connected.
[0034]
As shown in FIGS. 2 and 3, the connecting portions 7 </ b> A and 7 </ b> B are formed in two stages, the recording insertion section 8 connected to the recording device 38 is provided in the upper stage, and the connection terminal section 26 of the operating device 17 is provided in the lower stage. The connection terminal insertion part 12 to be connected is provided.
[0035]
The insertion hole of the recording insertion portion 8 is formed in a rectangular shape that is long in the lateral direction, and has a structure in which the lower end corners are more rounded than the upper end corners so that the recording device 38 cannot be inserted in reverse. It has become. Further, the recording insertion portion 8 is provided with a shutter 9 for protecting a connection terminal (not shown) for obtaining an internal electrical connection.
[0036]
The shutter 9 is attached in a state in which it is always urged outward by an elastic body (not shown) such as a spring formed in the shape of a coil torsion spring. Therefore, when the recording device 38 is inserted, the shutter 9 is opened to the back side at the leading end side where the recording device 38 is inserted, and when the recording device 38 is removed, the shutter 9 is returned by the urging force of the elastic body and automatically closed. Thus, it serves to protect the internal connection terminals from dust and further protects it from external impacts.
[0037]
As shown in FIGS. 2 and 3, the connection terminal insertion portion 12 has a shape in which the corners at the lower end of the insertion hole having a rectangular shape that is long in the horizontal direction are more rounded than the corners at the upper end. The connection terminal portion 26 of the operating device 17 does not enter in the reverse direction, and the shape of the insertion hole is different so that the recording device 38 does not enter. In this way, the size and shape of the insertion holes of the recording device 38 and the operation device 17 are different so that they are not misplaced.
[0038]
As shown in FIG. 1, the operating device 17 has a structure in which five fingers are freely moved and operated by being held between the palms of both hands, and is formed in a round shape connected to left and right objects. First and second operation portions 18 and 19, first and second support portions 20 and 21 formed in a square shape projecting from the first and second operation portions 18 and 19, first and second operations A select switch 22 and a start switch 23 provided in a constricted portion at an intermediate position between the portions 18 and 19, and third and fourth operation portions 24 formed to project from the front side of the first and second operation portions 18 and 19. 25 and a connection terminal portion 26 that is electrically connected to the game machine main body 2 via a cable 27. It is also possible to adopt a configuration that does not require the cable 27.
[0039]
The connection terminal portion 26 is attached to the tip of a cable 27 for electrical connection with the game machine main body 2, and as shown in FIG. A gripping portion is provided which is provided with a so-called jagged pattern anti-slip process (for example, a knurling process). Note that the gripping portion provided in the connection terminal portion 26 forms a so-called insertion / extraction portion, and its size, that is, its width W and length L are, for example, the same as the gripping portion of the recording device 38 described later. ing.
[0040]
The recording device 38 incorporates a non-volatile memory such as a flash memory, for example. On both side surfaces thereof, for example, a gripping portion (FIG. 3) configured in the same manner as in the connection terminal portion 26 is provided. It can be easily attached to and detached from the machine body 2. For example, when the game is temporarily interrupted, the recording device 38 is configured to store the state at that time, and when the game is restarted, the data can be read therefrom. The game can be resumed from the state corresponding to the data, that is, the state at the time of interruption.
[0041]
In the case of playing a game with the video game machine configured as described above, for example, the user connects the operation device 17 to the game machine body 2 and, if necessary, the recording device 38 also includes a game machine. Connect to the main body 2. Further, the user operates the disk operation switch 6 to set a CD-ROM 51 as a game recording medium in the disk mounting portion 3 and operates the power switch 5 to turn on the power to the game machine body 2. turn on. Thereby, in the game machine main body 2, the image and sound for the game are reproduced, so that the user plays the game by operating the operation device 17.
[0042]
Next, FIG. 5 shows an example of the electrical configuration of the game machine body 2 of FIG.
[0043]
The game machine main body 2 has two types of buses, a main bus 101 and a sub bus 102, as buses for exchanging data in each block. The main bus 101 and the sub bus 102 have a bus controller 116. Connected through.
[0044]
In addition to the bus controller 116, the main bus 101 includes a main CPU (Central Processing Unit) 111 including a microprocessor, a main memory 112 including a RAM (Random Access Memory), and a main DMAC (Direct Memory Access Controller) 113. MDEC (MPEG Decorder), GPU 115 (selection means) (drawing means), and PPP (Programmable Preprocessor) 120 are connected.
[0045]
In addition to the bus controller 116, the sub-bus 102 stores a GPU 115, for example, a sub-CPU 121 configured similarly to the main CPU 111, for example, a sub-memory 122 configured similarly to the main memory 112, a sub-DMAC 123, and an operating system. (Read Only Memory) 124, SPU (Sound Processing Unit) 125, ATM (Asynchronous Transmission Mode) communication unit 126, auxiliary storage device 127, and input device I / F (Interface) 128 are connected.
[0046]
Here, the main bus 101 is designed to exchange data at high speed, and the sub-bus 102 is designed to exchange data at low speed. That is, for data that can be exchanged at a low speed, the high speed of the main bus 101 is ensured by using the sub bus 102.
[0047]
The bus controller 116 disconnects the main bus 101 and the sub bus 102 and connects the sub bus 102 to the main bus 101. When the main bus 101 and the sub bus 102 are disconnected, only the devices connected to the main bus 101 can be accessed from the main bus 101, and only the devices connected to the sub bus can be accessed from the sub bus 102. However, when the sub-bus 102 is connected to the main bus 101, any device can be accessed from either the main bus 101 or the sub-bus 102. For example, in an initial state such as immediately after the power of the apparatus is turned on, the bus controller 116 is in an open state (the main bus 101 and the sub bus 102 are connected).
[0048]
The main CPU 111 performs various processes according to programs stored in the main memory 112. That is, for example, when the apparatus is activated, the main CPU 111 reads and executes a boot program from the ROM 124 on the sub bus 102 (connected to the sub bus 102) via the bus controller 116. Thus, the main CPU 111 loads an application program (here, a game program) and necessary data (for example, data such as polygons) from the auxiliary storage device 127 into the main memory 112 and the sub memory 112. The main CPU 111 executes the program loaded in the main memory 112 in this way.
[0049]
The main CPU 111 has a built-in GTE (Geometry Transfer Engine) 117, and this GTE 117 includes a parallel operation mechanism that executes a plurality of operations in parallel, for example, coordinate conversion and light source according to a request from the main CPU 111. Calculation, three-dimensional polygon perspective transformation, two-dimensional sprite rotation, enlargement, reduction processing, and other geometry processing are performed at high speed. In this way, the GTE 117 performs processing (geometry processing) in accordance with a request from the main CPU 111 to thereby form a polygon (in this specification, a polygon having three or more vertices) that constitutes an image to be displayed. In addition, data (hereinafter, referred to as polygon data as appropriate) is generated and supplied to the main CPU 111.
[0050]
When the main CPU 111 receives polygon data from the GTE 117, the main CPU 111 packetizes the polygon data and transfers it to the PPP 120 or GPU 115 via the main bus 101. Further, the main CPU 111 packetizes a command for instructing a drawing rule used in the GPU 115 (to be described later) (hereinafter referred to as a drawing command as appropriate) and transmits it to the GPU 115 as necessary.
[0051]
The main CPU 111 has a built-in cache memory (Cache) 119, and instead of accessing the main memory 112, the main CPU 111 accesses the cache memory 119 so as to increase the processing speed.
[0052]
As described above, the main memory 112 stores programs and data. The main DMAC 113 controls the DMA transfer for the devices on the main bus 101. However, when the bus controller 116 is in the open state, the main DMAC 113 controls the devices on the subbus 102 as well. The MDEC 114 is an I / O device operable in parallel with the main CPU 111 and functions as an image expansion engine. That is, the MDEC 114 decodes image data compressed by MPEG (Moving Picture Experts Group) encoding.
[0053]
The GPU 115 is configured to function as a rendering processor. That is, the GPU 115 receives a packet transmitted from the main CPU 111 or PPP 120, and is arranged as polygon data in the packet, for example, Z indicating the color data and depth (depth from the viewpoint) of the vertex of the polygon. Based on the value, rendering processing is performed to write (draw) image data corresponding to the polygon in the graphic memory 118. Further, the GPU 115 reads image data written in the graphic memory 118 and outputs it as a video signal.
[0054]
Note that the GPU 115 receives a packet from the main DMAC 113 or a device on the subbus 102 as necessary, and performs a rendering process according to polygon data arranged in the packet.
[0055]
Further, the GPU 115 stores a plurality of drawing rules including, for example, a shared vertex drawing rule, an independent vertex drawing rule, and the like, and selects a predetermined one from the drawing rules, and selects a polygon according to the selected drawing rule. Drawing (texture mapping and other rendering processes) is performed. The drawing rule is selected according to a drawing command transmitted from the main CPU 111.
[0056]
The graphic memory 118 is composed of, for example, a DRAM or the like, and temporarily stores image data supplied from the GPU 115. Note that the graphic memory 118 has, for example, an area that can store image data for two screens (two frames), so that when data is written in one area, the other It is possible to read from this area.
[0057]
The PPP 120 receives a packet transmitted from the main CPU 111 or the main DMAC 113, and bears a part of the geometry processing in the GTE 111. Note that packets processed in the PPP 120 are directly transferred to the GPU 115 without passing through the main bus 101.
[0058]
The sub CPU 121 reads out and executes a program stored in the sub memory 122 to perform various processes. Similar to the main memory 112, the sub memory 122 stores programs and necessary data. The sub DMAC 123 controls the DMA transfer for the devices on the sub bus 102. The sub DMAC 123 acquires the bus right only when the bus controller 116 is in the closed state (when the main bus 101 and the sub bus 102 are disconnected). As described above, the ROM 124 stores a boot program, an operating system, and the like. The ROM 124 stores programs for both the main CPU 111 and the sub CPU 121. In addition, the ROM 124 here has a low access speed, and is therefore provided on the sub-bus 102.
[0059]
The SPU 125 receives a packet transmitted from the sub CPU 121 or the sub DMAC 123, and reads out audio data from the sound memory 129 in accordance with a sound command arranged in the packet. The SPU 25 is configured to supply the read audio data to a speaker (not shown) for output. For example, the ATM communication unit 126 performs control of communication (control of ATM communication) performed via a public line (not shown). Thereby, a user of the video game machine can play a battle with a user of another video game machine directly or by exchanging data via a predetermined center station.
[0060]
The auxiliary storage device 127 is configured to reproduce information (programs, data) recorded on the CD-ROM 51 (FIGS. 1 and 4) using, for example, a disk drive. The auxiliary storage device 127 is also configured to record and read information with respect to the recording device 38 (FIG. 1). The input device I / F 128 is an interface for receiving an external input such as a signal corresponding to an operation of the operation device 17 (FIG. 1) as a control pad or an image or a sound reproduced by another device. A signal corresponding to the input signal is output on the sub-bus 102. The sound memory 129 stores audio data.
[0061]
In the game machine main body 2 configured as described above, when the power of the apparatus is turned on, the main CPU 111 reads the boot program from the ROM 124 and executes it, thereby being set in the auxiliary storage device 127. The program and data are read from the CD-ROM 51 and developed in the main memory 112 and the sub memory 122. Then, in the main CPU 111 or the sub CPU 121, a program developed in the main memory 112 or the sub memory 122 is executed, so that the game image and sound are reproduced.
[0062]
That is, for example, in the main CPU 111, polygon data for drawing a polygon constituting a predetermined three-dimensional image is generated according to the data stored in the main memory 112. The polygon data is packetized and supplied to the GPU 115, for example. The GPU 115 receives a packet from the main CPU 111, performs rendering processing according to polygon data arranged in the packet, and writes image data to the graphic memory 118. Then, the GPU 115 reads the image data of the already written frame from the graphic memory 118 and outputs it as a video signal. Thereby, the game screen (image) is displayed.
[0063]
On the other hand, in the sub CPU 121, a sound command for instructing sound generation is generated according to the data stored in the sub memory 122. This sound command is packetized and supplied to the SPU 125 via the sub-bus 102. The SPU 125 reads and outputs audio data from the sound memory 129 in accordance with the sound command from the sub CPU 121. Thereby, BGM (Background Music) and other sounds of the game are output.
[0064]
Next, the polygon drawing process in the game machine main body 2 of FIG. 5 will be further described with reference to the flowchart of FIG. The CD-ROM 51 (FIGS. 1 and 4) stores a mixture of three-dimensional polygon and two-dimensional sprite data. The polygon data arranged in the packet transferred from the main CPU 111 to the GPU 115 is as follows. Suppose that there are two types of 3D polygons and 2D sprites.
[0065]
In the case of drawing a polygon, first, in step S1, it is determined whether the polygon is a three-dimensional polygon or a two-dimensional sprite, and if it is a three-dimensional polygon or a two-dimensional sprite. If it is determined, the process proceeds to step S2 or S3, and the drawing rule is set to the shared vertex drawing rule or the independent vertex drawing rule, respectively. In step S4, polygons are drawn according to the set drawing rule.
[0066]
That is, in step S1, the main CPU 111 determines whether the packet to be transferred to the GPU 115 is a packet in which three-dimensional polygons or two-dimensional sprites are arranged, and determines whether the three-dimensional polygons or two-dimensional sprites are stored. When a packet in which data is arranged is transferred to the GPU 115, a drawing command for instructing to use a shared vertex drawing rule or an independent vertex drawing rule is transferred to the GPU 115 prior to the transfer.
[0067]
In accordance with the drawing command transferred from the main CPU 111, the GPU 115 selects a shared vertex drawing rule or an independent vertex drawing rule as a drawing rule to be used in step S3 or S4, and then selects the selected rule in step S4. The polygon corresponding to the data arranged in the packet transferred from the main CPU 111 is drawn according to the drawing rule.
[0068]
Therefore, in this game machine body 2, the 3D polygon is drawn according to the shared vertex drawing rule, and the 2D sprite is drawn according to the independent vertex drawing rule. The polygon is drawn as shown in FIG. 7 similar to FIG. 12, and the two-dimensional sprite is drawn as shown in FIG. 8 similar to FIG. 13. Therefore, the three-dimensional polygon, the two-dimensional sprite, Even if is mixed, an image without deterioration in image quality can be obtained. Moreover, it is possible to prevent the texture from being unnatural.
[0069]
Since the main CPU 111 sends a drawing command every time a packet in which polygon data is arranged is transmitted, the processing becomes complicated. Therefore, the main CPU 111 receives a packet in which two-dimensional sprite data is arranged. After sending, when sending a packet in which 3D polygon data is placed, send a drawing command to instruct that the shared vertex drawing rule should be used, and send a packet in which 3D polygon data is placed After that, when transmitting a packet in which the data of the two-dimensional sprite is arranged, it is desirable to send a drawing command indicating that the independent vertex drawing rule should be used.
[0070]
Although the present invention has been described with respect to the case where the present invention is applied to a video game machine, the present invention draws an image in units of polygons in addition to the video game machine, for example, a video effector, a computer graphic system, and other images. It is applicable to a processing device.
[0071]
In this embodiment, a case where a 3D polygon and a 2D sprite are mixed is targeted, but the present invention is also applicable to a case where polygons of other data formats are mixed. .
[0072]
In addition, as described above, when a drawing command is transmitted when a polygon to be drawn is switched from a 3D polygon to a 2D sprite, or from a 2D sprite to a 3D polygon, It is desirable that two-dimensional sprites are drawn together. In this case, the number of drawing command transmissions can be reduced.
[0073]
Furthermore, in this embodiment, the drawing command is transmitted separately from the packet in which the polygon data is arranged. However, for example, the drawing command is transmitted by being included in the packet in which the polygon data is arranged. Is also possible.
[0074]
Further, the present invention can be applied regardless of the shape of the polygon, the positional relationship between the vertices, and the drawing order, for example.
[0075]
【The invention's effect】
According to the drawing apparatus described in claim 1 and the drawing method described in claim 4, the drawing rule for drawing the unit graphic is selected, and the unit graphic is drawn according to the drawing rule. Therefore, it is possible to obtain an image that is natural and has no deterioration in image quality.
[Brief description of the drawings]
FIG. 1 is a plan view showing a configuration of an embodiment of a video game machine to which the present invention is applied.
FIG. 2 is a front view of the video game machine of FIG. 1;
FIG. 3 is a side view of the video game machine of FIG. 1;
4 is a plan view showing a CD-ROM 51. FIG.
5 is a block diagram showing an example of the electrical configuration of the game machine body 2 of FIG.
6 is a flowchart for explaining polygon drawing processing in the game machine main body 2 of FIG. 5; FIG.
7 is a diagram showing a drawing result of a three-dimensional polygon by the game machine main body 2 of FIG. 5. FIG.
8 is a diagram illustrating a drawing result of a two-dimensional sprite by the game machine body 2 of FIG.
FIG. 9 is a diagram for explaining a three-dimensional polygon and a two-dimensional sprite.
FIG. 10 is a diagram for explaining a shared vertex drawing rule.
FIG. 11 is a diagram for explaining an independent vertex drawing rule;
FIG. 12 is a diagram illustrating a drawing result when a three-dimensional polygon is drawn according to a shared vertex drawing rule.
FIG. 13 is a diagram illustrating a drawing result when a two-dimensional sprite is drawn according to an independent vertex drawing rule.
FIG. 14 is a diagram illustrating a drawing result when a two-dimensional sprite is drawn according to a shared vertex drawing rule.
FIG. 15 is a diagram illustrating a drawing result when a two-dimensional sprite is doubled in the horizontal direction and drawn according to the independent vertex drawing rule.
FIG. 16 is a diagram illustrating a drawing result when a two-dimensional sprite is doubled in the horizontal direction and drawn according to the shared vertex drawing rule.
[Explanation of symbols]
111 main CPU, 112 main memory, 115 GPU (selection means) (drawing means), 117 GTE, 118 graphic memory, 120 PPP

Claims (4)

単位図形の組合せにより定義される画像を描画する描画装置であって、
前記単位図形を描画するための描画規則を選択する選択手段と、
前記選択手段により選択された前記描画規則にしたがって、前記単位図形を描画する描画手段とを備え、
前記選択手段は、前記単位図形が、共有頂点型のデータで表現されるものであるとき、前記単位図形の境界の一部を描画しないという前記描画規則を選択すること
を特徴とする描画装置。
A drawing device for drawing an image defined by a combination of unit graphics,
A selection means for selecting a drawing rule for drawing the unit graphic;
Drawing means for drawing the unit graphic according to the drawing rule selected by the selection means,
The drawing device, wherein when the unit graphic is expressed by shared vertex type data, the drawing unit selects the drawing rule not to draw a part of the boundary of the unit graphic.
単位図形の組合せにより定義される画像を描画する描画装置であって、
前記単位図形を描画するための描画規則を選択する選択手段と、
前記選択手段により選択された前記描画規則にしたがって、前記単位図形を描画する描画手段とを備え、
前記選択手段は、前記単位図形が、独立頂点型のデータで表現されるものであるとき、前記単位図形の境界すべてを描画するという前記描画規則を選択すること
を特徴とする描画装置。
A drawing device for drawing an image defined by a combination of unit graphics,
A selection means for selecting a drawing rule for drawing the unit graphic;
Drawing means for drawing the unit graphic according to the drawing rule selected by the selection means,
The drawing device, wherein the selection means selects the drawing rule for drawing all boundaries of the unit graphic when the unit graphic is expressed by independent vertex type data.
単位図形の組合せにより定義される画像を描画する描画装置が行う描画方法であって、
前記描画装置は、
前記単位図形を描画するための描画規則を選択するステップと、
前記選択された前記描画規則にしたがって、前記単位図形を描画するステップとを実行し、
前記選択するステップは、前記単位図形が、共有頂点型のデータで表現されるものであるとき、前記単位図形の境界の一部を描画しないという前記描画規則を選択すること
を特徴とする描画方法。
A drawing method performed by a drawing device that draws an image defined by a combination of unit graphics,
The drawing device includes:
Selecting a drawing rule for drawing the unit graphic;
Drawing the unit graphic in accordance with the selected drawing rule ,
The selecting step includes selecting the drawing rule not to draw a part of the boundary of the unit graphic when the unit graphic is expressed by shared vertex type data. .
単位図形の組合せにより定義される画像を描画する描画装置が行う描画方法であって、
前記描画装置は、
前記単位図形を描画するための描画規則を選択するステップと、
前記選択された前記描画規則にしたがって、前記単位図形を描画するステップとを実行し、
前記選択するステップは、前記単位図形が、独立頂点型のデータで表現されるものであるとき、前記単位図形の境界すべてを描画するという前記描画規則を選択すること
を特徴とする描画方法。
A drawing method performed by a drawing device that draws an image defined by a combination of unit graphics,
The drawing device includes:
Selecting a drawing rule for drawing the unit graphic;
Drawing the unit graphic in accordance with the selected drawing rule ,
The drawing step is characterized in that, when the unit graphic is expressed by independent vertex type data, the drawing rule of drawing all the boundaries of the unit graphic is selected.
JP16430296A 1996-06-25 1996-06-25 Drawing apparatus and drawing method Expired - Fee Related JP3795580B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16430296A JP3795580B2 (en) 1996-06-25 1996-06-25 Drawing apparatus and drawing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16430296A JP3795580B2 (en) 1996-06-25 1996-06-25 Drawing apparatus and drawing method

Publications (2)

Publication Number Publication Date
JPH1011611A JPH1011611A (en) 1998-01-16
JP3795580B2 true JP3795580B2 (en) 2006-07-12

Family

ID=15790547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16430296A Expired - Fee Related JP3795580B2 (en) 1996-06-25 1996-06-25 Drawing apparatus and drawing method

Country Status (1)

Country Link
JP (1) JP3795580B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003225369A (en) * 2002-02-05 2003-08-12 Shinnichi Electronics Kk Image display device for pachinko game machine and image display method and program therefor
WO2007043293A1 (en) * 2005-10-03 2007-04-19 Ssd Company Limited Image creating device, texture mapping device, image processor, and texture storing method

Also Published As

Publication number Publication date
JPH1011611A (en) 1998-01-16

Similar Documents

Publication Publication Date Title
KR100482391B1 (en) Video signal processing apparatus and method
JP3620857B2 (en) Image processing apparatus and image processing method
EP0867807B1 (en) Information processing, computer readable media, and authoring systems
JP3220328B2 (en) Video game console
KR100715880B1 (en) Method of and system for adding information and recording medium
EP0806744B1 (en) Recording and/or reproducing three-dimensional image data
JP3824788B2 (en) Video game apparatus, game screen viewpoint switching method in video game, and computer-readable recording medium recorded with game screen viewpoint switching program in video game
US6454653B1 (en) Game apparatus, game display control method, and computer-readable storage medium
JP5746916B2 (en) Data processing
JP2001312258A (en) Information processing device for producing image data according to image output device, and recording medium therefor
JP2000132706A (en) Recording medium, image processor and image processing method
US20010035868A1 (en) Game system, display image forming method in the game system, and computer-readable storage medium carrying game program
JPH10137447A (en) Software emulator for executing differently described software and input-output device in certain game device
JP3442366B2 (en) Character display method and entertainment apparatus
JP3495189B2 (en) Drawing apparatus and drawing method
US20020101435A1 (en) Apparatus and method for rendering antialiased image
JP3795580B2 (en) Drawing apparatus and drawing method
JP3696515B2 (en) Kernel function realization structure, entertainment device including the same, and peripheral device control method using kernel
JP4228455B2 (en) Image processing method and image processing apparatus
JP3758753B2 (en) Data transfer apparatus and data transfer method
JP2004139625A (en) Data processor and data processing method
EP1249791A2 (en) 3-D game image processing method and device for drawing border lines
JP2003260268A (en) Memory card and relay adaptor of video game machine
JPH08161438A (en) Video game device
JP2000070547A (en) Game machine

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060315

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060413

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120421

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees