JP4975159B2 - Colorless lighting in a graphics system, method and program for generating graphics images - Google Patents

Colorless lighting in a graphics system, method and program for generating graphics images Download PDF

Info

Publication number
JP4975159B2
JP4975159B2 JP2010273183A JP2010273183A JP4975159B2 JP 4975159 B2 JP4975159 B2 JP 4975159B2 JP 2010273183 A JP2010273183 A JP 2010273183A JP 2010273183 A JP2010273183 A JP 2010273183A JP 4975159 B2 JP4975159 B2 JP 4975159B2
Authority
JP
Japan
Prior art keywords
texture
color
lighting
graphics
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2010273183A
Other languages
Japanese (ja)
Other versions
JP2011090699A (en
Inventor
エイ ドレビン ロバート
吉孝 安本
ホリス マーチン
デマーズ エリック
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nintendo Co Ltd
Original Assignee
Nintendo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nintendo Co Ltd filed Critical Nintendo Co Ltd
Publication of JP2011090699A publication Critical patent/JP2011090699A/en
Application granted granted Critical
Publication of JP4975159B2 publication Critical patent/JP4975159B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

本発明は、コンピュータグラフィックスに関し、より詳細には、家庭用ビデオゲームプラットフォームなどの対話式グラフィックスシステム、グラフィックス画像を生成する方法、およびプログラムに関する。より詳細には、本発明は、色または不透明度を変更するために後に用いられるパラメータを生成するためにライティング関数を用いるグラフィックス処理の改良に関する。さらに、詳細には、本発明は、さらなる関数(例えばテクスチャリング)などに適用される距離または角度などのパラメータをライティング計算が定義する3Dグラフィックスシステムに関する。   The present invention relates to computer graphics, and more particularly to interactive graphics systems such as home video game platforms, methods and programs for generating graphics images. More particularly, the present invention relates to improved graphics processing that uses lighting functions to generate parameters that are used later to change color or opacity. More particularly, the present invention relates to a 3D graphics system in which lighting calculations define parameters such as distance or angle applied to additional functions (eg, texturing) and the like.

我々の多くは、驚くほどリアルな恐竜、異星人、アニメーション化された玩具、およびその他の空想的な生物を含む映画を観たことがある。このようなアニメーションは、コンピュータグラフィックスによって可能となる。こうした技術を用いることにより、コンピュータグラフィックスアーチストは、各オブジェクトがどのように見えるべきか、また時間とともにどのように外見が変化すべきかを指定することができ、そしてコンピュータがオブジェクトをモデリングし、これらをテレビやコンピュータスクリーンなどのディスプレイ上に表示する。このコンピュータは、シーン中の各オブジェクトの位置および方向、各オブジェクトに光が入射しているように見える方向、各オブジェクトの表面テクスチャ、およびその他の要素に基づき、表示された画像の各部分がちょうど正しく色付けされかつ形付けられていることを確実にするために必要な多くの処理の実行を担当する。   Many of us have seen movies that include surprisingly realistic dinosaurs, aliens, animated toys, and other fantastic creatures. Such animation is made possible by computer graphics. Using these techniques, computer graphics artists can specify how each object should look and how its appearance should change over time, and the computer models the objects On a display such as a television or computer screen. Based on the position and orientation of each object in the scene, the direction in which light appears to be incident on each object, the surface texture of each object, and other factors, the computer Responsible for performing many of the processes necessary to ensure that it is correctly colored and shaped.

コンピュータグラフィックスの生成は複雑であるため、ほんの数年前では、コンピュータ生成された3次元グラフィックスは、高価な専用のフライトシミュレータ、ハイエンドのグラフィックスワークステーション、およびスーパーコンピュータに概ね限定されていた。大衆は、これらのコンピュータシステムによって生成された画像のいくつかを映画や高価なテレビ広告で見ることはあったが、我々の大部分は、グラフィックス生成を行うコンピュータに実際に接触することはできなかった。これが全て、例えばニンテンドウ64(登録商標)などの比較的安価な3Dグラフィックスプラットフォームや、現在パーソナルコンピュータで利用可能な様々な3Dグラフィックスカードが利用可能になることにより変貌した。今や、家庭またはオフィスにて、比較的安価なコンピュータグラフィックスシステム上で刺激的な3Dアニメーションおよびシミュレーションと接触することが可能である。   Due to the complexity of computer graphics generation, only a few years ago computer-generated 3D graphics was largely limited to expensive dedicated flight simulators, high-end graphics workstations, and supercomputers. . The public has seen some of the images generated by these computer systems in movies and expensive television advertisements, but most of us cannot actually touch the computers that generate the graphics. There wasn't. All of this has changed with the availability of relatively inexpensive 3D graphics platforms such as Nintendo 64® and various 3D graphics cards currently available on personal computers. It is now possible to come in contact with exciting 3D animations and simulations on a relatively inexpensive computer graphics system at home or in the office.

3Dグラフィックスシステムにおいて、様々なパラメータ(例えば距離減衰、角度、ビームライティングなど)に基づいてライティング計算を行うことが、長く知られている。従来、そのようなライティング計算の結果は、表示されているオブジェクトの色および/または不透明度を変更するために用いられた。これについてはコンピュータグラフィックスに関する様々な標準的な参考文献に記載がある(例えば、Foleyら、Computer Graphics Principles and Practice(2d.Ed. 1990)のChapter16("Illumination and Shading");およびMollerら、Real time Rendering(AK Peters 1999)のSection4.3以降("Lighting and
Shading");Rogersら、Procedural Elements for Computer Graphics(2d Ed.McGraw−Hill 1997)のSection5.2以降("Illumination Models");Neiderら、Open GL Programming Guide(Addison−Wesley 1993)のChapter6("Lighting");およびKovach、Inside Direct3D(Microsoft Press 2000)のChapter5("Direct3D Vertices and the Transformation and Lighting Pipeline")を参照)。例えば、グロー(Gouraud)シェーディングおよびフォン(Phong)シェーディングとして知られる技術は、表示された表面の色を、ライティング式によってモデル化されたライティング効果に依存して変更する。一例として、光沢のある表面に明るいスポット光を照らすと、光が輝いている点において表面色を白色化させる効果を有し得る。これは従来のグラフィックスシステムにおいて、しばしば、あるプリミティブの表面に表示された各ピクセルの色を、そのプリミティブの色(しばしば頂点単位で定義される)およびライティング式の結果に基づき、ラスタライザに決定させることによって達成される。
It has long been known to perform lighting calculations based on various parameters (eg distance attenuation, angle, beam lighting, etc.) in 3D graphics systems. Traditionally, the results of such lighting calculations have been used to change the color and / or opacity of the displayed object. This is described in various standard references on computer graphics (eg, Chapter 16 ("Illumination and Shading") of Foley et al., Computer Graphics Principles and Practice (2d. Ed. 1990)); and Moller et al., Section 4.3 or later of Real time Rendering (AK Peters 1999) ("Lighting and
Rogers et al., Procedural Elements for Computer Graphics (2d Ed. McGraw-Hill 1997), Section 5.2 or later ("Illumination Models" on Ne GLu 19G, Gr. Lighting "); and Chapter 5 of Kovach, Inside Direct3D (Microsoft Press 2000) (see" Direct3D Vertices and the Transforming Pipeline ") and Gurding, for example. A technique known as (Phong) shading changes the color of the displayed surface depending on the lighting effect modeled by the lighting equation, for example, when a bright spot light is illuminated on a glossy surface, Can have the effect of whitening the surface color at the point where it shines, which in conventional graphics systems often replaces the color of each pixel displayed on the surface of a primitive with the color of that primitive (often the vertex Achieved by letting the rasterizer decide based on the result of the lighting expression).

グラフィックスシステムの設計者が過去において直面した1つの問題は、漫画のキャラクターなどの写実的でない像をどのようにして効率的に作成するかであった。長年、グラフィックス分野の作業の大部分は、写真と同じくらいリアルな像を作成することに注がれてきた。しかし最近においては、非写実的なイメージングに関心が抱かれてきている。   One problem faced by graphics system designers in the past has been how to efficiently create non-realistic images such as cartoon characters. Over the years, much of the work in the graphics field has been devoted to creating images as realistic as photographs. Recently, however, there has been interest in non-realistic imaging.

最近関心を呼んでいる非写実的なイメージングのタイプの1つは、漫画のキャラクターのイメージングを自動化するプロセスである。1930年代および1940年代における手書き漫画の最盛期においては、フレームからフレームへと動的に変化する素晴らしい漫画のキャラクターをアーチストらが作成した。これらの手書き漫画は、多くの意味において漫画的なレンダリングの標準となった。漫画はリアルに見えるように意図されたものではなかった。逆に、漫画は戯画的に見えるようにデザインされた。例えばそのような漫画において人物の顔は、真っ白なところに真っ赤または赤みがかった桃色の色合いによるバラ色の頬を備えたものであったりした。アーチストが各フレームを手で色づけしたため、キャラクターがシーン中を移動するにつれて頬の色合いは動的に変化し得た。このような動的な効果は見ていて魅力的であり、漫画の像におもしろみを付加するものである。   One type of non-realistic imaging that has recently gained interest is the process of automating the imaging of cartoon characters. During the heyday of handwritten comics in the 1930s and 1940s, artists created amazing comic characters that dynamically changed from frame to frame. These handwritten comics have become the standard for comic rendering in many ways. The comic was not intended to look real. Conversely, comics were designed to look like caricatures. For example, in such comics, a person's face may have a rosy cheek with a pink or reddish pink shade on a white spot. As the artist colored each frame by hand, the color of the cheeks could change dynamically as the character moved through the scene. Such dynamic effects are attractive to watch and add interest to the cartoon image.

残念ながら、1930年代および1940年代における手書き漫画の芸術は、非常に時間がかかり高価であった。また人々は今や、漫画のキャラクターと接触するようにビデオゲームおよびコンピュータゲームを使用したがっている。ビデオゲームは、対話式に漫画キャラクターを動的にレンダリングすることに何年間か成功しているが、当世の手書き漫画の手書き芸術の細かさは達成していない。漫画およびその他の非写実的な像の創造のためのハイエンドタイプのシステムにおいては多大な研究がなされているが、さらなる改良が可能であり、かつ望まれる。   Unfortunately, the art of handwritten comics in the 1930s and 1940s was very time consuming and expensive. And now people want to use video games and computer games to come in contact with cartoon characters. Although video games have been successful for years in dynamically rendering cartoon characters interactively, they have not achieved the fine arts of handwritten art in modern-day handwritten cartoons. Although much research has been done on high-end type systems for the creation of comics and other non-realistic images, further improvements are possible and desirable.

本発明は、家庭用ビデオゲームプラットフォームまたはパーソナルコンピュータのグラフィックスアクセラレータなどの低コストなグラフィックスシステムを用いて実現可能な、非写実的およびその他のイメージング効果における改良を提供する。   The present invention provides improvements in non-photorealistic and other imaging effects that can be achieved using low cost graphics systems such as home video game platforms or personal computer graphics accelerators.

本発明によって提供される一局面によれば、シーン中のオブジェクトをライティングするために典型的に用いられるタイプのライティング関数を用いて、色以外のパラメータを生成する。このようなパラメータを用いて、オブジェクトの色または不透明度を変更する。   According to one aspect provided by the present invention, parameters other than color are generated using a type of lighting function typically used to illuminate objects in a scene. Such parameters are used to change the color or opacity of the object.

本発明によって提供される別の局面によれば、ライティング計算が頂点毎のライティングを実行することにより、従来の色成分出力を提供する。色成分出力は、色成分を無色パラメータとして処理するテクスチャリング関数に入力される。テクスチャリング関数の出力は、レンダリングされたシーンの視覚化への寄与に用いられる、視覚化効果(例えば、無色パラメータに基づいて変更される色および/または不透明度)を提供する。   According to another aspect provided by the present invention, the lighting calculation provides a conventional color component output by performing per-vertex lighting. The color component output is input to a texturing function that processes the color component as a colorless parameter. The output of the texturing function provides a visualization effect (eg, color and / or opacity that is changed based on a colorless parameter) that is used to contribute to the visualization of the rendered scene.

本発明によって提供されるさらに別の局面によれば、ライティング計算の出力は3つの色成分を提供し、そのうち1つは捨象される。残りの2つの色成分はテクスチャ座標に変換され、テクスチャマッピング動作に用いられる。一方のテクスチャ座標は、2次元テーブル中の1次元テクスチャマップを選択する。他方のテクスチャ座標は、選択された1次元テクスチャマップ内の特定のテクセルを選択する。結果として得られる選択されたテクセルは、その頂点により定義される表面に加えられる、色および/またはアルファ情報を提供する。   According to yet another aspect provided by the present invention, the output of the lighting calculation provides three color components, one of which is discarded. The remaining two color components are converted into texture coordinates and used for the texture mapping operation. One texture coordinate selects a one-dimensional texture map in a two-dimensional table. The other texture coordinate selects a particular texel in the selected one-dimensional texture map. The resulting selected texel provides color and / or alpha information that is added to the surface defined by the vertex.

本発明によって提供されるさらに別の局面によれば、色や不透明度以外のパラメータを生成するためにライティング計算を用いることにより、リアルタイム3Dグラフィックスシステムにおいて、非写実的な漫画的なライティング効果が提供される。異なるブラシストロークをこのパラメータの関数として指定する、1次元テクスチャマップを定義することができる。従来のテクスチャマッピング動作を用いて、上記パラメータに基づき上記1次元テクスチャマップをポリゴン表面にマッピングすることができる。   According to yet another aspect provided by the present invention, the use of lighting calculations to generate parameters other than color and opacity results in non-realistic cartoon lighting effects in real-time 3D graphics systems. Provided. A one-dimensional texture map can be defined that specifies different brush strokes as a function of this parameter. Using the conventional texture mapping operation, the one-dimensional texture map can be mapped to the polygon surface based on the parameters.

より詳細には、本開示のシステムは従来のライティング型のシェーディング(前述)を全体動作の一部として提供し得るが、ライティング式を用いてテクスチャ座標(すなわち色や不透明度以外の別のパラメータ)を生成することを可能にする、さらなる改良を提供する。この別のパラメータは、さらなる結果(これがオブジェクトの色/不透明度を変更してもよい)を提供するためのさらなる関数(テクスチャとして格納されるルックアップテーブルなど)へ入力され得る。この、表示されるオブジェクトの色および/または不透明度に間接的にのみ影響するパラメータをライティング計算に生成させる中間ステップにより、プリミティブの表面色に直接影響するようにライティング式の出力を用いる従来のアプローチを越えた、さらなるフレキシビリティが提供される。   More particularly, the system of the present disclosure may provide conventional lighting-type shading (as described above) as part of the overall operation, but using lighting formulas, texture coordinates (ie, other parameters other than color and opacity) Further improvements are provided that make it possible to generate This other parameter can be input into a further function (such as a look-up table stored as a texture) to provide further results (which may change the color / opacity of the object). Traditional approach using lighting expression output to directly affect the surface color of the primitive through this intermediate step that causes the lighting calculation to only indirectly affect the color and / or opacity of the displayed object More flexibility beyond that is provided.

ある特定の実施例では、ライティング式の結果を用いて複数のテクスチャから1次元のテクスチャを選択する。一例として、木の幹を表示するために、銀色のレンジを有するテクスチャと茶色のレンジを有するテクスチャとの2つの異なる1次元テクスチャを定義し得る。ライティング式を光源が木の幹に入射している角度を決定するために用い、結果によって2つテクスチャの選択を行うことができる。この木の幹を、斜角からは異なる銀色のレンジによって(従来テクスチャマッピングを用いて)色づけし、光が真正面から入射しているときには茶色/黒色のレンジで色づけすることができる。このような場合において、ライティング式は、1次元テクスチャを選択している(すなわち、色や不透明度以外のパラメータ−−この場合2つの異なるテクスチャの選択を行う−−として機能している)。   In one particular embodiment, a lighting expression result is used to select a one-dimensional texture from a plurality of textures. As an example, two different one-dimensional textures may be defined to display a tree trunk, a texture having a silver range and a texture having a brown range. A lighting formula is used to determine the angle at which the light source is incident on the trunk of the tree, and two textures can be selected depending on the result. The trunk of the tree can be colored by a different silver range from the bevel (using conventional texture mapping) and in the brown / black range when light is incident directly in front. In such a case, the lighting expression selects a one-dimensional texture (ie, functions as a parameter other than color and opacity—in this case, selecting two different textures).

本明細書において開示される特定の実施形態において、変換およびライティング(「T&L」)パイプラインに改良がなされることにより、このパイプラインがライティング式に基づいてテクスチャ座標を生成することを可能にする。変換およびライティングは、ライティング式の出力を生成するが、これをラスタライザによって生成されたピクセル色/不透明度を変更するために直接提供するのではなく、結果をテクスチャユニットにテクスチャ座標として提供する。開示された実施形態において、テクスチャユニットの出力は、オブジェクトのプリミティブ色/不透明度(例えば、変換およびライティングパイプラインならびにラスタライザによって、同一または異なるライティング式に基づきグローまたはフォンシェーディングなどの従来のシェーディングアルゴリズムを用いて生成される)とブレンドされることにより変更された色/不透明度値を表示用に提供する、色または不透明度である。   In certain embodiments disclosed herein, improvements are made to the transformation and lighting (“T & L”) pipeline, which allows the pipeline to generate texture coordinates based on lighting expressions. . Transformation and lighting produces a lighting expression output, but does not provide it directly to change the pixel color / opacity generated by the rasterizer, but provides the result as texture coordinates to the texture unit. In the disclosed embodiment, the output of the texture unit is a conventional shading algorithm, such as glow or von shading, based on the same or different lighting expressions, depending on the object's primitive color / opacity (eg, transformation and lighting pipelines and rasterizers). Color or opacity that provides the display with a modified color / opacity value by being blended with.

対話式コンピュータグラフィックスシステムの一例の全体図である。1 is an overall view of an example of an interactive computer graphics system. 図1の例のコンピュータグラフィックスシステムのブロック図である。It is a block diagram of the computer graphics system of the example of FIG. 図2に示す例のグラフィックスおよび音声プロセッサのブロック図である。FIG. 3 is a block diagram of the example graphics and audio processor shown in FIG. 2. 図3に示す例の3Dグラフィックスプロセッサのブロック図である。FIG. 4 is a block diagram of the example 3D graphics processor shown in FIG. 3. 図4のグラフィックスおよび音声プロセッサの、論理フロー図例である。FIG. 5 is an exemplary logic flow diagram of the graphics and audio processor of FIG. 本発明により提供される高レベル画像生成処理の例を示す図である。It is a figure which shows the example of the high level image generation process provided by this invention. 本発明により提供される無色ライティングパラメータに基づくテクスチャリングを用いたより具体的な画像生成処理の例を示す図である。It is a figure which shows the example of the more specific image generation process using the texturing based on the colorless lighting parameter provided by this invention. テクスチャ関数の例を示す図である。It is a figure which shows the example of a texture function. 1次元テクスチャマップの例を示す図である。It is a figure which shows the example of a one-dimensional texture map. テクスチャマッピング手順の例を示す図である。It is a figure which shows the example of a texture mapping procedure. 2次元テクスチャマップの例を示す図である。It is a figure which shows the example of a two-dimensional texture map. 2次元テクスチャマップのさらなる例を示す図である。It is a figure which shows the further example of a two-dimensional texture map. ライティングパイプライン実施形態の例を示す図である。It is a figure which shows the example of lighting pipeline embodiment. 光のカラーチャネルとの対応付けの例を示す図である。It is a figure which shows the example of matching with the color channel of light. 変換ユニットの実施形態の例を示す図である。It is a figure which shows the example of embodiment of a conversion unit. ライティングパイプラインの実施形態の例を示す図である。It is a figure which shows the example of embodiment of a lighting pipeline. ベクトルドット/加算ユニットの実施形態の例を示す図である。It is a figure which shows the example of embodiment of a vector dot / addition unit. 正規化器の実施形態の例を示す図である。It is a figure which shows the example of embodiment of a normalizer. 距離減衰器の実施形態の例を示す図である。It is a figure which shows the example of embodiment of a distance attenuator. 光スケール器の実施形態の例を示す図である。It is a figure which shows the example of embodiment of an optical scale device. 整数アキュムレータの実施形態の例を示す図である。It is a figure which shows the example of embodiment of an integer accumulator. 状態遷移図例である。It is an example of a state transition diagram. 別の互換的な実施例を示す図である。FIG. 6 shows another compatible embodiment. 別の互換的な実施例を示す図である。FIG. 6 shows another compatible embodiment.

図1は、対話式3Dコンピュータグラフィックスシステム50の一例を示す。システム50は、対話式3Dビデオゲームを面白いステレオ音とともにプレイするために用いられ得る。また、様々な他の応用例にも用いられ得る。   FIG. 1 shows an example of an interactive 3D computer graphics system 50. System 50 can be used to play interactive 3D video games with interesting stereo sounds. It can also be used in various other applications.

本例において、システム50は、3次元世界のデジタル表現物あるいはモデルを、対話式にリアルタイムで処理することが可能である。システム50は、その世界のうちの一部または全部を、いかなる任意の視点から表示することもできる。例えば、システム50は、手持ちコントローラ52a、52bまたはその他の入力デバイスからのリアルタイム入力に応答して、対話式に視点を変更することができる。これにより、ゲームのプレーヤが、その世界の中または外側にいる人の目を通じて、その世界を見ることが可能になる。システム50は、リアルタイム3D対話式表示を必要としない応用例(例えば、2D表示生成および/または非対話式表示)に用いられ得るが、非常に素早く高品質3D画像を表示できる能力を、非常にリアルかつ刺激的なゲームプレイまたはその他のグラフィカルな対話を創出するために用いることができる。   In this example, the system 50 can interactively process a digital representation or model of a three-dimensional world in real time. The system 50 can display some or all of the world from any arbitrary viewpoint. For example, the system 50 can interactively change the viewpoint in response to real-time input from a handheld controller 52a, 52b or other input device. This allows game players to see the world through the eyes of people inside or outside the world. The system 50 can be used in applications that do not require real-time 3D interactive display (eg, 2D display generation and / or non-interactive display), but has the ability to display high quality 3D images very quickly. It can be used to create real and exciting game play or other graphical interactions.

システム50を用いて、ビデオゲームまたはその他のアプリケーションをプレイするために、ユーザは、まず、ケーブル58を両者の間に接続することによって、メインユニット54を自分のカラーテレビ56またはその他のディスプレイデバイスに接続する。メインユニット54は、カラーテレビ56を制御するための映像信号と音声信号との両方を生成する。映像信号は、テレビスクリーン59上に表示される画像を制御するものであり、音声信号は、テレビのステレオスピーカ61L、61Rを介して音として再生される。   To play a video game or other application using the system 50, a user first connects the main unit 54 to his or her color television 56 or other display device by connecting a cable 58 between them. Connecting. The main unit 54 generates both a video signal and an audio signal for controlling the color television 56. The video signal controls an image displayed on the television screen 59, and the audio signal is reproduced as sound through the stereo speakers 61L and 61R of the television.

ユーザは、また、メインユニット54を電源に接続する必要がある。この電源は、標準的な家庭用電気コンセントに接続して家庭電流をメインユニット54に電力供給するために、適切なより低いDC電圧信号に変換する従来のACアダプタ(図示せず)であり得る。他の実施形態として、電池を用い得る。   The user also needs to connect the main unit 54 to a power source. This power source may be a conventional AC adapter (not shown) that converts to a suitable lower DC voltage signal to connect to a standard household electrical outlet to power the household current to the main unit 54. . As another embodiment, a battery may be used.

ユーザは、メインユニット54を制御するためにハンドコントローラ52a、52bを用い得る。コントロール60は、例えば、テレビ56上に表示されたキャラクターが3D世界内で移動するべき方向(上下、左右、近くあるいは遠く)を指定するために用い得る。コントロール60は、また、他のアプリケーション(例えば、メニュー選択、ポインタ/カーソル制御など)のための入力を提供する。コントローラ52は、様々な形態を取りては、図示したコントローラ52は、それぞれジョイスティック、プッシュボタンおよび/または方向スイッチとしてのコントロール60を含む。コントローラ52は、ケーブルを介して、あるいは電磁(例えば高周波または赤外線)波を介して無線でメインユニット54に接続され得る。   The user can use the hand controllers 52 a and 52 b to control the main unit 54. The control 60 can be used, for example, to specify the direction (up / down, left / right, close or far) in which the character displayed on the television 56 should move in the 3D world. The control 60 also provides input for other applications (eg, menu selection, pointer / cursor control, etc.). The controller 52 may take various forms, and the illustrated controller 52 includes controls 60 as joysticks, push buttons, and / or directional switches, respectively. The controller 52 can be connected to the main unit 54 via a cable or wirelessly via electromagnetic (eg, high frequency or infrared) waves.

ゲームなどのアプリケーションをプレイするためには、ユーザは自分がプレイしたいビデオゲームあるいはその他のアプリケーションを記憶している適切な記憶媒体62を選択し、その記憶媒体をメインユニット54のスロット64に挿入する。記憶媒体62は、例えば、専用にコード化されたおよび/または暗号化された光学および/または磁気ディスクであり得る。ユーザは、パワースイッチ66を操作してメインユニット54をオンにし、記憶媒体62に記憶されたソフトウェアに基づいて、メインユニットにビデオゲームあるいはその他のアプリケーションの実行を開始させ得る。ユーザは、コントローラ52を操作してメインユニット54に入力を供給し得る。例えば、コントロール60を操作することにより、ゲームあるいはその他のアプリケーションを開始させ得る。その他のコントロール60を動かすことにより、アニメーション化されたキャラクターを異なる方向に移動させたり、3D世界におけるユーザの視点を変更することができる。記憶媒体62に記憶された特定のソフトウェアに依存して、コントローラ52上の様々なコントロール60は、異なる時刻において異なる機能を実行することができる。   In order to play an application such as a game, the user selects an appropriate storage medium 62 that stores a video game or other application that the user wants to play, and inserts the storage medium into the slot 64 of the main unit 54. . The storage medium 62 may be, for example, a dedicated encoded and / or encrypted optical and / or magnetic disk. The user can operate the power switch 66 to turn on the main unit 54 and cause the main unit to start executing a video game or other application based on software stored in the storage medium 62. The user can operate the controller 52 to supply input to the main unit 54. For example, a game or other application can be started by operating the control 60. By moving other controls 60, the animated character can be moved in different directions and the user's viewpoint in the 3D world can be changed. Depending on the particular software stored on the storage medium 62, the various controls 60 on the controller 52 can perform different functions at different times.

システム全体の電子回路例
図2に、システム50の要素例のブロック図を示す。主要な要素として以下のものを含む。
・メインプロセッサ(CPU)110、
・メインメモリ112、および
・グラフィックスおよび音声プロセッサ114
Example Electronic Circuit of Entire System FIG. 2 shows a block diagram of example elements of the system 50. The main elements include:
A main processor (CPU) 110,
Main memory 112, and graphics and audio processor 114

本例において、メインプロセッサ110(例えば、機能拡張型IBM Power PC750)は、手持ちコントローラ108(および/または他の入力装置)からの入力を、グラフィックスおよびプロセッサ114を介して受け取る。メインプロセッサ110は、ユーザ入力に対話式に応答し、例えば、外部記憶媒体62から光ディスクドライブなどの大容量記憶アクセス装置106を介して供給されるビデオゲームあるいはその他のプログラムを実行する。一例としてビデオゲームプレイの場合、メインプロセッサ110は、様々な対話式機能および制御機能に加えて、衝突検出およびアニメーション処理を実行することができる。   In this example, main processor 110 (eg, enhanced IBM Power PC 750) receives input from handheld controller 108 (and / or other input devices) via graphics and processor 114. The main processor 110 interactively responds to user input and executes a video game or other program supplied from the external storage medium 62 via a mass storage access device 106 such as an optical disk drive, for example. As an example, for video game play, the main processor 110 can perform collision detection and animation processing in addition to various interactive and control functions.

本例において、メインプロセッサ110は、3Dグラフィックスコマンドおよび音声コマンドを生成し、これらをグラフィックスおよび音声プロセッサ114に送る。グラフィックスおよび音声プロセッサ114は、これらのコマンドを処理することにより、ディスプレイ59上に面白い視覚画像を生成し、ステレオスピーカ61R、61Lまたはその他の適切な音声生成装置上で面白いステレオ音を生成する。   In this example, the main processor 110 generates 3D graphics commands and audio commands and sends them to the graphics and audio processor 114. The graphics and audio processor 114 processes these commands to generate an interesting visual image on the display 59 and an interesting stereo sound on the stereo speakers 61R, 61L or other suitable audio generating device.

例示のシステム50は、グラフィックスおよび音声プロセッサ114から画像信号を受け取って、画像信号をコンピュータモニタまたは家庭用カラーテレビ56などの標準的な表示装置上での表示に適したアナログおよび/またはデジタル映像信号に変換するビデオ符号化器120を有する。システム50はまた、デジタル化された音声信号を圧縮および伸長し、また必要に応じてデジタルおよびアナログの音声信号化フォーマット間の変換を行う音声コーデック(圧縮器/伸長器)122を有する。音声コーデック122は、バッファ124を介して音声入力を受け取り、これらをグラフィックスおよび音声プロセッサ114に処理(例えば、プロセッサが生成する、および/または大容量記憶アクセス装置106の音声ストリーミング出力を介して受け取る他の音声信号との混合)のために供給することができる。本例におけるグラフィックスおよび音声プロセッサ114は、音声関連の情報を、音声タスクについて利用可能である音声メモリ126中に記憶することができる。グラフィックスおよび音声プロセッサ114は、結果として得られた音声出力信号を、伸長およびアナログ信号への変換(例えばバッファアンプ128L、128Rを介して)のために音声コーデック122に供給することにより、スピーカ61L、61Rによって再生できるようにする。   The exemplary system 50 receives image signals from the graphics and audio processor 114 and analog and / or digital video suitable for display on a standard display device such as a computer monitor or home color television 56. It has a video encoder 120 that converts it into a signal. The system 50 also has an audio codec (compressor / decompressor) 122 that compresses and decompresses the digitized audio signal and converts between digital and analog audio signal formats as needed. The audio codec 122 receives audio inputs via the buffer 124 and processes them into the graphics and audio processor 114 (eg, generated by the processor and / or received via the audio streaming output of the mass storage access device 106). For mixing with other audio signals). The graphics and audio processor 114 in this example may store audio related information in the audio memory 126 that is available for audio tasks. The graphics and audio processor 114 supplies the resulting audio output signal to the audio codec 122 for decompression and conversion to an analog signal (eg, via buffer amplifiers 128L, 128R), thereby providing the speaker 61L. , 61R.

グラフィックスおよび音声プロセッサ114は、システム50内に存在し得る様々な追加的なデバイスと連絡する能力を有する。例えば、大容量記憶アクセス装置106および/またはその他の要素と連絡するために、パラレルデジタルバス130を用い得る。シリアル周辺バス132は、例えば、
・プログラム可能なリードオンリーメモリおよび/またはリアルタイムクロック134、
・モデム136その他のネットワーク化インターフェース(これは、プログラム命令および/またはデータをダウンロードまたはアップロードすることができるインターネットあるいはその他のデジタルネットワークなどの通信ネットワーク138に、システム50を接続し得る)、および
・フラッシュメモリ140を含む、様々な周辺デバイスまたはその他のデバイスと連絡し得る。追加的な拡張メモリ144(例えばメモリカード)やその他のデバイスと連絡するために、さらなる外部シリアルバス142を用い得る。コネクタを用いて様々なデバイスをバス130、132、142に接続し得る。
Graphics and audio processor 114 has the ability to communicate with various additional devices that may be present in system 50. For example, parallel digital bus 130 may be used to communicate with mass storage access device 106 and / or other elements. The serial peripheral bus 132 is, for example,
Programmable read-only memory and / or real-time clock 134,
A modem 136 or other networked interface (which may connect the system 50 to a communication network 138 such as the Internet or other digital network from which program instructions and / or data can be downloaded or uploaded), and flash Various peripheral devices or other devices may be communicated, including memory 140. An additional external serial bus 142 may be used to communicate with additional expansion memory 144 (eg, a memory card) and other devices. Connectors may be used to connect various devices to the buses 130, 132, 142.

グラフィックスおよび音声プロセッサの例
図3は、グラフィックスおよび音声プロセッサ114の一例のブロック図である。一例において、グラフィックスおよび音声プロセッサ114は、単一チップのASIC(アプリケーション専用集積回路)であり得る。本例において、グラフィックスおよび音声プロセッサ114は、以下を含む。
・プロセッサインターフェース150
・メモリインターフェース/コントローラ152
・3Dグラフィックスプロセッサ154
・音声デジタル信号プロセッサ(DSP)156
・音声メモリインターフェース158
・音声インターフェースおよびミキサ160
・周辺コントローラ162、および
・ディスプレイコントローラ164
Example Graphics and Audio Processor FIG. 3 is a block diagram of an example graphics and audio processor 114. In one example, the graphics and audio processor 114 may be a single chip ASIC (application specific integrated circuit). In this example, graphics and audio processor 114 includes:
Processor interface 150
Memory interface / controller 152
3D graphics processor 154
Audio digital signal processor (DSP) 156
-Voice memory interface 158
Audio interface and mixer 160
A peripheral controller 162, and a display controller 164

3Dグラフィックスプロセッサ154は、グラフィックス処理タスクを行う。音声デジタル信号プロセッサ156は、音声処理タスクを行う。ディスプレイコントローラ164は、メインメモリ112からの画像情報にアクセスし、これをディスプレイデバイス56上に表示するためにビデオ符号化器120に供給する。音声インターフェースおよびミキサ160は音声コーデック122とインターフェースし、また異なるソースからの音声(例えば大容量記憶アクセス装置106からの音声ストリーミング、音声DSP156の出力、および音声コーデック122を介して受け取られる外部音声入力)を混合することができる。プロセッサインターフェース150は、メインプロセッサ110とグラフィックスおよび音声プロセッサ114との間のデータおよび制御インターフェースを提供する。   The 3D graphics processor 154 performs graphics processing tasks. The audio digital signal processor 156 performs audio processing tasks. Display controller 164 accesses the image information from main memory 112 and provides it to video encoder 120 for display on display device 56. Audio interface and mixer 160 interfaces with audio codec 122 and also audio from different sources (eg, audio streaming from mass storage access device 106, output of audio DSP 156, and external audio input received via audio codec 122). Can be mixed. The processor interface 150 provides a data and control interface between the main processor 110 and the graphics and audio processor 114.

メモリインターフェース152は、グラフィックスおよび音声プロセッサ114とメモリ112との間の、データおよび制御インターフェースを提供する。本例において、メインプロセッサ110は、グラフィックスおよび音声プロセッサ114の一部であるプロセッサインターフェース150およびメモリインターフェース152を介して、メインメモリ112にアクセスする。周辺コントローラ162は、グラフィックスおよび音声プロセッサ114と、上述した様々な周辺機器との間の、データおよび制御インターフェースを提供する。音声メモリインターフェース158は、音声メモリ126とのインターフェースを提供する。   Memory interface 152 provides a data and control interface between graphics and audio processor 114 and memory 112. In this example, the main processor 110 accesses the main memory 112 via a processor interface 150 and a memory interface 152 that are part of the graphics and audio processor 114. Peripheral controller 162 provides a data and control interface between graphics and audio processor 114 and the various peripherals described above. The audio memory interface 158 provides an interface with the audio memory 126.

グラフィックスパイプラインの例
図4は、3Dグラフィックスプロセッサ154の一例のより詳細な図を示す。3Dグラフィックスプロセッサ154は、特に、コマンドプロセッサ200および3Dグラフィックスパイプライン180を含む。メインプロセッサ110は、データのストリーム(例えば、グラフィックスコマンドストリームおよび表示リスト)を、コマンドプロセッサ200に通信する。メインプロセッサ110は、メモリ待ち時間を最小にするために2レベルキャッシュ115を有し、また、グラフィックスおよび音声プロセッサ114を対象とした非キャッシュデータストリーム用の書き込み収集バッファ111を有している。書き込み収集バッファ111は、部分キャッシュラインを集めて完全なキャッシュラインにし、データを一度につき1キャッシュラインずつグラフィックスおよび音声プロセッサ114に送り出すことにより、バス利用率を最大にする。
Graphics Pipeline Example FIG. 4 shows a more detailed view of an example of a 3D graphics processor 154. The 3D graphics processor 154 includes a command processor 200 and a 3D graphics pipeline 180, among others. Main processor 110 communicates a stream of data (eg, a graphics command stream and a display list) to command processor 200. The main processor 110 has a two-level cache 115 to minimize memory latency and a write collection buffer 111 for a non-cached data stream intended for the graphics and audio processor 114. The write collection buffer 111 collects partial cache lines into a complete cache line and sends data to the graphics and audio processor 114 one cache line at a time to maximize bus utilization.

コマンドプロセッサ200は、メインプロセッサ110から表示コマンドを受け取って解析する(これらを処理するために必要な任意の追加的なデータは、共有メモリ112から得る)。コマンドプロセッサ200は、頂点コマンドのストリームを、2Dおよび/または3D処理およびレンダリングのためにグラフィックスパイプライン180に供給する。グラフィックスパイプライン180は、これらのコマンドに基づいて画像を生成する。得られた画像情報は、ディスプレイコントローラ/ビデオインターフェースユニット164(パイプライン180のフレームバッファ出力をディスプレイ56上に表示する)によるアクセスのために、メインメモリ112に転送され得る。   The command processor 200 receives and analyzes display commands from the main processor 110 (any additional data needed to process them is obtained from the shared memory 112). Command processor 200 provides a stream of vertex commands to graphics pipeline 180 for 2D and / or 3D processing and rendering. The graphics pipeline 180 generates an image based on these commands. The resulting image information can be transferred to the main memory 112 for access by the display controller / video interface unit 164 (which displays the frame buffer output of the pipeline 180 on the display 56).

図5は、グラフィックスプロセッサ154の論理フロー図である。メインプロセッサ110は、グラフィックスコマンドストリーム210、表示リスト212、および頂点配列214をメインメモリ112に格納し得、バスインターフェース150を介してコマンドプロセッサ200にポインタを渡し得る。メインプロセッサ110は、メインメモリ112内に割り当てた1つ以上のグラフィックス先入れ先出し(FIFO)バッファ210に、グラフィックスコマンドを格納する。コマンドプロセッサ200は、
・同期/フロー制御および負荷バランスを取るためグラフィックスコマンドを受け取りバッファリングするオンチップFIFOメモリバッファ216を介して、メインメモリ112からのコマンドストリーム、
・オンチップコールFIFOメモリバッファ218を介して、メインメモリ112からの表示リスト212、および
・頂点キャッシュを介して、コマンドストリームからおよび/またはメインメモリ112中の頂点配列214からの頂点属性)
を取り込む。
FIG. 5 is a logic flow diagram of the graphics processor 154. Main processor 110 may store graphics command stream 210, display list 212, and vertex array 214 in main memory 112 and may pass pointers to command processor 200 via bus interface 150. The main processor 110 stores graphics commands in one or more graphics first-in first-out (FIFO) buffers 210 allocated in the main memory 112. The command processor 200
A command stream from the main memory 112 via an on-chip FIFO memory buffer 216 that receives and buffers graphics commands for synchronization / flow control and load balancing;
Display list 212 from main memory 112 via on-chip call FIFO memory buffer 218, and vertex attributes from command stream and / or vertex array 214 in main memory 112 via vertex cache)
Capture.

コマンドプロセッサ200は、属性タイプを浮動小数点フォーマットに変換し、得られた完全な頂点ポリゴンデータをレンダリング/ラスタライゼーションのためにグラフィックスパイプライン180に渡すコマンド処理動作200aを行う。プログラム可能なメモリ調停回路130(図4を参照)は、共有メインメモリ112へのアクセスを、グラフィックスパイプライン180、コマンドプロセッサ200、およびディスプレイコントローラ/ビデオインターフェースユニット164間で調停する。   The command processor 200 performs a command processing operation 200a that converts the attribute type to floating point format and passes the resulting complete vertex polygon data to the graphics pipeline 180 for rendering / rasterization. Programmable memory arbitration circuit 130 (see FIG. 4) arbitrates access to shared main memory 112 among graphics pipeline 180, command processor 200, and display controller / video interface unit 164.

図4は、グラフィックスパイプライン180が以下を含み得ることを示している。
・変換ユニット300
・セットアップ/ラスタライザ400
・テクスチャユニット500
・テクスチャ環境ユニット600、および
・画素エンジン700
FIG. 4 illustrates that the graphics pipeline 180 may include:
Conversion unit 300
Setup / rasterizer 400
-Texture unit 500
A texture environment unit 600 and a pixel engine 700

変換ユニット300は、様々な2Dおよび3D変換ならびにその他の動作300aを行う(図5を参照)。変換ユニット300は、変換処理300aで用いられる行列を格納するための、1つ以上のマトリックスメモリ300bを有し得る。変換ユニット300は、受け取った図形を頂点毎にオブジェクト空間からスクリーン空間に変換し、また、受け取ったテクスチャ座標を変換し投影テクスチャ座標を生成する(300c)。変換ユニット300は、また、ポリゴンクリッピング/間引き300dを行ってもよい。やはり変換ユニット300bによって行われるライティング処理300eは、一実施例において最高8個の独立のライティングまでに対し、頂点毎のライティング演算を提供する。変換ユニット300は、また、ポリゴンクリッピング/間引き動作(300d)に加え、エンボス型のバンプマッピング効果のためのテクスチャ座標生成(300c)、を行うことができる。   The conversion unit 300 performs various 2D and 3D conversions and other operations 300a (see FIG. 5). The conversion unit 300 may have one or more matrix memories 300b for storing matrices used in the conversion process 300a. The conversion unit 300 converts the received figure from object space to screen space for each vertex, and converts the received texture coordinates to generate projected texture coordinates (300c). The conversion unit 300 may also perform polygon clipping / decimation 300d. The lighting process 300e, also performed by the transform unit 300b, provides per-vertex lighting operations for up to eight independent lights in one embodiment. The conversion unit 300 can also perform texture coordinate generation (300c) for an embossed bump mapping effect in addition to polygon clipping / thinning operation (300d).

セットアップ/ラスタライザ400は、変換ユニット300から頂点データを受け取り、トライアングルセットアップ情報を、境界のラスタライズ、テクスチャ座標のラスタライズおよび色のラスタライズを行う1つ以上のラスタライザユニット(400b)に送るセットアップユニットを有する。   The setup / rasterizer 400 has a setup unit that receives vertex data from the transform unit 300 and sends triangle setup information to one or more rasterizer units (400b) that perform boundary rasterization, texture coordinate rasterization, and color rasterization.

テクスチャユニット500(オンチップテクスチャメモリ(TMEM502)を含み得る)は、テクスチャリングに関連する様々な処理を行う。これには、例えば、
・メインメモリ112からのテクスチャ504の取り出し、
・例えば、マルチテクスチャ処理、キャッシュ後テクスチャ伸長、テクスチャフィルタリング、エンボス化、投影テクスチャの使用を介した陰影および明暗、ならびにアルファ透明度および深度をともなうBLITを含むテクスチャ処理(500a)、
・バンプマッピング、擬似テクスチャ、およびテクスチャタイル化効果(500b)についてのテクスチャ座標変位の演算のためのバンプマップ処理、および
・間接テクスチャ処理(500c)
が含まれる。
A texture unit 500 (which may include an on-chip texture memory (TMEM 502)) performs various processing related to texturing. For example,
Extracting the texture 504 from the main memory 112,
-Texture processing (500a), including, for example, multi-texturing, post-cache texture decompression, texture filtering, embossing, shading and shading through the use of projected textures, and Blit with alpha transparency and depth,
• Bump map processing for computing texture coordinate displacement for bump mapping, pseudo-texture, and texture tiling effects (500b); and • Indirect texture processing (500c).
Is included.

テクスチャユニット500は、フィルタリングされたテクスチャ値を、テクスチャ環境処理のため(600a)にテクスチャ環境ユニット600に出力する。テクスチャ環境ユニット600は、ポリゴンおよびテクスチャ色/アルファ/深度をブレンドし、また、逆レンジ型フォグ効果を達成するためのテクスチャフォグ処理(600b)を行い得る。テクスチャ環境ユニット600は、例えば色/アルファ変調、エンボス化、詳細テクスチャリング、テクスチャスワッピング、クランピング、および深度ブレンディングに基づき、様々な他の面白い環境関連の機能を行うためのステージを複数提供し得る。   The texture unit 500 outputs the filtered texture value to the texture environment unit 600 for texture environment processing (600a). Texture environment unit 600 may blend polygons and texture colors / alpha / depth and perform texture fog processing (600b) to achieve a reverse range fog effect. Texture environment unit 600 may provide multiple stages for performing various other interesting environment-related functions based on, for example, color / alpha modulation, embossing, detailed texturing, texture swapping, clamping, and depth blending. .

ピクセルエンジン700は、深度(z)比較(700a)およびピクセルブレンディング(700b)を行う。本例において、ピクセルエンジン700は、データを埋め込み(オンチップ)フレームバッファメモリ702に格納する。グラフィックスパイプライン180は、フレームバッファおよび/またはテクスチャ情報をローカルに格納するための1つ以上の埋め込みDRAMメモリ702を有し得る。z比較700a'は、また、現在有効なレンダリングモードに依存して、グラフィックスパイプライン180中のより早い段階で行われ得る(例えば、アルファブレンディングが必要でなければ、z比較は、より早くに行われ得る)。ピクセルエンジン700は、オンチップフレームバッファ702をディスプレイ/ビデオインターフェースユニット164によるアクセスのためにメインメモリ112に周期的に書き込むコピー動作700cを含む。このコピー動作700cは、また、動的テクスチャ合成効果を得るために、埋め込みフレームバッファ702の内容をメインメモリ112内のテクスチャにコピーするためにも用いられ得る。コピーアウト動作中において、アンチエイリアシングおよびその他のフィルタリングを行うことができる。グラフィックスパイプライン180のフレームバッファ出力(最終的には、メインメモリ112に格納される)は、各フレームごとにディスプレイ/ビデオインターフェースユニット164によって読み出される。ディスプレイコントローラ/ビデオインターフェースユニット164は、ディスプレイ102上に表示するためのデジタルRGB画素値を提供する。   The pixel engine 700 performs depth (z) comparison (700a) and pixel blending (700b). In this example, the pixel engine 700 stores data in an embedded (on-chip) frame buffer memory 702. Graphics pipeline 180 may have one or more embedded DRAM memories 702 for storing frame buffer and / or texture information locally. The z comparison 700a ′ can also be performed earlier in the graphics pipeline 180 depending on the currently enabled rendering mode (eg, if alpha blending is not required, the z comparison is performed earlier). Can be broken). The pixel engine 700 includes a copy operation 700 c that periodically writes the on-chip frame buffer 702 to the main memory 112 for access by the display / video interface unit 164. This copy operation 700c can also be used to copy the contents of the embedded frame buffer 702 to the texture in the main memory 112 to obtain a dynamic texture synthesis effect. Anti-aliasing and other filtering can be performed during the copy-out operation. The frame buffer output of the graphics pipeline 180 (which is ultimately stored in the main memory 112) is read by the display / video interface unit 164 for each frame. Display controller / video interface unit 164 provides digital RGB pixel values for display on display 102.

無色ライティング関数の例
上述のように、本実施例における変換ユニット300は、幾何学的変換、ポリゴンクリッピング、間引きおよびその他の機能に加えて、ライティングを行う。本実施例において、変換ユニット300は、ハードウェアにおいてライティングを頂点毎の計算としてサポートする。このことは、色値(RGB)がライティングされている頂点毎に演算され得ること、そしてこれらの色が、各ライティングされたトライアングルの表面にわたって線形補間されることができることを意味する。これはグローシェーディングとして公知である。ライティングの実施形態の一例に関するさらなる詳細を、図14以降と関連して以下に説明する。
Example of Colorless Lighting Function As described above, the conversion unit 300 in this embodiment performs lighting in addition to geometric conversion, polygon clipping, thinning, and other functions. In this embodiment, the conversion unit 300 supports lighting as a calculation for each vertex in hardware. This means that color values (RGB) can be computed for each illuminated vertex, and that these colors can be linearly interpolated across the surface of each illuminated triangle. This is known as glow shading. Further details regarding an example lighting embodiment are described below in connection with FIG.

本実施例の変換ユニット300は、従来のグラフィックスシステムでは利用可能でない、ライティング関数302のさらなる用途を提供する。一般に従来のグラフィックスシステムにおけるライティング関数の出力は、ポリゴンシェーディングに用いられる色である。グラフィックスシステムの中には、ライティング関数に基づいてアルファ(例えば透明度)値を提供するものもある。本発明によって提供される実施例においては、色および/または不透明度を変更するために後に用いられる無色パラメータ(すなわち色でもアルファでもなく何か別のもの)を生成するために、ライティング関数を用いる。   The conversion unit 300 of this example provides additional uses of the lighting function 302 that are not available in conventional graphics systems. In general, the output of a lighting function in a conventional graphics system is a color used for polygon shading. Some graphics systems provide alpha (eg, transparency) values based on lighting functions. In an embodiment provided by the present invention, a lighting function is used to generate a colorless parameter (ie, something other than color or alpha) that is used later to change color and / or opacity. .

図6はそのような構成を示すブロック図であり、ライティング関数302が、色または不透明度を変更するための後のプロセス304で用いられる無色パラメータを提供する。変更の結果はディスプレイ56などの表示装置上に表示される。この文脈において、「ライティング関数」の語は一般に、表面位置、表面方向、眼点の位置、ならびに場合によっては光源位置の、数学的関数を意味する。ライティング関数は、これらの座標の任意の組み合わせとして定義されることができる。   FIG. 6 is a block diagram illustrating such a configuration, where the lighting function 302 provides colorless parameters that are used in a subsequent process 304 to change color or opacity. The result of the change is displayed on a display device such as the display 56. In this context, the term “lighting function” generally refers to a mathematical function of surface position, surface orientation, eye point position, and possibly light source position. A lighting function can be defined as any combination of these coordinates.

本実施例において、ライティング関数302によって出力される無色パラメータは、図7に示すようにテクスチャ関数306によって処理される。非常に単純なレベルにおいては、オブジェクトをテクスチャリングすることは画像をそのオブジェクトに「貼り付ける」ことを意味する。より詳細には、テクスチャリングは一般にライティング関数302において用いられる値を変更することによって成立する。例えば、典型的な場合において、ライティング関数302は、ポリゴン表面の色および照度を決定するために用いられ、テクスチャリング関数は、その色/照度を変更することによって追加的な効果(例えば、レンガの壁または木目の外観を創出したり、表面を凹凸や鏡面状あるいは歪んでいるように見せるなど)を提供するために用いられる。図7に示す実施例においては対照的に、ライティング関数302の出力は色や透明度値ではなく、テクスチャリング関数306用の一般化されたパラメータ(例えばテクスチャ座標)である。テクスチャリング関数は、表示装置56上での表示用にプリミティブ色および/または不透明度によって変更(例えばブレンド)を行うために用いられる、色および/または不透明情報を作成する。   In this embodiment, the colorless parameter output by the lighting function 302 is processed by the texture function 306 as shown in FIG. At a very simple level, texturing an object means “pasting” an image to the object. More specifically, texturing is generally accomplished by changing the values used in the lighting function 302. For example, in the typical case, the lighting function 302 is used to determine the color and illuminance of the polygon surface, and the texturing function can add additional effects (eg, bricks) by changing its color / illuminance. Used to create the appearance of a wall or grain, or to provide a surface that appears uneven, mirrored, or distorted). In contrast to the embodiment shown in FIG. 7, the output of the lighting function 302 is a generalized parameter (eg, texture coordinates) for the texturing function 306 rather than a color or transparency value. The texturing function creates color and / or opacity information that is used to change (eg, blend) with primitive color and / or opacity for display on display device 56.

図8はテクスチャ関数306の例を示す。この例においてライティング関数302は、例示のテクスチャ関数306をパラメータ化する、無色出力パラメータSを生成する。この図8の例において例示のテクスチャ関数306は、パラメータSの値に依存して、3つの色(C1、C2、C3)または不透明度のうちの1つを選択する。その結果、テクスチャ関数306から出力される特定の色または不透明度が、ライティング関数302から出力されるパラメータSの関数として決定される。ライティング関数302がパラメータSを提供しているため、テクスチャ関数306から出力されるいずれの色または不透明度を選択するかは、ライティング関数の計算に用いられる様々なファクタのうちの任意のものに依存し得る。これらファクタは例えば、
・距離、
・減衰、
・角度、
・ベクトル、
・コサイン、
・多項式、
・光源タイプ、
・その他の係数
を含む。
FIG. 8 shows an example of the texture function 306. In this example, the lighting function 302 generates a colorless output parameter S that parameterizes the example texture function 306. The texture function 306 illustrated in the example of FIG. 8 selects one of three colors (C1, C2, C3) or opacity depending on the value of the parameter S. As a result, the specific color or opacity output from the texture function 306 is determined as a function of the parameter S output from the lighting function 302. Since the lighting function 302 provides the parameter S, which color or opacity to output from the texture function 306 depends on any of the various factors used to calculate the lighting function. Can do. These factors are for example:
·distance,
・ Attenuation,
·angle,
·vector,
・ Cosine,
・ Polynomial,
・ Light source type,
・ Including other coefficients.

テクスチャ関数306は様々な異なる態様で実施され得るが、コスト効率のよいアプローチの一つは、テクスチャ関数306の出力値をテクスチャルックアップテーブルまたはマップに格納し、テクスチャ座標を用いてこれらの値にアクセスすることである。図9は、ライティング関数302の出力パラメータSによってインデックスされる1次元テクスチャマップ308の一例を示す。この実施例において従来のテクスチャマッピング関数を用いることの利点は、ライティング関数302とともに、汎用テクスチャリングで利用可能なテクスチャマッピングハードウェアあるいはその他の機能も用いてテクスチャ関数306を実現することが可能であることである。   Although the texture function 306 can be implemented in a variety of different ways, one cost-effective approach is to store the output values of the texture function 306 in a texture lookup table or map, and use texture coordinates to store these values. Is to access. FIG. 9 shows an example of a one-dimensional texture map 308 that is indexed by the output parameter S of the lighting function 302. The advantage of using a conventional texture mapping function in this embodiment is that the texture function 306 can be implemented using the texture mapping hardware available in general texturing or other functions along with the lighting function 302. That is.

図10は、2次元テクスチャマッピング動作306を含むより詳細な例を示す。この例においては、頂点の識別およびライティング定義に基づいてライティング計算302が行われる。本実施例におけるライティング計算302の出力は、頂点毎の色(例えば赤、緑、青)および/または透明度(すなわちアルファ)を含む。本実施例は、典型的にはこれらのライティング計算302の色出力をポリゴン表面のグローシェーディングに用いる。しかしこの動作モードにおいて、カラーチャネルのうちの1つ(例えば青)が捨象され、他の2つのカラーチャネル(すなわち赤、緑)が変換動作308を用いてテクスチャ座標s、tに変換される。テクスチャ座標s、tは、1つ以上のテクスチャマッピング動作306a、306bなどに供されることにより、色/透明度出力テクセルを提供する。ブレンディング動作602は、これらのテクセルを表面色情報(従来のシェーディング技術を用いて同一または異なるライティング計算に基づいて導出され得る)とブレンドすることにより、シェードが付けられたテクスチャ化ポリゴンを表示用に提供することができる。   FIG. 10 shows a more detailed example that includes a two-dimensional texture mapping operation 306. In this example, lighting calculation 302 is performed based on vertex identification and lighting definitions. The output of lighting calculation 302 in this example includes a color per vertex (eg, red, green, blue) and / or transparency (ie, alpha). This embodiment typically uses the color output of these lighting calculations 302 for glow shading of the polygon surface. However, in this mode of operation, one of the color channels (eg, blue) is discarded and the other two color channels (ie, red, green) are converted to texture coordinates s, t using conversion operation 308. The texture coordinates s, t are provided to one or more texture mapping operations 306a, 306b, etc. to provide a color / transparency output texel. A blending operation 602 blends these texels with surface color information (which can be derived based on the same or different lighting calculations using conventional shading techniques) to display shaded textured polygons for display. Can be provided.

本実施例においてテクスチャマッピング動作306は、図11に示すような2次元テクスチャマッピングを提供する。本例においてテクスチャ座標tは、ライティング計算302の緑のカラーチャネル出力に基づいて生成され、2次元テクスチャマップ310内のn個の1次元テクスチャマップのうちの1つを選択するために用いられる。他方のテクスチャ座標sは、ライティング計算302の赤のカラーチャネル出力に基づいて作成され、座標tによって選択された1次元テクスチャ内の特定の1つのテクセルを選択するために用いられる。もちろん他の実施形態において、テクスチャ座標sが1−Dマップを選択して座標tが1つの特定のテクセルを選択してもよく、および/または異なる色および/または不透明度を用いて異なるテクスチャ座標を生成してもよい。所望であれば、3つのテクスチャ座標を用いて3Dテクスチャ中のテクセルを選択してもよい。   In this embodiment, the texture mapping operation 306 provides a two-dimensional texture mapping as shown in FIG. In this example, the texture coordinate t is generated based on the green color channel output of the lighting calculation 302 and is used to select one of the n one-dimensional texture maps in the two-dimensional texture map 310. The other texture coordinate s is created based on the red color channel output of the lighting calculation 302 and is used to select a particular texel in the one-dimensional texture selected by the coordinate t. Of course, in other embodiments, a texture coordinate s may select a 1-D map and a coordinate t may select one particular texel and / or different texture coordinates using different colors and / or opacity. May be generated. If desired, texels in the 3D texture may be selected using three texture coordinates.

図12は、複数の1次元テクスチャマップ308を含む2次元テクスチャマップ310の例示的な一例である。図12に示す特定の2次元テクスチャマップは、漫画的なライティング効果に特に適している。図示例では、それぞれが2つの異なる種類のテクセル(例えば紫色のテクセルと青色のテクセル)を含んだ4つのマップ308(1)〜308(4)を含む、複数の1次元テクスチャマップが含まれている。テクスチャ座標のうちの一方(例えばt)がこれらの異なるテクスチャマップ間の選択を行い、他方のテクスチャ座標(例えばs)が特定のテクセル(すなわち青または紫)を選択する。様々な1Dテクスチャマップ308(1)〜308(4)は、テクスチャ座標と青または紫のテクセルとの間で異なるマッピングを提供することにより、異なるブラシストロークあるいはその他の効果を提供する。   FIG. 12 is an illustrative example of a two-dimensional texture map 310 that includes a plurality of one-dimensional texture maps 308. The specific two-dimensional texture map shown in FIG. 12 is particularly suitable for cartoon-like lighting effects. The illustrated example includes a plurality of one-dimensional texture maps, each including four maps 308 (1) -308 (4), each containing two different types of texels (eg, purple texels and blue texels). Yes. One of the texture coordinates (eg, t) makes a selection between these different texture maps, and the other texture coordinate (eg, s) selects a particular texel (ie, blue or purple). The various 1D texture maps 308 (1) -308 (4) provide different brush strokes or other effects by providing different mappings between texture coordinates and blue or purple texels.

別の例として、図12に示す1Dテクスチャマップ308(6)は、4つの異なる種類のテクセル(黄色、橙色、赤色および茶色)を含んでいる。これらの異なる色を用いて、例えばあるオブジェクトに対して指向性光がなす角度または光源からのオブジェクトの距離がテクスチャマッピング動作306の出力から得られる色を決定するような、大胆な漫画的なライティング効果を得ることができる。そのような視覚化は、特に動的に生成される漫画的なアニメーションなどの非写実的なリアルタイムレンダリングにおいて、様々な面白い応用例を有し得る。例えば、オブジェクトをライティングする仮想的な漫画的な光を定義することが可能である。オブジェクトのレンダリングされた視覚化は、頂点位置、局所的な漫画的な光位置およびライティング計算302が考慮するその他のファクタ(鏡面または拡散演算、距離減衰など)に、依存するようになる。一例において、赤のカラーチャネルをゼロに設定し、ライティング計算302に緑チャネルを演算させることで、1セットのブラシストロークを定義する1Dテクスチャ内の特定のテクセル値を指定することが可能である。メインプロセッサ110が典型的にライティング計算302に供することが可能な材質の色は、2Dテクスチャマップ内のどの1Dテクスチャを選択するかを指定するために用いることができる。ライティング計算302は、頂点単位で(頂点毎に1インデックスを供給する以上の追加的なコストなく)、どのブラシストロークを選択するかを計算する。   As another example, the 1D texture map 308 (6) shown in FIG. 12 includes four different types of texels (yellow, orange, red and brown). Using these different colors, for example, bold cartoon lighting where the angle of directional light to an object or the distance of the object from the light source determines the color obtained from the output of the texture mapping operation 306 An effect can be obtained. Such visualization can have a variety of interesting applications, especially in non-realistic real-time rendering such as dynamically generated cartoon animation. For example, it is possible to define a virtual cartoon light that lights an object. The rendered visualization of the object will depend on the vertex position, the local cartoon light position and other factors that the lighting calculation 302 considers (specular or diffuse operations, distance attenuation, etc.). In one example, a specific texel value in a 1D texture that defines a set of brush strokes can be specified by setting the red color channel to zero and letting the lighting calculation 302 compute the green channel. The material colors that the main processor 110 can typically provide for the lighting calculations 302 can be used to specify which 1D texture in the 2D texture map to select. The lighting calculation 302 calculates which brush stroke to select on a per vertex basis (without the additional cost of supplying one index per vertex).

図10に示す例は漫画的なライティングに特に有用であるが、多くの他の応用例にも用いることができる。一例として、ライティング関数302は、影立体または表面を計算するために用いられ得る。所与の頂点に基づいたライティング計算302は、テクスチャマッピング動作306に用いられるテクスチャ座標において定義された影立体を生成することが可能である。多くの他の応用例が可能である。例えば、面白い応用例の1つは、投影テクスチャである。投影テクスチャの望ましくない特徴の1つは、典型的にはカメラから前方または後方に投影することである。本明細書において開示される技術は、減衰(例えば逆方向を向いたライティングを排除するため)および/または距離減衰(例えば、本物のスライドプロジェクタを用いて画像を投影するときの見え方のように、どれだけ遠くに投影されるかに基づいて投影テクスチャを減衰するため)を提供するライティング関数に基づいて、投影テクスチャ座標生成を提供することができる。このような投影テクスチャリングと本明細書に記載した無色ライティング関数との組み合わせにより、多くの面白い画像およびイメージング効果が得られる。   The example shown in FIG. 10 is particularly useful for comic writing, but can also be used for many other applications. As an example, the lighting function 302 can be used to calculate shadow solids or surfaces. A lighting calculation 302 based on a given vertex can generate a shadow solid defined in the texture coordinates used for the texture mapping operation 306. Many other applications are possible. For example, one interesting application is projected textures. One undesirable feature of the projected texture is typically projecting forward or backward from the camera. The techniques disclosed herein provide for attenuation (eg, to eliminate backward-facing lighting) and / or distance attenuation (eg, as seen when projecting an image using a real slide projector) Projected texture coordinate generation can be provided based on a lighting function that provides (to attenuate the projected texture based on how far it is projected). The combination of such projection texturing with the colorless lighting function described herein provides many interesting image and imaging effects.

図10に示す従来の動作306は、必ずしも全ての実施形態において必要なわけではない。本実施例においてライティング関数302は整数出力を生成し、この整数出力は変換ブロック308によって、以降のテクスチャマッピング動作306で用いられるテクスチャ座標に適した浮動小数点表現に変換される。しかし、そのような整数−浮動小数点変換は他の実施形態においては不要であり、あるいは他の実施形態においては所望に応じて異なるタイプの変換を用いることが可能である。   The conventional operation 306 shown in FIG. 10 is not necessary in all embodiments. In this example, the lighting function 302 generates an integer output that is converted by the conversion block 308 into a floating point representation suitable for the texture coordinates used in subsequent texture mapping operations 306. However, such integer-to-floating point conversions are not required in other embodiments, or different types of conversions can be used in other embodiments as desired.

図10に示す実施例において、ライティング関数302はテクスチャ座標sおよびtの両方を計算する必要はない。本実施例において、プリミティブ表面に適用されるべき1次元テクスチャマップ中で、どの特定のテクセルが使用されたのかを選択するために1つのテクスチャ座標のみをパラメータとして用いているため、好適な実施例では、ライティング計算302を用いてそのテクスチャ座標(あるいはそのテクスチャ座標が導出されるもととなる中間値として)を好ましくは計算する。しかし、アプリケーションによっては、ライティング計算302ではなくそのアプリケーションプログラムが、(本実施例では)複数の1次元テクスチャ308から選択を行うために用いられる別のテクスチャ座標を指定することが望ましいこともあり得る。一例として、メインプロセッサ110上で稼働するアプリケーションプログラムが、ライティング計算入力に適用されるライティング定義を介して、ライティング計算302のカラーチャネル出力のいずれかあるいはその全部のための値を指定することができる。いくつかの応用例においては、メインプロセッサ110が例えば緑のカラーチャネルの内容を指定し、従ってテクスチャマッピング動作306に用いられる特定の1次元テクスチャを指定することが望ましい場合もある。これにより、ライティング計算ユニット302が評価する変数に基づいてライティング計算302がテクスチャ座標sを動的に生成することを依然として可能にしながら、アプリケーションのプログラマの新たな制御が提供される。メインプロセッサ110が変換ユニット300に送る浮動小数点値をRGB8の形に切り捨てることにより、計算を高精度で行うことを可能にできる。   In the embodiment shown in FIG. 10, the lighting function 302 need not calculate both texture coordinates s and t. In this embodiment, since only one texture coordinate is used as a parameter to select which particular texel was used in the one-dimensional texture map to be applied to the primitive surface, the preferred embodiment Then, the lighting calculation 302 is preferably used to calculate the texture coordinates (or as an intermediate value from which the texture coordinates are derived). However, depending on the application, it may be desirable for the application program rather than the lighting calculation 302 to specify different texture coordinates that are used to select from multiple one-dimensional textures 308 (in this example). . As an example, an application program running on the main processor 110 can specify values for any or all of the color channel outputs of the lighting calculations 302 via lighting definitions applied to the lighting calculation inputs. . In some applications, it may be desirable for main processor 110 to specify the content of, for example, a green color channel, and thus a specific one-dimensional texture to be used for texture mapping operation 306. This provides new control for the programmer of the application while still allowing the lighting calculation 302 to dynamically generate the texture coordinates s based on the variables that the lighting calculation unit 302 evaluates. By truncating the floating point value sent from the main processor 110 to the conversion unit 300 in the form of RGB8, the calculation can be performed with high accuracy.

本実施例において、ライティング計算302が負の出力値を生成できないわけはない。図10に示す例において、これはオブジェクトをバックライトで照らすことに相当する。従って本実施例において、負のあるいはバックライトで照らされた漫画的なライティングを得ることが可能である。これは、オブジェクトの背面側に情報が存在する場合の効果を提供するために有用であり得る。好適な実施例において、ライティングユニットは常に正の色(値)を出力する。好適な実施例は負のタイプのライティング計算をサポートするが、最終値が正になるようにスケールおよび/またはバイアスを加えることは応用例次第である。例えば、ライティング計算の出力は、テクスチャ座標に変換される前において、−1から0および+1から1の間でマッピングされ得る。実施例においては負の値をクランプはせずに、単に正の数値にマッピングする。ここでアプリケーションは、これらの正の値が適切に解釈されるように注意を払うものとする。もちろん他の実施形態において所望であれば、負のライティング値を直接サポートしてもよい。   In this embodiment, there is no reason that the lighting calculation 302 cannot generate a negative output value. In the example shown in FIG. 10, this corresponds to illuminating the object with a backlight. Therefore, in this embodiment, it is possible to obtain negative or backlit cartoon lighting. This can be useful to provide an effect when information is present on the back side of the object. In the preferred embodiment, the lighting unit always outputs a positive color (value). The preferred embodiment supports negative types of lighting calculations, but it is up to the application to add scale and / or bias so that the final value is positive. For example, the output of the lighting calculation can be mapped between −1 to 0 and +1 to 1 before being converted to texture coordinates. In the embodiment, negative values are not clamped but simply mapped to positive numbers. Here the application shall take care to ensure that these positive values are properly interpreted. Of course, negative lighting values may be directly supported if desired in other embodiments.

図10に示すテクスチャマッピング動作306およびブレンディング動作602は、任意に複合化され得る。例えば、アルファとブレンドを行うことが可能である。別の例として、ライティング計算302から出力される2つの別々のカラーチャネルを2つの異なるテクスチャマッピング動作に用いてから、これらをブレンダ602によりブレンドしてもよい。本実施例におけるテクスチャマッパ500およびテクスチャ環境ユニット600はいずれもマルチタスク/マルチステージ動作であるため、ライティング計算302の出力に基づいて一連の直接/間接の動作を提供することにより、様々な面白く複雑な効果を得ることができる。例えば、同一譲受人に係る同時係属中の仮出願No.60/226,891(2000年8月23日出願)およびそれに対応している実用特許出願No.09/722,382(2000年11月28日出願)(弁理士受付番号723−961、いずれも「Method And Apparatus For Direct And Indirect Texture Processing In A Graphics System」の名称を有す)、ならびに同一譲受人に係る同時係属中の仮出願No.60/226,888(2000年8月23日出願)およびそれに対応している実用特許出願No.09/722,367(2000年11月28日出願)(弁理士受付番号723−968、いずれも「Recirculating Shade Tree Blender For A Graphics System」の名称を有す)を参照のこと。これら全てを本明細書において参考のため援用する。   The texture mapping operation 306 and blending operation 602 shown in FIG. 10 can be arbitrarily combined. For example, it is possible to blend with alpha. As another example, two separate color channels output from lighting calculation 302 may be used for two different texture mapping operations and then blended by blender 602. Since the texture mapper 500 and the texture environment unit 600 in this embodiment are both multitask / multistage operations, providing a series of direct / indirect operations based on the output of the lighting calculation 302 provides various interesting and complex operations. Effects can be obtained. For example, co-pending provisional application no. 60 / 226,891 (filed on August 23, 2000) and the corresponding utility patent application no. 09 / 722,382 (filed on Nov. 28, 2000) (patent attorney's reception number 723-961, both of which have the same name as “Method And Apparatus For Direct Indirect Texture Processing In A Graphics System”) Provisional application no. 60 / 226,888 (filed on August 23, 2000) and the corresponding utility patent application no. 09 / 722,367 (filed Nov. 28, 2000) (patent attorney acceptance number 723-968, both having the name of “Recirculating Shade Blender For A Graphics System”). All of which are incorporated herein by reference.

ライティングパイプラインの実施形態例
図13は、ライティング計算302のブロック図例を示す。本例において、ライティング計算302は、コマンドプロセッサ200から受け取った情報に応答して、変換ユニット300によって行われる。この情報は、メインプロセッサ110およびメインメモリ112(図4参照)を含む様々なソースから得ることができる。
Example Embodiment of Lighting Pipeline FIG. 13 shows an example block diagram of the lighting calculation 302. In this example, the lighting calculation 302 is performed by the conversion unit 300 in response to information received from the command processor 200. This information can be obtained from a variety of sources including main processor 110 and main memory 112 (see FIG. 4).

本実施例において変換ユニット300は、マスター制御部320、ライティング演算パイプライン322、アキュムレータ324、およびテクスチャ生成のための整数−浮動小数点変換器308を有する。マスターコントローラ320は、コマンドプロセッサ200からライティング定義および頂点定義を受け取り、適切な記憶/バッファリングの後に、関連する情報をライティング計算パイプライン322に提供する。ライティングパイプライン322は、ライティング演算を以下の基本形態で行う。すなわち、

Figure 0004975159
である。ここで、Cnはライティング計算パイプラインの出力を規定し、Cmaterialは材質の色を規定し、Acはアンビエント色を規定し、L(c)はライティング拡散または鏡面成分を規定し、Aは距離減衰を規定する。この計算はRGBの3つ組を演算する。なぜなら、本実施例におけるライティング計算パイプライン322は2つのこのようなライティング計算を並列に行い得るためである。この並列演算特徴のため、ライティング演算のうちの一方をあるオブジェクトのための無色ライティング効果用に用いながら、他方のライティング演算を同じオブジェクトの有色ライティング効果のために用いることができる。並列演算特徴は、漫画的なライティング効果を有するシェード付けされたポリゴン表面を生成するのに、そのような漫画的なライティング効果を有さないシェード付けされたポリゴン表面を生成するのと同じだけの処理時間しかかからないという意味において、漫画的なライティングなどの効果を「自由」にする。本実施例において、ライティング演算パイプライン322によって生成されるCn値は、正でも負でもよい。負のライティングの場合は、バックライトライティングおよびその他の面白い効果が可能になる。 In this embodiment, the conversion unit 300 includes a master control unit 320, a lighting operation pipeline 322, an accumulator 324, and an integer-floating point converter 308 for texture generation. Master controller 320 receives lighting definitions and vertex definitions from command processor 200 and provides relevant information to lighting calculation pipeline 322 after appropriate storage / buffering. The lighting pipeline 322 performs the lighting operation in the following basic form. That is,
Figure 0004975159
It is. Where C n defines the output of the lighting calculation pipeline, C material defines the color of the material, A c defines the ambient color, L (c) defines the lighting diffusion or specular component, and A Defines the distance attenuation. This calculation calculates a triplet of RGB. This is because the lighting calculation pipeline 322 in this embodiment can perform two such lighting calculations in parallel. Because of this parallel computing feature, one of the lighting operations can be used for a colorless lighting effect for an object while the other lighting operation can be used for a colored lighting effect for the same object. The parallel computing feature is as much as generating a shaded polygon surface with no comical lighting effect to generate a shaded polygon surface with such a comical lighting effect. In the sense that it only takes processing time, effects such as comic writing are made “free”. In the present embodiment, the C n value generated by the lighting operation pipeline 322 may be positive or negative. For negative lighting, backlighting and other interesting effects are possible.

本実施例において、ライティング演算パイプライン322の出力Cnは、整数アキュムレータ324によって累積される。本実施例において累積された出力は、変換ブロック308によって浮動小数点に変換され、テクスチャ座標としてテクスチャマッピング動作のためにテクスチャユニット502に供給される。本実施例は、テクスチャマッピング動作306の一部としてテクスチャフィルタリングを提供し得る。アプリケーションのプログラマは、ライティング計算302をテクスチャ座標を生成するとき、選択されるテクスチャフィルタリングモードに関して注意しなければならない。本実施例におけるs軸およびt軸は独立のファクタのために用いられるにも関わらずある種のテクスチャフィルタリングは両方の軸に同時に適用されるという事実に起因して、問題が起こりえる。これを回避する1つのやり方は、隣接するt値間の補間が最終出力に影響を及ぼさないことを確実にするために、テクスチャマップ内において各エントリをt軸に沿って複製することである。この結果、tの隣接する値に対する1次元テクスチャフィルタリングは同一になる。複数レベルのディテールをともなうミップマップフィルタリングも実行し得るが、これは、与えられた2Dテクスチャマップ中の1Dテクスチャの数を減らすようにも働き得る。   In this embodiment, the output Cn of the lighting operation pipeline 322 is accumulated by the integer accumulator 324. The accumulated output in this embodiment is converted to floating point by the conversion block 308 and supplied to the texture unit 502 for texture mapping operations as texture coordinates. This example may provide texture filtering as part of the texture mapping operation 306. The application programmer must be careful about the texture filtering mode selected when generating the texture coordinates for the lighting calculations 302. Problems can arise due to the fact that some texture filtering is applied to both axes simultaneously, even though the s and t axes in this embodiment are used for independent factors. One way to avoid this is to replicate each entry along the t axis in the texture map to ensure that the interpolation between adjacent t values does not affect the final output. As a result, the one-dimensional texture filtering for adjacent values of t is the same. Mipmap filtering with multiple levels of detail may also be performed, but this may also work to reduce the number of 1D textures in a given 2D texture map.

本実施例において、ライティング計算302の色値をテクスチャ座標に変換する方法に起因して、別の複雑さが発生する。例示の実施形態においてライティング計算302により生成される色値は、0〜255の範囲の8ビット整数である。変換ブロック308は、この整数値を255で除算することによって浮動小数点数値に変換する。しかし本実施例において、この値はテクスチャサイズで乗算されることによってテクスチャ座標に変換される。このプロセスは、1Dテクスチャを選択するためのテクスチャ座標に対してアプリケーションのプログラマが細心の注意を払わなければならないことを意味する。テクスチャサイズが256としかつGX_NEARテクスチャフィルタリングと仮定すると、これは以下のようにマッピングされる。

Figure 0004975159
In this embodiment, another complexity arises due to the method of converting the color values of the lighting calculation 302 into texture coordinates. In the exemplary embodiment, the color value generated by lighting calculation 302 is an 8-bit integer in the range of 0-255. Conversion block 308 converts this integer value to a floating point value by dividing by 255. However, in this embodiment, this value is converted to texture coordinates by multiplying by the texture size. This process means that the application programmer must pay close attention to the texture coordinates to select the 1D texture. Assuming a texture size of 256 and GX_NEAR texture filtering, this is mapped as follows:
Figure 0004975159

変換プロセスのため、座標値128はスキップされ、色値254および255は同じ座標値にマッピングされる。テクスチャサイズが256としかつGX_LINEARフィルタリングと仮定すると、以下のようなマッピングとなる。

Figure 0004975159
Because of the conversion process, coordinate value 128 is skipped and color values 254 and 255 are mapped to the same coordinate value. If the texture size is 256 and GX_LINEAR filtering is assumed, the mapping is as follows.
Figure 0004975159

例示の実施形態においてテーブルIDを色値に変換するために、n*2を用いても安全である。しかし、1Dテクスチャを2Dテクスチャ内において単純でない方法で格納しなければならない。n=0のテーブルは座標0(のみ)に格納しなければならず、n=1からn=63のテーブルはn*2−1およびn*2に格納しなければならず、n=64からn=127のテーブルはn*2およびn*2+1に格納しなければならない。座標127は、この特定の実施形態においては通常はアクセスされないため空のままにしておいてもよい。他の実施形態ではこの問題をまったく回避できるか、あるいは異なる変換問題を有する。   In the exemplary embodiment, it is safe to use n * 2 to convert the table ID to a color value. However, 1D textures must be stored in a non-simple manner within 2D textures. The n = 0 table must be stored at coordinate 0 (only), the n = 1 to n = 63 tables must be stored in n * 2-1 and n * 2, and from n = 64 The table with n = 127 must be stored in n * 2 and n * 2 + 1. Coordinate 127 may be left empty because it is not normally accessed in this particular embodiment. Other embodiments can avoid this problem altogether or have a different conversion problem.

より詳細な変換ユニット300例の説明
図14〜22はさらなる例として、ライティング計算302に用いられるライティングパイプラインを含む変換ユニット300のより詳細な実施形態を示す。このシステム50の実施例において、変換ユニット300はハードウェアにおいてライティングを頂点毎の計算としてサポートする。このことは、ライティングされている頂点毎に色(RGB)値が演算され得ること、そしてこれらの色が、各ライティングされたトライアングルの表面にわたって線形補間されることができることを意味する(グローシェーディングとして公知)。本実施例における変換ユニット300は、拡散局所スポット光をフルにサポートし、また無限鏡面ライティングもサポートする。
Description of More Detailed Conversion Unit 300 Example FIGS. 14-22 show, as a further example, a more detailed embodiment of a conversion unit 300 that includes a lighting pipeline used for lighting calculations 302. In this system 50 embodiment, the transform unit 300 supports lighting as a per-vertex calculation in hardware. This means that color (RGB) values can be computed for each vertex being illuminated, and that these colors can be linearly interpolated across the surface of each illuminated triangle (as glow shading). Known). The conversion unit 300 in this embodiment fully supports diffuse local spot light and also supports infinite specular lighting.

本例における変換ユニット300は、拡散減衰をサポートする。これは、オブジェクトの前面が側面よりも明るく、かつ背面が最も暗くなることが可能であることを意味する。変換ユニット300は、頂点の法線をサポートすることにより、拡散減衰を提供する。各頂点について、頂点の法線をその頂点と光の位置との間のベクトルに対して比較する。   The conversion unit 300 in this example supports diffusion attenuation. This means that the front of the object can be brighter than the side and the back can be darkest. Transform unit 300 provides diffusion attenuation by supporting vertex normals. For each vertex, compare the vertex normal to the vector between that vertex and the position of the light.

本実施例の変換ユニット300はまた、局所光をサポートする。局所光は、その世界の中で位置を有し、また方向も有する可能性がある。各光は位置を有するように定義される。各頂点の位置および光の位置を用いて、変換ユニット300は頂点毎の距離減衰を行うことができる。これはオブジェクト上で輝く光の輝度を、オブジェクトが光から遠ざかるにつれて減少させることが可能であることを意味する。   The conversion unit 300 of this embodiment also supports local light. Local light has a position in the world and may also have a direction. Each light is defined to have a position. Using the position of each vertex and the position of light, the conversion unit 300 can perform distance attenuation for each vertex. This means that the brightness of light shining on the object can be reduced as the object moves away from the light.

本実施例における変換ユニット300はまた、指向性ライティングをサポートする。サポートは、非指向性光から弱指向性効果、そして高指向性スポット光にまでわたる。これらの効果は角度減衰によってサポートされる。従って、光の「ビーム内」に直に存在する頂点を、ビームの外側あるいは光の後ろに存在する頂点よりも明るくさせることが可能である。   The conversion unit 300 in this embodiment also supports directional lighting. Support ranges from non-directional light to weak directional effects and highly directional spotlights. These effects are supported by angular attenuation. Therefore, it is possible to make a vertex directly present “in the beam” of light brighter than a vertex existing outside the beam or behind the light.

局所拡散光は、距離減衰および角度減衰の両方を受けることができる。適切なライティング式をプログラムすることにより、アプリケーションのプログラマは、減衰値を出力色またはアルファとして(あるいはテクスチャ座標生成の場合にはテクスチャ座標として)得ることが可能である。   Locally diffused light can be subject to both distance attenuation and angular attenuation. By programming an appropriate lighting expression, the application programmer can obtain the attenuation value as an output color or alpha (or as texture coordinates in the case of texture coordinate generation).

例示の実施形態において、変換ユニットは8個の物理光をサポートする。アプリケーションのプログラマは、各光の減衰パラメータ、位置、方向、および色を記述することができる。アプリケーションのプログラマはまた、ライティング式の結果を累積する、最大4個の物理カラーチャネルを制御することができる。光をチャネルと対応付けることにより、アプリケーションのプログラマは頂点毎の複数の光の効果を加算するか、あるいはそれらを後でテクスチャ環境ユニット600において結合するかを選択することができる。テクスチャ環境ユニット600が利用可能なチャネル数は、アプリケーションのプログラマによって設定される。場合によっては(例えばカラーチャネルを用いてテクスチャ座標を生成するとき)、ライトチャネルは演算されるが色または不透明度としては出力されない。前述のように、変換ユニット300は2つのカラーチャネルを同時に計算するようにパイプライン化されているが、1つのカラーチャネルだけをブレンディングのために直接テクスチャ環境ユニット600に供給してもよい。その他のカラーチャネルは、テクスチャ座標の形でテクスチャユニット500に提供され得る。   In the exemplary embodiment, the conversion unit supports 8 physical lights. The application programmer can describe the attenuation parameters, position, direction, and color of each light. The application programmer can also control up to four physical color channels that accumulate lighting results. By associating light with a channel, the application programmer can choose to add the effects of multiple lights per vertex, or combine them later in the texture environment unit 600. The number of channels available to the texture environment unit 600 is set by the application programmer. In some cases (eg, when generating texture coordinates using a color channel), the light channel is computed but not output as color or opacity. As previously described, the transform unit 300 is pipelined to calculate two color channels simultaneously, but only one color channel may be provided directly to the texture environment unit 600 for blending. Other color channels may be provided to the texture unit 500 in the form of texture coordinates.

各カラーチャネルは、カラーソースの選択において減衰を可能にする。光マスクが、最大8個の光をチャネルと対応付ける。図14のチャネルを参照し、最大8個の異なる光を2つのカラーチャネルおよび2つのアルファチャネルのうちの任意のものと対応付けることにより、一方がテクスチャ座標に変換され得る2つの独立な出力が提供される例を示している。   Each color channel allows attenuation in the selection of the color source. A light mask associates up to eight lights with the channel. Referring to the channel of FIG. 14, associating up to 8 different lights with any of the two color channels and the two alpha channels provides two independent outputs, one of which can be converted to texture coordinates. An example is shown.

図14に示すように、本実施例における変換ユニット300は2つのRGBA色(色0および色1)を生成する。各出力色はRGB用に1つおよびアルファ用に1つの2つのライティング関数を有し、ポリゴン毎頂点毎につき計4つのライティング関数を有する。4個のそのような光は、例えばテクスチャリングなどの様々なライティング効果を可能にする。各関数は、変換ユニット300が保持するグローバルアンビエント色および8個の光の状態に基づく、動作中の材質の色を含み得る。これらの式は拡散、鏡面、およびスポット光減衰を可能にする。ライティングデータパスは、好適な実施例においては局所拡散スポット光について最適であるように設計されるが、同じデータパスでテクスチャ型ライティングのための鏡面ハイライトおよび/または減衰係数を生成することも可能である。上述のように、光の色を用いてテクスチャ座標を生成することもできる。   As shown in FIG. 14, the conversion unit 300 in this embodiment generates two RGBA colors (color 0 and color 1). Each output color has two lighting functions, one for RGB and one for alpha, for a total of four lighting functions per polygon per vertex. Four such lights allow various lighting effects such as texturing. Each function may include the color of the active material based on the global ambient color held by the conversion unit 300 and the eight light states. These equations allow diffusion, specularity, and spot light attenuation. The lighting data path is designed to be optimal for locally diffuse spotlight in the preferred embodiment, but it is also possible to generate specular highlights and / or attenuation factors for textured lighting in the same data path It is. As described above, texture coordinates can also be generated using the color of light.

ライティング計算の例
変換ユニット300によって実行されるライティング式の例は以下の通りである。

Figure 0004975159
Example of Lighting Calculation An example of the lighting expression executed by the conversion unit 300 is as follows.
Figure 0004975159

本実施例において、材質およびグローバルアンビエント色はレジスタから得てもよく、あるいはコマンドプロセッサ200から頂点色の形で得てもよい。8個より多くの光を要求するアプリケーションは、メインプロセッサ110上で実行するソフトウェアに基づいて、結果が頂点色のうちの1つになるように追加的な光からの照度を演算して、その頂点色を用いるようにアンビエントソースレジスタを設定し得る。所望であれば、メインプロセッサ110がソフトウェアを用いてライティング計算のいずれかまたは全部を演算し、結果得られたこれらの演算出力を頂点色の形として、テクスチャ座標へ変換されるために変換ユニット300に供給することが可能である。あるいは、メインプロセッサは演算されたテクスチャ座標を、テクスチャマッピングのためにテクスチャユニット500に渡してもよい。   In this embodiment, the material and the global ambient color may be obtained from a register or may be obtained from the command processor 200 in the form of a vertex color. An application that requires more than eight lights calculates the illuminance from the additional light based on software running on the main processor 110 so that the result is one of the vertex colors, and The ambient source register can be set to use the vertex color. If desired, the main processor 110 computes any or all of the lighting calculations using software, and the resulting computed output is converted to texture coordinates as vertex color shapes for conversion unit 300. Can be supplied. Alternatively, the main processor may pass the computed texture coordinates to the texture unit 500 for texture mapping.

「LightFunc」パラメータを無効にすることにより、材質の色が変更されずに変換ユニット300を通過する。これを用いて、無色ライティング関数出力に応答して複数の1Dテクスチャのうちのいずれをテクスチャマッピング動作に用いるかを、メインプロセッサ110がアプリケーションプログラムのソフトウェア制御に基づき直接選択することを、可能にすることができる。   By invalidating the “LightFunc” parameter, the color of the material passes through the conversion unit 300 without being changed. This allows the main processor 110 to directly select which of a plurality of 1D textures to use for the texture mapping operation in response to the colorless lighting function output based on software control of the application program. be able to.

各ライティング関数において、利用可能な8個の光のいずれかまたは全部が許可され得る。光毎の照度の和は本実施例では[−1,1]にクランプされ、グローバルアンビエント項を加える前に整数2の補数に変換される。照度の総計が[0,1]にクランプされるため、材質は本実施例におけるライティングを通じては明るくなり得ない。もしこの効果が望まれる場合は、光の色を材質の色で予め乗算し、式中の材質の色を1.0に設定してもよい。他の実施形態例において、ライティングを通じて材質をより明るくすることを可能にするための他の構成が提供され得る。   In each lighting function, any or all of the eight available lights may be allowed. In this embodiment, the sum of the illuminances for each light is clamped to [−1, 1] and converted to an integer 2's complement before adding the global ambient term. Since the total illuminance is clamped at [0, 1], the material cannot be brightened through the lighting in this embodiment. If this effect is desired, the light color may be pre-multiplied by the material color and the material color in the equation may be set to 1.0. In other example embodiments, other configurations may be provided to allow the material to be brighter through lighting.

本実施形態において、結果が単色でも十分な場合には、アルファ式を用いることができる。その結果として得られるアルファ値は、本実施例のテクスチャ環境ユニット600において、他のRGBおよびアルファ値と組み合わせられることができる。例えば、チャネル0色の色出力に拡散結果を出し、色0チャネルのアルファ出力に鏡面結果を出し、かつテクスチャ環境ユニット600によって拡散色をテクスチャ色で乗算し、テクスチャ環境ユニット600内の1つのステージで(白色などの)鏡面ハイライトを加えることが可能である。   In this embodiment, when the result is sufficient even for a single color, the alpha formula can be used. The resulting alpha value can be combined with other RGB and alpha values in the texture environment unit 600 of the present example. For example, a diffusion result is output to the color output of channel 0 color, a specular result is output to the alpha output of color 0 channel, and the diffusion color is multiplied by the texture color by the texture environment unit 600. It is possible to add specular highlights (such as white).

本実施例の拡散減衰関数において、コマンド(N・H)[0,1]クランプ以上で柔軟性がもたらされる。拡散プロパティを有さないあるいは未クランプのままにされたライティング式については減衰が無効にされ得る。未クランプの内積は、光に基づくテクスチャ生成で照度を180°制御することを可能にする。本実施例においては照度はクランプされるため、colorcおよびambcを適切に用いることにより、符号付きライティング関数を適切にスケーリングおよびバイアスし得る。本実施例において、1つのライティング式において使用できる拡散減衰関数が、3例提供される。すなわち、

Figure 0004975159
である。 In the diffusion attenuation function of the present embodiment, flexibility is provided by a command (N · H) [0, 1] clamp or more. Attenuation can be disabled for lighting expressions that do not have diffuse properties or are left unclamped. The unclamped inner product makes it possible to control the illuminance by 180 ° with light-based texture generation. Since the illuminance is clamped in the present embodiment, the signed lighting function can be appropriately scaled and biased by appropriately using color c and amb c . In this embodiment, three examples of diffusion decay functions that can be used in one lighting formula are provided. That is,
Figure 0004975159
It is.

本実施例における角度減衰ロジックは、光−方向ベクトルおよび光−頂点ベクトルの内積に基づく2次多項式を演算する。二乗項および線形項を外挿することにより、鋭角的なフォールオフが得られる。スポット光角度の外側の角度について外挿により負の値が発生するのを避けるため、クランピングを用いる。別の2次多項式の逆関数を用いることにより、レンジ減衰を行うことができる。距離値dは、頂点から光の位置までのベクトルの長さである。距離減衰だけの光の式をテクスチャ型の光に用いることによって、投影あるいはその他のテクスチャの距離に基づいた照度フォールオフを、シミュレートすることができる。   The angle attenuation logic in this embodiment calculates a second order polynomial based on the inner product of the light-direction vector and the light-vertex vector. By extrapolating the square and linear terms, an acute falloff is obtained. Clamping is used to avoid the generation of negative values due to extrapolation for angles outside the spot light angle. Range attenuation can be performed by using an inverse function of another second-order polynomial. The distance value d is the length of the vector from the vertex to the light position. Illumination falloff based on projection or other texture distances can be simulated by using a distance attenuation-only light equation for texture-type light.

この同じロジックを、平行光源についての一般の鏡面減衰(N・H)Sを近似するために用いることができる。光−頂点ベクトルおよび光−方向ベクトルのかわりに、法線および半角ベクトルをそれぞれ用いてもよい。ライティング関数において減衰を無効にすることにより、拡散および鏡面式の両方において非減衰の点(例えば全方位の)光源を用いることが可能になる。本例において、光の角度減衰係数を鏡面式に用い、そして拡散式において減衰をオフにしてもよい。本実施例の鏡面式および拡散式は、本実施例において変換ユニット300内ではなくテクスチャ環境ユニット600内で組み合わせられるが、他の実施形態が可能である。 This same logic can be used to approximate the general specular attenuation (N · H) S for parallel light sources. Instead of the light-vertex vector and the light-direction vector, normal and half-angle vectors may be used, respectively. By disabling attenuation in the lighting function, it is possible to use a non-attenuating point (eg omnidirectional) light source in both diffuse and specular. In this example, the angular attenuation coefficient of the light may be used in the specular formula, and attenuation may be turned off in the diffusion formula. The specular and diffusion types of this example are combined in the texture environment unit 600 instead of in the conversion unit 300 in this example, but other embodiments are possible.

例示の減衰関数のさらなる詳細は以下の通りである。

Figure 0004975159
Further details of an exemplary attenuation function are as follows.
Figure 0004975159

変換ユニット300のブロック図の実施形態例
図15は、システム50の変換ユニット300の実施形態例のブロック図である。本実施例における変換ユニット300は、
・トップオブパイプライン部330
・光部332
・ボトムオブパイプライン部334
の3つの主要部を有する。
Exemplary Block Diagram Embodiment of Conversion Unit 300 FIG. 15 is a block diagram of an exemplary embodiment of conversion unit 300 of system 50. The conversion unit 300 in this embodiment is
・ Top of pipeline part 330
Optical section 332
・ Bottom of pipeline part 334
It has three main parts.

本実施例におけるトップオブパイプライン部330は、光部332、コンテキスト行列格納336、入力FIFOバッファ338内積ユニット340、投影ブロック342、テクスチャドット2ブロック346、クリッピング検出器348、およびバイパスFIFOブロック350を有する。本実施例において、トップオブパイプライン(TOP)部330は、以下の例示的な関数を実行する。
・頂点変換(3つの内積)
・法線変換(3つの内積)
・テクスチャ変換(テクスチャに対して2または3つの内積)
・投影変換(単純化3つの内積)そして光部332は以下のカラーチャネル関数を実行する。
・カラーチャネル0拡散演算(1つの内積N・L)
・カラーチャネル0拡散演算(光毎につき1つの内積L2
・カラーチャネル0拡散演算(1つの内積N2
The top-of-pipeline unit 330 in this embodiment includes an optical unit 332, a context matrix storage 336, an input FIFO buffer 338 inner product unit 340, a projection block 342, a texture dot 2 block 346, a clipping detector 348, and a bypass FIFO block 350. Have. In the present embodiment, the top-of-pipeline (TOP) unit 330 performs the following exemplary functions.
・ Vertex transformation (three inner products)
Normal conversion (three inner products)
Texture conversion (2 or 3 inner products for texture)
Projection transformation (simplified three inner products) and the light section 332 performs the following color channel functions:
Color channel 0 diffusion operation (one inner product N · L)
Color channel 0 diffusion calculation (one inner product L 2 per light)
Color channel 0 diffusion operation (one inner product N 2 )

さらに入力FIFOは、例えば以下の情報を特定する頂点毎の頂点記述子を受け取る。
・図形情報XYZ、
・法線ベクトル情報NX、NY、NZ
・頂点毎につきRGBA色0
・頂点毎につきRGBA色1
・従法線ベクトルTX、TY、TZ
・従法線ベクトルBX、BY、BZ
・テクスチャ0データT0
・テクスチャ1からnデータSn、Tn
Further, the input FIFO receives a vertex descriptor for each vertex specifying, for example, the following information.
・ Graphic information XYZ,
・ Normal vector information N X , N Y , N Z
RGBA color 0 per vertex
RGBA color 1 per vertex
-Binormal vectors T X , T Y , T Z
-Binormal vectors B X , B Y , B Z
Texture 0 data T 0 ,
Texture 1 to n data Sn , Tn

適切な頂点毎の情報が光部332に供給されて、ライティング演算を可能にする。   Appropriate information for each vertex is supplied to the light unit 332 to enable lighting calculations.

図15に示す実施例における光部332は、ライティングパラメータメモリ352、法線メモリ354、および光データパス356を含んでいる。   The light unit 332 in the embodiment shown in FIG. 15 includes a lighting parameter memory 352, a normal memory 354, and an optical data path 356.

光パラメータメモリ352は、光データパス356が使用する様々な光パラメータを記憶する。このように、光パラメータ352は様々なライティング情報(例えば光ベクトル、光パラメータなど)の全てを保持する。本実施例において、グローバル状態およびアンビエント状態の両方がこのメモリに記憶される。本実施例において各ワードは32ビットで書かれているが、上位20ビットのみが保持される。本実施例において、各位置は3ワード幅を有し、最小ワード書き込みサイズは3ワードである。以下に光パラメータメモリ352の内容例を示す。

Figure 0004975159
The optical parameter memory 352 stores various optical parameters used by the optical data path 356. Thus, the light parameter 352 holds all of various lighting information (for example, light vector, light parameter, etc.). In this embodiment, both global and ambient states are stored in this memory. In this embodiment, each word is written in 32 bits, but only the upper 20 bits are retained. In this embodiment, each position has a width of 3 words, and the minimum word write size is 3 words. An example of the contents of the optical parameter memory 352 is shown below.
Figure 0004975159

本実施例における光部332の全体図を図16に示す。簡潔に言えば、光部332は以下の局所ライティング演算を行う。

Figure 0004975159
これは、以下の頂点毎の局所光ベクトル演算
Figure 0004975159
を必要とする。この後、
Figure 0004975159
を演算する必要がある。 An overall view of the light section 332 in this embodiment is shown in FIG. In short, the light unit 332 performs the following local lighting operation.
Figure 0004975159
This is the following local light vector calculation for each vertex:
Figure 0004975159
Need. After this,
Figure 0004975159
Need to be calculated.

このように、拡散減衰計算は、光ベクトルおよび視点空間法線を必要とする。例示の実施形態において、0へのクランピングは内部フラグを条件としてもよい(例えば1.0にクランプされてもまったくクランプされなくてもよい。)。拡散光が負の内積を有することを許してもよい。変換内積ユニットが幾何学的な視点空間変換を演算する一方で、ライティング内積ユニットが視点空間法線を演算してもよい。そして、ライティング内積ユニットがN・L、L2およびN2内積を演算し得る。この後、本実施例では結果を正規化することにより、正規化光ベクトル法線情報を提供する。正規化後、正規化の中間結果(例えば距離の二乗と距離とコサインN・Lと)を用いて正規化係数ならびに減衰式を演算する。そして、光アンビエントベクトルを乗算する。得られた3つ組は、光毎の減衰された拡散成分である。これを2の補数整数に変換し、得られた3つの値を整数アキュムレータに累積する。このアキュムレータは、アンビエント項と他の光からの任意の他の拡散項を加算する。最終的な和が頂点毎の色である(本実施例においては0から255にクランプされた8ビットRGBフォーマット)。 Thus, diffusion attenuation calculations require a light vector and a viewpoint space normal. In the illustrated embodiment, clamping to 0 may be conditional on an internal flag (eg, it may be clamped to 1.0 or not clamped at all). The diffused light may be allowed to have a negative inner product. The lighting dot product unit may calculate the viewpoint space normal while the conversion dot product unit calculates the geometric viewpoint space conversion. The lighting dot product unit can then calculate N · L, L 2 and N 2 dot products. Thereafter, in the present embodiment, normalized light vector normal information is provided by normalizing the result. After normalization, a normalization coefficient and an attenuation expression are calculated using an intermediate result of normalization (for example, the square of distance, distance, and cosine N · L). Then, the optical ambient vector is multiplied. The resulting triplet is an attenuated diffuse component for each light. This is converted to a two's complement integer and the three values obtained are accumulated in an integer accumulator. This accumulator adds the ambient term and any other diffusion term from other light. The final sum is the color for each vertex (in this example, an 8-bit RGB format clamped from 0 to 255).

図17は、図16に示したベクトルドット/Maddブロック357のブロック図の例を示す。Nおよび他の全ての内積を演算するために同じ内積ユニットを用いると、各光が同じデータパス要素を複数回再使用しなければならないため、性能がやや劣るかもしれず、光のスケジューリングが難しくなる。これは、複雑な制御問題につながる。設計を単純化するためには、第2の制限された内積ユニットを実施することで様々な演算を分離してもよい。第1の内積ユニットが変換法線を演算し、他方の内積ユニットが頂点変換を演算してもよい。次にベクトル加算が局所ライティングについての光ベクトルを演算し得る。第2の内積ユニットは、(鏡面光について)N2、L2、N・L、N・Hを演算し得る。本実施例においてこれは、フィードバックのない完全にパイプライン化された態様で実現することができる。図17を参照のこと。 FIG. 17 shows an example of a block diagram of the vector dot / Madd block 357 shown in FIG. Using the same dot product unit to compute N and all other dot products, each light must reuse the same data path element multiple times, so performance may be somewhat inferior and light scheduling becomes difficult . This leads to complex control problems. To simplify the design, various operations may be separated by implementing a second limited dot product unit. The first inner product unit may calculate the transformation normal, and the other inner product unit may compute the vertex transformation. Vector addition can then compute the light vector for local lighting. The second inner product unit may compute N 2 , L 2 , N · L, N · H (for specular light). In this embodiment this can be realized in a completely pipelined manner without feedback. See FIG.

図18は、図16に示す正規化器360の実施形態の一例を示す。いったんライティングベクトル値が演算されれば、本実施例は結果を正規化し、減衰を演算する。本実施例の正規化器360は、以下の入力を受け付け、
・コサイン減衰:L・Dir、1/sqrt(L)
・距離減衰:L2、L
・拡散係数:N・L、N2、L2
そして図18に示す例示の正規化器360によって行われる以下のステップを用いて距離減衰を演算する。
1.K22を演算
2.K22 +K0を演算
3.dを演算
4.K1dを演算
5.D22+K1d+ KOを演算
6.1/(K22+K1d+K0)を演算
FIG. 18 shows an example of an embodiment of the normalizer 360 shown in FIG. Once the lighting vector value is computed, this example normalizes the result and computes the attenuation. The normalizer 360 of this embodiment accepts the following inputs:
Cosine decay: L · Dir, 1 / sqrt (L)
・ Distance attenuation: L 2 , L
・ Diffusion coefficient: N ・ L, N 2 , L 2 ,
The distance attenuation is then calculated using the following steps performed by the exemplary normalizer 360 shown in FIG.
1. 1. Calculate K 2 d 2 2. Calculate K 2 d 2 + K0 . Calculate d4. 4. Calculate K 1 d Calculate D 2 D 2 + K 1 d + KO 6. Calculate 1 / (K 2 d 2 + K 1 d + K0)

図19は、距離減衰ユニット362の一例を示す。例示の距離減衰器の実施形態362は、以下のステップ例を用いてコサイン減衰を演算する。
1.Cos=Clamp0(L.Ldir)を演算
2.Cos2を演算
3.A2Cos2を演算
4.A1Cosを演算
5.A1Cos+A0を演算
6.A2Cos2+A1Cos+A0を演算
7.Clamp_0(A+2+Cos2+A1Cos+A0)を演算
FIG. 19 shows an example of the distance attenuation unit 362. The exemplary distance attenuator embodiment 362 computes cosine attenuation using the following example steps.
1. 1. Calculate Cos = Clamp0 (L.Ldir) 2. Calculate Cos 2 3. Calculate A 2 Cos 2 4. Calculate A 1 Cos 5. Calculate A 1 Cos + A0 6. Calculate A 2 Cos 2 + A 1 Cos + A0 Calculate Clamp_0 (A + 2 + Cos 2 + A 1 Cos + A0)

図20は、以下を演算する光スケーラ364の実施形態の一例を示す。
・1/sqrt(N2
・1/sqrt(L2
・N・L(sqrt(N2)×sqrt(L2))
FIG. 20 shows an example of an embodiment of an optical scaler 364 that calculates:
・ 1 / sqrt (N 2 )
・ 1 / sqrt (L 2 )
・ N ・ L (sqrt (N 2 ) × sqrt (L 2 ))

ユニットのうちのいくつか(例えば1/sqrtおよび乗算器のうちのいくつか)は、図17〜20の様々なデータパスの実施例の間で共有することができる。従って、ある実施例がおよそ18個の乗算器と10個の加算器を必要とすることもある。反転および1/sqrtは、テーブルルックアップまたは単純な1パスニュートン−ラプソン補間器またはその他の何らかのパイプライン補間器を用いて、行うことができる。アルファおよび鏡面書き込み演算は、ライティング式の変更でしかないため、本実施例において追加的なハードウェアをいっさい必要としない。   Some of the units (eg, 1 / sqrt and some of the multipliers) can be shared between the various data path embodiments of FIGS. Thus, some embodiments may require approximately 18 multipliers and 10 adders. Inversion and 1 / sqrt can be done using a table lookup or a simple 1-pass Newton-Raphson interpolator or some other pipeline interpolator. Since the alpha and specular writing operations are only changes in the lighting formula, no additional hardware is required in this embodiment.

図21は、整数アキュムレータ336の実施形態の一例を示す。各色について新しい属性が到着したとき、その色が累積される。ある色について全ての光が累積されると、アンビエントが加算され(例えば頂点色FIFOから、あるいはレジスタから)、材質の色が乗算される。次に、最終色およびテクスチャ生成の構築により、最終RGB/A色が累積/フォーマットレジスタに累積される。色/テクスチャが演算されれば、出力FIFOに書き込まれる。制御は以下の一般ガイドラインに従い得る。
If (新しい属性 == 色Xについての新しい光)
新しい光を色Xに累積
色Xについての光の数をインクリメント
End
If (色Xについての光の数が最大)
色を乗算器に転送
材質の乗算を実行
End
If (色Xが乗算状態)
色Xをまず累積
End
If (色Xの累積が完了(RGBXまたはAXXまたはRGBA))
色が使用可能されていれば、色Xを色についてフォーマット
テクスチャが使用可能されておりかつ色が使用不可にされているかあるいは色が既にロードされていれば、色Xをテクスチャについてフォーマット
出力FIFOにフォーマットされたデータをロード、色/テクスチャカウントをインクリメント
End
If (色カウントおよびテクスチャカウントが最大)
BOPにデータを書き込む
fifoをポップするEnd
FIG. 21 shows an example of an embodiment of an integer accumulator 336. As new attributes arrive for each color, the color is accumulated. When all the light has accumulated for a certain color, the ambient is added (eg from the vertex color FIFO or from the register) and multiplied by the material color. The final RGB / A color is then accumulated in the accumulation / format register by building the final color and texture generation. Once the color / texture is computed, it is written to the output FIFO. Control may follow the following general guidelines:
If (new attribute == new light for color X)
Accumulate new light in color X Increment the number of lights for color X End
If (maximum number of lights for color X)
Transfer color to multiplier Perform material multiplication End
If (color X is multiplied)
Color X is first accumulated End
If (accumulation of color X is complete (RGBX or AXX or RGBA))
If color is enabled, format color X for color If color texture is enabled and color is disabled, or color is already loaded, color X is formatted for texture to output FIFO Load formatted data, increment color / texture count End
If (maximum color count and texture count)
Write data to BOP End to pop fifo

図22は、本実施例において光パイプライン322を制御するために用いられるステージ遷移図の一例を示す。調停ロジックが、光データパス内に送出された一連の事象を決定する。本実施例の調停器は、その事象に依存して4サイクル毎あるいは8サイクル毎にしか新しい事象を送出することができない。可能な事象のリストは、
・特定の色/アルファについての光演算
・バンプマップ演算
を含む。
FIG. 22 shows an example of a stage transition diagram used for controlling the optical pipeline 322 in this embodiment. Arbitration logic determines the sequence of events sent out in the optical data path. The arbiter of this embodiment can send a new event only every 4 or 8 cycles depending on the event. The list of possible events is
-Light calculation for specific color / alpha-Includes bump map calculation.

上記の事象について、調停器は4/8サイクル毎に制御パイプライン内に属性をドロップする。これらの属性の各々は、光パイプライン322に入れられる事象のための実行命令を含んでいる。パイプラインの終端において、色/テクスチャが完了しているか否かを決定するために用いられる局所カウントをインクリメントするために、これらの属性が用いられる。   For the above event, the arbiter drops an attribute in the control pipeline every 4/8 cycle. Each of these attributes includes an execution instruction for an event that is entered into the light pipeline 322. These attributes are used to increment the local count used to determine whether the color / texture is complete at the end of the pipeline.

以下に、変換ユニット300がどのように挙動してどのようにデータおよびテクスチャなどを扱うかを制御するために用いられる、制御レジスタの例を示す。

Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
The following is an example of a control register used to control how the conversion unit 300 behaves and how it handles data, textures, etc.
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159
Figure 0004975159

アプリケーションプログラミングインターフェースの例
以下に、一実施形態例におけるライティング関数からのテクスチャ座標生成に関連する、API呼び出しの例をいくつか挙げる。
Examples of Application Programming Interfaces Below are some examples of API calls related to generating texture coordinates from lighting functions in an example embodiment.

GXSetTexCoordGen
説明
この関数を用いて、テクスチャ座標がどのように生成されるかを指定する。出力テクスチャ座標は通常は入力属性(位置、法線、またはテクスチャ座標)の何らかの変換の結果である。頂点毎のライティング計算の出力カラーチャネルからも、テクスチャ座標を生成することができる。
GXSetTexCoordGen
Description This function is used to specify how texture coordinates are generated. The output texture coordinates are usually the result of some transformation of input attributes (position, normal, or texture coordinates). Texture coordinates can also be generated from the output color channel of lighting calculation for each vertex.

C言語シンタックスにおいて、テクスチャ座標生成関数は以下のようなものになる。
dst_coord=func(src_param, mtx);
In the C language syntax, the texture coordinate generation function is as follows.
dst_coord = func (src_param, mtx);

API関数呼び出し例の用法の一例は、
Void GXSetTexCoordGen(
GXTexCoordID dst_coord,
GXTexGenType func,
GXTexGenSrc src_param,
u32 mtx );
である。
An example usage of the API function call example is
Void GXSetTexCoordGen (
GXTexCoordID dst_coord,
GXTexGenType func,
GXTexGenSrc src_param,
u32 mtx);
It is.

GXSetVtxDescによって設定される現在の頂点記述子は、グラフィックスプロセッサへのデータ入力を記述する。GXSetTexCoordGenを用いることにより、アプリケーションは入力データから新しい出力テクスチャ座標を作成することができる。dst_coordパラメータは、出力テクスチャ座標に名前を与えるために用いられる。このテクスチャ座標は、GXSetTevOrderを用いてテクスチャに結びつけることができる。関数GXSetNumTexGensは、GXSetTevOrder関数で利用可能なGX_TEXCOORD0から開始する連続する複数のテクスチャ座標を指定する。   The current vertex descriptor set by GXSetVtxDesc describes the data input to the graphics processor. By using GXSetTexCoordGen, the application can create new output texture coordinates from the input data. The dst_coord parameter is used to give a name to the output texture coordinates. This texture coordinate can be tied to the texture using GXSetTevOrder. The function GXSetNumTexGens specifies a plurality of consecutive texture coordinates starting from GX_TEXCOORD0 available with the GXSetTevOrder function.

入力テクスチャ座標は、テクスチャ座標生成ハードウェアを通る。GXInitは、ハードウェアを(このAPIを呼び出して)初期化することにより、GX_IDENTITY行列によって変換される全てのテクスチャ座標が、入力座標が変更されずにテクスチャハードウェアを通されたかのように見えるように変換される。   Input texture coordinates pass through texture coordinate generation hardware. GXInit initializes the hardware (by calling this API) so that all texture coordinates transformed by the GX_IDENTITY matrix appear to have passed through the texture hardware without changing the input coordinates. Converted.

列挙GXTexMtxは、mtxとして供給され得るテクスチャ行列名のデフォルトのセットを定義する。行列名は実際には、マトリクスメモリ中のロードされた行列の第1行目を示す行アドレス(1行につき4フロート)である。モデルビュー行列およびテクスチャ行列は、本実施例においてマトリクスメモリを共有する。   The enumeration GXTexMtx defines a default set of texture matrix names that can be supplied as mtx. The matrix name is actually a row address (4 floats per row) indicating the first row of the loaded matrix in the matrix memory. The model view matrix and the texture matrix share a matrix memory in this embodiment.

例:頂点ライティング計算からのテクスチャ座標生成
このタイプのテクスチャ座標生成は、漫画的なライティング効果を創出するために用いることができる。カラーチャネル結果のうちの1つをテクスチャ座標に変換する。
Example: Texture Coordinate Generation from Vertex Lighting Calculations This type of texture coordinate generation can be used to create cartoon lighting effects. Convert one of the color channel results to texture coordinates.

GX_TG_SRTG
座標sはチャネルの8ビット赤成分と等しく設定される。座標tはカラーチャネルの8ビット緑成分と等しく設定される。漫画的なライティングにおいて座標sは光の強度を表し、強度を色に変換するために任意の1Dテクスチャルックアップに入力される。座標tは材質の色を表すために用いられ、2Dテクスチャから1Dテーブルを選択するために用いられる。GX_TG_SRTG関数を用いて生成されるテクスチャ座標は、変換(GX_TG_MTX2×4またはGX_TG_MTX3×4)およびバンプマップ関数(GX_TG_BUMP0−3)によって生成される任意の座標の後に生成されなければならない。
GX_TG_SRTG
The coordinate s is set equal to the 8-bit red component of the channel. The coordinate t is set equal to the 8-bit green component of the color channel. In cartoon lighting, the coordinate s represents the intensity of light and is input to an arbitrary 1D texture lookup to convert the intensity into color. The coordinate t is used to represent the color of the material and is used to select a 1D table from the 2D texture. Texture coordinates generated using the GX_TG_SRTG function must be generated after any coordinates generated by the transformation (GX_TG_MTX2 × 4 or GX_TG_MTX3 × 4) and the bump map function (GX_TG_BUMP0-3).

1Dの強度−色テーブルの配列を表すテクスチャは、本実施例において注意深く構築されなければならない。各テーブル(行)は二重に記述されなければならない。座標sおよび座標tは8ビット色から生成されるため、256×256の最大テクスチャを用いることができる。このテクスチャサイズにおいて、127個のテーブルが利用可能である((256−1)/2)。   The texture representing the array of 1D intensity-color tables must be carefully constructed in this example. Each table (row) must be described twice. Since coordinates s and t are generated from 8-bit color, a 256 × 256 maximum texture can be used. In this texture size, 127 tables are available ((256-1) / 2).

2行テーブル中で正しく中央に位置される座標tを作成する、緑チャネル色を生成するためのルールの一例は、
n=1D強度ルックアップテーブルインデックス (256×256テクスチャにおいて0〜126)
rows=テクスチャ中の行数、2の倍数
if ((2*n +1)<((rows−1)/2))
green=2*n+1
else
green=2*n
である。
An example of a rule for generating a green channel color that creates a correctly centered coordinate t in a two-row table is:
n = 1D intensity lookup table index (0-126 for 256 × 256 textures)
rows = number of rows in texture, multiple of 2 if ((2 * n + 1) <((rows-1) / 2))
green = 2 * n + 1
else
green = 2 * n
It is.


//2Dテクスチャルックアップについてcolor0をs,tに変換、
行列は不使用
GXSetTexCoodGen(GX_TEXCOORD2,GX_T
G_SRTG,GX_TG_COLOR0,GX_IDENTITY);
Example // convert color0 to s, t for 2D texture lookup,
Matrix not used GXSetTexCoodGen (GX_TEXCOORD2, GX_T
G_SRTG, GX_TG_COLOR0, GX_IDENTITY);

機能順序付け
本実施例において、テクスチャ座標は機能順に生成される。すなわち、まず全ての変換(GX_TG_MTX2×4またはGX_TG_MTX3×4)、次にバンプマップ(GX_TG_BUMP0〜3)、そして次にライティングからのテクスチャ座標生成(GX_TG_SRTG)である。
Functional ordering In this embodiment, texture coordinates are generated in functional order. That is, all conversions (GX_TG_MTX2 × 4 or GX_TG_MTX3 × 4), then bump maps (GX_TG_BUMP0 to 3), and then texture coordinate generation from lighting (GX_TG_SRTG).

GXSetNumTexGens
説明
この関数は、テクスチャ環境(TEV)ステージにおいて生成され利用可能であるテクスチャ座標の数を設定する。テクスチャ座標は、GXSetTexCoordGenにより記述される入力データから生成される。生成されたテクスチャ座標は、GXSetTevOrderを用いて特定のテクスチャおよび特定のテクスチャ環境(TEV)ステージにリンクされる。
GXSetNumTexGens
Description This function sets the number of texture coordinates that are generated and available in the texture environment (TEV) stage. Texture coordinates are generated from input data described by GXSetTexCoordGen. The generated texture coordinates are linked to a specific texture and a specific texture environment (TEV) stage using GXSetTevOrder.

GX_TEXCOORD0から開始して連続する複数のテクスチャ座標を生成することができる。最大8個のテクスチャ座標を生成し得る。nTexGensが0に設定されると、テクスチャ座標は生成されない。この場合、少なくとも1つのカラーチャネルが出力されなければならない。GXSetNumChansを参照のこと。
引数
nTexGensは生成されるテクスチャ座標の数である。
用法例
void GXSetNumTexGens(u8 nTexGens);
A plurality of continuous texture coordinates can be generated starting from GX_TEXCOORD0. A maximum of 8 texture coordinates can be generated. When nTexGens is set to 0, no texture coordinates are generated. In this case, at least one color channel must be output. See GXSetNumChans.
The argument nTexGens is the number of texture coordinates to be generated.
Usage example void GXSetNumTexGens (u8 nTexGens);

GXSetNumChans
説明
この関数は、テクスチャ環境(TEV)ステージに出力されるライティングカラーチャネルの数を設定する。カラーチャネルは、頂点毎のライティング効果を演算するために用いられるメカニズムである。カラーチャネルは、GXSetChanCtrlを用いて制御される。カラーチャネルは一般に、特定のテクスチャ環境(TEV)ステージにリンクされる。
GXSetNumChans
Description This function sets the number of lighting color channels output to the texture environment (TEV) stage. The color channel is a mechanism used to calculate the lighting effect for each vertex. The color channel is controlled using GXSetChanCtrl. The color channel is typically linked to a specific texture environment (TEV) stage.

この関数は基本的に、ラスタライズされる頂点毎の色の数を定義する。nChansが0に設定された場合、少なくとも1つのテクスチャ座標が生成されなければならない。GXSetNumTexGensを参照。nChansが1に設定されると、チャネルGX_COLOR0A0がラスタライズされる。nChansが2(最大値)に設定されると、GX_COLOR0A0またはGX_COLOR1A1がラスタライズされる。
引数
nChansはラスタライズされるカラーチャネルの数である。
用法例
void GXSetNumChans(u8 nChans);
This function basically defines the number of colors per vertex to be rasterized. If nChans is set to 0, at least one texture coordinate must be generated. See GXSetNumTexGens. When nChans is set to 1, channel GX_COLOR0A0 is rasterized. When nChans is set to 2 (maximum value), GX_COLOR0A0 or GX_COLOR1A1 is rasterized.
The argument nChans is the number of color channels to be rasterized.
Usage example void GXSetNumChans (u8 nChans);

GXSetChanCtrl
説明
この関数は、あるカラーチャネルについてのライティングコントロールを設定する。カラーチャネルは、対応して1つ以上(最高8個)の光を有することができ、これはlight_maskを用いて設定される。diff_fnおよびattn_fnパラメータは、このチャネルに対応付けられた全ての光についてのライティング計算を制御する。amb_srcおよびmat_srcは、入力ソース色がレジスタ色由来であるか頂点色由来であるかを選択するために用いられ得る。チャネル使用可能がGX_FALSEに設定されると、材質のカラーソース(mat_srcにより設定される)はチャネルの出力色としてそのまま渡される。チャネル使用可能がGX_TRUEに設定されると、出力色は他のコントロールの設定(すなわちライティング式)に依存する。GXInitは、全てのチャネルについての許可をGX_FALSEへに設定する。GXSetChanCtrlはライティングチャネルをコンフィギュレーションする。チャネル演算の結果を出力するためには、関数GXSetNumChansを用いる。
GXSetChanCtrl
Description This function sets the lighting control for a color channel. A color channel can correspondingly have one or more (up to 8) lights, which are set using light_mask. The diff_fn and attn_fn parameters control the lighting calculations for all lights associated with this channel. amb_src and mat_src may be used to select whether the input source color is derived from a register color or a vertex color. When channel availability is set to GX_FALSE, the color source of the material (set by mat_src) is passed as is as the channel output color. When channel availability is set to GX_TRUE, the output color depends on other control settings (ie lighting formulas). GXInit sets permission for all channels to GX_FALSE. GXSetChanCtrl configures the lighting channel. The function GXSetNumChans is used to output the channel calculation result.

チャネルGX_COLOR0およびGX_ALPHA0はライティングのために別々に制御されるが、これらは1つのRGBA色(実効的にGX_COLOR0A0)として一緒にラスタライズされる。同じことがGX_COLOR1およびGX_ALPHA1にも言え、これらは実効的にGX_COLOR1A1としてラスタライズされる。グラフィックスハードウェアには色用ラスタライザが1つしかないため、アプリケーションは、テクスチャ環境ユニット(Tev)内の各ステージに対してどの色をラスタライズするかを選択する。これはGXSetTevOrder関数を用いて達成される。   Channels GX_COLOR0 and GX_ALPHA0 are controlled separately for lighting, but they are rasterized together as one RGBA color (effectively GX_COLOR0A0). The same is true for GX_COLOR1 and GX_ALPHA1, which are effectively rasterized as GX_COLOR1A1. Since the graphics hardware has only one color rasterizer, the application chooses which color to rasterize for each stage in the texture environment unit (Tev). This is achieved using the GXSetTevOrder function.

チャネルGX_COLOR1A1において頂点色を用いるために、頂点毎につき2つの色が供給される。すなわち、現在の頂点記述子中でGX_VA_CLR0およびGX_VA_CLR1の両方が許可される。現在の頂点記述子中でGX_VA_CLR0かGX_VA_CLR1かのいずれか一方のみが許可される場合、頂点色はチャネルGX_VA_COLOR0A0に渡される。   In order to use vertex colors in channel GX_COLOR1A1, two colors are supplied per vertex. That is, both GX_VA_CLR0 and GX_VA_CLR1 are allowed in the current vertex descriptor. If only one of GX_VA_CLR0 or GX_VA_CLR1 is allowed in the current vertex descriptor, the vertex color is passed to channel GX_VA_COLOR0A0.

amb_srcがGX_SRC_REGに設定されると、GXSetChanAmbColorにより設定される色がアンビエント色として用いられる。mat_srcがGX_SRC_REGの場合、GXSetChanMatColorにより設定される色が材質の色として用いられる。
引数

Figure 0004975159
用法例
void GXSetChanCtrl(
GXChannelID chan,
GXBool enable,
GXColorSrc amb_src,
GXColorSrc mat_src,
GXLightID light_mask,
GXDiffuseFn diff_fn,
GXAttnFn attn_fn); When amb_src is set to GX_SRC_REG, the color set by GXSetChanAmbColor is used as the ambient color. When mat_src is GX_SRC_REG, the color set by GXSetChanMatColor is used as the material color.
argument
Figure 0004975159
Usage example void GXSetChanCtrl (
GXChannelID chan,
GXBool enable,
GXColorSrc amb_src,
GXColorSrc mat_src,
GXLightID light_mask,
GXDiffuseFn diff_fn,
GXAttnFn attn_fn);

例:局所拡散スポット光
本例では、どのようにGX_COLOR0チャネルをコンフィギュレーションして頂点色を局所拡散スポット光でライティングするかを示す。関数GXInitLightPosおよびGXInitLightDirを用いて、光の位置および方向を初期化する。光の位置および方向は、光オブジェクトの設定以前に視点空間に変換されているものとする。拡散ライティングを許可するために、diff_fnがGX_DF_CLAMPに設定される。これはスポット光であるため、attn_fnがGX_AF_SPOTに設定される。スポット光の角度減衰関数のタイプは光で決定され、ここでGXInitLightSpotにより設定される。距離減衰関数がGXInitLightDistAttnを用いて設定される。

Figure 0004975159
Example: Local diffuse spot light This example shows how to configure the GX_COLOR0 channel to illuminate vertex colors with local diffuse spot light. The functions GXInitLightPos and GXInitLightDir are used to initialize the position and direction of the light. It is assumed that the position and direction of light have been converted to the viewpoint space before setting the light object. In order to allow diffuse lighting, diff_fn is set to GX_DF_CLAMP. Since this is a spot light, attn_fn is set to GX_AF_SPOT. The type of the angular attenuation function of the spot light is determined by the light and is set here by GXInitLightSpot. A distance decay function is set using GXInitLightDistAttn.
Figure 0004975159

例:鏡面光
本例では、鏡面光用にどのようにGX_COLOR0を設定するかを示す。GXInitSpecularDir関数を、光の方向を設定するために用いる。光オブジェクトの初期化以前に、方向は視点空間に変換されなければならない。鏡面光は無限遠にあると考えられるので、位置パラメータは不要である。角度減衰関数および距離減衰関数を用いて、鏡面光に対する指数減衰関数を近似する。GXInitLightShininessを呼び出し、ライティングされた材質がどれくらい輝いて見えるかを制御する(減衰パラメータを設定する)。attn_fnがGX_AF_SPECに設定され、鏡面演算を許可する。

Figure 0004975159
Example: Specular Light This example shows how to set GX_COLOR0 for specular light. The GXInitSpecularDir function is used to set the direction of light. Prior to the initialization of the light object, the direction must be converted to viewpoint space. Since the specular light is considered to be at infinity, no position parameter is required. An exponential decay function for specular light is approximated using an angular decay function and a distance decay function. Call GXInitLightShinness to control how bright the illuminated material appears (set attenuation parameters). attn_fn is set to GX_AF_SPEC to allow specular calculation.
Figure 0004975159

例:平行指向性拡散光
ハードウェアは平行指向性拡散光をサポートしないが、ライティングされるべき全オブジェクトから光を非常に遠く置くことにより、「ほぼ平行な」光を得ることは可能である。光の位置がオブジェクトから非常に遠ければ、全ての光線は平行であると見なし得る。

Figure 0004975159
Example: Parallel-directed diffused light The hardware does not support parallel-directed diffused light, but it is possible to obtain "almost parallel" light by placing the light very far from all objects to be lit. If the position of the light is very far from the object, all the rays can be considered parallel.
Figure 0004975159

光は拡散チャネルおよび鏡面チャネルの両方に用いることが可能
局所拡散あるいは鏡面のいずれの計算がチャネルにおいて実行されるかは、チャネルコントロールによって決定される。(チャネルに対応付けられた)光のパラメータは、通常はこれらの演算のうちの1つを想定して設定される。例えば、アプリケーションは局所拡散光(拡散チャネルで用いられる)に対しては位置および方向を設定し、鏡面光(鏡面チャネルで用いられる)に対しては方向のみを設定する。しかし、アプリケーションが指向性の拡散光のみを必要とする場合(光の位置が非常に遠いために光の全ての光線が平行であると見なし得る)、同じ光のパラメータを鏡面チャネルと拡散チャネルとの両方に用いることができる。この場合、GXInitSpecularDirを用いて光のパラメータを初期化する。
Light can be used for both diffuse and specular channels Whether local diffusion or specular calculations are performed on the channel is determined by channel control. The optical parameters (corresponding to the channel) are usually set assuming one of these operations. For example, the application sets the position and direction for local diffused light (used in the diffuse channel) and sets only the direction for specular light (used in the specular channel). However, if the application requires only directional diffused light (it can be considered that all rays of light are parallel because the position of the light is very far), the same light parameters can be used for the specular and diffuse channels. It can be used for both. In this case, the light parameters are initialized using GXInitSpecialDir.

例:ライティング前を考慮した頂点毎の光
本例では、頂点毎GX_VA_CLR0として供給される(GXSetVtxDescを参照)ライティング前の色(例えばアートツールで演算される)を、拡散局所光の結果に対して加える。この例において、以下の式を実施すればよい。

Figure 0004975159
Example: Light per vertex taking into account pre-lighting In this example, the color before lighting (see GXSetVtxDesc) supplied as per-vertex GX_VA_CLR0 is calculated for diffuse local light results Add. In this example, the following equation may be implemented.
Figure 0004975159

アンビエントスケールは、光がオブジェクトに当たっていない時のライティング前の色の最小量を定義する。amb_scaleとdiff_scaleとの和は1.0に等しいはずなので、オブジェクトが最も明るい光の中にあるとき、頂点色はライティング前の色に等しい。   The ambient scale defines the minimum amount of color before lighting when light is not hitting the object. Since the sum of amb_scale and diff_scale should be equal to 1.0, the vertex color is equal to the color before lighting when the object is in the brightest light.

材質の色は、頂点毎の色(ライティング前の色)であるようにコンフィギュレーションされる。アンビエント色レジスタはamb_scaleに等しく設定される。光の色はdiff_scaleによってスケーリングされる。

Figure 0004975159
The color of the material is configured to be the color for each vertex (the color before lighting). The ambient color register is set equal to amb_scale. The light color is scaled by diff_scale.
Figure 0004975159

例:4つの投影光に対する減衰
この例では、4つの投影テクスチャ光に対してどのように局所光減衰値を計算するかを示す。頂点毎に提供される色はない。材質の色はチャネルマテリアルレジスタから入来し、減衰をパスするように設定される(1.0で乗算)。アンビエント色からの寄与はない。各チャネルは、テクスチャ環境(Tev)ユニットにおいて投影テクスチャを減衰するために用いられ得る。

Figure 0004975159
Example: Attenuation for 4 Projected Lights This example shows how to calculate a local light attenuation value for 4 projected texture lights. There is no color provided per vertex. The material color comes from the channel material register and is set to pass attenuation (multiply by 1.0). There is no contribution from ambient color. Each channel may be used to attenuate the projected texture in a texture environment (Tev) unit.
Figure 0004975159

GXSetChanMatColor
説明
この関数は、カラーチャネルchanに対する材質の色レジスタを設定する。材質の色は、GXSetChanCtrlにより設定される材質のソースがGX_SRC_REGならば使用される。
引数
chan= カラーチャネル
用法例:
void GXSetChanMatColor(
GXChannelID chan,
GXColor mat_color );
GXSetChanMatColor
Description This function sets the material color register for the color channel chan. The color of the material is used if the source of the material set by GXSetChanCtrl is GX_SRC_REG.
Argument chan = color channel Example usage:
void GXSetChanMatColor (
GXChannelID chan,
GXColor mat_color);

説明に役立つ実例
以下の例におけるアプリケーションプログラミングインターフェース関数および関連するパラメータは、非クランプの拡散ライティング関数を用いてテクスチャ座標を生成するために用いることができ、あるいは、各頂点の光の色の赤色成分において1次元テクスチャマップをルックアップするためのテクスチャ座標を生成するために用いられ、第2のテクスチャ座標が緑色成分によって生成され、2次元テクスチャマップから1次元テクスチャラインを選択するために用いられ得る。

Figure 0004975159
Illustrative examples The application programming interface functions and associated parameters in the examples below can be used to generate texture coordinates using an unclamped diffuse lighting function, or the red component of the light color at each vertex Can be used to generate texture coordinates for looking up the one-dimensional texture map, and the second texture coordinates can be generated by the green component and used to select a one-dimensional texture line from the two-dimensional texture map. .
Figure 0004975159

他の互換性のある実施例
上述のシステム要素50のうちのいくつかは、上述の家庭用ビデオゲームコンソール構成以外としても実施可能である。例えば、システム50用に書かれたグラフィックスアプリケーションまたはその他のソフトウェアを、システム50をエミュレートするなどして互換性を有する異なる構成を持ったプラットフォーム上で実行することができる。もしその別のプラットフォームがシステム50のハードウェアおよびソフトウェアリソースの一部または全部をうまくエミュレート、シミュレートおよび/または提供することができれば、その別のプラットフォームは、ソフトウェアを首尾よく実行することができる。
Other Compatible Embodiments Some of the system elements 50 described above can be implemented other than the home video game console configuration described above. For example, a graphics application or other software written for the system 50 can be run on a platform with a different compatible configuration, such as by emulating the system 50. If the other platform can successfully emulate, simulate and / or provide some or all of the hardware and software resources of the system 50, the other platform can successfully execute the software. .

一例として、エミュレータは、システム50のハードウェアおよび/またはソフトウェア構成(プラットフォーム)とは異なるハードウェアおよび/またはソフトウェア構成(プラットフォーム)を提供し得る。このエミュレータシステムは、アプリケーションソフトウェアが書かれたシステムのハードウェアおよび/またはソフトウェア要素の一部または全部をエミュレートまたはシミュレートする、ソフトウェアおよび/またはハードウェア要素を有し得る。例えば、エミュレータシステムは、システム50のハードウェアおよび/またはファームウェアをシミュレートするソフトウェアエミュレータプログラムを実行するパーソナルコンピュータなどの汎用のデジタルコンピュータからなっていてもよい。   As an example, the emulator may provide a hardware and / or software configuration (platform) that is different from the hardware and / or software configuration (platform) of the system 50. The emulator system may have software and / or hardware elements that emulate or simulate some or all of the hardware and / or software elements of the system in which the application software is written. For example, the emulator system may comprise a general purpose digital computer such as a personal computer that executes a software emulator program that simulates the hardware and / or firmware of the system 50.

汎用デジタルコンピュータのいくつか(例えばIBMまたはマッキントッシュのパーソナルコンピュータおよび互換機)は現在、DirectXまたはその他の標準的な3DグラフィックスコマンドAPIと適合する3Dグラフィックスパイプラインを提供する3Dグラフィックスカードを備えている。また、標準的な音声コマンドのセットに基づいて高品質なステレオ音を提供するステレオサウンドカードを備えている場合もある。このようなマルチメディア−ハードウェアを備えたパーソナルコンピュータがエミュレータソフトウェアを実行すれば、システム50のグラフィックスおよびサウンド性能に匹敵する十分な能力を有し得る。エミュレータソフトウェアは、ゲームプログラマがゲームソフトウェアを書いた対象である家庭用ビデオゲームコンソールプラットフォームの処理、3Dグラフィックス、音声、周辺およびその他の機能をシミュレートするように、パーソナルコンピュータプラットフォーム上のハードウェアリソースを制御する。   Some general purpose digital computers (eg, IBM or Macintosh personal computers and compatibles) now have a 3D graphics card that provides a 3D graphics pipeline that is compatible with DirectX or other standard 3D graphics command APIs. . Others may have a stereo sound card that provides high quality stereo sound based on a standard set of voice commands. If a personal computer with such multimedia hardware executes emulator software, it may have sufficient capability to match the graphics and sound performance of the system 50. Emulator software is a hardware resource on a personal computer platform that simulates the processing, 3D graphics, audio, peripherals, and other functions of the home video game console platform that the game programmer wrote the game software for. To control.

図23は、ホストプラットフォーム1201、エミュレータ要素1303、および記憶媒体62上に記憶されたゲームソフトウェア実行可能2値画像を用いたエミュレーション処理の全体例を示す。ホスト1201は、例えばパーソナルコンピュータ、ビデオゲームコンソール、または十分な演算能力を有する任意のその他のプラットフォームなどの、汎用あるいは専用のデジタル演算装置であり得る。エミュレータ1303は、ホストプラットフォーム1201上で稼働し、記憶媒体62からのコマンド、データおよびその他の情報の、ホストによって処理される形式へのリアルタイム変換を提供するソフトウェアおよび/またはハードウェアであり得る。例えば、エミュレータ1303は、システム50によって実行されることが意図される「ソース」2値画像プログラム命令を記憶媒体62から取り込み、これらのプログラム命令を、ホスト1201によって実行その他の処理を行われ得る対象形式に変換する。   FIG. 23 shows an example of the entire emulation process using the game software executable binary image stored on the host platform 1201, the emulator element 1303, and the storage medium 62. Host 1201 may be a general purpose or dedicated digital computing device such as, for example, a personal computer, a video game console, or any other platform with sufficient computing power. The emulator 1303 may be software and / or hardware that runs on the host platform 1201 and provides real-time conversion of commands, data, and other information from the storage medium 62 into a form processed by the host. For example, the emulator 1303 retrieves “source” binary image program instructions intended to be executed by the system 50 from the storage medium 62 and executes these program instructions by the host 1201 for other processing. Convert to format.

一例として、ソフトウェアが、IBM PowerPCまたはその他の特定のプロセッサを用いたプラットフォーム上で実行されるように書かれており、ホスト1201が異なる(例えばインテルの)プロセッサを用いたパーソナルコンピュータである場合は、エミュレータ1303は、1つまたは一連の2値画像プログラム命令を記憶媒体62から取り込み、これらのプログラム命令を、1つ以上の同等なインテルの2値画像プログラム命令に変換する。エミュレータ1303はまた、グラフィックスおよび音声プロセッサ114によって処理されることを意図されたグラフィックスコマンドおよび音声コマンドを取り込みおよび/または生成し、これらのコマンドを、ホスト1201上において利用可能であるハードウェアおよび/またはソフトウェアグラフィックスおよび音声処理リソースによって処理され得る単数または複数のフォーマットに変換する。一例として、エミュレータ1303は、これらのコマンドを、ホスト1201の特定のグラフィックスおよび/または音声ハードウェアによって処理され得るコマンドに変換し得る(例えば、標準的なDirectX、OpenGL、および/または音声APIを用いて)。   As an example, if the software is written to run on a platform using an IBM PowerPC or other specific processor and the host 1201 is a personal computer using a different (eg Intel) processor, The emulator 1303 takes one or a series of binary image program instructions from the storage medium 62 and converts these program instructions into one or more equivalent Intel binary image program instructions. The emulator 1303 also captures and / or generates graphics commands and audio commands that are intended to be processed by the graphics and audio processor 114, and the hardware and hardware available on the host 1201. Convert to one or more formats that can be processed by software graphics and audio processing resources. As an example, emulator 1303 may convert these commands into commands that can be processed by host 1201's specific graphics and / or audio hardware (eg, standard DirectX, OpenGL, and / or audio APIs). make use of).

上述のビデオゲームシステムの一部または全ての特徴を提供するために用いられるエミュレータ1303には、また、そのエミュレータを用いて実行されるゲームの様々なオプションやスクリーンモードの選択を単純化あるいは自動化するグラフィックスユーザインターフェース(GUI)が備えられてもよい。一例において、そのようなエミュレータ1303は、また、ソフトウェアが本来意図されたホストプラットフォームに比較して、より高度な機能性をさらに含んでもよい。   The emulator 1303 used to provide some or all of the features of the video game system described above also simplifies or automates the selection of various options and screen modes for games executed using the emulator. A graphics user interface (GUI) may be provided. In one example, such an emulator 1303 may also include more advanced functionality compared to the host platform for which the software was originally intended.

図24は、エミュレータ1302とともに適切に用いられるエミュレーションホストシステム1201を示す。システム1201は、処理ユニット1203およびシステムメモリ1205を有する。システムバス1207が、システムメモリ1205を含む様々なシステム要素を、処理ユニット1203に接続する。システムバス1207は、メモリバスまたはメモリコントローラを含む数種のタイプのバス構造、周辺バス、および様々なバスアーキテクチャのうちのいずれかを用いた局所バスのうちのいずれでもよい。システムメモリ1207は、リードオンリーメモリ(ROM)1252およびランダムアクセスメモリ(RAM)1254を有する。パーソナルコンピュータシステム1201内の要素間の情報の転送(例えばスタートアップ中など)に役立つ基本的なルーチンを含んだ基本入力/出力システム(BIOS)1256が、ROM1252に格納されている。システム1201はさらに、様々なドライブおよび関連するコンピュータ可読性の媒体を有する。ハードディスクドライブ1209は、(典型的には固定の)磁気ハードディスク1211から読み出し、またこれに対して書き込む。追加的な(可能なオプションである)磁気ディスクドライブ1213は、着脱可能な「フロッピー」またはその他の磁気ディスク1215から読み出し、また、これに対して書き込む。光ディスクドライブ1217は、CD ROMまたはその他の光メディアなどの着脱可能な光ディスク1219から読み出し、また、いくつかの構成においては、これに対して書き込む。ハードディスクドライブ1209および光ディスクドライブ1217は、それぞれハードディスクドライブインターフェース1221および光ドライブインターフェース1225によって、システムバス1207に接続されている。そのドライブおよびそれに対応するコンピュータ可読性媒体は、コンピュータ可読性の命令、データ構造、プログラムモジュール、ゲームプログラムおよびパーソナルコンピュータシステム1201のためのその他のデータを、不揮発的に記憶する。その他の構成において、コンピュータによりアクセス可能なデータを格納することができる他のタイプのコンピュータ可読性媒体、例えば、磁気カセット、フラッシュメモリカード、デジタルビデオディスク、ベルヌーイ(Bernoulli)カートリッジ、ランダムアクセスメモリ(RAM)リードオンリーメモリ(ROM)などもまた使用され得る。   FIG. 24 shows an emulation host system 1201 suitably used with the emulator 1302. The system 1201 includes a processing unit 1203 and a system memory 1205. A system bus 1207 connects various system elements including the system memory 1205 to the processing unit 1203. The system bus 1207 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory 1207 includes a read only memory (ROM) 1252 and a random access memory (RAM) 1254. Stored in ROM 1252 is a basic input / output system (BIOS) 1256 that includes basic routines useful for transferring information between elements in personal computer system 1201 (eg, during startup). The system 1201 further includes various drives and associated computer readable media. The hard disk drive 1209 reads from and writes to a (typically fixed) magnetic hard disk 1211. An additional (possible option) magnetic disk drive 1213 reads from and writes to a removable “floppy” or other magnetic disk 1215. Optical disk drive 1217 reads from and writes to removable optical disks 1219, such as CD ROM or other optical media. The hard disk drive 1209 and the optical disk drive 1217 are connected to the system bus 1207 by a hard disk drive interface 1221 and an optical drive interface 1225, respectively. The drive and the corresponding computer readable media store computer readable instructions, data structures, program modules, game programs, and other data for the personal computer system 1201 in a nonvolatile manner. In other configurations, other types of computer-readable media capable of storing computer-accessible data, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memory (RAM) Read only memory (ROM) or the like may also be used.

エミュレータ1303を含む複数のプログラムモジュールは、ハードディスク1211、着脱式磁気ディスク1215、光ディスク1219、および/またはシステムメモリ1205のROM1252および/またはRAM1254上に記憶され得る。このようなプログラムモジュールは、グラフィックスおよび音声APIを提供するオペレーティングシステム、1つ以上のアプリケーションプログラム、その他のプログラムモジュール、プログラムデータおよびゲームデータを含んでもよい。ユーザは、キーボード1227、ポインティング装置1229、マイク、ジョイスティック、ゲームコントローラ、衛星放送用アンテナ、スキャナなどの入力装置を介して、コマンドおよび情報を、パーソナルコンピュータシステム1201に入力し得る。これらおよびその他の入力装置は、システムバス1207に接続されたシリアルポートインターフェース1231を介して処理ユニット1203に接続されることができるが、パラレルポート、ゲームポートファイヤワイヤバスまたはユニバーサルシリアルバス(USB)などの他のインターフェースによって接続されてもよい。また、モニタ1233またはその他のタイプの表示装置が、ビデオアダプタ1235などのインターフェースを介して、システムバス1207に接続される。   A plurality of program modules including the emulator 1303 can be stored on the hard disk 1211, the removable magnetic disk 1215, the optical disk 1219, and / or the ROM 1252 and / or the RAM 1254 of the system memory 1205. Such program modules may include an operating system that provides graphics and audio APIs, one or more application programs, other program modules, program data, and game data. A user may input commands and information into the personal computer system 1201 via input devices such as a keyboard 1227, a pointing device 1229, a microphone, a joystick, a game controller, a satellite broadcasting antenna, and a scanner. These and other input devices can be connected to the processing unit 1203 via a serial port interface 1231 connected to the system bus 1207, such as a parallel port, a game port firewire bus or a universal serial bus (USB). It may be connected by other interfaces. A monitor 1233 or other type of display device is also connected to the system bus 1207 via an interface, such as a video adapter 1235.

システム1201は、インターネットなどのネットワーク1152を介して通信を確立するための、モデム1154やその他のネットワークインターフェース手段を有し得る。内部でも外部でもよいモデム1154が、シリアルポートインターフェース1231を介してシステムバス123に接続されている。また、システム1201が、局所エリアネットワーク1158を介してリモート演算装置1150(例えば、別のシステム1201)と通信することを可能にするために、ネットワークインターフェース1156が提供され得る(あるいはこのような通信は、広域ネットワーク1152またはダイヤルアップやその他の通信手段などの他の通信パスを介して行われてもよい)。システム1201は典型的には、プリンタその他の標準的な周辺デバイスなどの、他の周辺出力デバイスを有し得る。   System 1201 may include a modem 1154 and other network interface means for establishing communications over a network 1152, such as the Internet. A modem 1154, which may be internal or external, is connected to the system bus 123 via the serial port interface 1231. A network interface 1156 may also be provided to allow the system 1201 to communicate with a remote computing device 1150 (eg, another system 1201) via the local area network 1158 (or such communication may be Or via other communication paths such as wide area network 1152 or dial-up or other communication means). System 1201 may typically have other peripheral output devices, such as a printer or other standard peripheral device.

一例において、ビデオアダプタ1235は、マイクロソフトのDirectX7.0または他バージョンなどの標準的な3Dグラフィックスアプリケーションプログラマインターフェースに基づいて発せられる3Dグラフィックスコマンドに応答して、高速な3Dグラフィックスレンダリングを提供する3Dグラフィックスパイプラインチップセットを有し得る。また1組のステレオスピーカ1237が、従来の「サウンドカード」などのサウンド発生インターフェースを介してシステムバス1207に接続されていることにより、バス1207によって供給される音声コマンドに基づいて高品質なステレオ音声を生成するためのハードウェアおよび埋め込みソフトウェアサポートを提供する。これらのハードウェア能力は、システム1201が、記憶媒体62に格納されたソフトウェアをプレイするために十分なグラフィックスおよびサウンド速度能力を提供することを可能にする。   In one example, video adapter 1235 provides fast 3D graphics rendering in response to 3D graphics commands issued based on a standard 3D graphics application programmer interface such as Microsoft's DirectX 7.0 or other versions. You can have a 3D graphics pipeline chipset. In addition, a pair of stereo speakers 1237 is connected to the system bus 1207 via a sound generation interface such as a conventional “sound card”, so that high-quality stereo audio can be obtained based on the audio commands supplied by the bus 1207. Provides hardware and embedded software support for generating These hardware capabilities allow system 1201 to provide sufficient graphics and sound speed capabilities to play software stored on storage medium 62.

上記参照した全ての文献を、本明細書において参考のために援用する。   All documents referred to above are incorporated herein by reference.

以上、本発明を、最も実用的で好ましい実施形態であると現時点で判断される内容について説明してきたが、本発明は、開示された実施形態にのみ制限されるべきものではなく、反対に記載したクレームの範囲内において、様々に変更、および同等な内容が適用されるものとする。例えば、特定の漫画的なライティングの例を本明細書において開示したが、本発明は漫画的なライティングに限定されるものではなくむしろ、無色ライティングパラメータを用いて達成し得る様々な写実的および非写実的そしてテクスチャ型および非テクスチャ型の、アプリケーションおよび効果を包含することが理解されるであろう。   While the present invention has been described in terms of what is currently determined to be the most practical and preferred embodiment, the present invention should not be limited to the disclosed embodiment, but described in reverse. Various modifications and equivalents shall apply within the scope of the claimed claims. For example, although specific comical lighting examples have been disclosed herein, the present invention is not limited to comical lighting, but rather various realistic and non-realistics that can be achieved using colorless lighting parameters. It will be understood to encompass photorealistic and textured and non-textured applications and effects.

Claims (11)

非写実的なライティングの方法であって、
コンピュータにより、ライティング関数を用いて少なくとも1つの色または不透明度値を生成するステップと、
コンピュータにより、前記少なくとも1つのまたは不透明度値を、少なくとも1つのテクスチャ座標に変換するステップと、
コンピュータにより、前記テクスチャ座標を少なくとも1つのテクスチャマッピング動作に用いるステップと、
コンピュータにより、前記テクスチャマッピング動作の結果を用いて、動的に生成された非写実的画像中の少なくとも1つの可視表面の色または不透明度を変更するステップとを含む方法。
A non-realistic way of writing,
A computer, and generating at least one color or opacity values with lighting function,
A computer, and converting the at least one color or opacity values, at least one texture coordinate,
A computer, a step of using at least one texture mapping operation the texture coordinates,
A computer, the method comprising a step of changing the texture using the result of the mapping operation, dynamically color generated at least one visible surface in the non-photorealistic image or opacity.
前記テクスチャマッピング動作は、前記テクスチャ座標に応じて1次元テクスチャをマッピングすることを含む、請求項1に記載の方法。   The method of claim 1, wherein the texture mapping operation includes mapping a one-dimensional texture according to the texture coordinates. 前記テクスチャマッピング動作は、ブラシ画像をマッピングすることを含む、請求項1に記載の方法。 The texture mapping operation comprises a brush images mapping method according to claim 1. 前記テクスチャ座標は、負の値もとり得ることによりバックライトで照らされた非写実的なライティングを定義する、請求項1に記載の方法。 The texture coordinates defines a non-realistic lighting illuminated with by Riva backlight to be obtained to take a negative value, The method of claim 1. 前記ライティング関数は拡散ライティング関数を含む、請求項1に記載の方法。   The method of claim 1, wherein the lighting function comprises a diffuse lighting function. 前記ライティング関数は鏡面ライティング関数を含む、請求項1に記載の方法。   The method of claim 1, wherein the lighting function comprises a specular lighting function. 前記ライティング関数は距離減衰の効果を提供するライティング関数を含む、請求項1に記載の方法。 The method of claim 1, wherein the lighting function comprises a lighting function that provides a distance attenuation effect . 前記ライティング関数はスポット光ライティング関数を含む、請求項1に記載の方法。   The method of claim 1, wherein the lighting function comprises a spotlight lighting function. 前記ライティング関数は前記テクスチャマッピング動作用の第1のテクスチャ座標を定義し、前記ライティング関数以外のソースから前記テクスチャマッピング用の第2のテクスチャ座標が得られる、請求項1に記載の方法。 The method of claim 1, wherein the lighting function defines a first texture coordinate for the texture mapping operation , and the second texture coordinate for the texture mapping is obtained from a source other than the lighting function. 非写実的なライティングを行うグラフィックシステムであって、
ライティング関数を用いて少なくとも1つの色または不透明度値を生成する手段と、
前記少なくとも1つのまたは不透明度値を、少なくとも1つのテクスチャ座標に変換する手段と、
前記テクスチャ座標を少なくとも1つのテクスチャマッピング動作に用いる手段と、
前記テクスチャマッピング動作の結果を用いて、動的に生成された非写実的画像中の少なくとも1つの可視表面の色または不透明度を変更する手段とを備える、グラフィックシステム。
A graphics system that performs non-realistic lighting,
Means for generating at least one color or opacity value using a lighting function;
Means for converting said at least one color or opacity values, at least one texture coordinate,
Means for using the texture coordinates in at least one texture mapping operation;
Means for changing the color or opacity of at least one visible surface in the dynamically generated non-realistic image using the result of the texture mapping operation.
非写実的なライティングを行う装置のコンピュータを、
ライティング関数を用いて少なくとも1つの色または不透明度値を生成する手段、
前記少なくとも1つのまたは不透明度値を、少なくとも1つのテクスチャ座標に変換する手段、
前記テクスチャ座標を少なくとも1つのテクスチャマッピング動作に用いる手段、および
前記テクスチャマッピング動作の結果を用いて、動的に生成された非写実的画像中の少なくとも1つの可視表面の色または不透明度を変更する手段として機能させる、プログラム。
A computer with non-realistic lighting,
Means for generating at least one color or opacity value using a lighting function;
Means for converting said at least one color or opacity values, at least one texture coordinate,
Means for using the texture coordinates in at least one texture mapping operation, and using the result of the texture mapping operation to change the color or opacity of at least one visible surface in the dynamically generated non-realistic image A program that functions as a means.
JP2010273183A 2000-08-23 2010-12-08 Colorless lighting in a graphics system, method and program for generating graphics images Expired - Lifetime JP4975159B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US22700700P 2000-08-23 2000-08-23
US60/227007 2000-08-23

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001206704A Division JP4761492B2 (en) 2000-08-23 2001-07-06 Colorless lighting in graphic systems

Publications (2)

Publication Number Publication Date
JP2011090699A JP2011090699A (en) 2011-05-06
JP4975159B2 true JP4975159B2 (en) 2012-07-11

Family

ID=22851369

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2001206704A Expired - Fee Related JP4761492B2 (en) 2000-08-23 2001-07-06 Colorless lighting in graphic systems
JP2010273183A Expired - Lifetime JP4975159B2 (en) 2000-08-23 2010-12-08 Colorless lighting in a graphics system, method and program for generating graphics images

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2001206704A Expired - Fee Related JP4761492B2 (en) 2000-08-23 2001-07-06 Colorless lighting in graphic systems

Country Status (1)

Country Link
JP (2) JP4761492B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4766482B2 (en) * 2005-10-12 2011-09-07 株式会社ソニー・コンピュータエンタテインメント Drawing processing program, storage medium storing drawing processing program, drawing processing method, drawing processing apparatus, and portable terminal device
JP5007633B2 (en) * 2007-09-04 2012-08-22 株式会社セガ Image processing program, computer-readable recording medium storing the program, image processing apparatus, and image processing method
JP2011092365A (en) * 2009-10-29 2011-05-12 Daito Giken:Kk Game machine
JP5103543B2 (en) * 2011-05-16 2012-12-19 株式会社ディジタルメディアプロフェッショナル A computer graphics circuit and a three-dimensional computer that uses this circuit to generate a two-dimensional pseudo-random texture pattern applied to a three-dimensional object displayed on a two-dimensional display system using a one-dimensional texture image Graphics equipment
KR101748397B1 (en) * 2016-05-04 2017-06-16 주식회사 와이즈오토모티브 LUT Generating Method for Around View Monitor using OpenGL
KR102608863B1 (en) 2022-10-31 2023-12-01 주식회사 스튜디오징스 Animating method for expressing cartoon characteristics

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2267007B (en) * 1992-04-24 1995-09-13 Sony Broadcast & Communication Video special effect apparatus and method
JPH09231403A (en) * 1996-02-27 1997-09-05 Sony Corp Horn shading method and picture generating device
JP3401204B2 (en) * 1998-12-29 2003-04-28 株式会社ナムコ GAME DEVICE AND INFORMATION STORAGE MEDIUM

Also Published As

Publication number Publication date
JP2002197485A (en) 2002-07-12
JP4761492B2 (en) 2011-08-31
JP2011090699A (en) 2011-05-06

Similar Documents

Publication Publication Date Title
US6639595B1 (en) Achromatic lighting in a graphics system and method
US7307640B2 (en) Method and apparatus for efficient generation of texture coordinate displacements for implementing emboss-style bump mapping in a graphics rendering system
JP4731028B2 (en) Recirculating shade tree blender for graphics systems
US6664958B1 (en) Z-texturing
US6664962B1 (en) Shadow mapping in a low cost graphics system
JP4698893B2 (en) Method, graphics system, and program for providing improved fog effects
US6618048B1 (en) 3D graphics rendering system for performing Z value clamping in near-Z range to maximize scene resolution of visually important Z components
US6825851B1 (en) Method and apparatus for environment-mapped bump-mapping in a graphics system
US6707458B1 (en) Method and apparatus for texture tiling in a graphics system
US7307638B2 (en) Method and apparatus for interleaved processing of direct and indirect texture coordinates in a graphics system
US6700586B1 (en) Low cost graphics with stitching processing hardware support for skeletal animation
US8223149B2 (en) Cone-culled soft shadows
JP4975159B2 (en) Colorless lighting in a graphics system, method and program for generating graphics images
JP4740490B2 (en) Clamping Z values in the Z neighborhood to maximize the accuracy of visually important Z components in graphics rendering systems and avoid Z neighborhood clipping
JP4698894B2 (en) Method, apparatus and program for texture tiling in a graphics system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111222

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120202

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4975159

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150420

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

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

EXPY Cancellation because of completion of term