JPH02307172A - Shading circuit - Google Patents

Shading circuit

Info

Publication number
JPH02307172A
JPH02307172A JP12907889A JP12907889A JPH02307172A JP H02307172 A JPH02307172 A JP H02307172A JP 12907889 A JP12907889 A JP 12907889A JP 12907889 A JP12907889 A JP 12907889A JP H02307172 A JPH02307172 A JP H02307172A
Authority
JP
Japan
Prior art keywords
data
dda
luminance
points
register
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.)
Pending
Application number
JP12907889A
Other languages
Japanese (ja)
Inventor
Tsuneo Ikedo
恒雄 池戸
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP12907889A priority Critical patent/JPH02307172A/en
Publication of JPH02307172A publication Critical patent/JPH02307172A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To carry out the 3-dimensional picture display at a high speed and to obtain a man-machine system having the excellent response properties by carrying out simultaneously the display of a vector, a shading operation, and a hidden surface erasing operation respectively in terms of a vector arithmetic. CONSTITUTION:A shading circuit consists of a division value register 5, an adder 6, a register 7, a division value register 8, an adder 9, a register 10, a division value register 11, an adder 12, a register 13, a counter 14, a multiplexer 15, and a RAM 16. Then the luminance or color data is set as each attribute of a 3-dimensional vector. The luminance is distributed in the direction of the 3-dimensional vector in order to secure adaptation regardless of the line pictures or screens. In addition, the luminance data can be obtained in parallel with erasion of a hidden surface carried out by a depth buffer. As a result, a 3-dimensional picture is displayed at a high speed and at the same time the response speed is improved.

Description

【発明の詳細な説明】[Detailed description of the invention]

[産業上の利用分野] 本発明の技術は、3次元コンピュータ・グラフィックス
表示装置に応用される、シェーディング(陰影)効果を
得るための回路である。
[Industrial Application Field] The technique of the present invention is a circuit for obtaining a shading effect, which is applied to a three-dimensional computer graphics display device.

【従来技術との比較】[Comparison with conventional technology]

シェーディングは、従来その大半がソフトウェア手法に
よって実現されており、ハードウェアは殆ど見られない
、またハードウェアであっても。 スキャン(走査)方向に対する塗り潰しを兼ねた始点お
よび終点間の輝度補間である0本発明は、3次元ベクト
ルのそれぞれの属性として輝度あるいはカラーデータを
設定し、3次元ベクトルの方向に付随して、輝度を分布
するものである。よって、線画1画面を問わず適応でき
、またデプス・バッファによる隠面消去と並行して輝度
データを求めることができる。 [産業上の利用効果] 本発明による方式は、ベクトル演算に関して。 ベクトル表示、シェーディングおよび隠面消去のそれぞ
れが同時に実行できるため、高速な3次元画像表示が実
施でき、応答性の優れたマンマシン・システムの構築に
有効である。 [実施例〕 第1図は、従来からベクトル発生器の原理図を示したも
ので、x、yあるいはZ軸のうちの1軸のみを示してい
る。 第1図において、回路lはX、Yおよび2座標値のうち
2点間の長さが最も長い軸で他の2つの長さを除算した
。小数点以下の値がロードされたレジスタで、2は加算
器、3はレジスタとなっている。ベクトル発生器は最長
軸の長さに等しいクロック回数だけ、回路3に小数点値
を加算累積し。 加算器Zがキャリィ信号を出力する時点で、始点座標値
の初期ロードさ九たカウンタ4を歩進する。 この結果、カウンタ4の出力は求める2点間の補間座禅
値を逐次示すことになる。 本発明では、シェーディングを行なうにあたり。 幾何学情報とその属性のデータ構造は、第2図に示す3
次元座標値とその輝度属性で構成されているものとする
。すなわち、この回路に与えられるコマンドは、3次元
X、Yおよびzmw値と、その点における輝度属性であ
る。この輝度属性は。 単色あるいは赤、緑、青の値が、例えば8ビツト毎に1
ワード内に割り当てられているカラー・データあるいは
HLSカラーモデルの各要素であってもよい、H5Vや
HLSカラー・モデルでは、V(value)あるいは
L(light)が輝度の対象データとして取り扱われ
る。 第3図は、本発明に関わるシェーディング回路を示す、
第3図において、5,7.8,10.11および13は
レジスタ、6.9および12は加算器、14はカウンタ
、15はマルチプレクサ、16は記憶素子RAMのそれ
ぞれである。 第3図の動作を解説するにあたり、第21i1に示すデ
ータと第3図との関係を説明する1本発明のシェーディ
ングは、2点とその点での輝度データが与えられると、
その間を連続した座標点列と輝度とで直線補間するもの
で、一般に、インテンシテイ・インターボレイシ厘ン・
シェーディング(Intensity  1ntsrp
olati −on  shading)と呼ばれるも
のである。 a次元データノ始点(X @ Y @ Z @ L *
 )と終点(x tY a Z IL z )が第2図
のデータ形式で与えられると。 1式に示す計算が実行される。 ΔX電X* −Xt ΔγはY* −Yz     (1)式%式% 次に2式に示すようにΔX、ΔYおよびΔ2のうち、そ
の絶対値の最も大きなデータ3M各軸が除算される。 ASX=l八XI/へM Δ5Z=lΔZl/ΔM ΔM≧O この除算値ΔSx、ΔSYおよびΔSXはそれぞれ1に
等しいか、小数点以下の値であり、第3図のレジスタ1
1にロードされる。すなわち9回jlF11〜14は3
組存在するが、第3図には1軸のみを示している。但し
、マルチプレクサ15に入力する軸は、Z軸のカウンタ
である。ベクター発生器の原理に基づき、2点間を補間
する各軸の座標データは、それぞれのカウンタ14に初
期設定された始点座標値(X m Y @ Z @ )
から、逐次(xly、zgの終点座標に向かって歩進さ
せる。カウンタがアップするかダウンするかは1式の各
軸の符号が決定する。これら3軸座標値のうち、X。 Y座標は画像メモリのアドレスを、Z座標は2バツフア
に記憶する値となる。2バツフアは隠面消去のために設
けられたもので1画像メモリ上の同−xYアドレスに書
き込まれるデータに対して、2の値を比較して書き込み
の制御を行なうものである。 一方、Z軸を除くxおよびY軸のうち、いずれか2点間
の距離の長い軸を3M x yとする。この長軸データ
ΔM x yは輝度データΔLを(2)式と同様に(3
)式に示すように除算する。 Δ5L=lΔL+/ΔMxy   (3)式このΔLは
幾何学データではないため、ΔMxyより大きな値が存
在し、ΔSLは小数点以上の値を含む場合がある。(3
)式の演算結果、第3図において小数点以上のデータは
レジスタ8に、小数点以下はレジスタ5にロードされ、
また輝度の始点* L@  はレジスタ10に初期設定
さ、れる。 すなわち、回路5〜10は輝度DDAである。 このDDAは、XおよびY軸DDAのうち、長軸となる
DDAの小数点演算部のキャリィ信号で歩進されるもの
とする。よって、もしこれら2軸に3軸中最大の距離を
もつものがあれば、輝度DDAは2点間距離に等しいク
ロックで歩進される。 (2)式および(3)式は、同時あるいはシークエンシ
ャルに処理され、除算および初期設定完了後にそれぞれ
の回路が同時に歩進される。二の結果、輝度レジスタ1
0の出力は、x、y座標の始点における輝度から終点で
の輝度に連続補間される。この出力データはマルチプレ
クサ15に与えられ、Z軸カウンタ14から出力される
2軸補間座標値とともにRAM16の入力となる。マル
チプレクサを用いる理由は、シェーディング効果のみを
得る場合はZ値は不用であり、デプスキュー効果を得る
場合には両データを用いるため、その選択を可能として
いるためである。 輝度データとzI*座標値は、RAM16のアドレスと
なる。RAMはROMであってもよい、このRAMには
、テレビモニターの蛍光材料の特性に対し、視覚的に連
続な輝度勾配をもつ補正曲線(例えばα曲線に近似した
もの)に沿って、輝度データ・テーブルが記憶されてい
る。このRAMテーブルには、単色のデプスキューの場
合ではZ値をアドレスとし、テーブル内には1/Zを変
数とした上記曲線函数値を、カラ−3原色の場合は赤、
緑および青に対してそれぞれRAMを用意し、それぞれ
の輝度データをアドレスとして、前記補正曲線値が記憶
されている。また、デプスキューとシェーディングを兼
ねる場合は、マルチプレクサ15はZjlll標値と輝
度の両データを通過させ、輝度データと2座標値とをア
ドレスとするRAMを用意して、(輝度データ)x1/
Zを変数とする前記輝度補正曲線を記憶したRAMより
データを出力する。このようにして求めたデータは、D
DAの歩進に伴い画像メモリに逐次書き込まれる。 デザイン分野のカラーモデルにおいては、一般にRBG
方式に比べ、H8VあるいはHLSカラーモデルが利用
される1本発明では、前記輝度DDAはこれらカラーモ
デルの各要素のうち、H8vにおいてはV (Va l
 u a)、HLSモデルテはL(Light)がその
対象となる。一方、前記DDAによって求められた2点
間の輝度補間データは、画像メモリに書き込む際、ある
いは画像メモリの出力に位置するルック・アップ・テー
ブルにおいてRGBに変換されなければならない。 本発明では、H8VあるいはHLSモデルにおいてはそ
れぞれのH(Hue)および5(Satu−ratio
n)を第41!lに示す記憶素子RAM 17のアドレ
スとし、輝度補間データをRAM17の出力をアドレス
の1組とする他のRAM18のアドレスの1組として、
それぞれのRAMにはRGBへの変換式に基づくデータ
を記憶させる。RAMを2段にするのは、容量の問題と
アクセス速度の問題のためで、輝度補間データは他の要
sHおよびSに対して、DDAに同期して高速に変化す
るため、後段のRAMに入力することによって応答速度
を向上させる。 このようにして得られたR、G、B信号は画像メモリに
転送され、DDAのXおよびY軸の示すアドレスに2バ
ツフアの判定に基づいて順次書き込まれる。 以上のように、本発明は、3次元DDAを持つベクトル
発生器において、2点間距離が最長の軸で他の2軸を除
算して、それぞれの軸の2点間補間座標値を求め、デプ
スバッファのための機能をもつとともに、2点のX、Y
座標値のうち長軸でそれぞれの点で差分した輝度データ
を除算し、その長軸の歩進に合わせて輝度データを歩進
させ、輝度DDAの出力データをシェーディング・デー
タとすることを特徴とする。 3、図の筒車な説明 第1図はベクトル発生器の概念図 1、除算値レジスタ 2、加算器 3、レジスタ 4、カウンタ 第2図は輝度情報をもつベクトル定義コマンド第3図は
本発明に関わるシェーディング回路5、除算値レジスタ 6、加算器 7、レジスタ 8、除算値レジスタ 9、加算器 10、 レジスタ 11、除算値レジスタ 120.加算器 13、レジスタ 14 、カウンタ 15、マルチプレクサ 16、RAM 第4図は本発明に関わる輝度/R,G、B変換回路 17.1B、RAM
Traditionally, shading has been mostly achieved through software methods, with little or no hardware involved. The present invention is a luminance interpolation between a starting point and an ending point that also serves as filling in the scanning direction.In the present invention, luminance or color data is set as an attribute of each three-dimensional vector, and accompanying the direction of the three-dimensional vector, It distributes brightness. Therefore, it can be applied to any single line drawing screen, and brightness data can be obtained in parallel with hidden surface removal using the depth buffer. [Industrial Application Effects] The method according to the present invention relates to vector operations. Since vector display, shading, and hidden surface removal can be performed simultaneously, three-dimensional image display can be performed at high speed, and it is effective for constructing a man-machine system with excellent responsiveness. [Embodiment] FIG. 1 shows a principle diagram of a conventional vector generator, showing only one of the x, y, or Z axes. In FIG. 1, circuit 1 divides the lengths of X, Y, and two other coordinate values by the axis that has the longest length between two points. A register loaded with a value below the decimal point, 2 is an adder and 3 is a register. The vector generator adds and accumulates decimal point values in circuit 3 for a number of clocks equal to the length of the longest axis. At the time when the adder Z outputs the carry signal, the counter 4 that has been initially loaded with the starting point coordinate value is incremented. As a result, the output of the counter 4 successively indicates the interpolated meditation value between the two points. In the present invention, when performing shading. The data structure of geometric information and its attributes is shown in Figure 2.
It is assumed that it consists of dimensional coordinate values and their brightness attributes. That is, the commands given to this circuit are the three-dimensional X, Y and zmw values and the brightness attribute at that point. This brightness attribute is. A single color or red, green, blue values, e.g. 1 for every 8 bits.
In the H5V and HLS color models, which may be color data assigned within a word or each element of the HLS color model, V (value) or L (light) is treated as luminance target data. FIG. 3 shows a shading circuit according to the present invention.
In FIG. 3, 5, 7.8, 10.11 and 13 are registers, 6.9 and 12 are adders, 14 is a counter, 15 is a multiplexer, and 16 is a storage element RAM. In explaining the operation of FIG. 3, we will explain the relationship between the data shown in FIG. 21i1 and FIG.
Linear interpolation is performed between them using a series of continuous coordinate points and brightness, and generally, intensity, interpolation,
Shading (Intensity 1ntsrp
This is called "on shading". Starting point of a-dimensional data (X @ Y @ Z @ L *
) and the end point (x tY a Z IL z ) are given in the data format shown in Figure 2. The calculation shown in equation 1 is executed. ΔX electric power ASX = l8
1. In other words, 9th jlF11-14 is 3
Although there are two sets, only one axis is shown in Fig. 3. However, the axis input to the multiplexer 15 is the Z-axis counter. Based on the principle of a vector generator, the coordinate data of each axis for interpolation between two points is the starting point coordinate value (X m Y @ Z @ ) initialized in each counter 14.
From then on, step towards the end point coordinates of The Z coordinate of the address of the image memory is a value that is stored in 2 buffers.The 2 buffers are provided to erase hidden surfaces, and for the data written to the same -xY address on 1 image memory, Write control is performed by comparing the values of x y is luminance data ΔL as in equation (2), (3
) Divide as shown in the formula. Δ5L=lΔL+/ΔMxy (3) Since ΔL is not geometric data, there are values larger than ΔMxy, and ΔSL may include values above the decimal point. (3
), the data above the decimal point in Figure 3 is loaded into register 8, the data below the decimal point is loaded into register 5,
Further, the starting point *L@ of luminance is initially set in the register 10. That is, circuits 5 to 10 are luminance DDA. This DDA is assumed to be stepped by a carry signal of the decimal point arithmetic section of the major axis DDA among the X and Y axis DDAs. Therefore, if any of these two axes has the largest distance among the three axes, the luminance DDA is stepped with a clock equal to the distance between the two points. Equations (2) and (3) are processed simultaneously or sequentially, and their respective circuits are incremented simultaneously after the division and initialization are completed. Second result, brightness register 1
The output of 0 is continuously interpolated from the luminance at the starting point of the x, y coordinates to the luminance at the ending point. This output data is given to the multiplexer 15 and becomes an input to the RAM 16 together with the two-axis interpolated coordinate value output from the Z-axis counter 14. The reason for using a multiplexer is that the Z value is unnecessary when only the shading effect is obtained, and both data are used when obtaining the depth cue effect, making it possible to select one. The brightness data and the zI* coordinate value become the address of the RAM 16. The RAM may be a ROM, in which luminance data is stored along a correction curve (e.g., approximating an α curve) with a visually continuous luminance gradient for the characteristics of the fluorescent material of the television monitor.・The table is memorized. In this RAM table, in the case of a single color depth cue, the Z value is used as an address, and in the table, the above curve function value with 1/Z as a variable is stored, and in the case of color - three primary colors, red,
RAMs are prepared for each of green and blue, and the correction curve values are stored using respective luminance data as addresses. In addition, when serving both as depth cue and shading, the multiplexer 15 passes both the ZJllll target value and luminance data, prepares a RAM whose addresses are the luminance data and two coordinate values, and reads (luminance data) x1/
Data is output from the RAM that stores the brightness correction curve with Z as a variable. The data obtained in this way is D
The data is sequentially written into the image memory as the DA advances. In the color model in the design field, RBG is generally used.
In the present invention, in which the H8V or HLS color model is used, the luminance DDA is V (Val
u a), HLS Modelte targets L (Light). On the other hand, the luminance interpolation data between two points determined by the DDA must be converted to RGB when writing to the image memory or in a look-up table located at the output of the image memory. In the present invention, in the H8V or HLS model, each H (Hue) and 5 (Saturation
n) for the 41st! The address of the storage element RAM 17 shown in 1 is taken as one set of addresses of the other RAM 18, and the luminance interpolation data is set as one set of addresses of the other RAM 18, with the output of the RAM 17 as one set of addresses.
Each RAM stores data based on an RGB conversion formula. The reason for having two stages of RAM is due to capacity issues and access speed issues.Since the brightness interpolation data for other required sH and S changes rapidly in synchronization with DDA, it is necessary to use two stages of RAM. Improve response speed by typing. The R, G, and B signals thus obtained are transferred to the image memory and sequentially written to the addresses indicated by the X and Y axes of the DDA based on the determination of the two buffers. As described above, the present invention calculates interpolated coordinate values between two points of each axis by dividing the other two axes by the axis with the longest distance between two points in a vector generator having a three-dimensional DDA. In addition to having a depth buffer function, it also has two points of X and Y.
The brightness data obtained by dividing the difference at each point on the long axis of the coordinate values is divided, the brightness data is stepped in accordance with the step of the long axis, and the output data of the brightness DDA is used as shading data. do. 3. Explanation of the hour wheel in the figure Figure 1 is a conceptual diagram of the vector generator 1, division value register 2, adder 3, register 4, counter Figure 2 is the vector definition command with luminance information Figure 3 is the present invention Shading circuit 5, division value register 6, adder 7, register 8, division value register 9, adder 10, register 11, division value register 120 . Adder 13, register 14, counter 15, multiplexer 16, RAM Figure 4 shows the luminance/R, G, B conversion circuit 17.1B, RAM related to the present invention.

Claims (1)

【特許請求の範囲】[Claims] X、YおよびZ座標系からなる3次元ベクトルの始点お
よび終点間を結ぶそれぞれの座標軸の距離のうち、最長
となる軸で、他の2軸の距離を除算し、これら除算値を
各軸に設けられたベクトル発生器(DDA=DIGIT
AL DIFFERE−NCIAL ANALIZER
)にロードして、3次元始点座標から終点座標までを座
標点列で補間する3軸DDAを有し、XおよびY軸のベ
クトル発生器出力データは画像メモリの書き込みアドレ
スを、Z軸出力データは隠面消去のためZバッファ・デ
ータとするシステムにおいて、ベクトルの始点および終
点に輝度データを設定して、この2点間の輝度の差分値
を求め、前記XおよびY座標のうち、2点間の距離が大
なる値で前記差分値を除算し、終点輝度までを補間する
輝度DDAを設けて、前記除算値をロードする第1の手
段と、XおよびY座標のうち、2点間距離が大なる側の
DDAの小数点演算部のキャリィ信号を、前記輝度DD
Aの歩進クロックとする第2の手段と、輝度DDAによ
って得られた補間データを、モニターの蛍光素材のもつ
非線形特性を補正するデータが記憶されたRAMのアド
レスとして、DDA輝度データを補整値変換し、この補
整値を3軸DDAの歩進に並列同期して画像メモリのピ
クセルデータとするとともに前記Zバッファの比較判定
によって、画像メモリへの書き込み制御を行なう第3の
手段をそれぞれ合せ持つシェーディング回路。
Divide the distance of the other two axes by the longest axis among the distances of the respective coordinate axes connecting the starting point and end point of the three-dimensional vector consisting of the X, Y, and Z coordinate systems, and divide these divided values into each axis. Vector generator provided (DDA=DIGIT
AL DIFFERE-NCIAL ANALIZER
), and has a 3-axis DDA that interpolates from the 3-dimensional starting point coordinates to the ending point coordinates using a sequence of coordinate points. In a system that uses Z-buffer data to remove hidden surfaces, set brightness data at the start and end points of the vector, find the difference in brightness between these two points, and calculate the difference between two points among the X and Y coordinates. A first means for loading the divided value by dividing the difference value by a value with a large distance therebetween and interpolating up to the end point brightness; and a distance between two points among the X and Y coordinates. The carry signal of the decimal point arithmetic unit of the DDA on the side where
A second means uses the interpolated data obtained by the luminance DDA as a step clock of A, and uses the DDA luminance data as a compensation value as an address of a RAM that stores data for compensating the nonlinear characteristics of the fluorescent material of the monitor. and converting the correction values into pixel data of the image memory in parallel synchronization with the step of the three-axis DDA, and also have third means for controlling writing to the image memory by comparing and determining the Z buffer. shading circuit.
JP12907889A 1989-05-22 1989-05-22 Shading circuit Pending JPH02307172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12907889A JPH02307172A (en) 1989-05-22 1989-05-22 Shading circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12907889A JPH02307172A (en) 1989-05-22 1989-05-22 Shading circuit

Publications (1)

Publication Number Publication Date
JPH02307172A true JPH02307172A (en) 1990-12-20

Family

ID=15000533

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12907889A Pending JPH02307172A (en) 1989-05-22 1989-05-22 Shading circuit

Country Status (1)

Country Link
JP (1) JPH02307172A (en)

Similar Documents

Publication Publication Date Title
KR910009101B1 (en) Image synthesizing apparatus
EP1025558B1 (en) A method and apparatus for performing chroma key, transparency and fog operations
JP2923648B2 (en) Method and apparatus for generating color characteristics of an object
US6181352B1 (en) Graphics pipeline selectively providing multiple pixels or multiple textures
US5877769A (en) Image processing apparatus and method
JP3190762B2 (en) Digital video special effects device
JPH0814854B2 (en) 3D graphic display device
JPH05307610A (en) Texture mapping method and its device
JPH0916806A (en) Stereoscopic image processor
JPH0916144A (en) System and method for triangle raster with two-dimensionallyinterleaved frame buffer
JPH09244601A (en) Subsystem and method for graphic display
JP4707782B2 (en) Image processing apparatus and method
JPH096973A (en) Data synchronizer
JP2976945B2 (en) Image drawing device
US6075544A (en) Method and apparatus for accelerating rendering by coalescing data accesses
US5060172A (en) Method and apparatus for displaying smooth-shaded objects
JPH02307172A (en) Shading circuit
JPH05249953A (en) Image display device
JP2600904B2 (en) Image synthesizing method and apparatus
JPH10187124A (en) Plotting device and plotting method
JP4635379B2 (en) Image processing device
JP4224887B2 (en) Signal processing apparatus and image processing apparatus
JPH11339069A (en) Device and method for image position
JPH04225481A (en) Storage device
JPH0573259A (en) Picture shading method and picture processor