JP4767123B2 - 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 - Google Patents

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 Download PDF

Info

Publication number
JP4767123B2
JP4767123B2 JP2006209322A JP2006209322A JP4767123B2 JP 4767123 B2 JP4767123 B2 JP 4767123B2 JP 2006209322 A JP2006209322 A JP 2006209322A JP 2006209322 A JP2006209322 A JP 2006209322A JP 4767123 B2 JP4767123 B2 JP 4767123B2
Authority
JP
Japan
Prior art keywords
value
random
uub
vvb
dimensional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2006209322A
Other languages
Japanese (ja)
Other versions
JP2008033848A (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.)
Digital Media Professionals Inc
Original Assignee
Digital Media Professionals Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Digital Media Professionals Inc filed Critical Digital Media Professionals Inc
Priority to JP2006209322A priority Critical patent/JP4767123B2/en
Publication of JP2008033848A publication Critical patent/JP2008033848A/en
Application granted granted Critical
Publication of JP4767123B2 publication Critical patent/JP4767123B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、擬似ランダム・テクスチャ・パターンの生成に関する。一次元テクスチャ画像が、二次元画像テクスチャを生成するフレームワークとして用いられる。より正確には、二次元テクスチャ画像に一次元テクスチャを投影する特殊な投影法を用いて二次元画像テクスチャが生成される。   The present invention relates to the generation of pseudo-random texture patterns. A one-dimensional texture image is used as a framework for generating a two-dimensional image texture. More precisely, the two-dimensional image texture is generated using a special projection method that projects the one-dimensional texture onto the two-dimensional texture image.

コンピュータ・グラフィックスにおいては、幾何学的なオブジェクトが二次元表示システムに表示される。結果として得られる画像の現実性を向上させるため、幾何学図形はテクスチャと組み合わされることが多い。テクスチャは画像として、あるいはパターンとして、オブジェクトの表面に塗られているように見える。例えば、二次元表示システム上に山を描くには、四辺形を形状として使用し、山の画像をテクスチャとして使用することができる。山の画像はテクスチャ座標を用いて形状に加えることができる。形状の各ポイント毎に、1つのテクスチャ座標が定義される。このテクスチャ座標は、画像の中の配置をも定義する。幾何学空間と画像空間との対応付けはテクスチャ・マッピングと呼ばれている。従来のコンピュータ・グラフィックス・システムにおいては、幾何学的なオブジェクトが描画され、二次元表示システム上のポイントに対応するオブジェクトの各ポイントについて、対応するテクスチャ座標を使用することにより、テクスチャ画像におけるポイントを決定し、その結果或る色が得られる。そして、この色が表示されるのである。この説明は、非常に簡略化したものである。テクスチャリング及びテクスチャマッピングはコンピュータ・グラフィックスにおいて一般的な技術である。例えば、非特許文献[非特許文献1]参照。この技術を、以下、静的二次元テクスチャと称する。   In computer graphics, geometric objects are displayed on a two-dimensional display system. Geometric figures are often combined with textures to improve the realism of the resulting image. The texture appears to be painted on the surface of the object as an image or pattern. For example, to draw a mountain on a two-dimensional display system, a quadrilateral can be used as a shape and a mountain image can be used as a texture. Mountain images can be added to shapes using texture coordinates. One texture coordinate is defined for each point of the shape. This texture coordinate also defines the placement in the image. The association between the geometric space and the image space is called texture mapping. In conventional computer graphics systems, geometric objects are drawn and points in the texture image are used by using the corresponding texture coordinates for each point of the object corresponding to the point on the two-dimensional display system. And as a result a certain color is obtained. This color is then displayed. This description is very simplified. Texturing and texture mapping are common techniques in computer graphics. For example, see Non-Patent Document [Non-Patent Document 1]. This technique is hereinafter referred to as static two-dimensional texture.

あるオブジェクトに二次元テクスチャ画像をマッピングすることはコンピュータ・グラフィックスにおいて徹底的に使用されており、非常に有効である。とはいえ、オブジェクトによっては、この技術が最適のものではないこともある。例えば、壁を考えてみると、どこも同じパターンを示しており、微々たる変化があるだけ、すなわち、煉瓦とモルタルで出来た壁は同じ煉瓦・モルタルをどこでも示しているように見える、しかし注意深く見ると違いが見えてくる(例えば、モルタルが多少厚いなど)。このような、反復性があるが異なるパターンを生成するには、二次元テクスチャに対する代替手段(あるいは、拡張手段)が存在する。それは、プロシージャル・テクスチャと呼ばれるものである。静的二次元画像を使用する代わりに、ある関数(プロシージャ)を用いて擬似ランダムパターンをいくつか生成する。プロシージャル・テクスチャ技術の説明は非特許文献2(D. Ebert等「テクスチャリング及びモデリング:プロシージャル手法」)に記載されている。この技術を、以下、プロシージャル・テクスチャと称する。なお、プロシージャル・テクスチャは二次元テクスチャと組み合わせて使用することができる。プロシージャル関数が入力テクスチャ座標に摂動を与えた後、摂動された入力座標が使用され、二次元テクスチャ画像を用いた出力色が定義される。   Mapping a two-dimensional texture image to an object is used extensively in computer graphics and is very effective. However, for some objects, this technique may not be optimal. For example, if you consider a wall, it shows the same pattern everywhere, and there is only a slight change, that is, a wall made of brick and mortar seems to show the same brick / mortar everywhere, but look carefully (For example, the mortar is a little thicker). In order to generate such a repetitive but different pattern, there are alternative means (or extension means) for the two-dimensional texture. It is called procedural texture. Instead of using static two-dimensional images, a function (procedure) is used to generate some pseudo-random patterns. The description of the procedural texture technique is described in Non-Patent Document 2 (D. Ebert et al. “Texturing and Modeling: Procedural Method”). This technique is hereinafter referred to as procedural texture. The procedural texture can be used in combination with a two-dimensional texture. After the procedural function perturbs the input texture coordinates, the perturbed input coordinates are used to define the output color using the two-dimensional texture image.

静的及びプロシージャルの両技術において、与えられた入力テクスチャ座標(u, v)毎に出力色を定義するためにさまざまな計算が行われる。静的二次元テクスチャでは、主に、テクスチャ座標を画像空間の或るポイントにマッピングすることにより或る色を定義するためのマッピング機能で構成され、また、プロシージャル関数としては、例えば入力座標(u,v)を(u’,v’)にマッピングする特別な関数が定義されており、その後、(u’,v’)がテクスチャ・マッピング機能に使用される。   In both static and procedural techniques, various calculations are performed to define an output color for each given input texture coordinate (u, v). A static two-dimensional texture is mainly composed of a mapping function for defining a certain color by mapping a texture coordinate to a certain point in the image space. As a procedural function, for example, an input coordinate ( A special function is defined that maps u, v) to (u ′, v ′), after which (u ′, v ′) is used for the texture mapping function.

この書面では、静的二次元テクスチャとプロシージャル・テクスチャとの中間に存在するテクスチャリングの新規技術を提案し、さらに、新規のテクスチャ・マッピング技術も提案する。この新規技術は以下のように要約できる。或る入力テクスチャ座標(u,v)が与えられると、まず、雑音関数を用いて(u,v)に摂動を与え、(u’,v’)を得た後、特別のマッピング・ユニットが二次元テクスチャ座標(u’,v’)を一次元テクスチャ座標(t)にマッピングする。次に、この一次元テクスチャ座標を用いて一次元テクスチャ画像が指定される。   In this document, we propose a new texturing technique that exists between a static two-dimensional texture and a procedural texture, and also a new texture mapping technique. This new technology can be summarized as follows. Given some input texture coordinates (u, v), first perturb (u, v) using a noise function, and after obtaining (u ', v'), a special mapping unit The two-dimensional texture coordinates (u ′, v ′) are mapped to the one-dimensional texture coordinates (t). Next, a one-dimensional texture image is designated using the one-dimensional texture coordinates.

この新しい技術を使用することにより、興味深いテクスチャを得ることができる。それは、異なる二つの種類に分類することができる。   By using this new technique, interesting textures can be obtained. It can be classified into two different types.

摂動が与えられない場合には、通常の幾何学的テクスチャが得られる。このようなテクスチャの例としては、例えば、グレア(けばけばしさ)、フレア(ゆらめき)、ハロー(円光)、又は薄い織物の表面の反復的モチーフ(四角、丸等)。特定の二次元から一次元へのマッピング機能に関する特許文献は見つからなかった。   If no perturbation is given, a normal geometric texture is obtained. Examples of such textures are, for example, glare, flare, halo, or repetitive motifs (squares, circles, etc.) on a thin fabric surface. No patent literature was found regarding a specific two-dimensional to one-dimensional mapping function.

摂動が使用された場合には、木や大理石のような自然に見えるテクスチャが得られる。摂動モジュールを用いて得られる視覚的な結果は、非特許文献2(D. Ebert等「テクスチャリング及びモデリング:プロシージャル手法」)で提案されている結果に近い。この書面で提案されているものは、摂動モジュールに基づくものである。このモジュールの動作は特許文献(K. Perlin 「雑音対応方法及び装置」)W0 01/39126 A1(特許文献1)で提案された雑音関数にどことなく類似している。入力及び出力は類似しているが、出力値を得る手段が異なっている。雑音関数は三つのステップに依存している。例えば、何らかのハッシュ値を計算し、グラディエントを計算し、これらの値を補間して一つの値を得る。本発明の一実施例は、これらのステップの変形例によるものである。ハッシュ値の計算は置換表に依存しており、ハッシュ値はグラディエントを計算するのに使用される。本発明の好適な実施例の一つは、表やグラディエントを使用せず、非常に簡単な乱数発生とこれらの乱数の重み付け関数によるものである。本発明の別の実施例は補間手法を参照しており、摂動のパラメータ化を増大し、ひいては結果として得られるテクスチャの見栄えを向上させる特定の回路を提案している。全ての実施例を組み合わせると特許文献W0 01/39126 A1(特許文献1)で提案された雑音モジュールとは異なるモジュールを規定することになる。   When perturbations are used, natural looking textures such as wood and marble are obtained. The visual result obtained by using the perturbation module is close to the result proposed in Non-Patent Document 2 (D. Ebert et al. “Texturing and Modeling: Procedural Method”). What is proposed in this document is based on a perturbation module. The operation of this module is somewhat similar to the noise function proposed in the patent document (K. Perlin “Method and Apparatus for Noise Handling”) W0 01/39126 A1 (Patent Document 1). The input and output are similar, but the means for obtaining the output value is different. The noise function depends on three steps. For example, some hash value is calculated, a gradient is calculated, and these values are interpolated to obtain one value. One embodiment of the present invention is a variation of these steps. The calculation of the hash value depends on the permutation table, and the hash value is used to calculate the gradient. One preferred embodiment of the present invention is based on a very simple random number generation and weighting function of these random numbers without using a table or gradient. Another embodiment of the invention refers to an interpolation technique and proposes a specific circuit that increases the perturbation parameterization and thus improves the appearance of the resulting texture. When all the embodiments are combined, a module different from the noise module proposed in Patent Document W0 01/39126 A1 (Patent Document 1) is specified.

他の同様なモジュールは、特許文献(K. Perlin 「Perlinノイズ用基準」米国特許番号第6,867,776 B2号(特許文献2)に規定されている。W0
01/39126 A1(特許文献1)と同様に、ハッシュ値及びグラディエントが使用されている。本発明の好適な一実施例は、ハッシュ値及びグラディエントを使用しないが、重み付けランダム値に基づいている。特許文献2に記載された方法は双一次補間を用いていないが、代わりに球面カーネルと呼ばれる関数を用いている。
Other similar modules are defined in the patent literature (K. Perlin “Perlin Noise Standards” US Pat. No. 6,867,776 B2 (Patent Literature 2).
Similar to 01/39126 A1 (Patent Document 1), hash values and gradients are used. One preferred embodiment of the present invention does not use hash values and gradients, but is based on weighted random values. The method described in Patent Document 2 does not use bilinear interpolation, but uses a function called a spherical kernel instead.

Perlin Kenneth, 「雑音対応方法及び装置」国際公開番号第WO 01/39126 A1号Perlin Kenneth, “Noise Handling Method and Device” International Publication No. WO 01/39126 A1 Perlin Kenneth, 「Perlinノイズ用基準」米国特許番号第6,867,776 B2号Perlin Kenneth, “Perlin Noise Standards” US Pat. No. 6,867,776 B2 J.D. Foly, A. Van Dam, S.K. Feiner, 及びJ.F. Hugues「コンピュータ・グラフィックス:原理と実践」第2版, ADDISON-WESLY, ISBN: 0-201-84840-6,1995.J.D. Foly, A. Van Dam, S.K. Feiner, and J.F. Hugues "Computer Graphics: Principles and Practices" 2nd edition, ADDISON-WESLY, ISBN: 0-201-84840-6,1995. D. Ebert等「テクスチャリング及びモデリング:プロシージャル手法」第3版, Morgan Kaufmann Publishers, ISBN1-55860-848-6, 2003D. Ebert et al. “Texturing and Modeling: Procedural Method” 3rd edition, Morgan Kaufmann Publishers, ISBN1-55860-848-6, 2003

コンピュータ・グラフィックスにおいては、二次元テクスチャ画像を作成し表示するとき、テクスチャ・ユニットというモジュールを使用するのが一般的である。これは、二次元座標(u,v)、いわゆるテクスチャ座標を用いて、メモリに格納された二次元画像の特定の位置にアクセスするインデックスを計算するものである。インデックス計算には、膨大な計算が必要であり、二次元画像を格納することはメモリの観点から費用がかかる。この技術は静的、すなわちメモリに格納された二次元画像次第で様々な画像結果を得るための構成パラメータが非常に少ないものである。   In computer graphics, when creating and displaying a two-dimensional texture image, a module called a texture unit is generally used. In this method, an index for accessing a specific position of a two-dimensional image stored in a memory is calculated using two-dimensional coordinates (u, v), so-called texture coordinates. Index calculation requires enormous calculation, and storing a two-dimensional image is expensive from the viewpoint of memory. This technique is static, that is, has very few configuration parameters for obtaining various image results depending on the two-dimensional image stored in the memory.

木、石等といった、いわゆるナチュラル・テクスチャ用には、プロシージャル・テクスチャと呼ばれる別の手法がある。しかし、プロシージャル・テクスチャを作成するには、プログラム制御可能な回路(フラグメントシェーダと呼ばれる)が必要であることが多い。このような汎用のプログラム制御可能なハードウェア回路は通常グラフィックチップの重要な部分をなしており、ハードウェアの大きさの観点から非常に大きいものである。   For so-called natural textures such as wood and stone, there is another technique called procedural texture. However, creating a procedural texture often requires a programmable circuit (called a fragment shader). Such a general-purpose programmable hardware circuit usually forms an important part of the graphic chip and is very large from the viewpoint of the size of the hardware.

開示された発明の関心事はナチュラル・テクスチャ、又は擬似ランダム反復性テクスチャの生成であり、さらには幾何学的な規則性を示すテクスチャ(例えば、グレア、フレア、ハロー、又は薄い織物の表面に印刷された反復的モチーフ)の生成である。静的二次元テクスチャ及びプロシージャルテクスチャは共に、このようなテクスチャを作成することができる。提案された発明では、二次元テクスチャ画像を生成するためにギャップを埋めることを提案する。これは、完全に静的な二次元テクスチャとプロシージャル・テクスチャとの間のトレードオフである。この書面で開示されている一連の回路はいくつかの構成パラメータを提供するが、静的二次元テクスチャよりも高い柔軟性(但し、フラグメントシェーダにおいて定義されているプロシージャル・テクスチャよりは低い柔軟性)を、フラグメント・シェーダよりも(また、静的二次元テクスチャよりも)ずっと小さい回路規模で可能にする。   A concern of the disclosed invention is the generation of natural textures or pseudo-random repetitive textures, and even textures that exhibit geometric regularity (eg, glare, flare, halo, or print on thin fabric surfaces) Generated repetitive motifs). Both static two-dimensional textures and procedural textures can create such textures. In the proposed invention, it is proposed to fill a gap in order to generate a two-dimensional texture image. This is a trade-off between a completely static 2D texture and a procedural texture. The set of circuits disclosed in this document provides several configuration parameters but is more flexible than static two-dimensional textures (but less flexible than procedural textures defined in fragment shaders) ) On a much smaller circuit scale than a fragment shader (and also a static 2D texture).

メモリサイズ及び回路規模の要件の問題を解決するために使用するシステムは次のように分解することができる。前節で列挙した問題を解決するため、三つの手段が組み合わされたものが使われる。   The system used to solve the problem of memory size and circuit scale requirements can be broken down as follows. To solve the problems listed in the previous section, a combination of three measures is used.

二次元テクスチャの代わりに一次元テクスチャを使用し、メモリサイズの要件を緩和する。
入力二次元テクスチャ座標を摂動する専用の回路を使用し、結果として得られる二次元テクスチャにおいて目に見える変形を行う。
Use one-dimensional textures instead of two-dimensional textures to ease memory size requirements.
A dedicated circuit that perturbs the input 2D texture coordinates is used to perform visible deformations in the resulting 2D texture.

専用のマッピング回路で設定(変更)可能なものを使用し、摂動された二次元テクスチャ座標を一次元出力テクスチャ座標にマッピングし、これをメモリに格納された一次元テクスチャ画像のアドレス指定に用いる。   The one that can be set (changed) by a dedicated mapping circuit is used, and the perturbed two-dimensional texture coordinates are mapped to the one-dimensional output texture coordinates, which are used for addressing the one-dimensional texture image stored in the memory.

第1の態様:プロシージャル一次元擬似ランダム・パターン生成
本発明の第1の態様が対象とするのは、コンピュータ・システムにおいて二次元テクスチャ座標を算出するシステムであって、二次元テクスチャ座標(u,v)を求める第1手段と、前記座標u及びvを用いて2つのランダム値の一次元区間(interval)を2個生成する第2手段と、前記ランダム値の一次元区間2個を結合して、4つのランダム値の二次元区間を1個生成する第3手段と、前記テクスチャ座標(u,v)及び前記4つのランダム値の二次元区間に応じて、ランダム値を生成する第4手段と、前記ランダム値と前記入力テクスチャ座標(u,v)を結合して、変換された前記二次元テクスチャ座標(u’,v’)を得る第5手段と、を備えたことを特徴とするシステムである。
First aspect: Procedural one-dimensional pseudo-random pattern generation The first aspect of the present invention is a system for calculating two-dimensional texture coordinates in a computer system, and includes two-dimensional texture coordinates (u , v), a second means for generating two one-dimensional intervals (intervals) of two random values using the coordinates u and v, and two one-dimensional intervals of the random values A third means for generating one two-dimensional section of four random values, and a fourth means for generating a random value according to the two-dimensional sections of the texture coordinates (u, v) and the four random values. And a fifth means for combining the random value and the input texture coordinates (u, v) to obtain the transformed two-dimensional texture coordinates (u ′, v ′). System.

本発明の第1の態様の好適な例の一つは、上記において、前記第2手段が、u又はv座標のいずれかを入力して2つのランダム値(u0,u1)及び(v0,v1)の前記一次元区間を得る、分離しているが同様な(identical)乱数発生器2個を具備しており、前記第3手段が、前記ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して二次元区間[(u0,v0),(u1,v1)]を得ることを特徴としたシステムである。   One of the preferred examples of the first aspect of the present invention is that, in the above, the second means inputs either u or v coordinates and inputs two random values (u0, u1) and (v0, v1). ) Of two random number generators that are separated but similar (identical), and the third means includes the random values (u0, u1) and (v0, v1) It is a system characterized by combining two one-dimensional sections to obtain a two-dimensional section [(u0, v0), (u1, v1)].

本発明の第1の態様の好適な一例は、上記において、前記第2手段が、u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る手段であって、分離しているが同様な乱数発生器2個を備えており、ここで各乱数発生器は、2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、前記値TBをランダム値TTに投影する手段と、2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2を生成するものと、を具備し、前記第3手段が、ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、一定の整数値であって以下“magic_mask”と称するものを用いる手段と、2つの新規の数値であって以下“maskA”及び“maskB”と称するものを、前記2つのランダム値u0及びu1を用いて算出する手段と、ランダム値を算出する手段であって、4組の入力{u0,v0,maskA}, {u0,v1,maskA},
{u1,v0,maskB}, 及び{u1,v1,maskB}を用いる結果としてランダム値R1, R2, R3, 及びR4を得るものと、を具備するものを備え、前記第5手段が、UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、加重ランダム値を算出する手段であって、4組の入力{R1, UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0}, 及び{R4, UUB-1.0, VVB-1.0}を用いる結果として4つの加重値r1, r2, r3及びr4を得るものと、ランダム値RVを、r1, r2, r3, r4, UUB, 及びVVBを入力として用いて算出する手段で、双一次補間モジュールを具備するものであって、r1,
r2, r3及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものと、を備え、前記システムが、前記ランダム値の生成を制御する手段であって、前記入力座標(u,v)を変更する手段と、前記出力値RVを変更する手段と、を具備するものをさらに備え、前記第5手段が、前記RVと前記入力座標(u,v)とを結合して前記出力(u’,v’)を得る手段であるシステムである。
In a preferred example of the first aspect of the present invention, in the above description, the second means inputs either u or v coordinates (hereinafter sometimes referred to as “t”) and receives two random values. A means for obtaining a one-dimensional section of (u0, u1) and (v0, v1), comprising two separate but similar random number generators, where each random number generator has two numerical values Means for calculating TA and TB from the input value “t”, wherein TB is a floating-point value less than 1 and TA + TB is equal to 1, and means for projecting the value TB to a random value TT; Means for calculating two numerical values TTA and TTB from the value TT, wherein TTB is a floating-point value less than 1 and TTA + TTB is equal to 1, and means for generating a random value, the set of parameters { Generating two random values T1 and T2 as a result of using TA, TTA} and {TA, TTA + 1}, wherein the third means comprises a random value (u (0, u1) and (v0, v1) are two means to obtain a two-dimensional interval [(u0, v0), (u1, v1)] by combining two one-dimensional intervals, which are constant integer values. Means using what is hereinafter referred to as "magic_mask", means for calculating two new numerical values, hereinafter referred to as "maskA" and "maskB", using the two random values u0 and u1, A means for calculating a random value, comprising four sets of inputs {u0, v0, maskA}, {u0, v1, maskA},
{u1, v0, maskB}, and {u1, v1, maskB} resulting in random values R1, R2, R3, and R4, wherein the fifth means comprises UUB and Means for obtaining a VVB from the random number generator, wherein the pre-specified value TTB is equal to UUB when the coordinate u is used as an input to the random number generator, and similarly, the random number generator Is a means for calculating a weighted random value that is equal to VVB when the coordinate v is used as an input, and includes four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB} , {R3, UUB, VVB-1.0}, and {R4, UUB-1.0, VVB-1.0} to obtain four weights r1, r2, r3 and r4 as a result, and random value RV to r1, A means for calculating using r2, r3, r4, UUB, and VVB as inputs, comprising a bilinear interpolation module, r1,
r2, r3 and r4 are interpolated values, and UUB and VVB are interpolation parameters, and the system controls the generation of the random value, the input coordinates (u , v) and a means for changing the output value RV, and the fifth means combines the RV and the input coordinates (u, v) to It is a system that is a means for obtaining the output (u ′, v ′).

本発明の第1の態様の好適な一例は、上記のいずれかにおいて、前記システムが、前記ランダム値の生成を制御する手段であって、前記入力座標(u,v)を変更する手段であって、各入力u及びvについて、スケーリング、トランスレーション、及びクランピング演算を行い、スケーリング及びトランスレーション係数及びクランピング動作タイプを得る手段を具備するものと、前記出力値RVを変更する手段であって、スケーリング及びトランスレーション演算を行い、スケーリング係数及びクランピング動作タイプを得る手段を具備するものと、を具備するものをさらに備え、前記第2手段が、u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る手段であって、分離しているが同様な乱数発生器2個を備えており、ここで各乱数発生器は、2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、前記値TBをランダム値TTに投影する手段であって、以下magic_shift1と称する一定値を得る手段と、TBを前記区間[0,magic_shift1]内に投影する結果としてTTを得る手段と、を具備するものと、2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2をそれぞれ生成するものであって、以下“magic_mask”, “magic_shift1”, 及び“magic_shift”と称する一定値を定義して使用する手段と、以下“maskT”と称する擬似ランダム値を、D値(TA又はTA+1のいずれかに対応した値)を用いて算出する手段と、TA又はTA+1のいずれかを用い、且つ値TTA及び事前に算出した値“maskT”を用いて乱数Rを算出する手段と、を具備するものと、を備え、前記第3手段が、ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、以下“magic_mask”と称する定数を得る手段と、2つの新規の数値であって以下“maskA”及び“maskB”と称するものを、前記2つのランダム値u0及びu1を用いて算出する手段と、独立して4回使用されるランダム値を算出する手段であって、4組の入力{u0,v0,maskA}, {u0,v1,maskA}, {u1,v0,maskB}, 及び{u1,v1,maskB}を用いる結果としてランダム値R1, R2, R3, 及びR4を得るものと、を具備するものを備え、前記第5手段が、UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された数値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、独立して4回使用される重ランダム値を算出する手段であって、4組の入力{R1, UUB, VVB}, {R2, UUB-1.0, VVB},
{R3, UUB, VVB-1.0}及び{R4, UUB-1.0, VVB-1.0}を用いる結果として4つの加重値r1, r2, r3, 及びr4を得るものと、ランダム値RVを、r1, r2, r3, r4, UUB, 及びVVBを入力として用い、また双一次補間モジュールを用いて算出する手段であって、r1,
r2, r3及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものと、UUB及びVVBを変更して双一次補間動作を制御する手段と、前記ランダム値RVと前記入力座標(u,v)とを結合して出力(u’,v’)を得る手段と、を備えたシステムである。
In a preferred example of the first aspect of the present invention, in any one of the above, the system is a means for controlling the generation of the random value, and means for changing the input coordinates (u, v). A means for performing scaling, translation, and clamping operations for each input u and v to obtain a scaling and translation coefficient and a clamping operation type; and a means for changing the output value RV. Further comprising: means for performing scaling and translation operations to obtain a scaling factor and a clamping operation type, wherein the second means is one of u or v coordinates (hereinafter, Is also a means to obtain a one-dimensional section of two random values (u0, u1) and (v0, v1) by inputting 2 random number generators, where each random number generator is a means for calculating two numerical values TA and TB from the input value “t”, and is a floating point value with TB less than 1. TA + TB equal to 1, means for projecting the value TB to a random value TT, a means for obtaining a constant value, hereinafter referred to as magic_shift1, and as a result of projecting TB into the interval [0, magic_shift1] TT Means for calculating two numerical values TTA and TTB from the value TT, where TTB is a floating-point value less than 1 and TTA + TTB is equal to 1, and a random value Means for generating two random values T1 and T2 as a result of using the set of parameters {TA, TTA} and {TA, TTA + 1}, respectively, and hereinafter referred to as “magic_mask”, “ Means to define and use a constant value called “magic_shift1” and “magic_shift”, and “maskT” Means for calculating a pseudo-random value using a D value (a value corresponding to either TA or TA + 1), using either TA or TA + 1, and a value TTA and a value calculated in advance Means for calculating a random number R using “maskT”, wherein the third means combines two one-dimensional sections of random values (u0, u1) and (v0, v1) Means for obtaining a two-dimensional interval [(u0, v0), (u1, v1)], a means for obtaining a constant called “magic_mask”, and two new numerical values, hereinafter called “maskA”. And “maskB”, means for calculating using the two random values u0 and u1, and means for calculating the random value used four times independently, comprising four sets of inputs {u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, and {u1, v1, maskB} resulting in random values R1, R2, R3, and R4 And the fifth means includes UUB and VVB. A means for obtaining from a number generator, wherein the pre-specified numerical value TTB is equal to UUB when the coordinate u is used as an input to the random number generator, and similarly, the random number generator When v is used as an input, it is a means to calculate a heavy random value that is equal to VVB and used four times independently, and includes four sets of inputs {R1, UUB, VVB}, {R2, UUB -1.0, VVB},
As a result of using {R3, UUB, VVB-1.0} and {R4, UUB-1.0, VVB-1.0}, four weight values r1, r2, r3, and r4 are obtained, and a random value RV is defined as r1, r2. , r3, r4, UUB, and VVB as inputs and a means for calculating using a bilinear interpolation module, r1,
r2, r3 and r4 are interpolated values, UUB and VVB are interpolation parameters, means for controlling bilinear interpolation operation by changing UUB and VVB, the random value RV and the input coordinates and (u, v) to obtain an output (u ′, v ′).

本発明の第1の態様の好適な一実施例は、上記のいずれかにおいて、前記第2手段が、u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る、分離しているが同様な乱数発生器2個を用いて2つのランダム値の一次元区間を2個生成する手段であり、ここで各乱数発生器は、2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、前記値TBをランダム値TTに投影する手段であって、以下“magic_shift1”と称する一定値を得る手段と、TBを前記区間[0,magic_shift1]内に投影する結果としてTTを得る手段であって、単一のマルチプレクサを具備してTT = TB*magic_shift1を計算するものと、を具備するものと、2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2をそれぞれ生成するものであって、以下“magic_shift1”, “magic_mask”, 及び“magic_shift2”と称する一定値を得る手段と、以下の値、すなわち以下“maskT”と称する擬似ランダム値を、TTA又はTTA+1のいずれかを入力として用いて算出する手段であり、“ifステートメント論理回路”、マルチプレクサ、及び論理右ビットシフト演算子(>>)を具備し、もし、Dと表示され且つTTA又はTTA+1のいずれかに等しい前記入力値が、厳密に“magic_shift1”より低ければ、以下の値を算出し、
maskT = magic_mask>>(TA*magic_shift2)
さもなくば、以下の値を算出するものと、
maskT = magic_mask>>((TA+1)*magic_shift2);
Dと表示され且つTA又はTA+1のいずれかに等しい入力値及び“maskT”を入力として用いて乱数Rを算出する手段であって、“ifステートメント論理回路”、マルチプレクサ、及びビット論理演算子“XOR”(^で表す)を具備し、もし、Dが“magic_shift1”より低ければ、以下の値を算出し、R = ((1+TTA)*magic_shift2)^maskT
さもなくば、次の値を算出するものと、R = ((1)*magic_shift2)^maskTを具備するものと、
を備え、前記第3手段が、ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、 “magic_mask”を得る手段と、以下“maskA”及び“maskB”と称する以下の2つの値を、前記2つのランダム値u0及びu1を用いて算出する手段であって、各maskの算出は、単一の論理右ビットシフト演算子を具備し、入力値“t”について次の計算をするものと、mask =
(magic_mask>>t)ここで、“t”はu0又はu1のいずれかに等しく結果として得られる値“mask”は、それぞれ“maskA”又は“maskB”のいずれかに等しくなるものとし、ランダム値を算出する手段であって、4組の入力{u0,v0,maskA}, {u0,v1,maskA},
{u1,v0,maskB}, 及び{u1,v1,maskB}を用いる結果としてランダム値R1, R2, R3, 及びR4を得るものであって、加算器及びビット論理XOR (^)演算子を具備し、各入力{s,t,mask}について次の値を算出するものと、R=(s+t)^maskを備え、前記第5手段が、UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された数値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、独立して4回使用される加重ランダム値を算出する手段であって、4組の入力{R1, UUB, VVB}, {R2, UUB-1.0, VVB},
{R3, UUB, VVB-1.0}, 及び{R4, UUB-1.0, VVB-1.0}を用いる結果として4つの加重値r1, r2, r3, 及びr4を得るものであり、各モジュールが加算器及びマルチプレクサを具備し、各入力{R,a,b}について次の値r = R*(a+b)を算出するものと、ランダム値RVを、r1, r2, r3, r4, UUB, 及びVVBを入力として用い、また双一次補間モジュールを用いて算出する手段であって、r1,
r2, r3, 及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものであって、UUB及びVVBを変更して双一次補間動作を制御する手段であって、前記区間[0,1]におけるUUB及びVVBが定義されているときUUB及びVVBをUUB’及びVVB’にマッピングする参照テーブルと、双一次補間動作用のパラメータとしてUUB’及びVVB’を用いて双一次補間を算出する手段と、を具備したものと、を備え、前記システムが、前記ランダム値の生成を制御する手段であって、前記入力座標(u,v)を変更するために、各入力u及びvについて、スケーリング、トランスレーション、及びクランピング演算を行い、加算器、マルチプレクサ、及びクランピング回路で構成されたものと、スケーリング及びトランスレーション係数及びクランピング動作タイプを得る手段と、を具備するものと、前記出力値RVを変更する手段であって、スケーリング演算を行い、マルチプレクサで構成されたものと、スケーリング係数及びクランピング動作タイプを得る手段と、を具備するものと、をさらに備え、前記第5手段が、前記RVと前記入力座標(u,v)とを結合して出力(u’,v’)を得る手段であり、2つの加算器及び2つの“ifステートメント論理回路”を具備し、独立してu’及びv’座標を以下のように求める:もし(u>0)
ならば u’=u+RV さもなくば u’=u-RV、もし(v>0) ならば v’=v+RV さもなくば v’=v-RV、システムである。
In a preferred embodiment of the first aspect of the present invention, in any of the above, the second means inputs either u or v coordinates (hereinafter also referred to as “t”). Two random values (u0, u1) and (v0, v1) are obtained, and two random ones are generated using two separate but similar random number generators. Here, each random number generator is a means for calculating two numerical values TA and TB from the input value “t”, where TB is a floating point value less than 1 and TA + TB is equal to 1. Means for projecting the value TB onto a random value TT, means for obtaining a constant value, hereinafter referred to as “magic_shift1”, and means for obtaining TT as a result of projecting TB into the interval [0, magic_shift1]. One having a single multiplexer and calculating TT = TB * magic_shift1, and two values TTA and TTB as the value A means for calculating from TT, wherein TTB is a floating point value less than 1 and TTA + TTB is equal to 1, and means for generating a random value, wherein the set of parameters {TA, TTA} and {TA, As a result of using TTA + 1} to generate two random values T1 and T2, respectively , means for obtaining a constant value, hereinafter referred to as “magic_shift1”, “magic_mask”, and “magic_shift2”, and the following values: That is, a means for calculating a pseudo-random value, hereinafter referred to as “maskT”, using either TTA or TTA + 1 as an input, “if statement logic circuit”, multiplexer, and logical right bit shift operator (>> ), And if the input value displayed as D and equal to either TTA or TTA + 1 is strictly lower than “magic_shift1”, calculate the following value:
maskT = magic_mask >> (TA * magic_shift2)
Otherwise, calculate the following values,
maskT = magic_mask >> ((TA + 1) * magic_shift2);
Means for calculating a random number R using as input an input value equal to either TA or TA + 1 and “maskT” as input, comprising an “if statement logic circuit”, a multiplexer, and a bit logic operator If “XOR” (represented by ^) and D is lower than “magic_shift1”, calculate the following value: R = ((1 + TTA) * magic_shift2) ^ maskT
Otherwise, calculate the next value, R = ((1) * magic_shift2) ^ maskT,
The third means combines two one-dimensional sections of random values (u0, u1) and (v0, v1) to obtain a two-dimensional section [(u0, v0), (u1, v1)]. Means for obtaining "magic_mask" and means for calculating the following two values, hereinafter referred to as "maskA" and "maskB", using the two random values u0 and u1, The calculation of mask comprises a single logical right bit shift operator, which calculates the following for the input value “t”:
(magic_mask >> t) where “t” is equal to either u0 or u1 and the resulting value “mask” is equal to either “maskA” or “maskB” respectively and is a random value. 4 sets of inputs {u0, v0, maskA}, {u0, v1, maskA},
Random values R1, R2, R3, and R4 are obtained as a result of using {u1, v0, maskB}, and {u1, v1, maskB}, and include an adder and a bit logic XOR (^) operator. And the following means for calculating each input {s, t, mask}, R = (s + t) ^ mask, and the fifth means obtains UUB and VVB from the random number generator The numerical value TTB specified in advance is equal to UUB when the coordinate u is used as the input of the random number generator, and similarly, the random number generator is used with the coordinate v as input. Is a means to calculate a weighted random value that is equal to VVB and used independently four times, and includes four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB},
As a result of using {R3, UUB, VVB-1.0}, and {R4, UUB-1.0, VVB-1.0}, four weight values r1, r2, r3, and r4 are obtained, and each module has an adder and A multiplexer is provided to calculate the next value r = R * (a + b) for each input {R, a, b}, and the random value RV to r1, r2, r3, r4, UUB, and VVB Is used as an input and is calculated using a bilinear interpolation module, r1,
r2, r3, and r4 are interpolated values, UUB and VVB are parameters for interpolation, and means for changing the UUB and VVB to control the bilinear interpolation operation. 0,1] When UUB and VVB are defined, a lookup table that maps UUB and VVB to UUB 'and VVB', and bilinear interpolation using UUB 'and VVB' as parameters for bilinear interpolation operations Means for controlling the generation of the random value, wherein the input u and v are changed in order to change the input coordinates (u, v). And a means for performing scaling, translation, and clamping operations, and comprising an adder, a multiplexer, and a clamping circuit, and means for obtaining a scaling and translation coefficient and a clamping operation type. And a means for changing the output value RV, and further comprising a means for performing a scaling operation and comprising a multiplexer, and means for obtaining a scaling factor and a clamping operation type, The fifth means is means for obtaining the output (u ′, v ′) by combining the RV and the input coordinates (u, v), and includes two adders and two “if statement logic circuits”. And independently determine u 'and v' coordinates as follows: if (u> 0)
Then u '= u + RV otherwise u' = u-RV, if (v> 0) v '= v + RV otherwise v' = v-RV, the system.

第2の態様:一次元テクスチャ画像及び設定可能な二次元から一次元へのマッピング関数を用いた二次元テクスチャ画像生成   Second aspect: Generation of 2D texture image using 1D texture image and configurable 2D to 1D mapping function

本発明の第2の態様が対象とするのは、テクスチャ座標(u,v)を得る第1手段と、前記テクスチャ座標(u,v)を一次元テクスチャ座標(t)に投影する第2手段と、メモリに格納された一次元テクスチャ画像を、前記一次元テクスチャ座標(t)を用いてアクセスして獲得する第3手段と、前記一次元テクスチャ画像を用いて二次元テクスチャ画像を生成する第4手段と、を備えたことを特徴とする、二次元テクスチャ画像を生成するシステムである。本発明の第2の態様の好適な一例が対象とするのは、上記において、前記第2手段が、2つの関数G1及びG2を複数の固定関数から選択する手段と、あらゆる実関数、以下Fと称する、を表す参照テーブルを定義する手段と、前記関数G1、G2、及びFを結合する手段と、を備えたシステムである。   The second aspect of the present invention is intended for first means for obtaining texture coordinates (u, v) and second means for projecting the texture coordinates (u, v) to one-dimensional texture coordinates (t). And a third means for accessing and acquiring the one-dimensional texture image stored in the memory using the one-dimensional texture coordinates (t), and a second means for generating a two-dimensional texture image using the one-dimensional texture image. And a means for generating a two-dimensional texture image. A preferred example of the second aspect of the present invention is directed to the above, wherein the second means is a means for selecting two functions G1 and G2 from a plurality of fixed functions, and any real function, hereinafter F A means for defining a reference table representing the function, and means for combining the functions G1, G2, and F.

本発明の第2の態様の好適な例は、上記において、前記第2手段が、2つの関数G1及びG2を、{u, v, u+v, u-v, u^2, v^2, sqrt(u2+v2),
u+v+sqrt(u2+v2), u+v-sqrt(u2+v2), min(u,v), max(u,v), constant}に等しい関数G(u,v)から選択する手段であって、“sqrt”は数学関数である平方根であり、x^2はxの二乗(xのx倍)であるものと、あらゆる実関数で以下Fと称するものを表す参照テーブルを定義する手段と、前記関数G1、G2、及びFを結合する手段であって、G1を参照テーブルFのの入力として用い、これによりF(G1(u,v))を算出する手段と、参照テーブルの出力とG2を用いて、参照テーブルの出力とG2との積を算出して、結果として値値F(G1 (u,v))*G2(u.v)を得る手段と、を具備するものと、を備え、前記第3手段が、一次元テクスチャ画像F(G1 (u,v))*G2(u.v)を用いるシステムである。
In a preferred example of the second aspect of the present invention, in the above, the second means converts two functions G1 and G2 into {u, v, u + v, uv, u ^ 2, v ^ 2, sqrt. (u2 + v2),
Select from functions G (u, v) equal to u + v + sqrt (u2 + v2), u + v-sqrt (u2 + v2), min (u, v), max (u, v), constant} Means, “sqrt” is a mathematical function square root, x ^ 2 defines a look-up table that represents the square of x (x times x), and any real function, hereinafter referred to as F Means for combining the functions G1, G2, and F, using G1 as an input to the reference table F, thereby calculating F (G1 (u, v)), and a reference table Means for calculating a product of the output of the reference table and G2 using the output of G2 and G2 as a result to obtain a value value F (G1 (u, v)) * G2 (uv), and , And the third means uses a one-dimensional texture image F (G1 (u, v)) * G2 (uv).

本発明は、新しい一連の簡単な関数に基づく新しいグラフィック回路であって、グラフィック・チップに回路として容易に実装可能なものを提供することが出来る。
本発明は、新しいグラフィック回路であって、バッファ・アクセス無しに従来のテクスチャ関連技術より少ない動作でメモリのコストを削減することが可能なものを提供することが出来る。
本発明は、一次元入力テクスチャ画像から二次元テクスチャ画像を与えるシステムを提供することが出来、設定を変えれば、二次元テクスチャ画像が興味深い視覚的な特性、例えば擬似的なランダム性(でたらめさ)、反復性等、いわゆるナチュラル・テクスチャ(木、大理石等)に見られる特性だけでなく、幾何学的な特徴(グレア、ハロー、薄い織物の表面に印刷されたモチーフ等)を有するテクスチャも表示することが出来る。
The present invention can provide a new graphics circuit based on a new series of simple functions that can be easily implemented as a circuit on a graphics chip.
The present invention can provide a new graphics circuit that can reduce the cost of the memory without buffer access and with less operation than the conventional texture-related technology.
The present invention can provide a system that provides a two-dimensional texture image from a one-dimensional input texture image. If the setting is changed, the two-dimensional texture image has an interesting visual characteristic, for example, pseudo randomness. Display textures with geometric characteristics (glare, halo, motifs printed on thin fabric surfaces, etc.) as well as properties found in so-called natural textures (wood, marble, etc.), such as repeatability I can do it.

従来のテクスチャ・ユニット(コンピュータ・グラフィックスにおいては周知のユニット)は通常次のような役割を担っている。或る入力テクスチャ座標(u,v)が与えられると、出力色RGBA(赤、緑、青、及びアルファ)を生成するために、さまざまな計算が行われる。RGBAにおいて、アルファは一般的に透明性を示している。「課題を解決する手段」の節で説明した三つの手段は、組み合わせると完全なテクスチャ・ユニットを成す。入力二次元テクスチャ座標(u,v)が与えられると、出力色RGBAが生成される。図1は、提案された手段をモジュールに分解した様子を示している。第1段階では、(u,v)座標を摂動し、結果として(u’,v’)を得る。第2段階では、二次元座標(u,v)を一次元座標tにマッピングし、最終段階では、一次元座標tを一次元テクスチャ画像を含む参照テーブルにおけるインデックスとして使用する。図1は、開示された発明を2つのモジュールに分解した様子を示している。入力二次元テクスチャ座標(u,v)が与えられると、モジュール1000(摂動部)が(u,v)を変更し、結果として(u’,v’)を得た後、これらが二次元座標を一次元座標tに対応付けるモジュール3000 CMapの入力として使用される。この一次元座標は、されにモジュール5000における一次元テクスチャ参照テーブルにおけるインデックスとして使用される。   Conventional texture units (units well known in computer graphics) usually play the following roles. Given a certain input texture coordinate (u, v), various calculations are performed to produce the output color RGBA (red, green, blue, and alpha). In RGBA, alpha generally indicates transparency. When combined, the three means described in the section “Means for Solving the Problem” form a complete texture unit. Given input 2D texture coordinates (u, v), an output color RGBA is generated. FIG. 1 shows the proposed means broken down into modules. In the first stage, the (u, v) coordinates are perturbed, resulting in (u ′, v ′). In the second stage, the two-dimensional coordinates (u, v) are mapped to the one-dimensional coordinates t, and in the final stage, the one-dimensional coordinates t are used as an index in a reference table including a one-dimensional texture image. FIG. 1 shows the disclosed invention broken down into two modules. Given input 2D texture coordinates (u, v), module 1000 (perturbation) modifies (u, v), resulting in (u ', v'), then these are 2D coordinates Is used as input to module 3000 CMap that maps to one-dimensional coordinates t. This one-dimensional coordinate is then used as an index in the one-dimensional texture lookup table in module 5000.

第1の態様:プロシージャル一次元擬似ランダム・パターン生成
モジュール1000:PERTUBATER
発明の第1の態様は入力二次元テクスチャ座標(u,v)の摂動に関する。Pertubaterモジュールは、コンピュータ・システムにおいて二次元テクスチャ座標を算出するシステムであって、二次元テクスチャ座標(u,v)を求める第1手段と、前記座標u及びvを用いて2つのランダム値の一次元区間を2個生成する第2手段と、前記ランダム値の一次元区間2個を結合して、4つのランダム値の二次元区間を1個生成する第3手段と、前記テクスチャ座標(u,v)及び前記4つのランダム値の二次元区間に応じて、ランダム値を生成する第4手段と、前記ランダム値と前記入力テクスチャ座標(u,v)を結合して、変換された前記二次元テクスチャ座標(u’,v’)を得る第5手段と、を備えたことを特徴とするシステムである。
First aspect: Procedural one-dimensional pseudo-random pattern generation Module 1000: PERTUBATER
The first aspect of the invention relates to perturbation of input two-dimensional texture coordinates (u, v). The Pertubater module is a system for calculating a two-dimensional texture coordinate in a computer system, a first means for obtaining a two-dimensional texture coordinate (u, v), and a primary of two random values using the coordinates u and v. A second means for generating two original intervals; a third means for combining two one-dimensional intervals of the random value to generate one two-dimensional interval of four random values; and the texture coordinates (u, v) and a fourth means for generating a random value according to the two-dimensional interval of the four random values, and combining the random value and the input texture coordinates (u, v), the transformed two-dimensional And a fifth means for obtaining texture coordinates (u ′, v ′).

第1手段がu及びvを求める。第2手段がu及びvを得て2個の一次元区間を生成する。第3手段が、一次元区間2個を結合して4つのランダム値の二次元区間を得る。第4手段が、二次元区間値を得てランダム値を生成する。第5手段が、ランダム値と入力テクスチャ座標(u,v)を結合して、二次元テクスチャ座標を摂動した(u’,v’)を得る。   The first means finds u and v. The second means obtains u and v and generates two one-dimensional sections. A third means combines two one-dimensional sections to obtain four random two-dimensional sections. The fourth means obtains a two-dimensional section value and generates a random value. The fifth means combines the random value and the input texture coordinate (u, v) to obtain a perturbed (u ′, v ′) two-dimensional texture coordinate.

第1のシステムでは、いずれかの先行するモジュールからの通常のバス入力について説明した。第2のシステムは、2つ乱数発生器で構成された汎用モジュールである。この汎用モジュールにおいては、乱数発生器の数が使用される。例えば、2回、1回目は入力uを用い、2回目は入力vを用いる。4つのランダム値が生成される。このとき、(u0, u1)はuを入力とし、(v0,
v1)はvを入力とするものである。図2は、モジュール1000 Perturbaterをサブモジュールに分解した様子を示している。以下、これらの各サブモジュールについて説明する。
In the first system, a normal bus input from any preceding module has been described. The second system is a general purpose module composed of two random number generators. In this general purpose module, the number of random number generators is used. For example, the input u is used twice and the first time, and the input v is used the second time. Four random values are generated. At this time, (u0, u1) takes u as input and (v0, u1)
v1) takes v as input. FIG. 2 shows a state in which the module 1000 Perturbater is disassembled into submodules. Hereinafter, each of these submodules will be described.

モジュール1100:random1D
random1Dモジュールは、モジュール1000内で2回インスタンス化される。また、座標u及びvについて別々に使用される。或る入力座標tが与えられると、このモジュールのタスクは2つのランダム値及び浮動小数値を生成し、これらは後にそれぞれ、random2Dモジュール(1200)及びランダム結合(randomCombiner)モジュール(1300)で使用される。ランダム値の生成を担当するモジュールは、以下、pseudoRandomGenerator1Dと称する(このモジュールはモジュールrandom1D内で2回インスタンス化され、random1Dモジュールが2回インスタンス化されるので、このモジュールのインスタンスが合計で4つ存在することになる)。
Module 1100: random1D
The random1D module is instantiated twice in module 1000. Also, the coordinates u and v are used separately. Given a certain input coordinate t, the task of this module generates two random values and a float value, which are later used in the random2D module (1200) and the random combiner module (1300), respectively. The The module responsible for generating random values is hereinafter referred to as pseudoRandomGenerator1D (this module is instantiated twice in the module random1D and the random1D module is instantiated twice, so there are a total of four instances of this module. Will do).

モジュールpseudoRandomGenerator1Dの機能は以下の通りである。これは、3つの“magic”数を使用する。これらの数が単に符号なしの整数であり興味深いビット表現を有していると定義すれば十分である。第1のmagic数は“magic mask”と称することとし、符号なしの長い値(32ビット)である。他の2つを以下、“magic_shift1”及び“magic_shift2”と称することとし、それぞれ4ビット値及び8ビット値である。3つのmagic数は全て定数である。提案されるビット長は、説明のために示されたものである。開示された発明を大幅に変更すれば、他のビット長も選択することが出来る。これらのビット長を使用する主な利点は、このモジュールの超小型化(ハードウエアの観点で)である。   The function of module pseudoRandomGenerator1D is as follows. This uses three “magic” numbers. It is sufficient to define that these numbers are simply unsigned integers and have interesting bit representations. The first magic number is referred to as “magic mask” and is an unsigned long value (32 bits). The other two are hereinafter referred to as “magic_shift1” and “magic_shift2”, which are a 4-bit value and an 8-bit value, respectively. All three magic numbers are constants. The proposed bit length is shown for illustration. Other bit lengths can be selected with significant changes to the disclosed invention. The main advantage of using these bit lengths is the miniaturization (in terms of hardware) of this module.

まず、入力パラメータt(u又はvに等しいもの)が2つの値、TA及びTBに、但し、TBが1未満であり、TA+TBがtに等しくなるように分解される。値TAは、以下のように定義されるmaskTと呼ばれる値を生成するのに使用される。   First, the input parameter t (equal to u or v) is decomposed into two values, TA and TB, where TB is less than 1 and TA + TB is equal to t. The value TA is used to generate a value called maskT defined as follows:

MaskT= (magic_mask >>
((TA*magic_shift2)&0xF))&0xF (1)
ここで、&はビットのAND演算であり、&0xFは最初の4ビット(最下位)が考慮される、言い換えれば、maskTは4ビット値であり、このことがこの関数を非常に小さな回路で実現可能にしている。明確さのために&0xFと書くが、実際のハードウェア実装においては、この演算は適正な回路実装により暗黙的に定義することが出来る。
MaskT = (magic_mask >>
((TA * magic_shift2) & 0xF)) & 0xF (1)
Where & is the bitwise AND operation, & 0xF takes into account the first 4 bits (least significant), in other words, maskT is a 4-bit value, which makes this function a very small circuit It is possible. Although written & 0xF for clarity, in the actual hardware implementation, this operation can be implicitly defined by proper circuit implementation.

一方、(すなわち、平行して)、別の回路を用いて値TBを区間[0, magic_shift1]に投影し、この投影の結果が値TTである。
TT = (TB)*magic_shift1. (2)
同様に、値TTが2つの部分、TTA及びTTBに分解されるが、このとき、TTBが1未満であり、TTA+TTBがTTに等しくなる。値TTBは、モジュールrandomCombiner(1300)において使用される。
On the other hand (ie, in parallel), the value TB is projected onto the interval [0, magic_shift1] using another circuit, and the result of this projection is the value TT.
TT = (TB) * magic_shift1. (2)
Similarly, the value TT is broken down into two parts, TTA and TTB, where TTB is less than 1 and TTA + TTB is equal to TT. The value TTB is used in the module randomCombiner (1300).

値TTAは、事前に計算されたmaskT(式(1)参照)と共に、実際に乱数を発生するのに使用される。次に、TTAに対応するランダム値は以下のように定義される:
t0=((((1+TTA)*magic_shift2)&0xF)^MaskT)&0xF (3)
The value TTA is used together with a pre-calculated maskT (see equation (1)) to actually generate a random number. Next, the random value corresponding to TTA is defined as follows:
t0 = ((((1 + TTA) * magic_shift2) & 0xF) ^ MaskT) & 0xF (3)

出力は、4ビット値として定義される乱数(むろん、擬似乱数)である。モジュール1100 Random1Dは実際に2つのランダム値を、与えられた入力座標tについて生成する。この理由は、入力座標tをランダム空間の区間にマッピングしたいからである。このモジュールの目的は、2つのランダム値を定義することであって、t及びその周辺の区間が投影されるランダム空間に或る区間を定義することではない。言い換えれば、ランダム値は各tの値について生成されるべきではなく、むしろ或るランダム区間がtに隣接している区間に対して定義されるべきである。   The output is a random number (of course, a pseudorandom number) defined as a 4-bit value. Module 1100 Random1D actually generates two random values for a given input coordinate t. This is because it is desired to map the input coordinate t to a section of the random space. The purpose of this module is to define two random values, not to define a section in the random space where t and its surrounding sections are projected. In other words, a random value should not be generated for each value of t, but rather a certain random interval should be defined for the interval adjacent to t.

区間を生成する場合は、連続性を考慮すべきであり、もし、或る与えられた入力値についてランダム空間における区間[R0,R1]が生成されるならば、次の区間は[R1,R2]でなければならないということを保証しなければならない。式(3)から分かるように、値TTは区間[0,
magic_shift1]内にある。一定の連続性を保証するためには、TTAが値“magic_shift1”に等しいケースを特別のプロシージャが扱うべきである。TTAが値“magic_shift1”以上である場合には、式(1)及び(3)がそれぞれ以下のようになる:
MaskT= (magic_mask >>
(((TA+1)*magic_shift2)&0xF))&0xF (1’)
t0=((((1)*magic_shift2)&0xF)^MaskT)&0xF (3’)
先に言及したように、非常に小さなビット幅で十分である。
When generating an interval, continuity should be considered, and if an interval [R0, R1] in random space is generated for a given input value, the next interval is [R1, R2 ] Must guarantee that it must be. As can be seen from equation (3), the value TT is the interval [0,
It is in magic_shift1]. To ensure constant continuity, special procedures should handle the case where TTA is equal to the value “magic_shift1”. If TTA is greater than or equal to the value “magic_shift1”, equations (1) and (3) are as follows:
MaskT = (magic_mask >>
(((TA + 1) * magic_shift2) & 0xF)) & 0xF (1 ')
t0 = ((((1) * magic_shift2) & 0xF) ^ MaskT) & 0xF (3 ')
As mentioned earlier, a very small bit width is sufficient.

モジュールpseudoRandomGenerator1Dの好適な例は、前記第2手段が、u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る、分離しているが同様な乱数発生器2個を用いて2つのランダム値の一次元区間を2個生成する手段であり、ここで各乱数発生器は、2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、前記値TBをランダム値TTに投影する手段であって、以下“magic_shift1“t”と称する一定値を得る手段と、TBを前記区間[0,magic_shift1]内に投影する結果としてTTを得る手段であって、単一のマルチプレクサを具備してTT = TB*magic_shift1を計算するものと、を具備するものと、2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2をそれぞれ生成するものであって、以下“magic_shift1”, “magic_mask”, 及び“magic_shift2”と称する一定値を得る手段と、以下の値、すなわち以下“maskT”と称する擬似ランダム値を、TTA又はTTA+1のいずれかを入力として用いて算出する手段であり、“ifステートメント論理回路”、マルチプレクサ、及び論理右ビットシフト演算子(>>)を具備し、もし、Dと表示され且つTTA又はTTA+1のいずれかに等しい前記入力値が、厳密に“magic_shift1”より低ければ、以下の値を算出し、
maskT = magic_mask>>(TA*magic_shift2)
さもなくば、以下の値を算出するものと、
maskT = magic_mask>>((TA+1)*magic_shift2);
Dと表示され且つTA又はTA+1のいずれかに等しい入力値及び“maskT”を入力として用いて乱数Rを算出する手段であって、“ifステートメント論理回路”、マルチプレクサ、及びビット論理演算子“XOR”(^で表す)を具備し、もし、Dが“magic_shift1”より低ければ、以下の値R =
((1+TTA)*magic_shift2)^maskTを算出し、さもなくば、次の値R =
((1)*magic_shift2)^maskTを算出するものと、を具備するものと、を備え、前記第3手段が、ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、
“magic_mask”を得る手段と、以下“maskA”及び“maskB”と称する以下の2つの値を、前記2つのランダム値u0及びu1を用いて算出する手段であって、各maskの算出は、単一の論理右ビットシフト演算子を具備し、入力値“t”について次の計算をするものと、mask =
(magic_mask>>t)
ここで、“t”はu0又はu1のいずれかに等しく結果として得られる値“mask”は、それぞれ“maskA”又は“maskB”のいずれかに等しくなるものとし、ランダム値を算出する手段であって、4組の入力{u0,v0,maskA}, {u0,v1,maskA},
{u1,v0,maskB}, 及び{u1,v1,maskB}を用いる結果としてランダム値R1, R2, R3, 及びR4を得るものであって、加算器及びビット論理XOR (^)演算子を具備し、各入力{s,t,mask}について次の値R=(s+t)^maskを算出するものと、を備え、前記第5手段が、UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された数値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、独立して4回使用される加重ランダム値を算出する手段であって、4組の入力{R1, UUB, VVB}, {R2, UUB-1.0, VVB},
{R3, UUB, VVB-1.0}, 及び{R4, UUB-1.0, VVB-1.0}を用いる結果として4つの加重値r1, r2, r3, 及びr4を得るものであり、各モジュールが加算器及びマルチプレクサを具備し、各入力{R,a,b}について次の値r = R*(a+b)を算出するものと、ランダム値RVを、r1, r2, r3, r4, UUB, 及びVVBを入力として用い、また双一次補間モジュールを用いて算出する手段であって、r1,
r2, r3, 及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものであって、UUB及びVVBを変更して双一次補間動作を制御する手段であって、前記区間[0,1]におけるUUB及びVVBが定義されているときUUB及びVVBをUUB’及びVVB’にマッピングする参照テーブルと、双一次補間動作用のパラメータとしてUUB’及びVVB’を用いて双一次補間を算出する手段と、を具備したものと、を備え、前記システムが、前記ランダム値の生成を制御する手段であって、前記入力座標(u,v)を変更するために、各入力u及びvについて、スケーリング、トランスレーション、及びクランピング演算を行い、加算器、マルチプレクサ、及びクランピング回路で構成されたものと、スケーリング及びトランスレーション係数及びクランピング動作タイプを得る手段と、を具備するものと、前記出力値RVを変更する手段であって、スケーリング演算を行い、マルチプレクサで構成されたものと、スケーリング係数及びクランピング動作タイプを得る手段と、を具備するものと、をさらに備え、前記第5手段が、前記RVと前記入力座標(u,v)とを結合して出力(u’,v’)を得る手段であり、2つの加算器及び2つの“ifステートメント論理回路”を具備し、独立してu’及びv’座標を以下のように求めるものである:
もし(u>0) ならば u’=u+RV さもなくば
u’=u-RV
もし(v>0) ならば v’=v+RV さもなくば
v’=v-RV。
In a preferred example of the module pseudoRandomGenerator1D, the second means inputs either u or v coordinates (hereinafter also referred to as “t”), and receives two random values (u0, u1) and (v0 , v1) is a means for generating two one-dimensional sections of two random values using two separate but similar random number generators, where each random number generator is Means for calculating two numerical values TA and TB from the input value “t”, wherein TB is a floating-point value less than 1 and TA + TB is equal to 1, and means for projecting the value TB to a random value TT Means for obtaining a constant value, hereinafter referred to as “magic_shift1“ t ”, and means for obtaining TT as a result of projecting TB into the interval [0, magic_shift1], comprising a single multiplexer. One that calculates TT = TB * magic_shift1, and one that calculates two numerical values TTA and TTB from the value TT A means for generating a random value when TTB is a floating-point value less than 1 and TTA + TTB is equal to 1, using the set of parameters {TA, TTA} and {TA, TTA + 1} As a result, two random values T1 and T2 are generated respectively , and means for obtaining constant values, hereinafter referred to as “magic_shift1”, “magic_mask”, and “magic_shift2”, and the following values, namely “maskT” Is a means for calculating using either TTA or TTA + 1 as an input, comprising an “if statement logic circuit”, a multiplexer, and a logical right bit shift operator (>>). , D and if the input value equal to either TTA or TTA + 1 is strictly lower than “magic_shift1”, calculate the following value:
maskT = magic_mask >> (TA * magic_shift2)
Otherwise, calculate the following values,
maskT = magic_mask >> ((TA + 1) * magic_shift2);
Means for calculating a random number R using as input an input value equal to either TA or TA + 1 and “maskT” as input, comprising an “if statement logic circuit”, a multiplexer, and a bit logic operator If “XOR” (represented by ^) and D is lower than “magic_shift1”, then the following value R =
((1 + TTA) * magic_shift2) ^ maskT, otherwise the next value R =
((1) * magic_shift2) ^ A maskT is calculated, and the third means includes two one-dimensional sections of random values (u0, u1) and (v0, v1). A means for combining to obtain a two-dimensional interval [(u0, v0), (u1, v1)],
A means for obtaining “magic_mask” and a means for calculating the following two values, hereinafter referred to as “maskA” and “maskB”, using the two random values u0 and u1. With one logical right bit shift operator and the following calculation for the input value “t”, mask =
(magic_mask >> t)
Here, “t” is equal to either u0 or u1, and the resulting value “mask” is equal to either “maskA” or “maskB”, respectively, and is a means for calculating a random value. 4 sets of inputs {u0, v0, maskA}, {u0, v1, maskA},
Random values R1, R2, R3, and R4 are obtained as a result of using {u1, v0, maskB}, and {u1, v1, maskB}, and include an adder and a bit logic XOR (^) operator. And calculating the following value R = (s + t) ^ mask for each input {s, t, mask}, and the fifth means obtains UUB and VVB from the random number generator The numerical value TTB specified in advance is equal to UUB when the coordinate u is used as the input of the random number generator, and similarly, the random number generator is used with the coordinate v as input. Is a means to calculate a weighted random value that is equal to VVB and used independently four times, and includes four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB},
As a result of using {R3, UUB, VVB-1.0}, and {R4, UUB-1.0, VVB-1.0}, four weight values r1, r2, r3, and r4 are obtained, and each module has an adder and A multiplexer is provided to calculate the next value r = R * (a + b) for each input {R, a, b}, and the random value RV to r1, r2, r3, r4, UUB, and VVB Is used as an input and is calculated using a bilinear interpolation module, r1,
r2, r3, and r4 are interpolated values, UUB and VVB are parameters for interpolation, and means for changing the UUB and VVB to control the bilinear interpolation operation. 0,1] When UUB and VVB are defined, a lookup table that maps UUB and VVB to UUB 'and VVB', and bilinear interpolation using UUB 'and VVB' as parameters for bilinear interpolation operations Means for controlling the generation of the random value, wherein the input u and v are changed in order to change the input coordinates (u, v). And a means for performing scaling, translation, and clamping operations, and comprising an adder, a multiplexer, and a clamping circuit, and means for obtaining a scaling and translation coefficient and a clamping operation type. And a means for changing the output value RV, and further comprising a means for performing a scaling operation and comprising a multiplexer, and means for obtaining a scaling factor and a clamping operation type, The fifth means is means for obtaining the output (u ′, v ′) by combining the RV and the input coordinates (u, v), and includes two adders and two “if statement logic circuits”. Independently, the u ′ and v ′ coordinates are determined as follows:
If (u> 0) u '= u + RV otherwise
u '= u-RV
If (v> 0) v '= v + RV otherwise
v '= v-RV.

図2に示すように、モジュールrandom1Dの出力は乱数(t0,t1)の区間及び値TTBである。このモジュールは、u又はvを入力として用いて2回インスタンス化される。入力値がuである場合、出力はタプル(u0,u1,UUB)であり、入力値がvである場合、出力タプルは(v0,v1,VVB)である。ランダム区間[u0,u1]及び[v0,v1]がモジュール1200 (random2D)の入力として用いられ、値UUB及びVVBがモジュール1300 (randomCombiner)において用いられる。   As shown in FIG. 2, the output of the module random1D is a random number (t0, t1) interval and a value TTB. This module is instantiated twice using u or v as input. When the input value is u, the output is a tuple (u0, u1, UUB), and when the input value is v, the output tuple is (v0, v1, VVB). Random intervals [u0, u1] and [v0, v1] are used as inputs for module 1200 (random2D), and the values UUB and VVB are used in module 1300 (randomCombiner).

モジュール1200:random2D
このモジュールの入力は2つのランダム値の区間[u0,u1]及び[v0,v1]である。一次元区間を生成するために使用する手段により、区間[u0,u1]及び[v0,v1]が無相関であることは明らかである。Random2Dモジュールは4つの新しいランダム値を2つの一次元入力区間[u0,u1]及び[v0,v1]を用いて生成する役割を担っている。
Module 1200: random2D
The inputs of this module are two random value intervals [u0, u1] and [v0, v1]. It is clear that the intervals [u0, u1] and [v0, v1] are uncorrelated by the means used to generate the one-dimensional interval. The Random2D module is responsible for generating four new random values using two one-dimensional input intervals [u0, u1] and [v0, v1].

この回路の好適な実施例は、非常に小さな回路の4つのインスタンスを使用することであり、ここでは、各回路が1つのランダム値を異なる一連の入力値から生成する。この回路を、以下、pseudoRandomGenerator2Dと称する。   A preferred embodiment of this circuit is to use four instances of a very small circuit, where each circuit generates a random value from a different set of input values. Hereinafter, this circuit is referred to as pseudoRandomGenerator2D.

random2Dモジュールは、まず、この回路用に4セットの入力として、{u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, 及び{u1, v1, maskB}と定義されるものを生成する。値maskA及びmaskBもまた、単一の論理右ビットシフト演算を用いて4ビット値として表すことが出来る。これらのマスク値を計算する好適な実施例は、以下のプロシージャを実装した回路であればよい:   The random2D module first defines {u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, and {u1, v1, maskB} as four sets of inputs for this circuit. Generate what will be. The values maskA and maskB can also be represented as 4-bit values using a single logical right bit shift operation. A preferred embodiment for calculating these mask values may be any circuit that implements the following procedure:

maskA= ((magic_mask>>(u0)))&0xF;
maskB= ((magic_mask>>(u1)))&0xF;
maskA = ((magic_mask >> (u0))) &0xF;
maskB = ((magic_mask >> (u1))) &0xF;

maskA及びmaskBの値を計算した後、回路pseudoRandomGenerator2Dの4つのインスタンスを一連の入力パラメータ{u0,v0,maskA}, {u0,v1,maskA}, {u1,v0,maskB}, 及び{u1,v1,maskB}と平行して使用する。この回路の好適な実施例は、加算器と、ビットシフトとXOR演算子とで構成され、各演算が4ビット値で定義されているため、結果として非常に小さい回路規模になる。   After calculating the values of maskA and maskB, four instances of the circuit pseudoRandomGenerator2D are transformed into a series of input parameters {u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, and {u1, v1 , maskB} is used in parallel. A preferred embodiment of this circuit consists of an adder, a bit shift and an XOR operator, and each operation is defined by a 4-bit value, resulting in a very small circuit scale.

モジュールrandom2Dの好適な例は:定数magic_maskを使用する手段と、2つの新しい4ビット数であって、以下、maskA及びmaskBと称するものを、2つのランダム値u0及びu1を用いて計算し、このとき、各マスク演算は単一の論理右ビットシフト演算(4ビット)で構成され、入力値tについて次の値mask = (magic_mask>>t)&0xFを計算する手段であって:ここで、tはu0又はu1に等しく、結果として得られる4ビット値はそれぞれmaskA又はmaskBに等しくなるようなものと、4回独立して使用される4ビットのランダム値を、4セットの入力{u0,v0,maskA}, {u0,v1,maskA},
{u1,v0,maskB}, 及び{u1,v1,maskB}を用いて計算し、結果として4ビットのランダム値R1, R2, R3, 及びR4を得るものであり、各モジュールが加算器及びビット論理演算子XOR(^)で構成され各入力{s,t,mask}について以下の値R=((s+t)^mask)&0xFを計算する手段であって:ここで、Rは4ビットのランダム値であるものを備えている。
A suitable example of the module random2D is: a means to use the constant magic_mask and two new 4-bit numbers, hereinafter referred to as maskA and maskB, calculated using two random values u0 and u1, When each mask operation consists of a single logical right bit shift operation (4 bits), the means to calculate the following value mask = (magic_mask >> t) & 0xF for the input value t, where t Is equal to u0 or u1, and the resulting 4-bit value is equal to maskA or maskB, respectively, and a 4-bit random value used four times independently, with four sets of inputs {u0, v0 , maskA}, {u0, v1, maskA},
{u1, v0, maskB}, and {u1, v1, maskB} are used to obtain 4-bit random values R1, R2, R3, and R4 as a result. A means of calculating the following value R = ((s + t) ^ mask) & 0xF for each input {s, t, mask} composed of the logical operator XOR (^), where R is 4 bits With a random value.

4ビットのランダム値{R1, R2, R3,
R4}はモジュール1400 randomCombinerにおいて使用される。
4-bit random value {R1, R2, R3,
R4} is used in module 1400 randomCombiner.

モジュール1300:randomCombiner
このモジュールの入力は、モジュール1200 random2Dからのランダム値R1, R2, R3, 及びR4並びにモジュール1100 random1Dの2つのインスタンスからのUUB及びVVBである。このモジュールの役割は、最終的なランダム値であって、最初の入力座標(u, v)を摂動するのに使用されるものを生成することである。最終的なランダム値RVの生成は、2つの主要ステップに分解することが出来る。
Module 1300: randomCombiner
The inputs of this module are random values R1, R2, R3, and R4 from module 1200 random2D and UUB and VVB from two instances of module 1100 random1D. The role of this module is to generate the final random value that is used to perturb the first input coordinate (u, v). The final random value RV generation can be broken down into two main steps.

まず、重み付け関数がR1, R2, R3, 及びR4に適用され、結果として4つの新しいランダム値r1, r2, r3, 及びr4が得られる。重み付け関数の好適な実施例は、4セットの異なる入力で同様な回路を4回使用し、重み付け関数を符号付の距離関数として定義することである。この関数rの選択は重要である。   First, a weighting function is applied to R1, R2, R3, and R4, resulting in four new random values r1, r2, r3, and r4. A preferred embodiment of the weighting function is to use the same circuit four times with four sets of different inputs and define the weighting function as a signed distance function. The choice of this function r is important.

特許文献WO 01/39126 A1においては、この関数の代わりに、いわゆるグラディエント計算を用いている。グラディエント関数の使用が意味するのは、与えられたハッシュコード(言い換えれば、参照テーブルを用いて連続した置換により得られたある種の乱数)について、或る特定のグラディエントが計算され、結果として加重値が得られることである。ハッシュコードはグラディエントを定義するためのみに使用される、すなわち、どの入力値を加算又は減算するかを示すが、ハッシュコードそのものの値は実際のグラディエントの計算には使用されない。同様に、グラディエントの計算は、引用された特許文献WO 01/39126 A1において提案された回路で4回実行され、結果として4つの加重値が得られる。   In Patent Document WO 01/39126 A1, so-called gradient calculation is used instead of this function. The use of a gradient function means that for a given hash code (in other words, some random number obtained by successive substitutions using a look-up table), a certain gradient is calculated and the resulting weighting The value is to be obtained. The hash code is only used to define the gradient, ie it indicates which input values are added or subtracted, but the value of the hash code itself is not used in the actual gradient calculation. Similarly, the gradient calculation is performed four times with the circuit proposed in the cited patent document WO 01/39126 A1, resulting in four weight values.

randomCombinerの目的は、グラディエント計算と同様であるが、その手段及び得られた値の意味は全く異なる。本発明においては、重み付け関数の好適な実施例は単純化した符号付の距離関数に基づいている。第1の主な違いは、符号付の距離関数を計算する回路を実装するには、ifステートメントやビット比較を、特許文献WO 01/39126 A1で提案された回路のようには、必要としないことである。2つの入力が与えられると、符号付の距離が直接求められた後、符号付の距離値が各ランダム値に重みを付ける重み付けの値として使用される。グラディエント関数の場合においては、ハッシュコードを復号しなければならず、入力値からの選択をしなければならず、選択された値の中には無効にしなければならないものもあり、ハッシュコードによっては選択された値が結合(加算)される。乱数の尺度は入力値の選択を行うときに導入され、ハッシュコードに依存する。ハッシュコードの値は最終的なグラディエントの計算には使用されない。   The purpose of randomCombiner is the same as that of gradient calculation, but the means and the meaning of the obtained value are completely different. In the present invention, the preferred embodiment of the weighting function is based on a simplified signed distance function. The first major difference is that if a circuit that calculates a signed distance function is implemented, an if statement and bit comparison are not required as in the circuit proposed in Patent Document WO 01/39126 A1. That is. Given two inputs, the signed distance is directly determined and then the signed distance value is used as a weighting value to weight each random value. In the case of a gradient function, the hash code must be decoded, the input value must be selected, and some of the selected values must be invalidated, depending on the hash code The selected values are combined (added). A measure of randomness is introduced when selecting an input value and depends on the hash code. The hash code value is not used in the final gradient calculation.

この最後の文が主な違いの1つを説明している。すなわち、本発明では、ランダム値が重み付けされる値であり、重み付けする値は符号付の距離関数として計算される。符号付の距離関数を実装する好適な実施例は、2つの入力値A及びB、1つの加算器、及び値A+Bを出力する回路(以下、SignedDistanceと称する。)として定義される。4つのランダム値R1, R2, R3, 及びR4に重み付けするため、回路SignedDistanceは、4セットの入力{R1, UUB, VVB}, {R2, UUB-1.0, VVB},
{R3, UUB, VVB-1.0}, 及び{R4, UUB-1.0, VVB-1.0}で4回使用される。三重項{r, a, b}においては、a及びbの特定の選択により単純化された符号付の距離を定義することができ、a+bと表すことが出来る。
This last sentence explains one of the main differences. That is, in the present invention, the random value is a weighted value, and the weighted value is calculated as a signed distance function. A preferred embodiment for implementing a signed distance function is defined as a circuit that outputs two input values A and B, one adder, and a value A + B (hereinafter referred to as SignedDistance). To weight the four random values R1, R2, R3, and R4, the circuit SignedDistance has four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB},
Used four times in {R3, UUB, VVB-1.0}, and {R4, UUB-1.0, VVB-1.0}. In the triplet {r, a, b}, a signed distance simplified by a specific choice of a and b can be defined and can be expressed as a + b.

重み付け回路の好適な例は、SignedDistance回路に重み付け計算を含めることであり、以下、randomWeighting回路と改称する。この回路は、モジュール1300
randomCombinerにおいて、4セットの入力{R1,
UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0}, 及び{R4,
UUB-1.0, VVB-1.0}で4回繰り返される。randomWeighting回路の各インスタンスは、加算器及びマルチプレクサで構成され、新しいランダム値r = R*(a+b)の値を定める。.
A preferred example of the weighting circuit is to include a weighting calculation in the SignedDistance circuit, which will be hereinafter referred to as a randomWeighting circuit. This circuit is module 1300
In randomCombiner, 4 sets of input {R1,
UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0}, and {R4,
Repeated 4 times with UUB-1.0, VVB-1.0}. Each instance of the randomWeighting circuit is composed of an adder and a multiplexer, and defines a new random value r = R * (a + b). .

なお、Rは4ビット値であり、a及びbは2つの浮動小数値であることに留意する。浮動小数を16ビットを用いて定義すれば、良い結果(すなわち、最終画像中に目に見える不自然さが無いこと)を得るのに十分である。値Rは、何らかの、好ましくは区間[-1, 1]内の、浮動小数値に変換することができる。Rが4ビット値であることから、この変換は簡単(たった16の可能性ある浮動小数値のみ)である。提案されたビット幅は、品質と回路規模の間の良いトレードオフを提供している。   Note that R is a 4-bit value and a and b are two floating point values. Defining a float with 16 bits is sufficient to get good results (ie no visible unnaturalness in the final image). The value R can be converted to a floating point value, preferably in the interval [-1, 1]. Since R is a 4-bit value, this conversion is simple (only 16 possible floating point values). The proposed bit width offers a good trade-off between quality and circuit scale.

4つのrandomWeighting回路は、4つの加重ランダム値r1, r2, r3, 及びr4を出力する。モジュール1300 randomCombinerの第2の主要なステップは、重み付けされた雑音値r1, r2, r3, 及びr4を双一次補間を用いて補間することである。双一次補間に使用されるパラメータはUUB及びVVBから導き出す。   The four randomWeighting circuits output four weighted random values r1, r2, r3, and r4. The second major step of module 1300 randomCombiner is to interpolate the weighted noise values r1, r2, r3, and r4 using bilinear interpolation. The parameters used for bilinear interpolation are derived from UUB and VVB.

特許文献WO 01/39126 A1においては、同様な手法が提案されている。パラメータとして2つの値を用いて、グラディエントに対して双一次補間を行っている。明確化のため、以下の比較においては、sを入力パラメータの1つとし、s’をsが変更された値であってグラディエントの補間に使用されるものであるとする。特許文献WO 01/39126 A1においては、参照テーブルを用いてsがs’に対応付けられる。参照テーブルは、二次多項式関数、いわゆるイーズ曲線を含んでいる。このマッピングの目的は、双一次補間の結果の連続性を高めることであると主張されている。さらに、多項式関数の選択肢が固定されているため、テーブルのプロパティ(内容のビット幅及びテーブルエントリのビット幅)は固定されている。   In Patent Document WO 01/39126 A1, a similar method is proposed. Bilinear interpolation is performed on the gradient using two values as parameters. For clarity, in the following comparison, let s be one of the input parameters, and let s' be the modified value of s and used for gradient interpolation. In Patent Document WO 01/39126 A1, s is associated with s ′ using a reference table. The lookup table includes a second-order polynomial function, a so-called ease curve. It is claimed that the purpose of this mapping is to increase the continuity of bilinear interpolation results. Furthermore, since the choices of the polynomial function are fixed, the table properties (the bit width of the contents and the bit width of the table entry) are fixed.

この書面で開示される発明においても、参照テーブルが使用される。しかしながら、参照テーブルの入力は、定義により区間[0, 1]における16ビットの浮動小数値であるから、より精度が高い。本発明における参照テーブルの目的は、必ずしも双一次補間の結果の連続性を高めることではない。その目的は、結果として得られるテクスチャの見栄えを制御する(ユーザのための)手段を提供することが重要であるため、より総合的なものである。この意味で、参照テーブルは、外部データを用いてこのテーブルを初期化できるような回路に定義されている。初期化とは、誰か(ユーザ)があらゆる事前計算された関数を参照テーブルにロードすることが出来るという意味である。この可能性を提供することにより、開示された発明は柔軟性及び設定変更の可能性を大いに向上させ、テクスチャ・パターンのより豊富な種類が得られるようにする。関数の例としては、定数関数、バイアス関数、利得関数、三角関数及び多項式関数が挙げられるが、これに限定されるものではない。   In the invention disclosed in this document, a reference table is also used. However, since the input of the reference table is a 16-bit floating point value in the interval [0, 1] by definition, the accuracy is higher. The purpose of the lookup table in the present invention is not necessarily to increase the continuity of the result of bilinear interpolation. The objective is more comprehensive because it is important to provide a means (for the user) that controls the appearance of the resulting texture. In this sense, the reference table is defined in a circuit that can initialize the table using external data. Initialization means that someone (user) can load any precomputed function into the lookup table. By providing this possibility, the disclosed invention greatly improves flexibility and the possibility of changing settings, allowing a richer variety of texture patterns to be obtained. Examples of functions include, but are not limited to, constant functions, bias functions, gain functions, trigonometric functions, and polynomial functions.

前述の参照テーブルは入力パラメータUUB及びVVBをUUB’及びVVB’に変換する。これらの値は、次に双一次補間を行うために使用される。UUB’は(r1,r2)及び(r3,r4)を直線的に補間し、結果として2つの値を得て、これらの2つの値がVVB’を用いて補間される。最終結果はランダム値RVである。   The aforementioned reference table converts the input parameters UUB and VVB into UUB 'and VVB'. These values are then used to perform bilinear interpolation. UUB 'linearly interpolates (r1, r2) and (r3, r4), resulting in two values, and these two values are interpolated using VVB'. The final result is a random value RV.

最後のステップは、初期座標(u,v)をランダム値RVで摂動することである。このステップは摂動座標モジュール(1500)によって行われる。本発明の好適な実施例の一つは、単にu及びvに対して、それぞれu及びvの符号に従ってRVを加算するか減算するものである。このような例を定義する回路は、2つのifステートメント論理回路と、2つの否定演算子、及び2つの加算器で構成され、以下の計算を行う:
もし(u>0) ならば u’=u+RV さもなくば
u’=u-RV
もし(v>0) ならば v’=v+RV さもなくば
v’=v-RV
The last step is to perturb the initial coordinates (u, v) with a random value RV. This step is performed by the perturbed coordinate module (1500). One preferred embodiment of the present invention simply adds or subtracts RV from u and v according to the signs of u and v, respectively. The circuit defining such an example consists of two if-statement logic circuits, two negation operators, and two adders, and performs the following calculations:
If (u> 0) u '= u + RV otherwise
u '= u-RV
If (v> 0) v '= v + RV otherwise
v '= v-RV

摂動された座標(u’,v’)は、次にモジュール3000で使用される。
ランダム値の生成を制御するのに好適な例は、一連のスケーリング、トランスレーション、及びクランピング演算を使用するものである。これは、2つの異なる制御、事前制御と事後制御に分解することが出来る。第1の制御は、ランダム値を計算する前に入力座標(u, v)に適用されるが、事後制御は出力値RVに対して適用される。
The perturbed coordinates (u ′, v ′) are then used in module 3000.
A suitable example for controlling the generation of random values is to use a series of scaling, translation, and clamping operations. This can be broken down into two different controls, pre-control and post-control. The first control is applied to the input coordinates (u, v) before calculating the random value, but the post-control is applied to the output value RV.

事前制御のためのスケーリング及びトランスレーション演算は、好適な例において加算器及びマルチプレクサとして実装され、各入力座標u及びvについて、tと総称される値を(t+translation)*scaleとして計算する。ここで、translation及びscaleがどこか別の場所で(一般的にはユーザによって)定義された何らかの値である。一般的に、結果として得られる値はその後従来のクランピング演算を用いてクランプされ、出力値が区間[0, 1]内になるようになる。クランピング演算は、コンピュータ・グラフィックスにおいて周知のクランピング演算であり、開示された発明において新規発明には含まれていない。クランピング演算の例はいくつかあるが、エッジ演算、リピート関数、及びミラー関数が含まれる。   Scaling and translation operations for pre-control are implemented as adders and multiplexers in the preferred example, and for each input coordinate u and v, calculate a value collectively referred to as t as (t + translation) * scale. Here, translation and scale are some value defined elsewhere (typically by the user). In general, the resulting value is then clamped using conventional clamping operations so that the output value is in the interval [0, 1]. The clamping operation is a clamping operation well known in computer graphics, and is not included in the disclosed invention in the disclosed invention. There are several examples of clamping operations, including edge operations, repeat functions, and mirror functions.

事後制御動作は事前制御動作と同様であるが、出力値RVに適用される点が異なる。好適な実施例の一つは、事後演算を、値RV*scaleを計算するマルチプレクサとして実装し、ここで、scaleはどこか別の場所で定義される(一般的にはユーザ定義)別の値とする。同様なクランピング演算が、結果として得られる値にも行われ、結果が確実に区間[0,1]内に収まるようにする。   The post-control operation is similar to the pre-control operation, except that it is applied to the output value RV. One preferred embodiment implements the post-operation as a multiplexer that computes the value RV * scale, where scale is defined elsewhere (typically user-defined) and another value. And A similar clamping operation is performed on the resulting value to ensure that the result is within the interval [0,1].

第2の態様:一次元テクスチャ画像及び設定可能な二次元から一次元へのマッピング関数を用いた二次元テクスチャ画像生成
この書面に開示された発明の第2の態様は、図1に示したモジュール3000に相当する。このモジュールはCoordinates Mapping、略してCMap、と呼ばれる。名前が示しているように、このモジュールの役割は二次元入力座標(u,
v)(雑音モジュールの出力(u’,v’)からの可能性あり)を一次元テクスチャ座標(t)にマッピングすることである。
Second aspect: Generation of two-dimensional texture image using one-dimensional texture image and settable two-dimensional to one-dimensional mapping function The second aspect of the invention disclosed in this document is the module shown in FIG. Equivalent to 3000. This module is called Coordinates Mapping, or CMap for short. As the name suggests, this module is responsible for two-dimensional input coordinates (u,
v) mapping (possibly from noise module output (u ′, v ′)) to one-dimensional texture coordinates (t).

発明の第2の態様は基本的に、
テクスチャ座標(u,v)を得る第1手段と、
前記テクスチャ座標(u,v)を一次元テクスチャ座標(t)に投影する第2手段と、メモリに格納された一次元テクスチャ画像を、前記一次元テクスチャ座標(t)を用いてアクセスして獲得する第3手段と、前記一次元テクスチャ画像を用いて二次元テクスチャ画像を生成する第4手段と、を備えたことを特徴とする、二次元テクスチャ画像を生成するシステムを対象としている。
The second aspect of the invention is basically
A first means of obtaining texture coordinates (u, v);
A second means for projecting the texture coordinates (u, v) to the one-dimensional texture coordinates (t) and a one-dimensional texture image stored in the memory are accessed and obtained using the one-dimensional texture coordinates (t). And a fourth means for generating a two-dimensional texture image using the one-dimensional texture image. The present invention is directed to a system for generating a two-dimensional texture image.

第1手段は、u及びvを得る。第2手段は、テクスチャ座標(u,v)を一次元テクスチャ座標(t)に投影する。第3手段は、一次元テクスチャ座標(t)を用いて一次元テクスチャ画像にアクセスしてこれを獲得する。第4手段は、一次元テクスチャ画像を用いて二次元テクスチャ画像を生成する。   The first means obtains u and v. The second means projects the texture coordinates (u, v) to the one-dimensional texture coordinates (t). The third means accesses and acquires the one-dimensional texture image using the one-dimensional texture coordinate (t). The fourth means generates a two-dimensional texture image using the one-dimensional texture image.

第2の態様の好適な一例は、上記のシステムにおいて、前記第2手段が、2つの関数G1及びG2を複数の固定関数から選択する手段と、あらゆる実関数、以下Fと称する、を表す参照テーブルを定義する手段と、前記関数G1、G2、及びFを結合する手段と、を備えたものを対象としている。   A preferred example of the second aspect is a reference in the above system, wherein the second means represents means for selecting two functions G1 and G2 from a plurality of fixed functions, and any real function, hereinafter referred to as F. It is intended for a device comprising means for defining a table and means for combining the functions G1, G2, and F.

第2の態様の好適な例は、上記のシステムにおいて、前記第2手段が、2つの関数G1及びG2を、{u, v, u+v, u-v, u^2, v^2, sqrt(u2+v2),
u+v+sqrt(u2+v2), u+v-sqrt(u2+v2), min(u,v), max(u,v), constant}に等しい関数G(u,v)から選択する手段であって、“sqrt”は数学関数である平方根であり、x^2はxの二乗(xのx倍)であるものと、あらゆる実関数で以下Fと称するものを表す参照テーブルを定義する手段と、前記関数G1、G2、及びFを結合する手段であって、G1を参照テーブルFのの入力として用い、これによりF(G1(u,v))を算出する手段と、参照テーブルの出力とG2を用いて、参照テーブルの出力とG2との積を算出して、結果として値値F(G1 (u,v))*G2(u.v)を得る手段と、を具備するものと、を備え、前記第3手段が、一次元テクスチャ画像F(G1 (u,v))*G2(u.v)を用いるものを対象としている。
In a preferred example of the second aspect, in the system described above, the second means converts two functions G1 and G2 into {u, v, u + v, uv, u ^ 2, v ^ 2, sqrt ( u2 + v2),
Select from functions G (u, v) equal to u + v + sqrt (u2 + v2), u + v-sqrt (u2 + v2), min (u, v), max (u, v), constant} Means, “sqrt” is a mathematical function square root, x ^ 2 defines a look-up table that represents the square of x (x times x), and any real function, hereinafter referred to as F Means for combining the functions G1, G2, and F, using G1 as an input to the reference table F, thereby calculating F (G1 (u, v)), and a reference table Means for calculating a product of the output of the reference table and G2 using the output of G2 and G2 as a result to obtain a value value F (G1 (u, v)) * G2 (uv), and The third means is intended to use a one-dimensional texture image F (G1 (u, v)) * G2 (uv).

上記手段の好適な例は、合計4つの加算器と、3つのマルチプレクサと、平方根演算子とを使用した非常に小さな回路である。この回路の主な利点は、以下、Mapと称し、二次元点(u,v)を一次元点tに対応付けるマッピング関数を定義することである。このマッピングは、3つの関数の合成であり、一般的に次のように表現することが出来る:
F(G1(u,v))*G2(u,v), (4)
ここで、G1及びG2は一連の固定関数の中から選択され、Fは参照テーブルである。好適な実施例における代表的な一連の固定関数には以下の関数が含まれる。
A suitable example of the above means is a very small circuit using a total of four adders, three multiplexers and a square root operator. The main advantage of this circuit is to define a mapping function, hereinafter referred to as Map, that associates a two-dimensional point (u, v) with a one-dimensional point t. This mapping is a composition of three functions and can generally be expressed as:
F (G1 (u, v)) * G2 (u, v), (4)
Here, G1 and G2 are selected from a series of fixed functions, and F is a reference table. A typical set of fixed functions in the preferred embodiment includes the following functions:

(5)
| G(u,v) = u (5a)
| G(u,v) = v (5b)
| G(u,v) = u^2 (5c)
| G(u,v) = v^2 (5d)
| G(u,v) = u^2+v^2 (5e)
| G(u,v) = sqrt(u^2+v^2) (5f)
| G(u,v) = u+v+sqrt(u^2+v^2) (5g)
| G(u,v) = u+v-sqrt(u^2+v^2) (5h)
| G(u,v) = min(u,v) (5i)
| G(u,v) = max(u,v) (5j)
| G(u,v) = constant (5k)
(Five)
G (u, v) = u (5a)
G (u, v) = v (5b)
G (u, v) = u ^ 2 (5c)
G (u, v) = v ^ 2 (5d)
G (u, v) = u ^ 2 + v ^ 2 (5e)
G (u, v) = sqrt (u ^ 2 + v ^ 2) (5f)
G (u, v) = u + v + sqrt (u ^ 2 + v ^ 2) (5g)
G (u, v) = u + v-sqrt (u ^ 2 + v ^ 2) (5h)
G (u, v) = min (u, v) (5i)
G (u, v) = max (u, v) (5j)
G (u, v) = constant (5k)

この固定関数のセットを実装する回路は、5つの加算器、2つのマルチプレクサ、及び平方根演算子を含んでいる。主な利点は、参照テーブルへの入力の選択肢の多様性、及び結果の多様性である。もちろん、この多様性は完全にプログラマブルな回路(すなわち、フラグメントシェーダ)よりもかなり低いが、いくつかのケースでは十分である。それは、コンピュータ・グラフィックスにおいてコンテクストのテクスチャリングに頻繁に使用される数学関数のいくつかを表現することができるからである。   The circuit that implements this set of fixed functions includes five adders, two multiplexers, and a square root operator. The main advantage is the diversity of choices in the lookup table and the variety of results. Of course, this diversity is much lower than a fully programmable circuit (ie, fragment shader), but in some cases it is sufficient. This is because some of the mathematical functions frequently used for context texturing in computer graphics can be represented.

例えば、式(5e)及び(5f)は距離関数を表現しているが、従って、適切な参照テーブルを用いれば、全ての可能性の或る、ガウス関数及びその他全ての距離を基にした関数を実現することができる。可能性のある一連の関数で距離関数に基づくものは、次の参考資料(C. Blanc 尾及び C. Schlick. 「ソフトオブジェクト用拡張フィールド関数」 Implicit Surfaces'95, Eurographics/ACM SIGGRAPH Workshop, 頁21-32, 1995年)を参照できる。   For example, equations (5e) and (5f) represent distance functions, so with an appropriate lookup table, all possible Gaussian functions and all other distance-based functions Can be realized. A series of possible functions based on the distance function can be found in the following reference materials (C. Blanc tail and C. Schlick. “Extended field functions for soft objects” Implicit Surfaces '95, Eurographics / ACM SIGGRAPH Workshop, page 21 -32, 1995).

式(5h)-(5i)及び(5g)-(5j)は周知の関数min/maxを、様々な連続性のレベルで定義している。集合理論的関数のより詳細な説明には、次の参考資料を用いることが出来る。(A. Pasko, V. Adzhiev, A. Sourin, 及び V.
Savchenko. 「幾何学モデリングにおける関数表記:概念、実装及び応用」The Visual
Computer, 11(8):429-446, 1995年)なお、集合理論的演算のみを使用したいと望む場合には、恒等関数を参照テーブルにロードし、G2は定数1に設定すればよい。別の一般的な関数は、いわゆる正規関数であり、u/sqrt(u^2+v^2)と表現される。この関数は、開示された実施例を用い、sqrt(u^2+v^2)に等しいG1、uに等しいG2、及び事前に抽出された関数1/xが設定された参照テーブルに相当する参照テーブルを選択すれば、求めることが出来る。
Equations (5h)-(5i) and (5g)-(5j) define the well-known function min / max at various levels of continuity. The following reference material can be used for a more detailed explanation of the set theoretical function. (A. Pasko, V. Adzhiev, A. Sourin, and V.
Savchenko. “Functional Notation in Geometric Modeling: Concept, Implementation and Application” The Visual
Computer, 11 (8): 429-446, 1995) If you want to use only set-theoretic operations, load the identity function into the lookup table and set G2 to the constant 1. Another general function is a so-called normal function, which is expressed as u / sqrt (u ^ 2 + v ^ 2). This function corresponds to a lookup table with G1 equal to sqrt (u ^ 2 + v ^ 2), G2 equal to u, and a previously extracted function 1 / x, using the disclosed embodiment This can be obtained by selecting a reference table.

モジュール3000 CMapを実装する回路の好適な実施例は、式(5a)から(5k)で表現された関数の集合である。これは、回路規模と柔軟性の間の良いトレードオフとなる。回路規模が重大な問題でない場合には、他の固定関数を追加することにより柔軟性を向上させることが出来るのは明らかである。また、ハードウェア規模が大きな問題でないならば、いくつかの他の構成により投影関数を拡張することが出来ることも明らかである。例えば、提案された実施例は、F2(F(G1(u,v))*G2(u,v))*G3(u,v)に拡張することができ、ここでF2及びG3の可能性としては、新しい2つの回路であって固定関数の新規の集合或いは新規テーブルを定義するものである。   A preferred embodiment of a circuit that implements module 3000 CMap is a set of functions expressed in equations (5a) to (5k). This is a good tradeoff between circuit scale and flexibility. Obviously, if circuit scale is not a critical issue, the flexibility can be improved by adding other fixed functions. It is also clear that the projection function can be extended with several other configurations if the hardware scale is not a major issue. For example, the proposed embodiment can be extended to F2 (F (G1 (u, v)) * G2 (u, v)) * G3 (u, v), where F2 and G3 possibilities Are two new circuits that define a new set of fixed functions or a new table.

開示された発明の最終ステップは、式(4)で定義された値(t)を用いて、一次元テクスチャ画像におけるインデックスを計算し、結果としてRGBA色を得ることである。インデックス計算の好適な実施例には、コンピュータ・グラフィックス及びテクスチャ関連技術における通常の技術が含まれる。インデックス計算は開示された発明の請求の範囲の一部ではない。   The final step of the disclosed invention is to calculate the index in the one-dimensional texture image using the value (t) defined in equation (4), resulting in RGBA color. Preferred embodiments of index calculation include conventional techniques in computer graphics and texture related techniques. The index calculation is not part of the claimed invention.

この書面に開示された本発明の端的な拡張は、単一の値tの代わりに2つの出力値t_rgb及びt_aを生成することである。これにより、RGB色及びA(アルファ)値をそれぞれ別々にインデックス付けすることができ、自由度を向上させることが出来る。この拡張の好適な例は、二次元クランプドテクスチャ座標(u,v)を一次元テクスチャ座標(t)に投影する手段であって、4つの関数G1_rgb, G2_rgb, G1_a, 及びG2_aを、いくつかの固定関数の中から選択する手段であって、固定関数としては、{u,v,u+v,u-v,u^2,v^2,sqrt(u2+v2),
u+v+sqrt(u2+v2), u+v-sqrt(u2+v2), min(u,v), max(u,v)}に等しいG(u,v)であって、sqrtは数学的関数である平方根、及びx^2はxの二乗(xのx倍)を含むものであるが、これに限定されず、5つの加算器と、2つのマルチプレクサと1つの平方根演算子を備えたものと、2つの参照テーブルであって、以下、F_rgb及びF_aに対応するあらゆる実数を提示するものと、
一方で関数G1_rgb, G2_rgb, 及びF_rgbを結合し、他方でG1_a, G2_a, 及びF_aを結合する手段であって、参照テーブルF_rgbの入力としてG1_rgbを求め、これによりF_rgb (G1_rgb (u,v))を計算する手段と、G2_rgbを求め、参照テーブルの出力とG2_rgbとの積を計算し、結果として値F_rgb(G1_rgb (u,v))* G2_rgb
(u,v)を1つのマルチプレクサを用いて求める手段と、参照テーブルF_aの入力としてG1_aを求め、これによりF_a(G1_a(u,v))を計算する手段と、G2_aを求め、参照テーブルの出力とG2_aとの積を計算し、結果として値F_a(G1_rgb (u,v))* G2_a
(u,v)を1つのマルチプレクサを用いて求める手段と、を備えたものと、で構成される。
A straightforward extension of the invention disclosed in this document is to generate two output values t_rgb and t_a instead of a single value t. Thereby, the RGB color and the A (alpha) value can be separately indexed, and the degree of freedom can be improved. A suitable example of this extension is a means for projecting two-dimensional clamped texture coordinates (u, v) to one-dimensional texture coordinates (t), and includes four functions G1_rgb, G2_rgb, G1_a, and G2_a, The fixed function can be selected from (u, v, u + v, uv, u ^ 2, v ^ 2, sqrt (u2 + v2),
u + v + sqrt (u2 + v2), u + v-sqrt (u2 + v2), min (u, v), max (u, v)} equal to G (u, v), where sqrt is Mathematical functions square root and x ^ 2 include, but are not limited to, the square of x (x times x), with 5 adders, 2 multiplexers and 1 square root operator And two reference tables, which present all real numbers corresponding to F_rgb and F_a, and
On the one hand, G1_rgb, G2_rgb, and F_rgb are combined, and on the other hand, G1_a, G2_a, and F_a are combined. G2_rgb is calculated, the product of the reference table output and G2_rgb is calculated, and the result F_rgb (G1_rgb (u, v)) * G2_rgb
Means for obtaining (u, v) using one multiplexer, G1_a as input of the reference table F_a, thereby calculating F_a (G1_a (u, v)), G2_a Computes the product of the output and G2_a, resulting in the value F_a (G1_rgb (u, v)) * G2_a
and means for obtaining (u, v) using one multiplexer.

この好適な例を使用すれば、ほんの僅かなハードウェアの変更、すなわち、追加の参照テーブル1つ、追加のマルチプレクサ1つ、及び入力関数G1_rgb, G2_rgb, G1_a, 及びG2_aを選択する手段の拡張.によって、RGB及びAに別々の処理を施すことができる   Using this preferred example, only a few hardware changes, i.e. an additional lookup table, an additional multiplexer, and an extension of the means to select the input functions G1_rgb, G2_rgb, G1_a, and G2_a. Allows RGB and A to be processed separately

図3に示す例は、本明細書において開示された発明により結果として得られる画像の一例である。マッピング関数の様々な選択の様子が示されている。入力の幾何学図形は四辺形であり、左下角のテクスチャ座標(u0, v0)が(-1,-1)に等しく、右上角のテクスチャ座標(u1, v1)が(1, 1)に等しく、u座標は画像の中の横軸に沿っている。一次元テクスチャ画像は2色の配列である。第1の色は白であり、第2の色は黒である。この初期設定を用いて3つの画像が生成される。マッピング関数が変わるだけである。マッピング関数の一般形は以下の通りである: Map(u,v)=F(G1(u,v))*G2(u,v)   The example shown in FIG. 3 is an example of an image resulting from the invention disclosed herein. Various selections of the mapping function are shown. The input geometric figure is a quadrangle, the texture coordinates (u0, v0) in the lower left corner are equal to (-1, -1), and the texture coordinates (u1, v1) in the upper right corner are equal to (1, 1) , U coordinates are along the horizontal axis in the image. A one-dimensional texture image is an array of two colors. The first color is white and the second color is black. Three images are generated using this initial setting. Only the mapping function changes. The general form of the mapping function is: Map (u, v) = F (G1 (u, v)) * G2 (u, v)

第1の画像では、固定関数G1をG1(u,v) = uと定義し、第2の固定関数G2をG2(u,v)=1と定義し、関数F(参照テーブル)をF(x) = x (恒等関数)と定義している。従って、最終的な関数は、Map(u,v)=uである。テクスチャ画像が黒と白の2色しか含まないことを思い出せば、予測可能な結果は灰色のグラディエントである。uが0に等しければ、結果として得られる色は白であり、uが1に等しければ、結果は黒であり、その中間では、中間色は灰色である。   In the first image, the fixed function G1 is defined as G1 (u, v) = u, the second fixed function G2 is defined as G2 (u, v) = 1, and the function F (reference table) is defined as F ( x) = x (identity function). Therefore, the final function is Map (u, v) = u. Recall that the texture image contains only two colors, black and white, and the predictable result is a gray gradient. If u is equal to 0, the resulting color is white; if u is equal to 1, the result is black, and in the middle, the intermediate color is gray.

第2の画像では、固定関数G1をG1(u,v)=u^2+v^2と定義し、第2の固定関数G2をG2(u,v)=u^2と定義し、関数F(参照テーブル)をF(x)=1/x (逆関数)と定義している。結果は、関数u^2/(u^2/v^2)に対応した灰色のグラディエントである。   In the second image, the fixed function G1 is defined as G1 (u, v) = u ^ 2 + v ^ 2, the second fixed function G2 is defined as G2 (u, v) = u ^ 2, and the function F (reference table) is defined as F (x) = 1 / x (inverse function). The result is a gray gradient corresponding to the function u ^ 2 / (u ^ 2 / v ^ 2).

最後の画像では、固定関数G1をG1(u,v)=sqrt(u^2+v^2)と定義し、第2の固定関数G2をG2(u,v)=1と定義し、関数F(参照テーブル)をポテンシャル関数と定義している。関数G1が四辺形の中心までの距離であることに注目すれば、距離がゼロに等しいとき、ポテンシャルは1に等しくなり、中心までの距離が増加するにつれてゼロまで低下することから、結果として放射状の灰色のグラディエントが得られる。   In the last image, the fixed function G1 is defined as G1 (u, v) = sqrt (u ^ 2 + v ^ 2), the second fixed function G2 is defined as G2 (u, v) = 1, and the function F (reference table) is defined as the potential function. Note that the function G1 is the distance to the center of the quadrilateral, when the distance is equal to zero, the potential is equal to 1 and decreases to zero as the distance to the center increases, resulting in a radial A gray gradient is obtained.

図4に示す例は、開示された発明により結果として得られる画像の一例である。1つのマッピング関数が選択され、様々なランダム摂動が与えられている。入力の幾何学図形は四辺形であり、左下角のテクスチャ座標(u0, v0)が(-1,-1)に等しく、右上角のテクスチャ座標(u1, v1)が(1, 1)に等しく、u座標は画像の中の横軸に沿っている。一次元テクスチャ画像は2色の配列である。第1の色は白であり、第2の色は黒である。3つの画像を生成するため、同じマッピング関数が使用され、それは次の通りである:Map(u,v)=u
第1の画像では、摂動が与えられていない。結果が図3における第1の画像と同様であることが分かる。第2及び第3の画像では、摂動が与えられているが、異なる倍率が事前制御及び事後制御演算に設定されている。
The example shown in FIG. 4 is an example of an image resulting from the disclosed invention. One mapping function is selected and given various random perturbations. The input geometric figure is a quadrangle, the texture coordinates (u0, v0) in the lower left corner are equal to (-1, -1), and the texture coordinates (u1, v1) in the upper right corner are equal to (1, 1) , U coordinates are along the horizontal axis in the image. A one-dimensional texture image is an array of two colors. The first color is white and the second color is black. The same mapping function is used to generate the three images, which is as follows: Map (u, v) = u
In the first image, no perturbation is given. It can be seen that the result is similar to the first image in FIG. In the second and third images, perturbation is given, but different magnifications are set for the pre-control and post-control calculations.

本発明の回路は、三次元コンピュータ・グラフィック・チップに適用できる。   The circuit of the present invention can be applied to a three-dimensional computer graphic chip.

図1は、開示された発明を2つのモジュールに分解した様子を示している。二次元入力テクスチャ座標(u,v)が与えられると、モジュール1000 (Perturbater)が(u,v)を変換し、結果として(u’,v’)を得て、これらが次にモジュール3000 CMapの入力として使用され、二次元座標から一次元座標tにマッピングされる。その後、この一次元座標がモジュール5000の一次元テクスチャ参照テーブルのインデックスとして使用される。FIG. 1 shows the disclosed invention broken down into two modules. Given a two-dimensional input texture coordinate (u, v), module 1000 (Perturbater) transforms (u, v), resulting in (u ', v'), which in turn is module 3000 CMap And is mapped from two-dimensional coordinates to one-dimensional coordinates t. This one-dimensional coordinate is then used as an index in the one-dimensional texture reference table of module 5000. 図2は、モジュール1000 Perturbaterをサブモジュールに分解した様子を示している。2つの同一モジュールrandom1D、1つのrandom2Dモジュール、1つのrandomCombiner、及び最後に1つのperturbCoordinatesモジュールに分解される。FIG. 2 shows a state where the module 1000 Perturbater is disassembled into submodules. It is broken down into two identical modules random1D, one random2D module, one randomCombiner, and finally one perturbCoordinates module. 図3は、開示された発明の結果として得られる画像の一例を示している。マッピング関数の様々な選択肢を説明している。FIG. 3 shows an example of an image obtained as a result of the disclosed invention. Explains the various choices of mapping functions. 図4は、開示された発明の結果として得られる画像の一例を示している。1つのマッピング関数が選択され、様々な摂動が与えられている。FIG. 4 shows an example of an image obtained as a result of the disclosed invention. One mapping function is selected and given various perturbations.

Claims (5)

コンピュータ・システムにおいて二次元テクスチャ座標を算出するシステムであって、
二次元テクスチャ座標(u,v)を求める第1手段と、
前記座標u及びvを用いて2つのランダム値の一次元区間を2個生成する第2手段と、
前記ランダム値の一次元区間2個を結合して、4つのランダム値の二次元区間を1個生成する第3手段と、
前記テクスチャ座標(u,v)及び前記4つのランダム値の二次元区間に応じて、ランダム値を生成する第4手段と、
前記ランダム値と前記入力されたテクスチャ座標(u,v)を結合して、変換された前記二次元テクスチャ座標(u’,v’)を得る第5手段と、
を備えたシステム。
A system for calculating two-dimensional texture coordinates in a computer system,
A first means for obtaining two-dimensional texture coordinates (u, v);
A second means for generating two one-dimensional sections of two random values using the coordinates u and v;
A third means for combining two one-dimensional sections of the random value to generate one two-dimensional section of four random values;
A fourth means for generating a random value in accordance with the texture coordinates (u, v) and a two-dimensional section of the four random values;
A fifth means for combining the random value and the input texture coordinates (u, v) to obtain the transformed two-dimensional texture coordinates (u ′, v ′);
With system.
請求項1において、
前記第2手段が、u又はv座標のいずれかを入力して2つのランダム値(u0,u1)及び(v0,v1)の前記一次元区間を得る、分離しているが同様な乱数発生器2個を具備しており、
前記第3手段が、前記ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して二次元区間[(u0,v0),(u1,v1)]を得るシステム。
In claim 1,
The second means obtains the one-dimensional interval of two random values (u0, u1) and (v0, v1) by inputting either u or v coordinates, but is a separate but similar random number generator It has two,
A system in which the third means combines two one-dimensional sections of the random values (u0, u1) and (v0, v1) to obtain a two-dimensional section [(u0, v0), (u1, v1)].
請求項1において、
前記第2手段が、
u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る手段であって、分離しているが同様な乱数発生器2個を備えており、ここで各乱数発生器は、
2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、
前記値TBをランダム値TTに投影する手段と、
2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、
ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2を生成するものと、
を具備し、
前記第3手段が、
ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、
一定の整数値であって以下“magic_mask”と称するものを用いる手段と、
2つの新規の数値であって以下“maskA”及び“maskB”と称するものを、前記2つのランダム値u0及びu1を用いて算出する手段と、
ランダム値を算出する手段であって、4組の入力{u0,v0,maskA},{u0,v1,maskA},{u1,v0,maskB},及び{u1,v1,maskB}を用いる結果としてランダム値R1,R2,R3,及びR4を得るものと、
を具備するもの
を備え、
前記第5手段が、
UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、
加重ランダム値を算出する手段であって、4組の入力{R1,UUB,VVB},{R2,UUB-1.0,VVB},{R3,UUB,VVB-1.0},及び{R4,UUB-1.0,VVB-1.0}を用いる結果として4つの加重値r1,r2,r3及びr4を得るものと、
ランダム値RVを、r1,r2,r3,r4,UUB,及びVVBを入力として用いて算出する手段で、双一次補間モジュールを具備するものであって、r1,r2,r3及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものと、
を備え、
前記システムが、
前記ランダム値の生成を制御する手段であって、
前記入力座標(u,v)を変更する手段と、
前記出力値RVを変更する手段と、
を具備するもの
をさらに備え、
前記第5手段が、前記RVと前記入力座標(u,v)とを結合して前記出力(u’,v’)を得る手段である、
システム。
In claim 1,
The second means is
A means for obtaining a one-dimensional section of two random values (u0, u1) and (v0, v1) by inputting either u or v coordinates (hereinafter also referred to as “t”), It has two separate but similar random number generators, where each random number generator
Means for calculating two numerical values TA and TB from the input value “t”, wherein TB is a floating-point value less than 1 and TA + TB equals 1;
Means for projecting the value TB to a random value TT;
A means for calculating two numerical values TTA and TTB from the value TT, where TTB is a floating-point value less than 1 and TTA + TTB is equal to 1,
Means for generating random values, which generate two random values T1 and T2 as a result of using the set of parameters {TA, TTA} and {TA, TTA + 1};
Comprising
The third means is
A means for obtaining two-dimensional sections [(u0, v0), (u1, v1)] by combining two one-dimensional sections of random values (u0, u1) and (v0, v1),
Means using a constant integer value, hereinafter referred to as “magic_mask”;
Means for calculating two new numerical values, hereinafter referred to as “maskA” and “maskB”, using the two random values u0 and u1;
As a result of using four sets of inputs {u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, and {u1, v1, maskB} as means for calculating random values Obtaining random values R1, R2, R3, and R4;
Equipped with
The fifth means is
A means for obtaining UUB and VVB from the random number generator, wherein the pre-specified value TTB is equal to UUB when the coordinate u is used as an input to the random number generator, and similarly, the random number If the generator is used with the coordinates v as input, it is equal to VVB;
A means for calculating a weighted random value, comprising four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0}, and {R4, UUB-1.0 , VVB-1.0} to obtain four weights r1, r2, r3 and r4 as a result,
A means for calculating a random value RV using r1, r2, r3, r4, UUB, and VVB as inputs, comprising a bilinear interpolation module, with r1, r2, r3, and r4 interpolated Value, UUB and VVB are interpolation parameters,
With
The system is
Means for controlling the generation of the random value,
Means for changing the input coordinates (u, v);
Means for changing the output value RV;
Further comprising
The fifth means is means for combining the RV and the input coordinates (u, v) to obtain the output (u ′, v ′).
system.
請求項1において、
前記システムが、
前記ランダム値の生成を制御する手段であって、
前記入力座標(u,v)を変更する手段であって、各入力u及びvについて、スケーリング、トランスレーション、及びクランピング演算を行い、スケーリング及びトランスレーション係数及びクランピング動作タイプを得る手段を具備するものと、
前記出力値RVを変更する手段であって、スケーリング及びトランスレーション演算を行い、スケーリング係数及びクランピング動作タイプを得る手段を具備するものと、
を具備するもの
をさらに備え、
前記第2手段が、
u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る手段であって、分離しているが同様な乱数発生器2個を備えており、ここで各乱数発生器は、
2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、
前記値TBをランダム値TTに投影する手段であって、
以下magic_shift1と称する一定値を得る手段と、
TBを前記区間[0,magic_shift1]内に投影する結果としてTTを得る手段と、
を具備するものと、
2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、
ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2をそれぞれ生成するものであって、
以下“magic_mask”,“magic_shift1”,及び“magic_shift2”と称する一定値を定義して使用する手段と、
以下“maskT”と称する擬似ランダム値を、D値(TA又はTA+1のいずれかに対応した値)を用いて算出する手段と、
TA又はTA+1のいずれかを用い、且つ値TTA及び事前に算出した値“maskT”を用いて乱数Rを算出する手段と、
を具備するものと、
を備え、
前記第3手段が、
ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、
以下“magic_mask”と称する定数を得る手段と、
2つの新規の数値であって以下“maskA”及び“maskB”と称するものを、前記2つのランダム値u0及びu1を用いて算出する手段と、
独立して4回使用されるランダム値を算出する手段であって、4組の入力{u0,v0,maskA},{u0,v1,maskA},{u1,v0,maskB},及び{u1,v1,maskB}を用いる結果としてランダム値R1,R2,R3,及びR4を得るものと、
を具備するもの
を備え、
前記第5手段が、
UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された数値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、
独立して4回使用される重ランダム値を算出する手段であって、4組の入力{R1,UUB,VVB},{R2,UUB-1.0,VVB},{R3,UUB,VVB-1.0}及び{R4,UUB-1.0,VVB-1.0}を用いる結果として4つの加重値r1,r2,r3,及びr4を得るものと、
ランダム値RVを、r1,r2,r3,r4,UUB,及びVVBを入力として用い、また双一次補間モジュールを用いて算出する手段であって、r1,r2,r3及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものと、
UUB及びVVBを変更して双一次補間動作を制御する手段と、
前記ランダム値RVと前記入力座標(u,v)とを結合して出力(u’,v’)を得る手段と、
を備えたシステム。
In claim 1,
The system is
Means for controlling the generation of the random value,
Means for changing the input coordinates (u, v), comprising means for performing scaling, translation and clamping operations for each input u and v to obtain scaling and translation coefficients and clamping operation types; What to do,
Means for changing the output value RV, comprising means for performing scaling and translation operations to obtain a scaling factor and a clamping operation type;
Further comprising
The second means is
A means for obtaining a one-dimensional section of two random values (u0, u1) and (v0, v1) by inputting either u or v coordinates (hereinafter also referred to as “t”), It has two separate but similar random number generators, where each random number generator
Means for calculating two numerical values TA and TB from the input value “t”, wherein TB is a floating-point value less than 1 and TA + TB equals 1;
Means for projecting the value TB to a random value TT,
Means for obtaining a constant value, hereinafter referred to as magic_shift1,
Means for obtaining TT as a result of projecting TB into the interval [0, magic_shift1];
Comprising:
A means for calculating two numerical values TTA and TTB from the value TT, where TTB is a floating-point value less than 1 and TTA + TTB is equal to 1,
Means for generating random values, each of which generates two random values T1 and T2 as a result of using the set of parameters {TA, TTA} and {TA, TTA + 1}, respectively;
Means to define and use constant values called “magic_mask”, “magic_shift1” and “magic_shift2”,
Means for calculating a pseudo-random value, hereinafter referred to as “maskT”, using a D value (a value corresponding to either TA or TA + 1);
Means for calculating a random number R using either TA or TA + 1, and using the value TTA and the previously calculated value “maskT”;
Comprising:
With
The third means is
A means for obtaining two-dimensional sections [(u0, v0), (u1, v1)] by combining two one-dimensional sections of random values (u0, u1) and (v0, v1),
Means to obtain a constant called “magic_mask”,
Means for calculating two new numerical values, hereinafter referred to as “maskA” and “maskB”, using the two random values u0 and u1;
Means for calculating random values used independently four times, comprising four sets of inputs {u0, v0, maskA}, {u0, v1, maskA}, {u1, v0, maskB}, and {u1, as a result of using v1, maskB} to obtain random values R1, R2, R3, and R4;
Equipped with
The fifth means is
A means for obtaining UUB and VVB from the random number generator, wherein the pre-specified numerical value TTB is equal to UUB when the coordinate u is used as an input to the random number generator, and similarly, the random number If the generator is used with the coordinates v as input, it is equal to VVB;
A means to calculate a heavy random value that is used four times independently, with four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0} And four weights r1, r2, r3, and r4 as a result of using {R4, UUB-1.0, VVB-1.0}, and
A means for calculating a random value RV using r1, r2, r3, r4, UUB, and VVB as inputs, and using a bilinear interpolation module, where r1, r2, r3, and r4 are interpolated values. Yes, UUB and VVB are interpolation parameters,
Means for controlling the bilinear interpolation operation by changing UUB and VVB;
Means for combining the random value RV and the input coordinates (u, v) to obtain an output (u ′, v ′);
With system.
請求項1において、
前記第2手段が、
u又はv座標のいずれか(以下、“t”と称することもある。)を入力して2つのランダム値(u0,u1)及び(v0,v1)の一次元区間を得る、分離しているが同様な乱数発生器2個を用いて2つのランダム値の一次元区間を2個生成する手段であり、ここで各乱数発生器は、
2つの数値TA及びTBを前記入力値“t”から算出する手段であって、TBが1未満の浮動小数値でありTA+TBが1に等しいものと、
前記値TBをランダム値TTに投影する手段であって、
以下“magic_shift1”と称する一定値を得る手段と、
TBを前記区間[0,magic_shift1]内に投影する結果としてTTを得る手段であって、単一のマルチプレクサを具備してTT=TB*magic_shift1を計算するものと、
を具備するものと、
2つの数値TTA及びTTBを前記値TTから算出する手段であって、TTBが1未満の浮動小数値でありTTA+TTBが1に等しいものと、
ランダム値を生成する手段であって、前記パラメータの集合{TA,TTA}及び{TA,TTA+1}を用いる結果として2つのランダム値T1及びT2をそれぞれ生成するものであって、
以下“magic_shift1”,“magic_mask”,及び“magic_shift2”と称する一定値を得る手段と、
以下の値、すなわち以下“maskT”と称する擬似ランダム値を、TTA又はTTA+1のいずれかを入力として用いて算出する手段であり、“ifステートメント論理回路”、マルチプレクサ、及び論理右ビットシフト演算子(>>)を具備し、
もし、Dと表示され且つTTA又はTTA+1のいずれかに等しい前記入力値が、厳密に“magic_shift1”より低ければ、以下の値を算出し、
maskT=magic_mask>>(TA*magic_shift2)
さもなくば、以下の値を算出するものと、
maskT=magic_mask>>((TA+1)*magic_shift2);
Dと表示され且つTA又はTA+1のいずれかに等しい入力値及び“maskT”を入力として用いて乱数Rを算出する手段であって、“ifステートメント論理回路”、マルチプレクサ、及びビット論理演算子“XOR”(^で表す)を具備し、
もし、Dが“magic_shift1”より低ければ、以下の値を算出し、
R=((1+TTA)*magic_shift2)^maskT
さもなくば、次の値を算出するものと、
R=((1)*magic_shift2)^maskT
を具備するものと、
を備え、
前記第3手段が、
ランダム値(u0,u1)及び(v0,v1)の一次元区間2個を結合して、二次元区間[(u0,v0),(u1,v1)]を得る手段であって、
“magic_mask”を得る手段と、
以下“maskA”及び“maskB”と称する以下の2つの値を、前記2つのランダム値u0及びu1を用いて算出する手段であって、各maskの算出は、単一の論理右ビットシフト演算子を具備し、入力値“t”について次の計算をするものと、
mask=(magic_mask>>t)
ここで、“t”はu0又はu1のいずれかに等しく結果として得られる値“mask“t”は、それぞれ“maskA”又は“maskB”のいずれかに等しくなるものとし、
ランダム値を算出する手段であって、4組の入力{u0,v0,maskA},
{u0,v1,maskA},{u1,v0,maskB},及び{u1,v1,maskB}を用いる結果としてランダム値R1,R2,R3,及びR4を得るものであって、加算器及びビット論理XOR(^)演算子を具備し、各入力{s,t,mask}について次の値を算出するものと、
R=(s+t)^mask
を備え、
前記第5手段が、
UUB及びVVBを前記乱数発生器から得る手段であって、事前に指定された数値TTBは、前記座標uが前記乱数発生器の入力として用いられた場合はUUBに等しく、また同様に、前記乱数発生器が前記座標vを入力として用いられた場合はVVBに等しいものと、
独立して4回使用される加重ランダム値を算出する手段であって、4組の入力{R1,UUB,VVB},{R2,UUB-1.0,VVB},{R3,UUB,VVB-1.0},及び{R4,UUB-1.0,VVB-1.0}を用いる結果として4つの加重値r1,r2,r3,及びr4を得るものであり、各モジュールが加算器及びマルチプレクサを具備し、各入力{R,a,b}について次の値を算出するものと、
r=R*(a+b)
ランダム値RVを、r1,r2,r3,r4,
UUB,及びVVBを入力として用い、また双一次補間モジュールを用いて算出する手段であって、r1,r2,r3,及びr4が補間された値であり、UUB及びVVBが補間用パラメータであるものであって、
UUB及びVVBを変更して双一次補間動作を制御する手段であって、
前記区間[0,1]におけるUUB及びVVBが定義されているときUUB及びVVBをUUB’及びVVB’にマッピングする参照テーブルと、
双一次補間動作用のパラメータとしてUUB’及びVVB’を用いて双一次補間を算出する手段と、
を具備したものと、
を備え、
前記システムが、
前記ランダム値の生成を制御する手段であって、
前記入力座標(u,v)を変更するために、各入力u及びvについて、スケーリング、トランスレーション、及びクランピング演算を行い、加算器、マルチプレクサ、及びクランピング回路で構成されたものと、スケーリング及びトランスレーション係数及びクランピング動作タイプを得る手段と、を具備するものと
前記出力値RVを変更する手段であって、スケーリング演算を行い、マルチプレクサで構成されたものと、スケーリング係数及びクランピング動作タイプを得る手段と、を具備するものと、
をさらに備え、
前記第5手段が、前記RVと前記入力座標(u,v)とを結合して出力(u’,v’)を得る手段であり、
2つの加算器及び2つの“ifステートメント論理回路”を具備し、独立してu’及びv’座標を以下のように求める:
もし(u>0)ならばu’=u+RVさもなくば
u’=u-RV
もし(v>0)ならばv’=v+RVさもなくば
v’=v-RV
システム。
In claim 1,
The second means is
Inputs either u or v coordinates (hereinafter sometimes referred to as “t”) to obtain two random values (u0, u1) and (v0, v1) as one-dimensional sections. Is a means for generating two one-dimensional sections of two random values using two similar random number generators, where each random number generator is
Means for calculating two numerical values TA and TB from the input value “t”, wherein TB is a floating-point value less than 1 and TA + TB equals 1;
Means for projecting the value TB to a random value TT,
Means for obtaining a constant value, hereinafter referred to as “magic_shift1”;
Means for obtaining TT as a result of projecting TB into the interval [0, magic_shift1], comprising a single multiplexer and calculating TT = TB * magic_shift1;
Comprising:
A means for calculating two numerical values TTA and TTB from the value TT, where TTB is a floating-point value less than 1 and TTA + TTB is equal to 1,
Means for generating random values, each of which generates two random values T1 and T2 as a result of using the set of parameters {TA, TTA} and {TA, TTA + 1}, respectively;
Means for obtaining constant values hereinafter referred to as “magic_shift1”, “magic_mask” and “magic_shift2”;
A means for calculating the following value, that is, a pseudo-random value, hereinafter referred to as “maskT”, using either TTA or TTA + 1 as an input, “if statement logic circuit”, multiplexer, and logical right bit shift operation Child (>>)
If the input value displayed as D and equal to either TTA or TTA + 1 is strictly lower than “magic_shift1”, calculate the following value:
maskT = magic_mask >> (TA * magic_shift2)
Otherwise, calculate the following values,
maskT = magic_mask >> ((TA + 1) * magic_shift2);
Means for calculating a random number R using as input an input value equal to either TA or TA + 1 and “maskT” as input, comprising an “if statement logic circuit”, a multiplexer, and a bit logic operator “XOR” (represented by ^)
If D is lower than “magic_shift1”, calculate the following value,
R = ((1 + TTA) * magic_shift2) ^ maskT
Otherwise, calculate the next value,
R = ((1) * magic_shift2) ^ maskT
Comprising:
With
The third means is
A means for obtaining two-dimensional sections [(u0, v0), (u1, v1)] by combining two one-dimensional sections of random values (u0, u1) and (v0, v1),
Means to get “magic_mask”,
Means for calculating the following two values, hereinafter referred to as “maskA” and “maskB”, using the two random values u0 and u1, each mask being calculated using a single logical right bit shift operator With the following calculation for the input value “t”:
mask = (magic_mask >> t)
Where “t” is equal to either u0 or u1 and the resulting value “mask“ t ”is equal to either“ maskA ”or“ maskB ”, respectively,
Means for calculating a random value, comprising four sets of inputs {u0, v0, maskA},
Random values R1, R2, R3, and R4 are obtained as a result of using {u0, v1, maskA}, {u1, v0, maskB}, and {u1, v1, maskB}, and an adder and bit logic Comprises the XOR (^) operator, calculates the following values for each input {s, t, mask};
R = (s + t) ^ mask
With
The fifth means is
A means for obtaining UUB and VVB from the random number generator, wherein the pre-specified numerical value TTB is equal to UUB when the coordinate u is used as an input to the random number generator, and similarly, the random number If the generator is used with the coordinates v as input, it is equal to VVB;
A means of calculating a weighted random value that is used four times independently, comprising four sets of inputs {R1, UUB, VVB}, {R2, UUB-1.0, VVB}, {R3, UUB, VVB-1.0} , And {R4, UUB-1.0, VVB-1.0} resulting in four weights r1, r2, r3, and r4, each module having an adder and multiplexer, and each input {R , a, b} to calculate the following values,
r = R * (a + b)
Random value RV, r1, r2, r3, r4,
Means to calculate using UUB and VVB as input and bilinear interpolation module, where r1, r2, r3, and r4 are interpolated values, and UUB and VVB are interpolation parameters Because
A means for controlling the bilinear interpolation operation by changing UUB and VVB,
A reference table that maps UUB and VVB to UUB ′ and VVB ′ when UUB and VVB are defined in section [0, 1];
Means for calculating bilinear interpolation using UUB 'and VVB' as parameters for bilinear interpolation operation;
Equipped with,
With
The system is
Means for controlling the generation of the random value,
In order to change the input coordinates (u, v), each input u and v is subjected to scaling, translation, and clamping operations, and is composed of an adder, a multiplexer, and a clamping circuit, and scaling. And means for obtaining a translation coefficient and a clamping operation type, and means for changing the output value RV, which performs a scaling operation and is configured by a multiplexer, and a scaling coefficient and a clamping operation A means for obtaining a type;
Further comprising
The fifth means is means for combining the RV and the input coordinates (u, v) to obtain an output (u ′, v ′);
With two adders and two “if statement logic”, independently determine the u ′ and v ′ coordinates as follows:
If (u> 0) then u '= u + RV otherwise
u '= u-RV
If (v> 0) then v '= v + RV otherwise
v '= v-RV
system.
JP2006209322A 2006-08-01 2006-08-01 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 Active JP4767123B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006209322A JP4767123B2 (en) 2006-08-01 2006-08-01 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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006209322A JP4767123B2 (en) 2006-08-01 2006-08-01 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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2011109500A Division JP5103543B2 (en) 2011-05-16 2011-05-16 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

Publications (2)

Publication Number Publication Date
JP2008033848A JP2008033848A (en) 2008-02-14
JP4767123B2 true JP4767123B2 (en) 2011-09-07

Family

ID=39123155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006209322A Active JP4767123B2 (en) 2006-08-01 2006-08-01 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

Country Status (1)

Country Link
JP (1) JP4767123B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2270243B (en) * 1992-08-26 1996-02-28 Namco Ltd Image synthesizing system
US6664962B1 (en) * 2000-08-23 2003-12-16 Nintendo Co., Ltd. Shadow mapping in a low cost graphics system
JP4447417B2 (en) * 2004-09-22 2010-04-07 元気株式会社 GAME DEVICE, PROGRAM, AND COMPUTER CONTROL METHOD

Also Published As

Publication number Publication date
JP2008033848A (en) 2008-02-14

Similar Documents

Publication Publication Date Title
US6181352B1 (en) Graphics pipeline selectively providing multiple pixels or multiple textures
US6747660B1 (en) Method and system for accelerating noise
US6333744B1 (en) Graphics pipeline including combiner stages
US6664963B1 (en) System, method and computer program product for programmable shading using pixel shaders
US8289323B2 (en) Drawing processing apparatus, texture processing apparatus, and tessellation method
JP5006412B2 (en) Efficient 2D and 3D graphics processing
US6650327B1 (en) Display system having floating point rasterization and floating point framebuffering
US7477252B2 (en) Processing three dimensional data for spatial three dimensional displays
WO1994004990A1 (en) Image synthesizer
US5935198A (en) Multiplier with selectable booth encoders for performing 3D graphics interpolations with two multiplies in a single pass through the multiplier
Hart Perlin noise pixel shaders
US6437781B1 (en) Computer graphics system having per pixel fog blending
JP7096661B2 (en) Methods, equipment, computer programs and recording media to determine the LOD for texturing a cubemap
US7071937B1 (en) Dirt map method and apparatus for graphic display system
US20080284780A1 (en) Method for enabling alpha-to-coverage transformation
US5740344A (en) Texture filter apparatus for computer graphics system
JP5475848B2 (en) 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
JP5103543B2 (en) 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
JP4767123B2 (en) 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
US6373494B1 (en) Signal processing apparatus and image processing apparatus
JPH06266852A (en) Picture synthesizing device
US7336275B2 (en) Pseudo random number generator and method
US6329999B1 (en) Encoder, method thereof and graphic processing apparatus
CA2872653A1 (en) Image-generating system using beta distribution to provide accurate shadow mapping
US8111261B1 (en) Method and apparatus for noise

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090305

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110328

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110516

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4767123

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140624

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140624

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250