JP4749064B2 - Program, information storage medium, and image generation system - Google Patents
Program, information storage medium, and image generation system Download PDFInfo
- Publication number
- JP4749064B2 JP4749064B2 JP2005207664A JP2005207664A JP4749064B2 JP 4749064 B2 JP4749064 B2 JP 4749064B2 JP 2005207664 A JP2005207664 A JP 2005207664A JP 2005207664 A JP2005207664 A JP 2005207664A JP 4749064 B2 JP4749064 B2 JP 4749064B2
- Authority
- JP
- Japan
- Prior art keywords
- outline
- contour
- color
- image
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 claims description 101
- 230000008569 process Effects 0.000 claims description 38
- 239000000284 extract Substances 0.000 claims description 19
- 238000001514 detection method Methods 0.000 claims description 14
- 238000009877 rendering Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 description 83
- 235000019557 luminance Nutrition 0.000 description 51
- 239000003086 colorant Substances 0.000 description 23
- 230000033001 locomotion Effects 0.000 description 23
- 230000006870 function Effects 0.000 description 17
- 238000004891 communication Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004088 simulation Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- 238000012800 visualization Methods 0.000 description 4
- 230000015572 biosynthetic process Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 239000012634 fragment Substances 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 238000003786 synthesis reaction Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
Landscapes
- Image Generation (AREA)
Description
本発明は、プログラム、情報記憶媒体及び画像生成システムに関する。 The present invention relates to a program, an information storage medium, and an image generation system.
従来より、キャラクタなどのオブジェクトが配置設定されるオブジェクト空間内(仮想的な3次元空間)において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。このような画像生成システムでは、オブジェクトの輪郭に輪郭線を描画する従来技術が知られている。 Conventionally, an image generation system (game system) that generates an image that can be viewed from a virtual camera (a given viewpoint) in an object space (virtual three-dimensional space) in which an object such as a character is set is known. It is popular as a place to experience so-called virtual reality. In such an image generation system, a conventional technique for drawing a contour line on the contour of an object is known.
しかしながら従来の画像生成システムでは、アニメ特有のセル画風の画像の生成を目的として輪郭線を描画している。このため、オブジェクトの輪郭には、黒等の一色の輪郭線が描画されていた。 However, in the conventional image generation system, an outline is drawn for the purpose of generating a cell-like image peculiar to animation. For this reason, an outline of one color such as black is drawn on the outline of the object.
また従来の画像生成システムでは、例えば第1、第2のオブジェクトが視点から見て重なって見える場合に、重なり部分の境界での輪郭線の描画については、あまり考慮されていなかった。
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、オブジェクトの輪郭線の多様な表現を可能にする画像生成システム、プログラム及び情報記憶媒体を提供することにある。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an image generation system, a program, and an information storage medium that enable various expressions of the outline of an object. It is in.
本発明は、画像を生成する画像生成システムであって、オブジェクトを描画して元画像を生成する元画像生成部と、オブジェクト毎に設定された描画色でオブジェクトを描画し、オブジェクトの輪郭色設定と輪郭検出のための輪郭情報画像を生成する輪郭情報画像生成部と、オブジェクトの輪郭線を描画する輪郭線描画部とを含み、前記輪郭線描画部は、前記輪郭情報画像に基づいてオブジェクトの輪郭を抽出し、前記輪郭情報画像の前記描画色で設定される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線を描画する画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。 The present invention is an image generation system for generating an image, and includes an original image generation unit that generates an original image by drawing an object, draws the object with a drawing color set for each object, and sets an outline color of the object And a contour information image generation unit that generates a contour information image for contour detection, and a contour line drawing unit that draws a contour line of the object, the contour line drawing unit, based on the contour information image, The present invention relates to an image generation system that extracts a contour and draws a contour line with respect to the contour of the extracted object with a contour color set by the drawing color of the contour information image. The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to a computer-readable information storage medium that stores (records) a program that causes a computer to function as each unit.
本発明では、元画像と輪郭情報画像が生成される。この輪郭情報画像は輪郭色設定用画像と輪郭検出用画像を兼ねることができる。そして輪郭情報画像に基づいてオブジェクトの輪郭が抽出され、輪郭情報画像の描画色で設定される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線(輪郭に沿った線)が描画される。従って、少ない処理負荷で、オブジェクト毎に異なる輪郭色の輪郭線を描画できるようになり、オブジェクトの輪郭線の多様な表現が可能になる。 In the present invention, an original image and a contour information image are generated. This contour information image can serve as both a contour color setting image and a contour detection image. Then, the contour of the object is extracted based on the contour information image, and a contour line (a line along the contour) is drawn on the contour of the extracted object with the contour color set by the drawing color of the contour information image. . Accordingly, it becomes possible to draw contour lines having different contour colors for each object with a small processing load, and various expressions of the contour lines of the object are possible.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭情報画像生成部は、オブジェクトの輪郭色を視点からのオブジェクトの距離に応じてその輝度が変化するように調整し、調整された色を前記描画色としてオブジェクトを描画して、前記輪郭情報画像を生成するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour information image generation unit adjusts the contour color of the object so that the luminance changes according to the distance of the object from the viewpoint. The contour information image may be generated by drawing an object using the drawn color as the drawing color.
このようにすれば、同じ輪郭色が設定されたオブジェクトであっても、視点からの距離に応じてその前後関係を区別できるようになる。 In this way, even objects having the same contour color can be distinguished from each other according to the distance from the viewpoint.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記輪郭情報画像の前記描画色から輝度情報を抽出し、抽出された前記輝度情報に基づいてオブジェクトの輪郭を抽出するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour drawing unit extracts luminance information from the drawing color of the contour information image, and based on the extracted luminance information, the contour of the object is extracted. May be extracted.
このようにすれば、輪郭情報画像を輪郭検出用画像として用いることが可能になる。また、輝度情報の高輝度、低輝度と、オブジェクトの前後関係(視点からの距離)とを対応させて輪郭を抽出することも可能になる。 In this way, the contour information image can be used as the contour detection image. It is also possible to extract the contour by associating the high and low luminances of the luminance information with the object's context (distance from the viewpoint).
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記輪郭情報画像の前記描画色の第1、第2、第3の成分の値の加算処理を行うことで、前記輝度情報を抽出するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour line drawing unit performs addition processing of the values of the first, second, and third components of the drawing color of the contour information image. Thus, the luminance information may be extracted.
このようにすれば、簡素な処理で輝度情報を抽出できるようになる。但し輝度情報の抽出はこのような手法に限定されない。 In this way, luminance information can be extracted with a simple process. However, the extraction of luminance information is not limited to such a method.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記輪郭情報画像の前記描画色から色彩情報を抽出し、抽出された前記色彩情報に対応する輪郭色でオブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour drawing unit extracts color information from the drawing color of the contour information image, and uses a contour color corresponding to the extracted color information. You may make it draw the outline of an object.
このようにすれば、輪郭情報画像を輪郭色設定用画像として使用できるようになる。 In this way, the contour information image can be used as the contour color setting image.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記輪郭情報画像の前記描画色の第Kの成分から輝度情報を取り出し、取り出された前記輝度情報に基づいてオブジェクトの輪郭を抽出するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour drawing unit extracts luminance information from the Kth component of the drawing color of the contour information image, and based on the extracted luminance information. Thus, the outline of the object may be extracted.
このようにすれば、簡素な処理で、輪郭情報画像を輪郭検出用画像として使用できるようになる。 In this way, the contour information image can be used as the contour detection image with a simple process.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記輪郭情報画像の前記描画色の第Lの成分から輪郭色指定情報を取り出し、取り出された前記輪郭色指定情報で指定される輪郭色で、オブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour drawing unit extracts contour color designation information from the Lth component of the drawing color of the contour information image, and the extracted contour color You may make it draw the outline of an object with the outline color designated by designation | designated information.
このようにすれば、簡素な処理で、輪郭情報画像を輪郭色設定用画像として使用できるようになる。 In this way, the contour information image can be used as the contour color setting image with a simple process.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、オブジェクトの輪郭の一方側が高輝度で他方側が低輝度である場合に、前記高輝度側のみ或いは前記低輝度側のみにオブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour line drawing unit may be configured such that only one of the high brightness side or the low brightness is displayed when one side of the contour of the object has high brightness and the other side has low brightness. The outline of the object may be drawn only on the side.
このようにすれば、輪郭線が二重に描画されて不自然な画像が生成されてしまうなどの事態を防止できる。 In this way, it is possible to prevent a situation in which an unnatural image is generated due to a double outline drawn.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、前記元画像の生成の際に生成されたZ値と、前記輪郭情報画像の生成の際に生成されたZ値に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour line drawing unit is generated when generating the Z value generated when generating the original image and when generating the contour information image. Based on the Z value, it may be determined whether the pixel to be processed is a pixel on the contour line of the object.
このようにすれば、オブジェクトの前後関係を適正に判断して輪郭線を描画することが可能になる。 In this way, it is possible to draw a contour line by properly determining the object's context.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、視点から見て手前側にある第1のオブジェクトと視点から見て奥側にある第2のオブジェクトとが視点から見て重なる場合に、前記第1、第2のオブジェクトの重なり部分における境界において、前記第1のオブジェクトの輪郭線のみを描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the contour drawing unit includes a first object on the near side as viewed from the viewpoint and a second object on the back side as viewed from the viewpoint. When overlapping from the viewpoint, only the outline of the first object may be drawn at the boundary at the overlapping portion of the first and second objects.
また本発明は、画像を生成する画像生成システムであって、オブジェクトを描画して元画像を生成する元画像生成部と、視点から見て手前側にある第1のオブジェクトと視点から見て奥側にある第2のオブジェクトとが視点から見て重なる場合に、前記第1、第2のオブジェクトの重なり部分における境界において、前記第1のオブジェクトの輪郭線のみを描画する輪郭線描画部とを含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。 The present invention also relates to an image generation system for generating an image, an original image generation unit that generates an original image by drawing an object, a first object on the near side as viewed from the viewpoint, and a rear side as viewed from the viewpoint. An outline drawing unit that draws only the outline of the first object at the boundary of the overlapping portion of the first and second objects when the second object on the side overlaps when viewed from the viewpoint. Concerning image generation system including. The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to a computer-readable information storage medium that stores (records) a program that causes a computer to function as each unit.
本発明によれば、視点から見て第1、第2のオブジェクトが重なる場合に、重なり部分の境界に、手前側の第1のオブジェクトの輪郭線が描画されるようになり、奥側の第2のオブジェクトの輪郭線が描画されるのを防止できる。従って、重なり部分の境界に二重の輪郭線等が描画されて不自然な画像が生成されてしまう事態を防止できる。 According to the present invention, when the first and second objects overlap when viewed from the viewpoint, the outline of the first object on the near side is drawn on the boundary of the overlapping portion, and the first object on the back side is drawn. It is possible to prevent the outline of the second object from being drawn. Therefore, it is possible to prevent a situation in which a double contour line or the like is drawn at the boundary of the overlapping portion and an unnatural image is generated.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、第1の属性に属するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、第2の属性に属するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the outline drawing unit draws the outline of the object with the first outline color for the object belonging to the first attribute, and the second attribute. For an object belonging to, the contour line of the object may be drawn with the second contour color.
また本発明は、画像を生成する画像生成システムであって、オブジェクトを描画して元画像を生成する元画像生成部と、第1の属性に属するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、第2の属性に属するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画する輪郭線描画部とを含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。 The present invention is also an image generation system for generating an image, wherein an original image generation unit that generates an original image by drawing an object, and an object that belongs to a first attribute has an outline of the object in a first outline color. This relates to an image generation system including an outline drawing unit that draws a line and draws the outline of the object with the second outline color for objects belonging to the second attribute. The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to a computer-readable information storage medium that stores (records) a program that causes a computer to function as each unit.
本発明によれば、異なる属性のオブジェクトの輪郭線は、異なる輪郭色で描画されるようになる。従って、プレーヤ(観者)は、オブジェクトの輪郭線の色を見て、オブジェクトの属性を把握できるようになり、これまでにないオブジェクトの輪郭線の多様な表現が可能になる。 According to the present invention, contour lines of objects having different attributes are drawn with different contour colors. Therefore, the player (viewer) can grasp the attribute of the object by looking at the color of the contour line of the object, and various expressions of the contour line of the object that have never existed are possible.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、敵グループに属するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、敵以外のグループに属するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the outline drawing unit draws the outline of the object with the first outline color for an object belonging to the enemy group, and belongs to a group other than the enemy. For the object, the outline of the object may be drawn with the second outline color.
このようにすれば、プレーヤ(観者)は、オブジェクトの輪郭線の色を見て、オブジェクトが敵グループに属するか否かを判断できるようになり、スムーズなゲーム進行を可能にするインターフェース環境を提供できる。 In this way, the player (viewer) can determine whether the object belongs to the enemy group by looking at the color of the outline of the object, and an interface environment that enables smooth game progression. Can be provided.
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記輪郭線描画部は、第1のタイプの情報を有するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、第2のタイプの情報を有するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画するようにしてもよい。 In the image generation system, the program, and the information storage medium according to the present invention, the outline drawing unit draws the outline of the object with the first outline color for the object having the first type information, and the second For an object having this type of information, the contour line of the object may be drawn with the second contour color.
このようにすれば、プレーヤ(観者)は、オブジェクトの輪郭線の色を見て、オブジェクトが有する情報を把握できるようになり、スムーズなゲーム進行を可能にするインターフェース環境を提供できる。 In this way, the player (viewer) can grasp the information that the object has by looking at the color of the outline of the object, and can provide an interface environment that enables smooth game progression.
以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。 Hereinafter, this embodiment will be described. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.
1.構成
図1に本実施形態の画像生成システム(ゲームシステム)の機能ブロック図の例を示す。なお本実施形態の画像生成システムは図1の構成要素(各部)の一部を省略した構成としてもよい。
1. Configuration FIG. 1 shows an example of a functional block diagram of an image generation system (game system) of the present embodiment. Note that the image generation system of the present embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.
操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、マイク、タッチパネル型ディスプレイ、或いは筺体などにより実現できる。記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM(VRAM)などにより実現できる。 The operation unit 160 is for a player to input operation data, and the function can be realized by a lever, a button, a steering, a microphone, a touch panel display, a housing, or the like. The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by a RAM (VRAM) or the like.
情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、ハードディスク、或いはメモリ(ROM)などにより実現できる。処理部100は、情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。即ち情報記憶媒体180には、本実施形態の各部としてコンピュータを機能させるためのプログラム(各部の処理をコンピュータに実行させるためのプログラム)が記憶される。 The information storage medium 180 (computer-readable medium) stores programs, data, and the like, and functions as an optical disk (CD, DVD), magneto-optical disk (MO), hard disk, or memory (ROM). It can be realized by. The processing unit 100 performs various processes of the present embodiment based on a program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute processing of each unit).
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などにより実現できる。音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどにより実現できる。 The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by a CRT, LCD, touch panel display, HMD (head mounted display), or the like. The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by a speaker, headphones, or the like.
携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などがある。通信部196は外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。 The portable information storage device 194 stores player personal data, game save data, and the like. Examples of the portable information storage device 194 include a memory card and a portable game device. The communication unit 196 performs various controls for communicating with the outside (for example, a host device or other image generation system), and functions thereof are hardware such as various processors or communication ASICs, programs, and the like. It can be realized by.
なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180(あるいは記憶部170)に配信してもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含めることができる。 A program (data) for causing a computer to function as each unit of the present embodiment is distributed from the information storage medium of the host device (server) to the information storage medium 180 (or storage unit 170) via the network and communication unit 196. May be. Use of the information storage medium of such a host device (server) can also be included in the scope of the present invention.
処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの処理を行う。ここでゲーム処理としては、ゲーム開始条件が満たされた場合にゲームを開始する処理、ゲームを進行させる処理、キャラクタやマップなどのオブジェクトを配置する処理、オブジェクトを表示する処理、ゲーム結果を演算する処理、或いはゲーム終了条件が満たされた場合にゲームを終了する処理などがある。この処理部100は記憶部170をワーク領域として各種処理を行う。処理部100の機能は各種プロセッサ(CPU、DSP等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。 The processing unit 100 (processor) performs processing such as game processing, image generation processing, or sound generation processing based on operation data and programs from the operation unit 160. Here, as the game process, a process for starting a game when a game start condition is satisfied, a process for advancing the game, a process for placing an object such as a character or a map, a process for displaying an object, and a game result are calculated. There is a process or a process of ending a game when a game end condition is satisfied. The processing unit 100 performs various processes using the storage unit 170 as a work area. The functions of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.), ASIC (gate array, etc.), and programs.
処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、画像生成部120、音生成部130を含む。なおこれらの一部を省略する構成としてもよい。 The processing unit 100 includes an object space setting unit 110, a movement / motion processing unit 112, a virtual camera control unit 114, an image generation unit 120, and a sound generation unit 130. Note that some of these may be omitted.
オブジェクト空間設定部110は、キャラクタ、建物、球場、車、樹木、柱、壁、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェイスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。 The object space setting unit 110 is composed of various objects (polygons, free-form surfaces, subdivision surfaces, etc.) representing display objects such as characters, buildings, stadiums, cars, trees, pillars, walls, and maps (terrain). (Object) is set in the object space. In other words, the position and rotation angle of the object in the world coordinate system (synonymous with direction and direction) are determined, and the rotation angle (rotation angle around the X, Y, and Z axes) is determined at that position (X, Y, Z). Arrange objects.
移動・動作処理部112は、オブジェクト(キャラクタ、車、又は飛行機等)の移動・動作演算(移動・動作シミュレーション)を行う。即ち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクト(モデルオブジェクト)をオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させる処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(パーツオブジェクトの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。 The movement / motion processing unit 112 performs a movement / motion calculation (movement / motion simulation) of an object (such as a character, a car, or an airplane). That is, an object (model object) is moved in the object space or an object is moved based on operation data input by the player through the operation unit 160, a program (movement / motion algorithm), various data (motion data), or the like. Perform processing (motion, animation). Specifically, a simulation process for sequentially obtaining object movement information (position, rotation angle, speed, or acceleration) and motion information (part object position or rotation angle) every frame (1/60 second). Do. A frame is a unit of time for performing object movement / motion processing (simulation processing) and image generation processing.
仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置や視線方向を制御する処理)を行う。 The virtual camera control unit 114 performs a virtual camera (viewpoint) control process for generating an image viewed from a given (arbitrary) viewpoint in the object space. Specifically, a process for controlling the position (X, Y, Z) or the rotation angle (rotation angle about the X, Y, Z axes) of the virtual camera (process for controlling the viewpoint position and the line-of-sight direction) is performed.
例えば仮想カメラによりオブジェクト(例えばキャラクタ、ボール、車)を後方から撮影する場合には、オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部112で得られたオブジェクトの位置、回転角度又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させる制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。 For example, when an object (eg, character, ball, car) is photographed from behind using a virtual camera, the position or rotation angle of the virtual camera (the direction of the virtual camera is set so that the virtual camera follows changes in the position or rotation of the object. ) To control. In this case, the virtual camera can be controlled based on information such as the position, rotation angle, or speed of the object obtained by the movement / motion processing unit 112. Alternatively, the virtual camera may be controlled to rotate at a predetermined rotation angle or to move along a predetermined movement path. In this case, the virtual camera is controlled based on the virtual camera data for specifying the position (movement path) or rotation angle of the virtual camera. When there are a plurality of virtual cameras (viewpoints), the above control process is performed for each virtual camera.
画像生成部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まずオブジェクトの各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含む頂点リストが入力され、入力された頂点リストに含まれる頂点データに基づいて、頂点シェーディング(広義には、頂点処理)が行われる。なお頂点シェーディングを行う際に、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うこともできる。頂点シェーディングでは、頂点シェーダプログラム(広義には、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点シェーディング後の頂点データに基づいてラスタライズ(走査変換)が行われ、表示画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセルシェーディング(広義には、ピクセル処理、フラグメント処理)が行われる。ピクセルシェーディングでは、ピクセルシェーダプログラム(第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、最終的な表示画像のピクセルの描画色を決定し、透視変換されたオブジェクトの描画色をフレームバッファ172(ピクセル単位で画像情報を記憶できるバッファ。描画バッファ、表示バッファ、バックバッファ、フロントバッファ、ワークバッファ、VRAM)に出力(描画)する。すなわち、ピクセルシェーディングでは、表示画像のピクセル単位で画像情報(色、法線、輝度、α値等)を設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像(フレーム画像)が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として1画面に表示できるようにフレーム画像を生成することができる。 The image generation unit 120 performs drawing processing based on the results of various processes (game processing) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. When generating a so-called three-dimensional game image, first, a vertex list including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object is input and input. Based on the vertex data included in the vertex list, vertex shading (vertex processing in a broad sense) is performed. When performing vertex shading, vertex generation processing (tessellation, curved surface division, polygon division) for subdividing a polygon can be performed as necessary. In vertex shading, according to the vertex shader program (first shader program in a broad sense), vertex movement processing, coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, or geometric processing such as perspective transformation is performed. On the basis of the processing result, the vertex data given to the vertex group constituting the object is changed (updated or adjusted). Then, rasterization (scan conversion) is performed based on the vertex data after vertex shading, and pixel shading (pixel processing and fragment processing in a broad sense) that draws pixels (fragments that configure the display screen) that constitute the display image Is done. In pixel shading, according to the pixel shader program (second shader program), various processes such as texture reading (texture mapping), color data setting / change, translucent composition, anti-aliasing, etc. are performed, and the final display image is displayed. The drawing color of the pixel is determined, and the drawing color of the perspective-transformed object is output to the frame buffer 172 (buffer that can store image information in units of pixels. Drawing buffer, display buffer, back buffer, front buffer, work buffer, VRAM). (draw. That is, in pixel shading, per-pixel processing for setting or changing image information (color, normal, luminance, α value, etc.) for each pixel of a display image is performed. As a result, an image (frame image) that can be seen from the virtual camera (given viewpoint) in the object space is generated. In addition, when there are a plurality of virtual cameras (viewpoints), a frame image can be generated so that an image seen from each virtual camera can be displayed on one screen as a divided image.
画像生成部120は、元画像生成部122、輪郭情報画像生成部124、輪郭線描画部128を含む。なおこれらの一部を省略する構成としてもよい。 The image generation unit 120 includes an original image generation unit 122, a contour information image generation unit 124, and a contour line drawing unit 128. Note that some of these may be omitted.
元画像生成部122はオブジェクトを描画して元画像を生成する処理を行う。具体的には、例えばZ値を格納するZバッファ176を用いて隠面消去を行いながらオブジェクト(プリミティブ面)をフレームバッファ(描画バッファ)172に描画することで元画像を生成する。そして元画像のZ値は、この描画処理の際に行われるZバッファ法(奥行き比較法)により、Zバッファ176上に生成(格納)される。なお本実施形態のZ値(奥行き値)は、カメラ座標系のZ座標軸のZ値そのものであってもよいし、このZ値と数学的な均等なパラメータであってもよい。 The original image generation unit 122 performs processing for drawing an object and generating an original image. Specifically, for example, an original image is generated by drawing an object (primitive surface) in a frame buffer (drawing buffer) 172 while performing hidden surface removal using a Z buffer 176 that stores Z values. The Z value of the original image is generated (stored) on the Z buffer 176 by the Z buffer method (depth comparison method) performed at the time of the drawing process. Note that the Z value (depth value) of the present embodiment may be the Z value itself of the Z coordinate axis of the camera coordinate system, or may be a parameter that is mathematically equivalent to this Z value.
輪郭情報画像生成部124は輪郭情報画像(テクスチャ画像)の生成処理を行う。具体的にはオブジェクト毎(オブジェクトの属性毎)に設定(指定)された描画色(指定色)でオブジェクトを描画し、オブジェクトの輪郭色設定や輪郭検出のための輪郭情報画像(輪郭色設定用画像、輪郭検出用画像)を生成する。例えば異なる属性のオブジェクトは異なる描画色でそのオブジェクトを描画する。具体的には第1の属性のオブジェクトは第1の描画色で描画し、第2の属性のオブジェクトは第2の描画色で描画して、色分けされた輪郭情報画像を生成する。この場合の描画色は、例えばオブジェクトの表面マテリアル(属性情報)として設定できる。 The contour information image generation unit 124 generates a contour information image (texture image). Specifically, the object is drawn with the drawing color (specified color) set (specified) for each object (for each object attribute), and the contour information image (for contour color setting) for setting the contour color of the object and detecting the contour Image, contour detection image). For example, objects with different attributes are drawn with different drawing colors. Specifically, the first attribute object is drawn in the first drawing color, and the second attribute object is drawn in the second drawing color to generate a color-coded contour information image. The drawing color in this case can be set as, for example, the surface material (attribute information) of the object.
例えば輪郭情報画像生成部124は、オブジェクトの輪郭色を視点からのオブジェクトの距離(奥行き距離、Z値)に応じてその輝度(明るさ)が変化するように調整し、調整した色を描画色としてオブジェクトを描画する。或いは描画色の第Kの成分(第1〜第3の成分のいずれかの成分)に輝度情報を設定し、第Lの成分(第1〜第3の成分のいずれかの成分)に輪郭色指定情報を設定して、オブジェクトを描画する。なお輪郭情報画像の描画色の第Mの成分(第1〜第3の成分のいずれかの成分)にZ値(奥行き値)を設定するようにしてもよい。 For example, the contour information image generation unit 124 adjusts the contour color of the object so that the luminance (brightness) changes according to the distance (depth distance, Z value) of the object from the viewpoint, and the adjusted color is the drawing color. Draw the object as Alternatively, luminance information is set in the Kth component (any one of the first to third components) of the drawing color, and the contour color is set in the Lth component (any one of the first to third components). Set the specified information and draw the object. Note that a Z value (depth value) may be set for the Mth component (any one of the first to third components) of the drawing color of the contour information image.
輪郭線描画部128は、オブジェクトの輪郭を抽出(検出)し、抽出されたオブジェクトの輪郭に対して、描画色で輪郭線を描画する。具体的には輪郭情報画像に基づいてオブジェクトの輪郭を抽出し、輪郭情報画像の描画色で設定される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線を描画する。例えばオブジェクトの輪郭色を視点からのオブジェクトの距離に応じて調整する場合には、調整色である描画色から輝度情報を抽出し、抽出された輝度情報に基づいてオブジェクトの輪郭を抽出する。この場合には輪郭線描画部128は、描画色の第1、第2、第3の成分(例えばR、G、B成分)の値の加算処理を行うことで、輝度情報を抽出できる。この加算処理は、第1、第2、第3の成分値を単純に加算する処理であってもよいし、第1、第2、第3の成分に係数を乗算して加算する処理であってもよい。 The outline drawing unit 128 extracts (detects) the outline of the object, and draws the outline in the drawing color with respect to the extracted outline of the object. Specifically, the contour of the object is extracted based on the contour information image, and a contour line is drawn on the extracted contour of the object with the contour color set by the drawing color of the contour information image. For example, when the contour color of an object is adjusted according to the distance of the object from the viewpoint, luminance information is extracted from the drawing color that is the adjustment color, and the contour of the object is extracted based on the extracted luminance information. In this case, the contour line drawing unit 128 can extract luminance information by performing addition processing of values of first, second, and third components (for example, R, G, and B components) of the drawing color. This addition process may be a process of simply adding the first, second, and third component values, or a process of multiplying the first, second, and third components by a coefficient and adding them. May be.
また輪郭線描画部128は、輪郭情報画像の描画色から色彩情報を抽出し、抽出された色彩情報により設定される輪郭色でオブジェクトの輪郭線を描画する。 The contour drawing unit 128 extracts color information from the drawing color of the contour information image, and draws the contour of the object with the contour color set by the extracted color information.
なお、輪郭情報画像の描画色の第Kの成分に輝度情報が設定される場合には、輪郭線描画部128は、輪郭情報画像の描画色の第Kの成分から輝度情報を取り出し、取り出された輝度情報に基づいてオブジェクトの輪郭を抽出すればよい。また輪郭情報画像の描画色の第Lの成分に輪郭色指定情報(輪郭色のインデックス番号)が設定される場合には、輪郭線描画部128は、輪郭情報画像の描画色の第Lの成分から輪郭色指定情報を取り出し、取り出された輪郭色指定情報で指定される輪郭色で、オブジェクトの輪郭線を描画すればよい。 When the luminance information is set in the Kth component of the drawing color of the contour information image, the contour line drawing unit 128 extracts the luminance information from the Kth component of the drawing color of the contour information image and extracts it. The outline of the object may be extracted based on the luminance information. When the contour color designation information (the contour color index number) is set as the Lth component of the drawing color of the contour information image, the contour drawing unit 128 uses the Lth component of the drawing color of the contour information image. The contour color designation information is extracted from the image, and the contour line of the object is drawn with the contour color specified by the extracted contour color designation information.
また輪郭線描画部128は、オブジェクトの輪郭の一方側(外側、内側の一方側)が高輝度で、他方側(外側、内側の他方側)が低輝度である場合に、高輝度側(一方側)のみにオブジェクトの輪郭線を描画する。或いは低輝度側(他方側)のみにオブジェクトの輪郭線を描画するようにしてもよい。このような描画処理は例えばラプラシアンフィルタなどにより実現できる。 In addition, the contour drawing unit 128 has a high brightness side (one side) when one side (outside, one side inside) of the object has high brightness and the other side (the other side, outside or inside) has low brightness. Draw the outline of the object only on the side. Alternatively, the outline of the object may be drawn only on the low luminance side (the other side). Such a drawing process can be realized by, for example, a Laplacian filter.
また輪郭線描画部128は、元画像の生成の際に最終的に生成されたZ値(奥行き値)と、輪郭情報画像の生成の際に最終的に生成されたZ値に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断する。具体的には、輪郭情報画像のZ値の方が元画像のZ値よりも視点から見て手前側のZ値である場合に、処理対象ピクセルがオブジェクトの輪郭線のピクセルであると判断する。 The contour drawing unit 128 performs processing based on the Z value (depth value) finally generated when the original image is generated and the Z value finally generated when the contour information image is generated. It is determined whether or not the target pixel is an outline pixel of the object. Specifically, when the Z value of the contour information image is closer to the near side as viewed from the viewpoint than the Z value of the original image, it is determined that the processing target pixel is a pixel of the contour line of the object. .
また輪郭線描画部128は、視点から見て手前側にある第1のオブジェクトと視点から見て奥側にある第2のオブジェクトとが視点から見て重なる場合に、第1、第2のオブジェクトの重なり部分における境界(輪郭)において、第1のオブジェクトの輪郭線のみを描画する。即ち奥側の第2のオブジェクトの輪郭線については描画せずに、手前側の第1のオブジェクトの輪郭線を描画する。 The contour line drawing unit 128 also displays the first and second objects when the first object on the near side as viewed from the viewpoint overlaps with the second object on the far side as viewed from the viewpoint. Only the contour line of the first object is drawn at the boundary (contour) in the overlapping portion. That is, the outline of the first object on the near side is drawn without drawing the outline of the second object on the back side.
また輪郭線描画部128は、異なる属性のオブジェクトには異なる描画色でオブジェクトの輪郭線を描画する。例えば第1の属性に属するオブジェクト(敵グループに属するオブジェクト、重要な第1のタイプの情報を有するオブジェクト等)については第1の輪郭色でオブジェクトの輪郭線を描画する。一方、第2の属性に属するオブジェクト(敵以外のグループに属するオブジェクト、取得済みの第2のタイプの情報を有するオブジェクト等)については第2の輪郭色でオブジェクトの輪郭線を描画する。このような輪郭線の描画は、例えば次のような手法で実現できる。即ちオブジェクトの属性フラグと、オブジェクトの輪郭色(描画色)とを対応づけるテーブルを用意する。そしてオブジェクトの属性フラグに基づいて、上記テーブルからオブジェクトの輪郭色を読み出し、読み出された輪郭色でオブジェクトの輪郭線を描画する。 The outline drawing unit 128 draws the outline of the object with different drawing colors for objects having different attributes. For example, for an object belonging to the first attribute (an object belonging to an enemy group, an object having important first type information, etc.), the outline of the object is drawn with the first outline color. On the other hand, for an object belonging to the second attribute (an object belonging to a group other than the enemy, an object having the acquired second type information, etc.), the outline of the object is drawn with the second outline color. Such contour drawing can be realized by the following method, for example. That is, a table for associating the attribute flag of the object with the outline color (drawing color) of the object is prepared. Then, based on the attribute flag of the object, the outline color of the object is read from the table, and the outline of the object is drawn with the read outline color.
音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。 The sound generation unit 130 performs sound processing based on the results of various processes performed by the processing unit 100, generates game sounds such as BGM, sound effects, or sounds, and outputs the game sounds to the sound output unit 192.
なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて分散処理により生成してもよい。 Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or may be a system having a multiplayer mode in which a plurality of players can play. Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated by distributed processing using a plurality of terminals (game machine, mobile phone).
2.本実施形態の手法
2.1 第1の手法
本実施形態では、オブジェクト毎に異なる描画色でオブジェクトの輪郭線を描画する。例えばゲーム画面中のオブジェクト(通行人、ドア、看板等)に対して、「これは何かの情報を持っている」、「あれは既に調べて情報収集済みだ」等の状態を、一目で判別できるように、各オブジェクトに色分けした輪郭線を付加することを目指している。このような色分けした輪郭線の描画を実現する第1の手法について、まず説明する。
2. 2. Method according to this embodiment 2.1 First method In this embodiment, the outline of an object is drawn with a different drawing color for each object. For example, for an object (passerby, door, signboard, etc.) on the game screen, you can see at a glance the states such as “I have some information” or “I have already investigated and collected information” The goal is to add color-coded contours to each object so that they can be identified. A first method for realizing such color-coded contour drawing will be described first.
この第1の手法では、オブジェクトを描画して元画像を生成する。また図2に示すように、オブジェクト毎に設定された描画色で色分けしてオブジェクトを描画し、オブジェクトの輪郭色を参照するための輪郭色参照用画像を生成する。例えば図2では輪郭線描画の対象となるオブジェクトOB1は、その輪郭色である緑の描画色で描画され、同じく輪郭線描画の対象となるオブジェクトOB2は、その輪郭色である赤の描画色で描画される。また輪郭線描画の対象とならないオブジェクトOB3は黒で描画される。この場合、これらのオブジェクトOB1、OB2、OB3はZバッファを用いて描画されるため、オブジェクトOB2のうちA1に示す部分は、手前側のオブジェクトOB3により隠面消去されている。このA1に示す部分では、ゲーム画面である元画像においてもオブジェクトOB2が表示されず、輪郭線を描画すべき部分ではないからである。 In this first method, an original image is generated by drawing an object. Further, as shown in FIG. 2, the object is drawn by color-coding with the drawing color set for each object, and an outline color reference image for referring to the outline color of the object is generated. For example, in FIG. 2, an object OB1 that is a contour drawing target is drawn with a green drawing color that is the contour color, and an object OB2 that is also a contour drawing target is a red drawing color that is the contour color. Drawn. Further, the object OB3 that is not the object of contour drawing is drawn in black. In this case, since these objects OB1, OB2, and OB3 are drawn using the Z buffer, the portion indicated by A1 in the object OB2 is hidden by the front object OB3. This is because, in the portion indicated by A1, the object OB2 is not displayed even in the original image that is the game screen, and the contour line is not to be drawn.
次に図3に示すように、オブジェクトの輪郭を検出するための輪郭検出用画像を生成する。具体的にはオブジェクト毎にユニークに設定された識別情報(識別番号)により得られる識別情報色で、輪郭線描画の対象となるオブジェクトを描画して、図3に示すような輪郭検出用画像を生成する。 Next, as shown in FIG. 3, a contour detection image for detecting the contour of the object is generated. Specifically, the object for contour drawing is drawn with the identification information color obtained from the identification information (identification number) uniquely set for each object, and the contour detection image as shown in FIG. Generate.
次に図3の輪郭検出用画像に基づいてオブジェクトの輪郭を抽出する。具体的には、処理対象ピクセルの周囲の例えば4つのピクセル(左上、左下、右上、右下のピクセル)の識別情報色(識別番号)を参照する。そしてその差分値(具体的には、(左上−右下)の2乗+(左下−右上)の2乗)に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断し、オブジェクトの輪郭を抽出する。例えば図4に、抽出された輪郭を視覚化したものを示す。図4に示すように第1の手法では、オブジェクトOB2のうち手前側のオブジェクトOB3により隠面消去された境界部分(B1に示す部分)についても、オブジェクトOB2の輪郭として抽出されている。 Next, the contour of the object is extracted based on the contour detection image shown in FIG. Specifically, for example, identification information colors (identification numbers) of four pixels (upper left, lower left, upper right, and lower right pixels) around the pixel to be processed are referred to. And based on the difference value (specifically, the square of (upper left-lower right) + (lower left-upper right) square), it is determined whether the pixel to be processed is a pixel of the contour line of the object, Extract the outline of the object. For example, FIG. 4 shows a visualization of the extracted contour. As shown in FIG. 4, in the first method, the boundary portion (the portion indicated by B1) of the object OB2 whose hidden surface has been erased by the object OB3 on the near side is also extracted as the outline of the object OB2.
次に図2の輪郭色参照用画像で参照される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線を描画する。具体的には図2において輪郭線の描画対象となるオブジェクトOB1、OB2については、α値が例えば不透明を表す1.0(広義には所定値)に設定されて描画される。そして処理対象ピクセルがオブジェクトの輪郭線のピクセルであり、処理対象ピクセルのα値が1.0に設定されていた場合に、輪郭色参照用画像で参照される輪郭色が処理対象ピクセルの色に設定される。これにより、オブジェクトOB1に対しては緑の輪郭線が描画され、オブジェクトOB2に対しては赤の輪郭線が描画され、図5に示すような輪郭線が付加された最終画像が生成される。 Next, a contour line is drawn on the contour of the extracted object with the contour color referred to in the contour color reference image of FIG. Specifically, in FIG. 2, the objects OB1 and OB2 to be drawn with the outline are drawn with the α value set to 1.0 (predetermined value in a broad sense) representing, for example, opacity. When the processing target pixel is a pixel of the contour line of the object and the α value of the processing target pixel is set to 1.0, the contour color referred to in the contour color reference image becomes the color of the processing target pixel. Is set. As a result, a green contour line is drawn on the object OB1, a red contour line is drawn on the object OB2, and a final image with a contour line as shown in FIG. 5 is generated.
さて、第1の手法では、図5のC1やC2に示す部分で不自然な輪郭線画像を生成されてしまう。例えば図5においてオブジェクトOB1は視点から見て手前側にあり、オブジェクトOB2は奥側にある。従ってC1に示すオブジェクトOB1、OB2の重なり部分における境界では、オブジェクトOB1の緑の輪郭色だけが描画されるべきである。 Now, with the first method, an unnatural contour image is generated at the portions indicated by C1 and C2 in FIG. For example, in FIG. 5, the object OB1 is on the near side when viewed from the viewpoint, and the object OB2 is on the far side. Therefore, only the green outline color of the object OB1 should be drawn at the boundary at the overlapping portion of the objects OB1 and OB2 shown in C1.
ところが、図5のC1の部分の拡大図である図6に示すように、D1に示す重なり部分の境界において、オブジェクトOB1の緑の輪郭線のみならず、オブジェクトOB2の赤の輪郭線も描画されている。従ってD1に示す部分において輪郭線が二重に見えてしまい、不自然な画像になる。そしてこの二重の輪郭線が原因で、プレーヤは、オブジェクトOB1、OB2の前後関係を把握できなくなってしまう。また図5のC2や図6のD2に示すように、本来は描画されるべきでない輪郭線が描画されてしまうという問題も発生する。 However, as shown in FIG. 6 which is an enlarged view of the portion C1 in FIG. 5, not only the green outline of the object OB1 but also the red outline of the object OB2 is drawn at the boundary of the overlapping portion shown in D1. ing. Accordingly, the outline appears double in the portion indicated by D1, resulting in an unnatural image. Due to this double outline, the player cannot grasp the context of the objects OB1 and OB2. Further, as indicated by C2 in FIG. 5 and D2 in FIG. 6, there is a problem that a contour line that should not be drawn is drawn.
2.2 第2の手法
次に、色分けした輪郭線の描画を実現する本実施形態の第2の手法について説明する。この第2の手法では、上述した第1の手法の問題点を解決するために、オブジェクトOB1、OB2が視点から見て重なる場合に、OB1、OB2の重なり部分における境界においてOB1の輪郭線のみを描画するようにしている。具体的には例えば以下に説明するような手法で輪郭線を描画している。
2.2 Second Method Next, a second method of the present embodiment that realizes drawing of color-coded contour lines will be described. In this second method, in order to solve the problem of the first method described above, when the objects OB1 and OB2 overlap each other when viewed from the viewpoint, only the outline of OB1 at the boundary at the overlapping portion of OB1 and OB2 is obtained. I try to draw. Specifically, for example, a contour line is drawn by the method described below.
まず図7に示すように、オブジェクトOB1、OB2、OB3等を描画して元画像(通常ゲーム画面)を生成する。即ちオブジェクトOB1、OB2、OB3のジオメトリ処理を行い、ジオメトリ処理後のオブジェクトをフレームバッファ(ゲーム画面の描画用のバッファ)に描画することで図7に示すような元画像を生成する。この場合、照明モデルに基づいてオブジェクトのシェーディング処理などを行い、リアルな3次元画像を生成する。また図7の元画像の生成の際に生成されたZバッファのZ値を、後の処理に使用するために保存しておく。例えば図8にZバッファのZ値(奥行き値)を視覚化したものを示す。図8では、視点から見て手前が暗くなり、奥側が明るくなるように、Z値が視覚化されて示されている。 First, as shown in FIG. 7, objects OB1, OB2, and OB3 are drawn to generate an original image (normal game screen). That is, the geometry processing of the objects OB1, OB2, and OB3 is performed, and the object after the geometry processing is drawn in a frame buffer (drawing buffer on the game screen), thereby generating an original image as shown in FIG. In this case, an object shading process or the like is performed based on the illumination model, and a realistic three-dimensional image is generated. Also, the Z value of the Z buffer generated when generating the original image in FIG. 7 is stored for use in later processing. For example, FIG. 8 shows a visualization of the Z value (depth value) of the Z buffer. In FIG. 8, the Z value is visualized so that the near side becomes darker and the far side becomes brighter when viewed from the viewpoint.
次に図9に示すようにオブジェクト毎に設定された描画色でオブジェクトを別バッファに描画し、輪郭情報画像を生成する。この輪郭情報画像は、第1の手法の図2の輪郭色参照用画像(輪郭色設定用画像)と図3の輪郭検出用画像(奥行き値参照用画像)を兼ねる画像である。また図9の輪郭情報画像の生成の際に生成されたZバッファのZ値を、後の処理に使用するために保存しておく。例えば図10にZバッファのZ値(奥行き値)を視覚化したものを示す。図10では、視点から見て手前が暗くなり、奥側が明るくなるように、Z値が視覚化されて示されている。 Next, as shown in FIG. 9, the object is drawn in another buffer with the drawing color set for each object, and an outline information image is generated. This contour information image is an image that serves as both the contour color reference image (contour color setting image) in FIG. 2 and the contour detection image (depth value reference image) in FIG. Further, the Z value of the Z buffer generated when generating the contour information image of FIG. 9 is stored for use in later processing. For example, FIG. 10 shows a visualization of the Z value (depth value) of the Z buffer. In FIG. 10, the Z value is visualized so that the near side becomes darker and the far side becomes brighter when viewed from the viewpoint.
図9では、輪郭線描画の対象となるオブジェクトOB1、OB2については、それぞれに設定された描画色で描画され、輪郭線描画の対象とならないオブジェクトOB3については描画されない。また第1の手法の図2の輪郭色参照用画像では、オブジェクトOB3についても黒で描画されるため、図2のA1に示す部分がZバッファにより隠面消去されている。これに対して図9では、オブジェクトOB2のうち手前側のオブジェクトOB3により隠れる部分についても描画されている。 In FIG. 9, the objects OB1 and OB2 that are the targets for contour drawing are drawn in the drawing colors set for them, and the object OB3 that is not the subject for contour drawing is not drawn. In the contour color reference image of FIG. 2 of the first method, the object OB3 is also drawn in black, so the portion indicated by A1 in FIG. 2 is erased by the Z buffer. On the other hand, in FIG. 9, the portion hidden by the near object OB3 in the object OB2 is also drawn.
また図9では、オブジェクトOB1、OB2の描画色はオブジェクトOB1、OB2の位置に応じて奥のものほど低輝度になるように設定されている。具体的にはオブジェクトOB1、OB2の輪郭色を視点からのオブジェクトの距離(例えば奥行き距離)に応じてその輝度が変化するように調整し、調整された色を描画色としてオブジェクトOB1、OB2を描画している。 In FIG. 9, the drawing colors of the objects OB1 and OB2 are set so that the brightness at the back becomes lower depending on the positions of the objects OB1 and OB2. Specifically, the outline colors of the objects OB1 and OB2 are adjusted so that the luminance changes according to the distance of the object from the viewpoint (for example, the depth distance), and the objects OB1 and OB2 are drawn using the adjusted colors as drawing colors. is doing.
例えば図14(A)において、オブジェクトOB1Aは視点VPから見て手前側に配置され、OB1Cは奥側に配置され、OB1BはOB1AとOB1Cの間に配置されている。即ち、視点から遠いほどZ値が大きくなる座標系を考えた場合に、オブジェクトOB1A、OB1B、OB1Cの代表点のZ値Z1A、Z1B、Z1Cは、Z1A<Z1B<Z1Cの関係になっている。またオブジェクトOB1A、OB1B、OB1Cの指定描画色は緑になっている。従って、この場合には、オブジェクトOB1A、OB1B、OB1Cは、各々、明るい緑、中ぐらいの明るさの緑、暗い緑の描画色で描画される。 For example, in FIG. 14A, the object OB1A is arranged on the near side when viewed from the viewpoint VP, OB1C is arranged on the back side, and OB1B is arranged between OB1A and OB1C. That is, when considering a coordinate system in which the Z value increases as the distance from the viewpoint increases, the Z values Z1A, Z1B, and Z1C of the representative points of the objects OB1A, OB1B, and OB1C have a relationship of Z1A <Z1B <Z1C. The designated drawing color of the objects OB1A, OB1B, and OB1C is green. Accordingly, in this case, the objects OB1A, OB1B, and OB1C are drawn in the drawing colors of bright green, medium-brightness green, and dark green, respectively.
また図14(A)において、オブジェクトOB2Aは視点VPから見て手前側に配置され、OB2Cは奥側に配置され、OB2BはOB2AとOB2Cの間に配置されている。即ちオブジェクトOB2A、OB2B、OB2Cの代表点のZ値Z2A、Z2B、Z2CはZ2A<Z2B<Z2Cの関係になっている。またオブジェクトOB2A、OB2B、OB2Cの指定描画色は赤になっている。従って、この場合には、オブジェクトOB2A、OB2B、OB2Cは、各々、明るい赤、中ぐらいの明るさの赤、暗い赤の描画色で描画される。 In FIG. 14A, the object OB2A is disposed on the near side as viewed from the viewpoint VP, the OB2C is disposed on the back side, and the OB2B is disposed between OB2A and OB2C. That is, the Z values Z2A, Z2B, and Z2C of the representative points of the objects OB2A, OB2B, and OB2C have a relationship of Z2A <Z2B <Z2C. The designated drawing color of the objects OB2A, OB2B, and OB2C is red. Therefore, in this case, the objects OB2A, OB2B, and OB2C are drawn in the drawing colors of bright red, medium-brightness red, and dark red, respectively.
なお図9、図14(A)では視点から奥側になるほど低輝度になる描画色でオブジェクトが描画されているが、視点から奥側になるほど高輝度になる描画色でオブジェクトを描画してもよい。また図9、図14(A)では、オブジェクトの代表点のZ値に基づいて描画色の調整を行っているが、各ピクセルのZ値に基づいて描画色の調整を行うようにしてもよい。 9 and 14A, the object is drawn with a drawing color that becomes lower in brightness as it goes from the viewpoint to the back side, but even if the object is drawn with a drawing color that becomes brighter as it goes from the viewpoint to the back side, Good. In FIGS. 9 and 14A, the drawing color is adjusted based on the Z value of the representative point of the object. However, the drawing color may be adjusted based on the Z value of each pixel. .
次に図9で生成された輪郭情報画像に基づいてオブジェクトの輪郭を抽出する。即ちオブジェクトの輪郭線となるピクセルを検出する。 Next, the contour of the object is extracted based on the contour information image generated in FIG. That is, the pixel that becomes the outline of the object is detected.
この場合に輪郭情報画像の色彩については考慮せずに輝度のみに注目する。即ち図9の輪郭情報画像の描画色から輝度情報を抽出し、抽出された輝度情報に基づいてオブジェクトの輪郭を抽出する。例えばカラー値は赤、緑、色の3原色で構成される。従って、輝度情報の抽出は、単純にピクセルの描画色のR、G、B値を足し合わせるだけでよい。即ち輪郭情報画像の描画色のR、G、B成分(広義には第1、第2、第3の成分)の値の加算処理を行うことで、輝度情報を抽出できる。 In this case, attention is paid only to the luminance without considering the color of the contour information image. That is, the luminance information is extracted from the drawing color of the contour information image of FIG. 9, and the contour of the object is extracted based on the extracted luminance information. For example, the color value is composed of three primary colors of red, green, and color. Therefore, the luminance information can be extracted simply by adding the R, G, and B values of the pixel drawing color. That is, luminance information can be extracted by performing addition processing of R, G, and B components (first, second, and third components in a broad sense) of the drawing color of the contour information image.
例えば図14(B)において、(R、G、B)=(0.5、0.0、0.0)である場合には、抽出される輝度情報は0.5+0.0+0.0=0.5になる。また(R、G、B)=(0.0、0.1、0.0)である場合には、抽出される輝度情報は0.0+0.1+0.0=0.1になる。なお、加算処理により得られた値に変換処理を施したものを輝度情報に設定してもよい。 For example, in FIG. 14B, when (R, G, B) = (0.5, 0.0, 0.0), the extracted luminance information is 0.5 + 0.0 + 0.0 = 0. .5. When (R, G, B) = (0.0, 0.1, 0.0), the extracted luminance information is 0.0 + 0.1 + 0.0 = 0.1. Note that a value obtained by performing a conversion process on a value obtained by the addition process may be set in the luminance information.
オブジェクトの輪郭の抽出には例えば図15(A)に示すようなラプラシアンフィルタを適用する。即ち、処理対象ピクセルを中心点とした9ピクセルのピクセル値(この場合には輝度)に、図15(A)に示す係数を乗算し、合計した結果がゼロよりも大きい場合に、その処理対象ピクセルはオブジェクトの輪郭線のピクセルであると判断する。例えば図11に、抽出された輪郭を視覚化したものを示す。例えば図4の第1の手法では、オブジェクトOB2のうち手前側のオブジェクトOB3により隠面消去された部分の境界(B1に示す境界)も、オブジェクトOB2の輪郭として抽出されていた。これに対して図11の第2の手法では、E1に示すようにこの境界は輪郭として抽出されていない。 For example, a Laplacian filter as shown in FIG. That is, when the pixel value of 9 pixels (in this case, luminance) centered on the pixel to be processed is multiplied by the coefficient shown in FIG. The pixel is determined to be a pixel of the outline of the object. For example, FIG. 11 shows a visualization of the extracted contour. For example, in the first method of FIG. 4, the boundary (the boundary indicated by B1) of the portion of the object OB2 whose hidden surface has been erased by the object OB3 on the near side is also extracted as the contour of the object OB2. On the other hand, in the second method shown in FIG. 11, the boundary is not extracted as a contour as indicated by E1.
次に、輪郭色を得るために図9の輪郭情報画像を用いる。即ち第1の手法では、図2の輪郭色参照用画像と図3の輪郭検出用画像の2つの画像を用いたが、第2の手法では、輪郭情報画像を、輪郭色設定用(輪郭色参照用)と輪郭検出用に兼用する。また輪郭情報画像を輪郭色設定用として用いる際に、輝度は無視し、赤や緑などの色彩情報を参照する。即ち輪郭情報画像の描画色から色彩情報を抽出し、抽出された色彩情報に対応する輪郭色でオブジェクトの輪郭線を描画する。例えば図3の輪郭情報画像から緑、黄の色彩情報を抽出し、緑、黄の輪郭色でオブジェクトOB1、OB2の輪郭線を描画する。 Next, the contour information image of FIG. 9 is used to obtain the contour color. That is, in the first method, two images of the contour color reference image of FIG. 2 and the contour detection image of FIG. 3 are used. However, in the second method, the contour information image is used for contour color setting (contour color). Used for both reference and contour detection. Further, when the contour information image is used for setting the contour color, the luminance is ignored and color information such as red and green is referred to. That is, the color information is extracted from the drawing color of the outline information image, and the outline of the object is drawn with the outline color corresponding to the extracted color information. For example, the color information of green and yellow is extracted from the contour information image of FIG. 3, and the contour lines of the objects OB1 and OB2 are drawn with the contour colors of green and yellow.
具体的には、カラー値は赤、緑、黄の3原色で構成され、R、G、Bの各値はそれぞれ0.0〜1.0の範囲になる。従ってR、G、Bの各値の小数点を切り上げて整数化すれば、輝度を抜いた色彩情報を得ることができる。このような整数化はピクセルシェーダのCeil命令で実現できる。例えば図14(B)において、(R、G、B)=(0.5、0.0、0.0)である場合には、抽出される色彩情報は(1.0、0.0、0.0)になる。即ち輪郭色は原色の赤になる。また(R、G、B)=(0.0、0.1、0.0)である場合には、抽出される色彩情報は(0.0、1.0、0.0)になる。即ち輪郭色は原色の緑になる。 Specifically, the color value is composed of three primary colors of red, green, and yellow, and the values of R, G, and B are in the range of 0.0 to 1.0, respectively. Therefore, if the R, G, and B values are rounded up to an integer, color information with reduced luminance can be obtained. Such integerization can be realized by a Ceil instruction of the pixel shader. For example, in FIG. 14B, when (R, G, B) = (0.5, 0.0, 0.0), the extracted color information is (1.0, 0.0, 0.0). That is, the outline color is the primary color red. When (R, G, B) = (0.0, 0.1, 0.0), the extracted color information is (0.0, 1.0, 0.0). That is, the outline color is the primary color green.
最後に、図7の元画像(ゲーム画面)に対して輪郭線画像を合成する。即ち図9の輪郭情報画像の描画色から抽出された輪郭色(緑、赤)で、図9の輪郭情報画像から抽出されたオブジェクトOB1、OB2の図11の輪郭に対して輪郭線を描画する。 Finally, a contour image is synthesized with the original image (game screen) of FIG. That is, contour lines are drawn on the contours of the objects OB1 and OB2 extracted from the contour information image of FIG. 9 with the contour colors (green and red) extracted from the contour color of the contour information image of FIG. .
この場合に図11のオブジェクトOB2の輪郭のうちE1に示す輪郭部分については、図12のオブジェクトOB3の奥側にあり、隠面消去されるべきである。そこで、輪郭部分のピクセルについては、Z値比較(深度比較)を行うことで最終的なピクセル値を決定する。具体的には、元画像の生成の際に生成された図8に示すZ値と、輪郭情報画像の生成の際に生成された図10に示すZ値を併せて参照する。即ち元画像の生成の際に生成されたZ値と、輪郭情報画像の生成の際に生成されたZ値に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断する。そして輪郭部分が視点から見て手前側になる場合には輪郭色を合成結果のピクセル値として採用し、それ以外は元画像(ゲーム画面)のピクセル値を合成結果のピクセル値として採用する。 In this case, the contour portion indicated by E1 in the contour of the object OB2 in FIG. 11 is on the back side of the object OB3 in FIG. 12, and the hidden surface should be erased. Therefore, the final pixel value is determined by performing Z value comparison (depth comparison) for the pixels in the contour portion. Specifically, the Z value shown in FIG. 8 generated when the original image is generated and the Z value shown in FIG. 10 generated when the contour information image is generated are also referred to. That is, based on the Z value generated at the time of generating the original image and the Z value generated at the time of generating the contour information image, it is determined whether or not the processing target pixel is a pixel of the contour line of the object. When the contour portion is on the near side when viewed from the viewpoint, the contour color is adopted as the pixel value of the synthesis result, and the pixel value of the original image (game screen) is adopted as the pixel value of the synthesis result otherwise.
例えば図11のE1に示す輪郭部分では、図7の元画像生成の際に生成された図8のZ値の方が、図9の輪郭情報画像の際に生成された図10のZ値よりも小さい(手前側のZ値である)。従って、この場合には、図7の元画像のピクセル値(R、G、B値)が、最終的な合成結果のピクセル値として採用される。一方、図11のE2に示す輪郭部分では、図9の輪郭情報画像の際に生成された図10のZ値の方が、図7の元画像生成の際に生成された図8のZ値よりも小さい。従って、この場合には、図9の輪郭情報画像から抽出された輪郭色(赤)が、最終的な合成結果のピクセル値として採用される。以上のようにして図12に示すような輪郭線が付加された最終画像が生成される。 For example, in the contour portion indicated by E1 in FIG. 11, the Z value in FIG. 8 generated when generating the original image in FIG. 7 is more than the Z value in FIG. 10 generated in the case of the contour information image in FIG. Is also small (the Z value on the near side). Accordingly, in this case, the pixel values (R, G, and B values) of the original image in FIG. 7 are adopted as the final synthesized pixel values. On the other hand, in the contour portion indicated by E2 in FIG. 11, the Z value in FIG. 10 generated in the contour information image in FIG. 9 is the Z value in FIG. 8 generated in the original image generation in FIG. Smaller than. Therefore, in this case, the contour color (red) extracted from the contour information image of FIG. 9 is adopted as the pixel value of the final synthesis result. As described above, a final image to which a contour line as shown in FIG. 12 is added is generated.
図5の第1の手法では、C1、C2に示す部分で不自然な輪郭線画像が生成されるという問題があった。即ち図6の拡大図に示すように、D1に示す部分で輪郭線が二重に描画されたり、図5のC2や図6のD2に示すように、本来は描画されるべきでない輪郭線が描画されてしまう。 The first method of FIG. 5 has a problem that an unnatural outline image is generated at the portions indicated by C1 and C2. That is, as shown in the enlarged view of FIG. 6, a contour line is drawn twice in the portion indicated by D1, or a contour line that should not be drawn as shown in C2 of FIG. 5 or D2 of FIG. It will be drawn.
これに対して第2の手法では、図12のF1、F2に示す部分においても不自然な輪郭線画像が生成されない。例えば図12のF1の部分の拡大図である図13に示すように、G1に示す重なり部分の境界において、手前側のオブジェクトOB1の緑の輪郭線のみが描画される。即ちこのG1に示す部分において輪郭線が二重に見えてしまうという第1の手法の問題点が解消される。従ってプレーヤは、オブジェクトOB1、OB2の前後関係を正確に把握できるようになる。また図12のF2や図13のG2に示すように、本来は描画されるべきでない輪郭線が描画されてしまうという第1の手法の問題点も解消される。 On the other hand, in the second method, an unnatural outline image is not generated even in the portions indicated by F1 and F2 in FIG. For example, as shown in FIG. 13 which is an enlarged view of the portion F1 in FIG. 12, only the green outline of the object OB1 on the near side is drawn at the boundary of the overlapping portion shown in G1. That is, the problem of the first method that the contour line appears double in the portion indicated by G1 is solved. Therefore, the player can accurately grasp the front-rear relationship between the objects OB1 and OB2. Further, as indicated by F2 in FIG. 12 and G2 in FIG. 13, the problem of the first technique that an outline that should not be drawn is drawn.
即ち図4の第1の手法では、オブジェクトOB2と手前側のオブジェクトOB3とのB1に示す境界についても、オブジェクトOB2の輪郭として抽出されていた。これに対して図11の第2の手法ではこの境界は輪郭として抽出されていない。従って図12のF2に示す部分に輪郭線が描画されてしまう事態を防止できる。この際、第2の手法では、元画像の生成の際に生成されたZ値と、輪郭情報画像の生成の際に生成されたZ値に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断している。従って図11のE1に示す部分に輪郭線が描画されてしまう事態も防止できる。 That is, in the first method of FIG. 4, the boundary indicated by B1 between the object OB2 and the near object OB3 is also extracted as the contour of the object OB2. On the other hand, this boundary is not extracted as a contour in the second method of FIG. Accordingly, it is possible to prevent a situation in which a contour line is drawn in the portion indicated by F2 in FIG. At this time, in the second method, the processing target pixel is a pixel of the contour line of the object based on the Z value generated when the original image is generated and the Z value generated when the contour information image is generated. Judgment whether or not. Therefore, it is possible to prevent a situation in which a contour line is drawn at a portion indicated by E1 in FIG.
また第2の手法では図15(A)に示すようなラプラシアンフィルタを適用することで、オブジェクトの輪郭の一方側が高輝度で他方側が低輝度である場合に、高輝度側のみに輪郭線が描画される。 In the second method, a Laplacian filter as shown in FIG. 15A is applied, so that when one side of the contour of the object has high luminance and the other side has low luminance, a contour line is drawn only on the high luminance side. Is done.
例えば図15(B)において、輪郭EDの右側(一方側)のピクセル値は高輝度であり、EDの左側(他方側)のピクセル値は低輝度になっている。この場合に図15(B)の処理対象ピクセル200に対して図15(A)のラプラシアンフィルタを適用すると、結果値は+1.5になる。従って処理対象ピクセル200は輪郭線を構成するピクセルであると判断される。一方、図15(C)の処理対象ピクセル202に対して図15(A)のラプラシアンフィルタを適用すると、結果値は−1.5になる。従って処理対象ピクセル202は輪郭線を構成するピクセルではないと判断される。従って、このようなラプラシアンフィルタを適用すれば、図15(C)に示すように、輪郭EDの高輝度側のみに輪郭線EDLが描画されるようになる。従って図13のG1に示す部分においても、描画色が高輝度に設定された手前側のオブジェクトOB1(OB1の内側)のみに緑の輪郭線が描画され、描画色が低輝度に設定された奥側のオブジェクトOB2には輪郭線が描画されないようになる。この結果、図6のような二重の輪郭線が描画されてしまう事態を防止できる。 For example, in FIG. 15B, the pixel value on the right side (one side) of the contour ED has high luminance, and the pixel value on the left side (other side) of the ED has low luminance. In this case, when the Laplacian filter of FIG. 15A is applied to the processing target pixel 200 of FIG. 15B, the result value is +1.5. Therefore, it is determined that the processing target pixel 200 is a pixel constituting an outline. On the other hand, when the Laplacian filter of FIG. 15A is applied to the processing target pixel 202 of FIG. 15C, the result value is −1.5. Therefore, it is determined that the processing target pixel 202 is not a pixel constituting the contour line. Therefore, when such a Laplacian filter is applied, the contour line EDL is drawn only on the high luminance side of the contour ED, as shown in FIG. Therefore, also in the portion indicated by G1 in FIG. 13, a green outline is drawn only on the near object OB1 (inside OB1) where the drawing color is set to high luminance, and the drawing color is set to low luminance. The contour line is not drawn on the side object OB2. As a result, it is possible to prevent a situation where a double contour line as shown in FIG. 6 is drawn.
即ち第1の手法では図14(A)に示すように、視点から見て手前側のオブジェクトほどその輝度が明るくなるように、輪郭画像情報の生成の際の描画色が調整されている。従って、視点から見て手前側のオブジェクトが高輝度になり、奥側のオブジェクトが低輝度になることが保証される。従って図13のG1に示すように、視点から見て手前側にある高輝度のオブジェクトOB1の輪郭線(緑)のみが描画され、奥側にある低輝度のオブジェクトOB2の輪郭線(赤)は描画されないようになる。即ち視点から見て手前側にあるオブジェクトOB1と視点から見て奥側にあるオブジェクトOB2とが視点から見て重なる場合に、オブジェクトOB1、OB2の重なり部分における境界(図13のG1)において、オブジェクトOB1の輪郭線のみが描画されるようになる。 That is, in the first method, as shown in FIG. 14A, the drawing color at the time of generating the contour image information is adjusted so that the brightness of the object on the near side as viewed from the viewpoint becomes brighter. Therefore, it is ensured that the object on the near side as viewed from the viewpoint has high brightness and the object on the back side has low brightness. Accordingly, as shown by G1 in FIG. 13, only the outline (green) of the high-luminance object OB1 on the near side as viewed from the viewpoint is drawn, and the outline (red) of the low-luminance object OB2 on the back side is drawn. It will not be drawn. That is, when the object OB1 on the near side when viewed from the viewpoint and the object OB2 on the far side when viewed from the viewpoint overlap with each other when viewed from the viewpoint, the object OB1 and OB2 overlap at the boundary (G1 in FIG. 13). Only the outline of OB1 is drawn.
なお図15(A)(B)(C)では、高輝度側のみに輪郭線を描画しているが、低輝度側のみに輪郭線を描画するようにしてもよい。この場合には、例えば図15(A)とは異なる係数が設定されたラプラシアンフィルタなどを用いればよい。またこの場合には、図14(A)の輪郭情報画像の生成において、視点からの距離が遠くなるほどその輝度が明るくなるようにオブジェクトの描画色を調整すればよい。 In FIGS. 15A, 15B, and 15C, the outline is drawn only on the high luminance side, but the outline may be drawn only on the low luminance side. In this case, for example, a Laplacian filter in which a coefficient different from that shown in FIG. In this case, in the generation of the contour information image in FIG. 14A, the drawing color of the object may be adjusted so that the luminance increases as the distance from the viewpoint increases.
また輪郭情報画像の生成手法も図14(A)の手法に限定されない。例えば図14(C)に示すように、R成分(広義には第Kの成分)に輝度情報が設定され、G成分(広義には第Lの成分)に輪郭色指定情報(色テーブルのインデックス番号)が設定される描画色で、輪郭線の描画対象となるオブジェクトを描画して、輪郭情報画像を生成してもよい。この場合には、輪郭情報画像の描画色のR成分(第Kの成分)から輝度情報を取り出し、取り出された輝度情報に基づいてオブジェクトの輪郭を抽出すればよい。また輪郭情報画像の描画色のG成分(第Lの成分)から輪郭色指定情報を取り出し、取り出された輪郭色指定情報で指定される輪郭色で、オブジェクトの輪郭線を描画すればよい。なおB成分(広義には第Mの成分)にZ値(奥行き値)を設定するようにしてもよい。 Further, the generation method of the contour information image is not limited to the method shown in FIG. For example, as shown in FIG. 14C, luminance information is set for the R component (Kth component in a broad sense), and outline color designation information (color table index) is set for the G component (Lth component in a broad sense). An outline information image may be generated by drawing an object to be drawn with a drawing line with a drawing color for which (number) is set. In this case, luminance information may be extracted from the R component (Kth component) of the drawing color of the contour information image, and the contour of the object may be extracted based on the extracted luminance information. Further, the contour color designation information may be extracted from the G component (Lth component) of the drawing color of the contour information image, and the contour line of the object may be drawn with the contour color specified by the extracted outline color designation information. A Z value (depth value) may be set for the B component (the Mth component in a broad sense).
なお図14(C)のR成分に設定される輝度情報は、図14(A)の手法と同様に、視点からのオブジェクトの距離に応じてその値を調整することが望ましい。例えば視点からのオブジェクトの距離が大きくなるほど暗くなるように輝度情報を調整する。このように輝度情報を設定すれば、同じ描画色のオブジェクト同士での前後関係を区別できるようになる。従って図13において、視点から見て手前側にあるオブジェクトOB1のみに輪郭線を描画できるようになる。なお視点からのオブジェクトの距離が大きくなるほど明るくなるように、描画色のR成分に設定される輝度情報を調整してもよい。 Note that the luminance information set for the R component in FIG. 14C is desirably adjusted in accordance with the distance of the object from the viewpoint, as in the method of FIG. For example, the luminance information is adjusted so that the distance from the viewpoint increases as the distance of the object increases. Setting luminance information in this way makes it possible to distinguish the front-rear relationship between objects of the same drawing color. Accordingly, in FIG. 13, the contour line can be drawn only on the object OB1 on the near side as viewed from the viewpoint. Note that the luminance information set in the R component of the drawing color may be adjusted so that the object becomes brighter as the distance from the viewpoint increases.
2.3 オブジェクトの属性毎の輪郭線の描画
本実施形態では、異なる属性のオブジェクトについては異なる輪郭色の輪郭線を描画するようにしている。例えば図12において、第1の属性に属するオブジェクトOB1については、緑(広義には第1の輪郭色)でOB1の輪郭線を描画する。一方、第2の属性に属するオブジェクトOB2については、赤(広義には第2の描画色)でOB2の輪郭線を描画する。なお、属性の数や輪郭色の数は2つに限定されず、3つ以上とすることができる。
2.3 Drawing Contour Lines for Each Object Attribute In this embodiment, contour lines having different outline colors are drawn for objects having different attributes. For example, in FIG. 12, for the object OB1 belonging to the first attribute, the contour line of OB1 is drawn in green (first contour color in a broad sense). On the other hand, for the object OB2 belonging to the second attribute, the outline of OB2 is drawn in red (second drawing color in a broad sense). Note that the number of attributes and the number of contour colors are not limited to two and can be three or more.
例えば図16に本実施形態で生成されるゲーム画面(ゲーム画像)の一例を示す。このゲームでは、近未来において、プレーヤがゴーグル型のサングラスを装着して町を探索するという想定になっている。このゴーグル側のサングラスを装着し、スキャンモードに設定すると、プレーヤは、町にいるキャラクタが敵なのか味方なのかを知ることができる。また操作部のボタンを押してその内容を調べたアイテムが、重要な情報を有するアイテムなのか、そうでないアイテムなのかを知ることができる。 For example, FIG. 16 shows an example of a game screen (game image) generated in the present embodiment. In this game, it is assumed that in the near future, a player searches for a town wearing goggles sunglasses. By wearing the goggles side sunglasses and setting the scan mode, the player can know whether the character in the town is an enemy or a friend. Further, it is possible to know whether an item whose contents are checked by pressing a button on the operation unit is an item having important information or not.
そして図16のゲーム画面において、キャラクタ(広義にはオブジェクト)CH1は、敵グループに属するため、例えば赤の輪郭色(第1の輪郭色)でCH1の輪郭線が描画されている。一方、キャラクタCH2、CH3、CH4は、敵以外のグループ(味方グループ、通行人などの無関係なグループ)に属するため、例えば緑の輪郭色(第2の輪郭色)でCH2、CH3、CH4の輪郭線が描画されている。このような色分けした輪郭線の描画は、前述した本実施形態の第1、第2の手法等により実現できる。 In the game screen of FIG. 16, the character (object in a broad sense) CH1 belongs to the enemy group, and therefore the outline of CH1 is drawn with a red outline color (first outline color), for example. On the other hand, since the characters CH2, CH3, and CH4 belong to a group other than the enemy (an irrelevant group such as an ally group and a passerby), for example, the contours of CH2, CH3, and CH4 are green contour colors (second contour colors). A line is drawn. Such drawing of the color-coded contour lines can be realized by the first and second methods of the present embodiment described above.
例えば従来の輪郭線描画では、アニメ特有のセル画風の画像の生成を目的として輪郭線を描画していた。このため、オブジェクトの輪郭に描画される輪郭線は、黒等の一色のみであり、色分けした輪郭線の描画を行うことはなかった。 For example, in the conventional contour drawing, a contour is drawn for the purpose of generating a cell-like image peculiar to animation. For this reason, the outline drawn on the outline of the object is only one color such as black, and the color-coded outline is not drawn.
これに対して本実施形態では図16に示すように、異なる属性のオブジェクトには異なる輪郭色の輪郭線を描画している。このようにすれば、プレーヤは、輪郭線の色を見るだけで、オブジェクトの属性を判別できるようになり、輪郭線をこれまでと違った用途に使用できるようになる。 On the other hand, in this embodiment, as shown in FIG. 16, contour lines having different contour colors are drawn on objects having different attributes. In this way, the player can determine the attribute of the object simply by looking at the color of the outline, and the outline can be used for a different purpose.
例えば図16では、プレーヤは、キャラクタに付加された輪郭線の色を見ることで、キャラクタが敵なのか、敵以外なのかを容易に判別できる。従って多数のキャラクタに囲まれたプレーヤが、どれが敵でどれが味方なのかが分からなくなり、ゲームプレイが混乱してしまうような事態を防止できる。特に近年のゲームでは、画像生成システムの能力の向上により、ゲーム空間上に多数のキャラクタを登場させることが可能になっている。従って、このような画像生成システムにおいては、図16に示すように輪郭色で敵を判別させる手法は有効になる。 For example, in FIG. 16, the player can easily determine whether the character is an enemy or a non-enemy by looking at the color of the outline added to the character. Accordingly, it is possible to prevent a player surrounded by a large number of characters from knowing which is an enemy and which is an ally and confusing game play. Particularly in recent games, it has become possible to make a large number of characters appear in the game space by improving the ability of the image generation system. Therefore, in such an image generation system, a technique for discriminating enemies by the outline color as shown in FIG. 16 is effective.
また、この種のゲームでは、ゲーム空間(オブジェクト空間)上に配置されたアイテム(広義にはオブジェクト)を調べて、情報を収集し、収集した情報に基づいてゲームを進行させる。この場合にも本実施形態では、第1のタイプの情報(例えば重要な情報)を有するアイテム(オブジェクト)については第1の輪郭色で輪郭線を描画し、第2のタイプの情報(例えば重要ではない情報や収集済みの情報)を有するアイテムについては第2の輪郭色で輪郭線を描画する。こうすればプレーヤは、アイテムに付加された輪郭線の色を見るだけで、アイテムが有する情報の内容を把握できる。従って、多数のアイテムがゲーム空間に配置されるような場合にも、プレーヤはスムーズにゲームを進行させることが可能になる。 In this type of game, items (objects in a broad sense) arranged in the game space (object space) are examined, information is collected, and the game is advanced based on the collected information. In this case as well, in this embodiment, for an item (object) having the first type of information (for example, important information), a contour line is drawn with the first outline color, and the second type of information (for example, important information) Contour lines are drawn in the second contour color for items having non-information or collected information). In this way, the player can grasp the content of the information that the item has only by looking at the color of the outline added to the item. Therefore, even when a large number of items are arranged in the game space, the player can smoothly advance the game.
なお、本実施形態の輪郭線の色分け手法は、上述した手法に限定されない。例えば輪郭線の色分け対象は、キャラクタやアイテム以外であってもよい。また、グループのタイプや情報のタイプ以外のオブジェクトの属性に基づいて、輪郭線の色分けを行ってもよい。また本実施形態の第1、第2の手法以外の手法で、輪郭線の色分けを行ってもよい。 Note that the color coding method of the contour line of the present embodiment is not limited to the above-described method. For example, the color coding target of the outline may be other than a character or item. The contour lines may be color-coded based on the attributes of the object other than the group type and the information type. In addition, the contour lines may be color-coded by a method other than the first and second methods of the present embodiment.
2.4 詳細な処理例
次に本実施形態の詳細な処理例を図17、図18のフローチャートを用いて説明する。図17、図18は第2の手法の処理例である。
2.4 Detailed Processing Example Next, a detailed processing example of this embodiment will be described with reference to the flowcharts of FIGS. 17 and 18. 17 and 18 show processing examples of the second method.
まずテクスチャAを描画先として設定する(ステップS31)。そしてZバッファをクリア(消去)する(ステップS32)。具体的にはZバッファのZ値を最大値(最も奥側の値)にクリアする。そして通常のゲーム画面(元画像)を描画し、同時に描画先のテクスチャAのαチャンネルにZ値を出力する(ステップS33)。これにより、テクスチャAの画像として図7に示すような画像が生成される。またテクスチャAのαチャンネルに図8に示すようなZ値が格納される。 First, texture A is set as a drawing destination (step S31). Then, the Z buffer is cleared (erased) (step S32). Specifically, the Z value of the Z buffer is cleared to the maximum value (the deepest value). Then, the normal game screen (original image) is drawn, and at the same time, the Z value is output to the α channel of the texture A as the drawing destination (step S33). As a result, an image as shown in FIG. Further, the Z value as shown in FIG.
次にテクスチャBを描画先として設定する(ステップS34)。そしてテクスチャBのR、G、B、αチャンネルをクリアする(ステップS35)。具体的には黒(0.0)の値にクリアする。そしてZバッファをクリアする(ステップS36)。 Next, texture B is set as a drawing destination (step S34). Then, the R, G, B, and α channels of texture B are cleared (step S35). Specifically, the value is cleared to black (0.0). Then, the Z buffer is cleared (step S36).
次に、輪郭線描画の対象となる各オブジェクトについて、各オブジェクトの指定輪郭色(赤、緑、青の原色)に対し、各オブジェクトの代表点(原点)の視点からの距離に応じて、手前側は明るくなり奥側は暗くなるように輝度調整を施した単色で描画し、同時に描画先のテクスチャBのαチャンネルにZ値を出力する(ステップS37)。即ち図14(A)で説明した手法により、輪郭線描画の対象となるオブジェクトを描画する。これにより、テクスチャBの画像として図9に示すような画像が生成される。またテクスチャBのαチャンネルに図10に示すようなZ値が格納される。 Next, for each object that is the subject of contour drawing, foremost according to the distance from the viewpoint of the representative point (origin) of each object to the specified contour color (primary colors of red, green, and blue) of each object Drawing is performed in a single color with brightness adjusted so that the side is bright and the back side is dark, and at the same time, the Z value is output to the α channel of the texture B of the drawing destination (step S37). In other words, the object to be drawn is drawn by the method described with reference to FIG. As a result, an image as shown in FIG. Also, the Z value as shown in FIG.
次にテクスチャC(フレームバッファ)を描画先として設定する(ステップS38)。そしてテクスチャA及びテクスチャBの対応する位置のピクセルについてピクセルシェーダ処理を行い、描画先の全ピクセルについての処理結果を出力する(ステップS39)。そしてテクスチャCを表示する(ステップS40)。即ちテクスチャCを画面サイズのプリミティブ面(スプライト、ポリゴン)にテクスチャマッピングし、得られた画像を表示部に出力する。なお、ゲーム画面に対して、体力ゲージや簡易マップなどを重ねて表示する場合には、これらの体力ゲージや簡易マップを表示するためのテクスチャDと、テクスチャCを、画面サイズのプリミティブ面にマルチテクスチャマッピングすればよい。 Next, texture C (frame buffer) is set as a drawing destination (step S38). Then, the pixel shader process is performed for the pixels at the corresponding positions of the texture A and the texture B, and the processing results for all the pixels of the drawing destination are output (step S39). Then, the texture C is displayed (step S40). That is, the texture C is texture-mapped to a screen-size primitive surface (sprite, polygon), and the obtained image is output to the display unit. When a physical strength gauge, a simple map, or the like is displayed over the game screen, the texture D and the texture C for displaying the physical strength gauge and the simple map are displayed on the screen size primitive surface. Texture mapping may be performed.
図18は図17のステップS39で行われるピクセルシェーダ処理のフローチャートである。具体的には図18の処理を行うピクセルシェーダプログラムが、画像生成システムが有するピクセルシェーダ回路に転送される。そしてピクセルシェーダ回路は、ピクセルシェーダプログラムに記述されたコマンドを解釈し、各コマンドに従った処理を実行する。そしてこの処理は画面の全てのピクセルに対して行われる。 FIG. 18 is a flowchart of the pixel shader process performed in step S39 of FIG. Specifically, a pixel shader program that performs the processing of FIG. 18 is transferred to a pixel shader circuit included in the image generation system. Then, the pixel shader circuit interprets commands described in the pixel shader program, and executes processing according to each command. This process is performed for all pixels on the screen.
ピクセルシェーダ処理では、まず、テクスチャBのR、G、B値の全てが0か否かを判断する(ステップS41)。そしてゼロである場合には、テクスチャA(元画像)のR、G、B値を描画先に出力する(ステップS42)。即ちテクスチャBのR、G、B値の全てが0である処理対象ピクセルについては、図7の元画像のR、G、B値が設定されることになる。 In the pixel shader process, first, it is determined whether or not all of the R, G, and B values of the texture B are 0 (step S41). If it is zero, the R, G, B values of texture A (original image) are output to the drawing destination (step S42). That is, for the processing target pixel in which all of the R, G, and B values of the texture B are 0, the R, G, and B values of the original image in FIG. 7 are set.
テクスチャBのR、G、B値の少なくとも1つがゼロではない場合には、テクスチャBのα値(Z値)がテクスチャAのα値(Z値)以下か否かを判断する(ステップS43)。そしてテクスチャBのα値の方がテクスチャAのα値よりも大きい場合には、ステップS42に移行し、処理対象ピクセルには元画像のR、G、B値が設定される。 If at least one of the R, G, and B values of the texture B is not zero, it is determined whether the α value (Z value) of the texture B is equal to or less than the α value (Z value) of the texture A (step S43). . If the α value of texture B is larger than the α value of texture A, the process proceeds to step S42, and the R, G, and B values of the original image are set for the processing target pixel.
一方、テクスチャBのα値がテクスチャAのα値以下である場合には、テクスチャBの処理対象ピクセル及び隣接する8ピクセルについて、各ピクセルの輝度(R、G、B値の総和)に対しラプラシアンフィルタを適用する(ステップS44)。即ち図15(A)に示すラプラシアンフィルタを適用して、図15(B)に示すような演算処理が行われ、オブジェクトの輪郭の抽出処理が行われる。 On the other hand, when the α value of the texture B is equal to or less than the α value of the texture A, the Laplacian with respect to the luminance (sum of R, G, and B values) of each pixel for the processing target pixel of the texture B and the adjacent 8 pixels A filter is applied (step S44). That is, the Laplacian filter shown in FIG. 15A is applied to perform arithmetic processing as shown in FIG. 15B, and object contour extraction processing is performed.
次にステップS44の処理結果がゼロよりも大きいか否かを判断する(ステップS45)。そしてゼロよりも大きい場合には、処理対象ピクセルが輪郭線のピクセルであると判断し、小数部を切り上げた値を描画先に出力する(ステップS46)。即ち図14(B)に示すような色彩情報の抽出が行われ、オブジェクトの輪郭色のR、G、B値が処理対象ピクセルに設定される。これにより、図12に示すようなオブジェクトの輪郭に輪郭線が付加された画像(テクスチャC)が生成されるようになる。 Next, it is determined whether or not the processing result of step S44 is greater than zero (step S45). If it is greater than zero, it is determined that the pixel to be processed is a contour pixel, and the value obtained by rounding up the fractional part is output to the drawing destination (step S46). That is, the color information is extracted as shown in FIG. 14B, and the R, G, and B values of the outline color of the object are set as the processing target pixel. As a result, an image (texture C) in which a contour line is added to the contour of the object as shown in FIG. 12 is generated.
3.ハードウェア構成
図19に本実施形態を実現できるハードウェア構成の例を示す。メインプロセッサ900は、DVD982(情報記憶媒体。CDでもよい。)に格納されたプログラム、通信インターフェース990を介してダウンロードされたプログラム、或いはROM950に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などを実行する。コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、マトリクス演算(ベクトル演算)を高速に実行する。例えばオブジェクトを移動させたり動作(モーション)させる物理シミュレーションに、マトリクス演算処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
3. Hardware Configuration FIG. 19 shows an example of a hardware configuration capable of realizing this embodiment. The main processor 900 operates based on a program stored in a DVD 982 (information storage medium, which may be a CD), a program downloaded via the communication interface 990, a program stored in the ROM 950, or the like. Perform processing, sound processing, etc. The coprocessor 902 assists the processing of the main processor 900, and executes matrix operation (vector operation) at high speed. For example, when a matrix calculation process is required for a physical simulation for moving or moving an object, a program operating on the main processor 900 instructs (requests) the process to the coprocessor 902.
ジオメトリプロセッサ904は、メインプロセッサ900上で動作するプログラムからの指示に基づいて、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、マトリクス演算を高速に実行する。データ伸張プロセッサ906は、圧縮された画像データや音データのデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセラレートする。これにより、オープニング画面やゲーム画面において、MPEG方式等で圧縮された動画像を表示できる。 The geometry processor 904 performs geometry processing such as coordinate conversion, perspective conversion, light source calculation, and curved surface generation based on an instruction from a program operating on the main processor 900, and executes matrix calculation at high speed. The data decompression processor 906 performs decoding processing of the compressed image data and sound data and accelerates the decoding processing of the main processor 900. Thereby, a moving image compressed by the MPEG method or the like can be displayed on the opening screen or the game screen.
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データ(頂点データや他のパラメータ)を描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエイリアシング、シェーディング処理なども行う。頂点シェーダやピクセルシェーダなどのプログラマブルシェーダも描画プロセッサ910に実装されており、本実施形態の手法を実現するシェーダプログラムに従って、頂点データの作成・変更(更新)やピクセル(あるいはフラグメント)の描画色の決定を行う。1フレーム分の画像がフレームバッファ922に書き込まれるとその画像はディスプレイ912に表示される。 The drawing processor 910 executes drawing (rendering) processing of an object composed of primitive surfaces such as polygons and curved surfaces. When drawing an object, the main processor 900 uses the DMA controller 970 to pass the drawing data (vertex data and other parameters) to the drawing processor 910 and, if necessary, the texture to the texture storage unit 924. Forward. Then, the drawing processor 910 draws the object in the frame buffer 922 while performing hidden surface removal using a Z buffer or the like based on the drawing data and texture. The drawing processor 910 also performs α blending (translucent processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. Programmable shaders such as a vertex shader and a pixel shader are also mounted on the drawing processor 910. According to the shader program that realizes the method of this embodiment, the creation / change (update) of vertex data and the drawing color of pixels (or fragments) are changed. Make a decision. When an image for one frame is written in the frame buffer 922, the image is displayed on the display 912.
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などのゲーム音を生成し、スピーカ932を介して出力する。ゲームコントローラ942やメモリカード944からのデータはシリアルインターフェース940を介して入力される。 The sound processor 930 includes a multi-channel ADPCM sound source and the like, generates game sounds such as BGM, sound effects, and sounds, and outputs them through the speaker 932. Data from the game controller 942 and the memory card 944 is input via the serial interface 940.
ROM950にはシステムプログラムなどが格納される。業務用ゲームシステムの場合にはROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納される。なおROM950の代わりにハードディスクを利用してもよい。RAM960は各種プロセッサの作業領域となる。DMAコントローラ970は、プロセッサ、メモリ間でのDMA転送を制御する。DVDドライブ980(CDドライブでもよい。)は、プログラム、画像データ、或いは音データなどが格納されるDVD982(CDでもよい。)にアクセスする。通信インターフェース990はネットワーク(通信回線、高速シリアルバス)を介して外部との間でデータ転送を行う。 The ROM 950 stores system programs and the like. In the case of an arcade game system, the ROM 950 functions as an information storage medium, and various programs are stored in the ROM 950. A hard disk may be used instead of the ROM 950. The RAM 960 is a work area for various processors. The DMA controller 970 controls DMA transfer between the processor and the memory. The DVD drive 980 (may be a CD drive) accesses a DVD 982 (may be a CD) in which programs, image data, sound data, and the like are stored. The communication interface 990 performs data transfer with the outside via a network (communication line, high-speed serial bus).
なお本実施形態の各部(各手段)の処理は、その全てをハードウェアのみにより実現してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。 The processing of each unit (each unit) in this embodiment may be realized entirely by hardware, or may be realized by a program stored in an information storage medium or a program distributed via a communication interface. Also good. Alternatively, it may be realized by both hardware and a program.
そして本実施形態の各部の処理をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、ハードウェア(コンピュータ)を本実施形態の各部として機能させるためのプログラムが格納される。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930は、その指示と渡されたデータとに基づいて本発明の各部の処理を実現する。 When the processing of each part of this embodiment is realized by both hardware and a program, a program for causing the hardware (computer) to function as each part of this embodiment is stored in the information storage medium. More specifically, the program instructs the processors 902, 904, 906, 910, and 930, which are hardware, and passes data if necessary. Each processor 902, 904, 906, 910, 930 realizes the processing of each unit of the present invention based on the instruction and the passed data.
なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語(第Kの成分、第Lの成分、第Mの成分、第1の輪郭色、第2の輪郭色等)と共に記載された用語(R成分、G成分、B成分、緑、赤等)は、明細書または図面のいかなる箇所においても、その異なる用語に置き換えることができる。 Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, in the specification or the drawings, it is described at least once together with different terms (Kth component, Lth component, Mth component, first contour color, second contour color, etc.) in a broader sense or the same meaning. The terms (R component, G component, B component, green, red, etc.) can be replaced with the different terms in any part of the specification or drawings.
また輪郭線の描画手法も本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。例えば輪郭情報画像の生成手法や輪郭の抽出手法等も本実施形態で説明した手法に限定されない。また異なる属性のオブジェクトに異なる描画色の輪郭線を描画する発明では、第1の手法や第2の手法で輪郭線を描画してもよいし、それ以外の手法で輪郭線を描画してもよい。また本発明は、ピクセルシェーダ処理により実現してもよいし、それ以外の処理により実現してもよい。 Further, the contour line drawing method is not limited to the one described in the present embodiment, and methods equivalent to these are also included in the scope of the present invention. For example, the contour information image generation method, the contour extraction method, and the like are not limited to the method described in the present embodiment. In the invention of drawing contour lines of different drawing colors on objects having different attributes, the contour lines may be drawn by the first method or the second method, or the contour lines may be drawn by other methods. Good. Further, the present invention may be realized by pixel shader processing, or may be realized by other processing.
また本発明は種々のゲームに適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレイヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々の画像生成システムに適用できる。 The present invention can be applied to various games. Further, the present invention is applied to various image generation systems such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, a system board for generating game images, and a mobile phone. it can.
100 処理部、110 オブジェクト空間設定部、112 移動・動作処理部、
114 仮想カメラ制御部、120 画像生成部、122 元画像生成部、
124 輪郭情報画像生成部、128 輪郭線描画部、
130 音生成部、160 操作部、170 記憶部、172 フレームバッファ、
174 テクスチャ記憶部、176 Zバッファ、180 情報記憶媒体、
190 表示部、192 音出力部、194 携帯型情報記憶装置、196 通信部
100 processing unit, 110 object space setting unit, 112 movement / motion processing unit,
114 virtual camera control unit, 120 image generation unit, 122 original image generation unit,
124 contour information image generation unit, 128 contour line drawing unit,
130 sound generation unit, 160 operation unit, 170 storage unit, 172 frame buffer,
174 texture storage unit, 176 Z buffer, 180 information storage medium,
190 display unit, 192 sound output unit, 194 portable information storage device, 196 communication unit
Claims (15)
オブジェクトを描画して元画像を生成する元画像生成部と、
オブジェクト毎に設定された描画色でオブジェクトを描画し、オブジェクトの輪郭色設定と輪郭検出のための輪郭情報画像を生成する輪郭情報画像生成部と、
前記元画像に対してオブジェクトの輪郭線の画像を合成し、オブジェクトの輪郭線を描画する輪郭線描画部として、
コンピュータを機能させ、
前記輪郭線描画部は、
前記輪郭情報画像に基づいてオブジェクトの輪郭を抽出し、前記輪郭情報画像の前記描画色で設定される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線を描画することを特徴とするプログラム。 A program for generating an image,
An original image generating unit for generating an original image by drawing an object;
A contour information image generating unit that draws an object with a drawing color set for each object, and generates a contour information image for contour color setting and contour detection of the object;
As an outline drawing unit that combines an image of an object outline with the original image and draws an object outline,
Make the computer work,
The outline drawing unit
A program that extracts the contour of an object based on the contour information image and draws a contour line with respect to the contour of the extracted object with the contour color set by the drawing color of the contour information image .
前記輪郭情報画像生成部は、
オブジェクトの輪郭色に対して視点からのオブジェクトの距離に応じて輝度調整を施した色を前記描画色としてオブジェクトを描画して、前記輪郭情報画像を生成することを特徴とするプログラム。 In claim 1,
The contour information image generation unit
A program characterized in that the contour information image is generated by drawing an object using a color obtained by adjusting brightness according to the distance of the object from the viewpoint with respect to the contour color of the object as the drawing color.
前記輪郭線描画部は、
前記輪郭情報画像の前記描画色から輝度情報を抽出し、抽出された前記輝度情報に基づいてオブジェクトの輪郭を抽出することを特徴とするプログラム。 In claim 2,
The outline drawing unit
A program that extracts luminance information from the drawing color of the outline information image and extracts an outline of an object based on the extracted luminance information.
前記輪郭線描画部は、
前記輪郭情報画像の前記描画色の第1、第2、第3の成分の値の加算処理を行うことで、前記輝度情報を抽出することを特徴とするプログラム。 In claim 3,
The outline drawing unit
The program which extracts the said brightness | luminance information by performing the addition process of the value of the 1st, 2nd, 3rd component of the said drawing color of the said outline information image.
前記輪郭線描画部は、
前記輪郭情報画像の前記描画色から色彩情報を抽出し、抽出された前記色彩情報に対応する輪郭色でオブジェクトの輪郭線を描画することを特徴とするプログラム。 In any of claims 2 to 4,
The outline drawing unit
A program that extracts color information from the drawing color of the outline information image and draws an outline of an object with an outline color corresponding to the extracted color information.
前記輪郭線描画部は、
前記輪郭情報画像の前記描画色の第Kの成分から輝度情報を取り出し、取り出された前記輝度情報に基づいてオブジェクトの輪郭を抽出することを特徴とするプログラム。 In any one of Claims 1 thru | or 5,
The outline drawing unit
A program that extracts luminance information from a Kth component of the drawing color of the contour information image and extracts an outline of an object based on the extracted luminance information.
前記輪郭情報画像生成部は、
第Lの成分に輪郭色指定情報が設定される描画色でオブジェクトを描画して、前記輪郭情報画像を生成し、
前記輪郭線描画部は、
前記輪郭情報画像の前記描画色の第Lの成分から輪郭色指定情報を取り出し、取り出された前記輪郭色指定情報で指定される輪郭色で、オブジェクトの輪郭線を描画することを特徴とするプログラム。 In any one of Claims 1 thru | or 6.
The contour information image generation unit
Drawing an object in a drawing color in which contour color designation information is set in the L-th component, generating the contour information image;
The outline drawing unit
A program that extracts contour color designation information from the Lth component of the drawing color of the contour information image and draws a contour line of an object with the contour color designated by the extracted contour color designation information .
前記輪郭線描画部は、
オブジェクトの輪郭の一方側が他方側に比べて高輝度である場合に、前記一方側のみ或いは前記他方側のみにオブジェクトの輪郭線を描画することを特徴とするプログラム。 In any one of Claims 1 thru | or 7,
The outline drawing unit
If Ru high brightness der compared to one side is the other side of the contour of an object, the program characterized by rendering the one side only or contour of an object only to the other side.
前記輪郭線描画部は、
前記元画像の生成の際に生成されたZ値と、前記輪郭情報画像の生成の際に生成されたZ値に基づいて、処理対象ピクセルがオブジェクトの輪郭線のピクセルか否かを判断することを特徴とするプログラム。 In any one of Claims 1 thru | or 8.
The outline drawing unit
Determining whether the pixel to be processed is a pixel of the contour line of the object based on the Z value generated when generating the original image and the Z value generated when generating the contour information image A program characterized by
前記輪郭線描画部は、
視点から見て手前側にある第1のオブジェクトと視点から見て奥側にある第2のオブジェクトとが視点から見て重なる場合に、前記第1、第2のオブジェクトの重なり部分における境界において、前記第1のオブジェクトの輪郭線のみを描画することを特徴とするプログラム。 In any of claims 1 to 9,
The outline drawing unit
When the first object on the near side when viewed from the viewpoint and the second object on the far side when viewed from the viewpoint overlap with each other when viewed from the viewpoint, at the boundary at the overlapping portion of the first and second objects, A program for drawing only an outline of the first object.
前記輪郭線描画部は、
第1の属性に属するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、第2の属性に属するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画することを特徴とするプログラム。 In any one of Claims 1 thru | or 10 .
The outline drawing unit
For an object belonging to the first attribute, an object outline is drawn with a first outline color, and for an object belonging to the second attribute, an object outline is drawn with a second outline color. program.
前記輪郭線描画部は、
敵グループに属するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、敵以外のグループに属するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画することを特徴とするプログラム。 In claim 11 ,
The outline drawing unit
A program for drawing an object outline in a first outline color for an object belonging to an enemy group and drawing an object outline in a second outline color for an object belonging to a group other than the enemy.
前記輪郭線描画部は、
第1のタイプの情報を有するオブジェクトについては第1の輪郭色でオブジェクトの輪郭線を描画し、第2のタイプの情報を有するオブジェクトについては第2の輪郭色でオブジェクトの輪郭線を描画することを特徴とするプログラム。 In claim 11 ,
The outline drawing unit
For an object having the first type of information, the outline of the object is drawn with the first outline color, and for an object having the second type of information, the outline of the object is drawn with the second outline color. A program characterized by
オブジェクトを描画して元画像を生成する元画像生成部と、
オブジェクト毎に設定された描画色でオブジェクトを描画し、オブジェクトの輪郭色設定と輪郭検出のための輪郭情報画像を生成する輪郭情報画像生成部と、
前記元画像に対してオブジェクトの輪郭線の画像を合成し、オブジェクトの輪郭線を描画する輪郭線描画部とを含み、
前記輪郭線描画部は、
前記輪郭情報画像に基づいてオブジェクトの輪郭を抽出し、前記輪郭情報画像の前記描画色で設定される輪郭色で、抽出されたオブジェクトの輪郭に対して輪郭線を描画することを特徴とする画像生成システム。 An image generation system for generating an image,
An original image generating unit for generating an original image by drawing an object;
A contour information image generating unit that draws an object with a drawing color set for each object, and generates a contour information image for contour color setting and contour detection of the object;
An outline drawing unit that combines an image of the outline of the object with the original image and draws the outline of the object;
The outline drawing unit
An image characterized in that an outline of an object is extracted based on the outline information image, and an outline is drawn with respect to the extracted outline of the object with an outline color set by the drawing color of the outline information image. Generation system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005207664A JP4749064B2 (en) | 2005-07-15 | 2005-07-15 | Program, information storage medium, and image generation system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005207664A JP4749064B2 (en) | 2005-07-15 | 2005-07-15 | Program, information storage medium, and image generation system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007026111A JP2007026111A (en) | 2007-02-01 |
JP4749064B2 true JP4749064B2 (en) | 2011-08-17 |
Family
ID=37786771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005207664A Active JP4749064B2 (en) | 2005-07-15 | 2005-07-15 | Program, information storage medium, and image generation system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4749064B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4387429B2 (en) | 2007-07-25 | 2009-12-16 | 株式会社スクウェア・エニックス | Image generating apparatus and method, program, and recording medium |
JP4382117B2 (en) | 2007-07-25 | 2009-12-09 | 株式会社スクウェア・エニックス | Image generating apparatus and method, program, and recording medium |
JP2010033300A (en) * | 2008-07-28 | 2010-02-12 | Namco Bandai Games Inc | Program, information storage medium, and image generation system |
KR100922600B1 (en) | 2009-04-29 | 2009-10-21 | (주)엠더블유스토리 | Outline rendering method and device of multimedia character |
CN103890814B (en) * | 2011-10-18 | 2017-08-29 | 英特尔公司 | Graphics process based on surface |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002163671A (en) * | 2000-11-27 | 2002-06-07 | Namco Ltd | Game system, program and information storage medium |
JP4583631B2 (en) * | 2001-02-21 | 2010-11-17 | シャープ株式会社 | Graphic drawing apparatus, graphic drawing method, and computer-readable recording medium recording a graphic drawing program |
-
2005
- 2005-07-15 JP JP2005207664A patent/JP4749064B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2007026111A (en) | 2007-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20020177481A1 (en) | Game system, program and image generating method | |
US7479961B2 (en) | Program, information storage medium, and image generation system | |
US6828969B2 (en) | Game system, program and image generating method | |
JP4749198B2 (en) | Program, information storage medium, and image generation system | |
JP4728721B2 (en) | Program, information storage medium, and image generation system | |
JP2005032140A (en) | Image generation system, program, and information storage medium | |
JP4749064B2 (en) | Program, information storage medium, and image generation system | |
JP2009129167A (en) | Program, information storage medium, and image generation system | |
JP4754384B2 (en) | Program, information recording 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 | |
JP2010231364A (en) | Image generation system, program and information recording medium | |
JP4528008B2 (en) | Program, information storage medium, and image generation system | |
JP4488346B2 (en) | Program, information storage medium, and image generation system | |
JP2010033297A (en) | Program, information storage medium, and image generation system | |
JP3748451B1 (en) | Program, information storage medium, and image generation system | |
JP4651527B2 (en) | Program, information storage medium, and image generation system | |
JP4913399B2 (en) | Program, information storage medium, and image generation system | |
JP2008077406A (en) | Image generation system, program, and information storage medium | |
JP4476040B2 (en) | Program, information storage medium, and image generation system | |
JP4521811B2 (en) | Program, information storage medium, and image generation system | |
JP4592087B2 (en) | Image generation system, program, and information storage medium | |
JP2010033253A (en) | Program, information storage medium, and image generation system | |
JP2010033302A (en) | Image generation system, program and information storage medium | |
JP2006268103A (en) | Program, information storage medium, model data structure, and image generation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080519 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101101 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101117 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110117 |
|
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: 20110511 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110517 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4749064 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140527 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140527 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R360 | Written notification for declining of transfer of rights |
Free format text: JAPANESE INTERMEDIATE CODE: R360 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R370 | Written measure of declining of transfer procedure |
Free format text: JAPANESE INTERMEDIATE CODE: R370 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |