JPH06266853A - Shading processing method and its device - Google Patents

Shading processing method and its device

Info

Publication number
JPH06266853A
JPH06266853A JP7896493A JP7896493A JPH06266853A JP H06266853 A JPH06266853 A JP H06266853A JP 7896493 A JP7896493 A JP 7896493A JP 7896493 A JP7896493 A JP 7896493A JP H06266853 A JPH06266853 A JP H06266853A
Authority
JP
Japan
Prior art keywords
vector
shading
polygon
line
rotation
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
JP7896493A
Other languages
Japanese (ja)
Inventor
Naohito Shiraishi
尚人 白石
Tatsuya Fujii
達也 藤井
Masanobu Fukushima
正展 福島
Tatsuya Nakajima
達也 中島
Yasuhiro Izawa
康浩 井澤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP7896493A priority Critical patent/JPH06266853A/en
Publication of JPH06266853A publication Critical patent/JPH06266853A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To execute the real time processing of shading by simple constitution. CONSTITUTION:This shading processor is provided with computing elements 43, 44 for rotating a light beam vector around the normal of a polygon end point so as to align the vector to any one of x, y and z coordinate axes, computing elements 47, 48 for rotating a visual line vector only by a difference between the light beam direction and the visual line direction so as to align the vector to the coordinate axis and a shading computing element 51 for calculating the intensity of diffusely radiated light based upon the rotated light beam vector, calculating the intensity of mirror face reflected light based upon the rotation of the visual line vector and finding out the color values of R, G and B of the polygon based upon the intensity of diffusely radiated light and the intensity of mirror face reflected light to shade a polygon graphic.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、立体を表現した3次
元画像に陰影を付加し、立体の把握を容易にするシェー
デイング処理方法及びその装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shading processing method and device for adding a shadow to a three-dimensional image representing a solid to facilitate the understanding of the solid.

【0002】[0002]

【従来の技術】CRTディスプレイ等の2次元(平面)
表示装置に3次元立体図形を透視変換処理、遠近処理等
によって表示する場合に、表示された物体に自然な感じ
を与えるため光反射モデルに基づいて、陰影、すなわち
シェーディング処理が行なわれている。
2. Description of the Related Art Two-dimensional (flat) such as CRT display
When a three-dimensional solid figure is displayed on a display device by perspective conversion processing, perspective processing, and the like, shading processing, that is, shading processing is performed based on a light reflection model in order to give a natural feeling to a displayed object.

【0003】このシェーディングの手法としては、ビ・
トウイング・フォング(Bui・Toung・Phon
g)のフォングシェーディングなどが知られている。
As a method of this shading,
Towing Fong (Bui, Tung, Phon)
g) Phong shading and the like are known.

【0004】このフォングシェーディングは、次の数1
式に基いて、図6に示すベクトルの関数に基いて視線方
向の光の強さを算出するものである。
This phong shading is expressed by the following equation 1.
Based on the formula, the light intensity in the line-of-sight direction is calculated based on the vector function shown in FIG.

【0005】[0005]

【数1】 [Equation 1]

【0006】また、鏡面反射を無視したシェーディング
手法として下記数2式に示すランバート(Lambar
t)シェーディング手法がある。
Further, as a shading method which ignores specular reflection, the Lambert shown in the following equation 2 is used.
t) There is a shading method.

【0007】[0007]

【数2】 [Equation 2]

【0008】このアルゴリズムを適用する時には、光線
ベクトル、面法線ベクトルを随時算出する必要があり、
極めて高速に動作する大規模な専用ハードウェアを必要
とする。
When applying this algorithm, it is necessary to calculate the ray vector and the surface normal vector as needed.
Requires large-scale dedicated hardware that operates extremely fast.

【0009】簡単な回路でランバートシェーディング手
法を実現する装置が特開平2−51789号公報(国際
特許分類G06F 15/72)に提案されている。
An apparatus for realizing the Lambertian shading method with a simple circuit is proposed in Japanese Patent Application Laid-Open No. 2-51789 (International Patent Classification G06F 15/72).

【0010】この装置は、物体の面法線をまず算出し、
その後、物体の回転の逆回転を光線ベクトルにだけ行
い、上記モデルによって陰影を付加するので、物体の回
転に伴って法線ベクトルの再計算を行なう必要がなく、
簡単な回路で高速動作を実現しようとするものである。
This apparatus first calculates the surface normal of the object,
After that, inverse rotation of the rotation of the object is performed only on the ray vector, and the shadow is added by the above model, so it is not necessary to recalculate the normal vector with the rotation of the object,
It is intended to realize high-speed operation with a simple circuit.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、上記装
置は、ランバートモデルのように物体の面法線と光線ベ
クトルだけの関係にのみ成立し、フォングモデルのよう
に鏡面反射を考慮すると、視線ベクトルと反射ベクトル
も考慮しなければならずリアルな画像を表現する場合に
は適用することができない。
However, the above-mentioned device is established only in the relationship between the surface normal of the object and the ray vector as in the Lambert model, and considering the specular reflection as in the Fong model, the line-of-sight vector becomes The reflection vector must also be considered and cannot be applied when expressing a realistic image.

【0012】また、光線ベクトルが移動した時に、その
単位ベクトルを算出するためには、下記の数3式に示す
複雑な演算を行なわなければならない。
Further, when the light ray vector moves, in order to calculate the unit vector, it is necessary to perform a complicated calculation shown in the following expression (3).

【0013】[0013]

【数3】 [Equation 3]

【0014】この数3式に示すように、この演算は複雑
である上に更に、平方根の高速化は困難である。また、
光線ベクトルにおいても同様である。
As shown in the equation (3), this calculation is complicated and it is difficult to speed up the square root. Also,
The same applies to the ray vector.

【0015】このため、従来は光線方向、視線方向の変
更をリアルタイムに行なうゲーム機器やフライトシミュ
レータ、ドライブシミュレータ等のように使用者のハン
ドル操作をリアルタイムに伝えられるシステムにおいて
は遅れを伴うという問題があった。
For this reason, conventionally, there is a problem in that there is a delay in a system capable of transmitting a user's steering wheel operation in real time, such as a game machine, a flight simulator, a drive simulator, etc. for changing the direction of a light ray and the direction of a line of sight in real time. there were.

【0016】この発明は、上述した従来の問題点を解消
するためになされたものにして、簡単な構成でシェーデ
ィングのリアルタイム処理が行なえる方法を提供するこ
とをその目的とする。
The present invention has been made to solve the above-mentioned conventional problems, and an object thereof is to provide a method capable of performing real-time shading processing with a simple configuration.

【0017】[0017]

【課題を解決するための手段】この発明は、ポリゴン法
線ベクトルに対して、光線方向にX,Y,Z回転を行な
うことにより、光線ベクトルをX,Y,Z=0,0,1
に固定し、R,G,B夫々の拡散反射強度を算出する。
そして、光線ベクトルと視線ベクトルの差分だけX,
Y,Z回転を行なうことにより、視線ベクトルをX,
Y,Z=0,0,1に固定し、R,G,B夫々の鏡面反
射強度を算出する。
According to the present invention, a ray vector is X, Y, Z = 0, 0, 1 by performing X, Y, Z rotations in the ray direction with respect to a polygon normal vector.
Then, the diffuse reflection intensity of each of R, G and B is calculated.
Then, only the difference between the ray vector and the line-of-sight vector is X,
By performing Y and Z rotations, the line-of-sight vector is changed to X,
It is fixed to Y, Z = 0, 0, 1 and the specular reflection intensity of each of R, G, B is calculated.

【0018】[0018]

【作用】この発明は、視線、光線ベクトルを複雑な演算
で算出する必要が無くなり、視線の変更、光線の変更を
リアルタイムで行なうことが出来る。
According to the present invention, it is not necessary to calculate the line-of-sight and the ray vector by complicated calculation, and the line-of-sight and the ray can be changed in real time.

【0019】[0019]

【実施例】以下、この発明の一実施例につき図面を参照
して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0020】図1は、この発明のシェーディング装置を
用いた立体画像表示装置のブロック図、図2はこの発明
のシェーディング装置の構成を示すブロック図である。
FIG. 1 is a block diagram of a stereoscopic image display device using the shading device of the present invention, and FIG. 2 is a block diagram showing the configuration of the shading device of the present invention.

【0021】この装置は、例えば、レーシングゲームや
飛行機の操縦シュミレーションなどのゲーム機器に用い
て好適な一例が示されている。図1に従いこの発明のシ
ェーディング装置を用いた立体画像表示装置の全体構成
につき説明する。
This device is shown as an example suitable for use in, for example, a game machine such as a racing game or an airplane control simulation. The overall configuration of a stereoscopic image display device using the shading device of the present invention will be described with reference to FIG.

【0022】この実施例においては、各種条件のシミュ
レーション画像を複数のポリゴン情報として、ポリゴン
端点メモリ1にX,Y,Z座標値として与えられる。
In this embodiment, simulation images under various conditions are given as a plurality of pieces of polygon information to the polygon end point memory 1 as X, Y, Z coordinate values.

【0023】また、各ポリゴン端点の法線ベクトル値
(ANX,ANY,ANZ)はポリゴン端点法線ベクト
ルメモリ2に格納さている。このベクトルメモリ2に
は、更に各ポリゴンのレッドの拡散反射係数(Rk
d)、グリーンの拡散反射係数(Gkd)、ブルーの拡
散反射係数(Bkd)と各ポリゴンのレッドの鏡面反射
係数(Rks)、グリーンの鏡面反射係数(Gks)、
ブルーの鏡面反射係数(Bks)及びレッドの環境光値
(Rambient)、グリーンの環境光値(Gambient)、ブ
ルーの環境光値(Bambient)を格納している。これら
各データはこの発明の特徴とするところのシェーディン
グ装置4に与えられる。
The normal vector values (ANX, ANY, ANZ) of each polygon end point are stored in the polygon end point normal vector memory 2. The vector memory 2 further includes the red diffuse reflection coefficient (Rk) of each polygon.
d), a green diffuse reflection coefficient (Gkd), a blue diffuse reflection coefficient (Bkd) and a red specular reflection coefficient (Rks) of each polygon, a green specular reflection coefficient (Gks),
The blue specular reflection coefficient (Bks), the red ambient light value (Rambient), the green ambient light value (Gambient), and the blue ambient light value (Bambient) are stored. These respective data are given to the shading device 4, which is a feature of the present invention.

【0024】CPUはあらゆる立体物を複数のポリゴン
の集合体として表現し、このポリゴンの各端点を示す端
点情報を読み出し、ハンドルアクセス等で構成された操
作部(図示しない)の操作内容に基づいて変換された電
気信号に従いこの状況に応じた状況データを演算し、幾
何変換装置3及びシェーディング装置4に夫々データを
与える。
The CPU represents all three-dimensional objects as an aggregate of a plurality of polygons, reads out end point information indicating each end point of the polygon, and based on the operation content of an operation unit (not shown) configured by handle access or the like. The situation data corresponding to this situation is calculated according to the converted electric signal, and the data is given to the geometric transformation device 3 and the shading device 4, respectively.

【0025】幾何変換装置3は、CPUからの命令に従
い各種ポリゴンデータを参照しながら、ポリゴン端点メ
モリ1からデータを読み出し、ポリゴンの端点の値を視
線方向に回転する視野変換、透視投影変換により各ポリ
ゴンの端点座標を幾何変換視、そのX,Yの2次元座標
(SX,SY)をスクリーンメモリ6に与える。また、
ポリゴン中心の視野変換された代表値即ち、そのポリゴ
ンの視点からの距離の代表値(Z値)を決定し、そのデ
ータをスクリーンメモリ6に与える。シェーディング装
置4は、ベクトルメモリ2より読み出したポリゴン端点
の法線ベクトル値に対して図4及び図5に示すフローチ
ャートに従って処理を行ない、ポリゴン端点の色を算出
し、このポリゴン端点の色をポリゴン端点カラーメモリ
5に与える。このシェーディング装置4の詳細について
は後述する。
The geometrical transformation device 3 reads data from the polygon end point memory 1 while referring to various polygon data according to a command from the CPU, and performs visual field conversion and perspective projection conversion for rotating the values of the end points of the polygon in the direction of the line of sight. The end point coordinates of the polygon are geometrically transformed and the two-dimensional X, Y coordinates (SX, SY) are given to the screen memory 6. Also,
A field-transformed representative value of the center of the polygon, that is, a representative value (Z value) of the distance from the viewpoint of the polygon is determined, and the data is given to the screen memory 6. The shading device 4 processes the normal vector value of the polygon end point read from the vector memory 2 according to the flowcharts shown in FIGS. 4 and 5, calculates the color of the polygon end point, and determines the color of this polygon end point as the polygon end point. It is given to the color memory 5. Details of the shading device 4 will be described later.

【0026】描画処理装置7はスクリーン画面のY方向
に分割された処理領域に含まれるポリゴンに対してスク
リーンメモリ6及びカラーメモリ5より端点情報を読み
出してCRT9が必要とするスキャンラインにかかるポ
リゴンをビットマップ上に描画し、そのデータをフレー
ムメモリ8に与える。
The drawing processing device 7 reads the end point information from the screen memory 6 and the color memory 5 with respect to the polygons contained in the processing area divided in the Y direction of the screen screen, and extracts the polygons associated with the scan lines required by the CRT 9. It is drawn on the bitmap and the data is given to the frame memory 8.

【0027】次にこの発明のシェーディング装置4につ
き図2を参照して更に説明する。シェーディング装置4
は、ベクトルメモリ2から、法線ベクトル値、拡散反射
係数、鏡面反射係数、環境光値を夫々読み出し、読み出
された各データはメモリインターフェース41に一旦格
納される。ベクトルメモリ2のアクセスは、アドレス生
成回路42にて生成されたアドレスによって行なわれ、
メモリより夫々データが読み出される。
Next, the shading device 4 of the present invention will be further described with reference to FIG. Shading device 4
The normal vector value, the diffuse reflection coefficient, the specular reflection coefficient, and the ambient light value are read from the vector memory 2, and the read data are temporarily stored in the memory interface 41. The vector memory 2 is accessed by the address generated by the address generation circuit 42,
The data is read from the memory.

【0028】メモリインターフェース41に格納された
データは、まずY回転演算器43に与えられる。このY
回転演算器43は、図3(a)に示すように、物体の回
転に基づいてCPUから与えられる光線ベクトルとY軸
との角度(LYO)だけ法線ベクトルを回転させる。こ
のCPUからの光線ベクトルのY軸との角度LYO値は
レジスタ45に与えられる。
The data stored in the memory interface 41 is first given to the Y rotation calculator 43. This Y
As shown in FIG. 3A, the rotation calculator 43 rotates the normal vector by the angle (LYO) between the ray vector given by the CPU and the Y axis based on the rotation of the object. The angle LYO value of the ray vector from the CPU with respect to the Y axis is given to the register 45.

【0029】続いて、Y回転演算器43にて回転移動さ
たデータがX回転演算器44に与えられる。X回転演算
器44はCPUから与えられる光線ベクトルとX軸との
角度(LXO)だけ法線ベクトルを回転させる。このC
PUからの光線ベクトルとX軸と角度(LXO)はレジ
スタ46に与えられている。これら演算処理されたデー
タは図3(b)に示すように、ベクトルが移動される
Subsequently, the data rotationally moved by the Y rotation calculator 43 is given to the X rotation calculator 44. The X rotation calculator 44 rotates the normal vector by the angle (LXO) between the ray vector given from the CPU and the X axis. This C
The ray vector from the PU, the X axis and the angle (LXO) are given to the register 46. Vectors of these arithmetically processed data are moved as shown in FIG.

【0030】そして、X回転演算器44にて演算処理さ
れたデータはY回転演算器47に与えられる。このY回
転演算器47は、光線ベクトルLX,LY,LZ=0,
0,1に対して、X回転演算器44の処理結果を視線、
光線ベクトルの差分量(DEYO)だけ回転処理を行な
う。この差分量はDEYO=EYO−LYOにて求めら
れる。この演算はCPUにて行なわれ、CPUよりレジ
スタ49に与えられる。Y回転演算器47にて処理した
処理結果がX回転演算器48に与えられる。
Then, the data processed by the X rotation calculator 44 is given to the Y rotation calculator 47. The Y-rotation calculator 47 is configured to calculate the light ray vectors LX, LY, LZ = 0,
0, 1, the line of sight of the processing result of the X rotation calculator 44,
Rotation processing is performed by the difference amount (DEYO) of the ray vector. This difference amount is calculated by DEYO = EYO-LYO. This calculation is performed by the CPU and is given to the register 49 by the CPU. The processing result processed by the Y rotation calculator 47 is given to the X rotation calculator 48.

【0031】X回転演算器48は、視線、光線ベクトル
の差分量(DEXO)だけ回転処理を行なう。この差分
量はDEXO=EXO−LXOにて求められる。この演
算はCPUにて行なわれ、CPUよりレジスタ50に与
えられる。
The X rotation calculator 48 performs a rotation process by the difference amount (DEXO) between the line of sight and the ray vector. This difference amount is calculated by DEXO = EXO-LXO. This calculation is performed by the CPU and is given to the register 50 by the CPU.

【0032】そして、X回転演算器44の処理結果と、
X回転演算器48の処理結果がシェーディング演算器5
1に与えられる。シェーディング演算器は、X回転演算
器44の処理結果とX回転演算器48の処理結果に対し
て、R,G,Bの拡散反射係数、鏡面反射係数、環境光
値により、色値を求める演算を行ない、この算出した色
値をメモリインターフェース52に出力する。
Then, the processing result of the X rotation calculator 44,
The processing result of the X rotation calculator 48 is the shading calculator 5
Given to 1. The shading computing unit obtains a color value from the processing result of the X rotation computing unit 44 and the processing result of the X rotation computing unit 48 based on the diffuse reflection coefficient of R, G, B, the specular reflection coefficient, and the ambient light value. The calculated color value is output to the memory interface 52.

【0033】メモリインターフェース52に格納された
色値は、アドレス生成回路53にて生成されたアドレス
値にて指定されたポリゴン端点カラーメモリ5の領域に
格納される。
The color value stored in the memory interface 52 is stored in the area of the polygon end point color memory 5 designated by the address value generated by the address generation circuit 53.

【0034】これら各演算器はコントローラ54により
制御され、コントローラ54は図4及び図5に示すフロ
ーチャートに従って動作する。
Each of these arithmetic units is controlled by the controller 54, and the controller 54 operates according to the flowcharts shown in FIGS.

【0035】次に、この発明の動作を図4、図5のフロ
ーチャートに基づいて、更に説明する。
Next, the operation of the present invention will be further described with reference to the flow charts of FIGS.

【0036】シェーディング動作を開始すると、まず、
図3(a)に示すように、光線ベクトルと各座標軸との
間の角度LXO,LYO,LZO及び視線ベクトルと各
座標軸との間の角度EXO,EYO,EZOがCPUよ
り入力され、レジスタ45,46に入力される(ステッ
プS1)。そして、続いて、光線ベクトル、視線ベクト
ルの差分DEXO,DEYOを算出し、レジスタ49,
レジスタ50に夫々格納される(ステップS2)。
When the shading operation is started, first,
As shown in FIG. 3A, the angles LXO, LYO, LZO between the ray vector and each coordinate axis and the angles EXO, EYO, EZO between the line-of-sight vector and each coordinate axis are input from the CPU, and the registers 45, 46 is input (step S1). Then, subsequently, the differences DEXO and DEYO between the ray vector and the line-of-sight vector are calculated, and the register 49,
They are stored in the registers 50 (step S2).

【0037】続いて、R,G,Bの拡散反射係数(Rk
d,Gkd,Bkd)及び鏡面反射係数(Rks,Gk
s,Bks)が入力され(ステップS3)、更に、ポリ
ゴン端点の法線ベクトル(ANX,ANY,ANZ)が
入力される(ステップS4)。そして、法線ベクトルを
夫々入替えた後(ステップS5)、X回転演算器44、
Y回転演算器43、ポリゴン端点、法線ベクトル(N
X,NY,NZ)を光線ベクトルをX,Y,Z=0.0
01になるようLXO回転処理(ステップS6)、LY
O回転(ステップS7)処理を行なう。図3(a)はこ
の回転処理前を図3(b)は回転後を示す。
Next, the R, G, B diffuse reflection coefficients (Rk
d, Gkd, Bkd) and specular reflection coefficient (Rks, Gk
s, Bks) is input (step S3), and further, the normal vector (ANX, ANY, ANZ) of the polygon end point is input (step S4). After the normal vectors are exchanged (step S5), the X rotation calculator 44,
Y rotation calculator 43, polygon end point, normal vector (N
(X, NY, NZ) the ray vector as X, Y, Z = 0.0
LXO rotation processing so that it becomes 01 (step S6), LY
O rotation (step S7) processing is performed. FIG. 3A shows the state before this rotation process and FIG. 3B shows the state after rotation.

【0038】この処理により、従来、法線ベクトルに夫
々光源ベクトルを積算する処理が必要であったのが、L
NX,LNY,LNZ=0,0,1で固定されるため、
ステップS8に示すように内部係数(INNER)=−
NZ,LX=0,LY=0,LZ=−1に設定すること
ができる。
According to this process, it has been conventionally necessary to integrate the light source vector with the normal vector.
Since it is fixed at NX, LNY, LNZ = 0, 0, 1,
As shown in step S8, the internal coefficient (INNER) =-
It can be set to NZ, LX = 0, LY = 0, and LZ = -1.

【0039】この内部係数を用いて、シェーディング演
算器1にて、回転後のR,G,Bの拡散反射強度を算出
する。すなわち、R,G,Bの拡散反射強度に夫々IN
NER=−NZ、すなわち、−NZを積算し、R,G,
Bの拡散反射強度を算出する(ステップS9)。続い
て、Y回転演算器47、X回転演算器48にて、光線ベ
クトルLX,LY,LZを0,0,1とする回転処理と
して、光線ベクトル、法線ベクトルの差分の角度だけ回
転処理を行なう(ステップS10,S11)。図3
(b)がこの回転処理前であり、(c)は回転後であ
る。
Using this internal coefficient, the shading calculator 1 calculates the diffuse reflection intensity of R, G, B after rotation. That is, each of the diffuse reflection intensities of R, G, and B is IN
NER = -NZ, that is, -NZ is integrated and R, G,
The diffuse reflection intensity of B is calculated (step S9). Subsequently, in the Y rotation calculator 47 and the X rotation calculator 48, as the rotation processing for setting the light ray vectors LX, LY, LZ to 0, 0, 1, rotation processing is performed by the angle of the difference between the light ray vector and the normal vector. Perform (steps S10 and S11). Figure 3
(B) is before this rotation processing, and (c) is after rotation.

【0040】この処理により、従来、前述したINNE
Rと法線ベクトルの類算値と光線ベクトルを引算した結
果を視線ベクトルとを積算処理するという複雑な処理を
必要としていたのに対し、ステップS12に示すように
簡略される。すなわち、ENX,ENY,ENz=0,
0,1に固定されるため、第2内部係数(INNER
2)がINNER2=LZ−2×NZ×INNERで算
出できる。
By this processing, the above-mentioned INNE is conventionally used.
Although a complicated process of integrating the line-of-sight vector with the result of subtracting the ray vector and the calculated value of R and the normal vector is required, the process is simplified as shown in step S12. That is, ENX, ENY, ENz = 0,
Since it is fixed at 0 and 1, the second internal coefficient (INNER
2) can be calculated by INNER2 = LZ−2 × NZ × INNER.

【0041】この第2内部係数を用いて、シェーディン
グ演算器51にて、回転後のR,G,Bの鏡面反射強度
に第2内部係数を夫々積残することで、R,G,Bの鏡
面反射強度を算出する(ステップS13)。
Using the second internal coefficient, the shading calculator 51 accumulates the second internal coefficient on the specular reflection intensities of R, G, and B after rotation, respectively, and The specular reflection intensity is calculated (step S13).

【0042】続いて、ステップS14において、シェー
ディング演算器51は回転後の拡散反射強度、同じく鏡
面反射強度及び環境光値を加算して、R,G,Bの色を
算出し、そのR,G,Bデータをメモリインタフェース
52に出力する。
Subsequently, in step S14, the shading calculator 51 adds the diffuse reflection intensity after rotation, the same specular reflection intensity and the ambient light value to calculate the colors R, G and B, and the R, G thereof. , B data is output to the memory interface 52.

【0043】そして、ステップS15にて、R,G,B
データをカラーメモリ5に書き込み、ステップS16に
て、ポリゴンの全てのポリゴン端点の処理が終了したか
否か判断され、処理していない場合には、前述のステッ
プS3に戻り、前述の動作を繰り返す。また、処理が終
了すると、ステップS17に進み、ステップS17に
て、全てのポリゴンの処理が終了したか否か判断され、
処理が終了していない場合には、ステップS4に戻り、
前述の動作を繰り返す。ステップS17にて、処理が終
了したと判断されると、このシェーディング処理が終了
する。
Then, in step S15, R, G, B
The data is written in the color memory 5, and it is determined in step S16 whether or not the processing of all the polygon end points of the polygon is completed. If not, the process returns to step S3 described above and the above operation is repeated. . When the processing is completed, the process proceeds to step S17, and it is determined in step S17 whether or not the processing of all polygons is completed.
If the processing is not completed, the process returns to step S4,
The above operation is repeated. If it is determined in step S17 that the processing has ended, this shading processing ends.

【0044】[0044]

【発明の効果】以上説明したように、この発明によれ
ば、視線、光線ベクトルを複雑な演算で算出する必要が
無くなり、視線の変更、光線の変更をリアルタイムで行
なうことが出来る。
As described above, according to the present invention, it is not necessary to calculate the line-of-sight and ray vector by complicated calculation, and the line-of-sight and the ray can be changed in real time.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明のシェーディング装置を用いた立体画
像表示装置を示すブロック図である。
FIG. 1 is a block diagram showing a stereoscopic image display device using a shading device of the present invention.

【図2】この発明のシェーディング装置を示すブロック
図である。
FIG. 2 is a block diagram showing a shading device of the present invention.

【図3】座標軸と視線ベクトル及び光線ベクトルとの関
係を示す模式図であり、(a)は回転処理前、(b)は
この発明により光線ベクトルに回転処理を施した状態、
(c)はこの発明により視線ベクトルに回転処理を施し
た状態を示す。
3A and 3B are schematic diagrams showing a relationship between coordinate axes and a line-of-sight vector and a ray vector, FIG. 3A is a state before rotation processing, FIG. 3B is a state in which a ray vector is rotated according to the present invention,
(C) shows a state in which the line-of-sight vector is rotated according to the present invention.

【図4】この発明の動作を示すフローチャートである。FIG. 4 is a flowchart showing the operation of the present invention.

【図5】この発明の動作を示すフローチャートである。FIG. 5 is a flowchart showing the operation of the present invention.

【図6】フォングシェーディングのベクトルの関係を示
す模式図である。
FIG. 6 is a schematic diagram showing a relationship between Fong shading vectors.

【符号の説明】[Explanation of symbols]

1 ポリゴン端点メモリ 2 ポリゴン端点法線ベクトルメモリ 4 シェーディング装置 5 ポリゴン端点カラーメモリ 43,47 Y回転演算器 44,48 X回転演算器 51 シェーディング演算器 1 polygon end point memory 2 polygon end point normal vector memory 4 shading device 5 polygon end point color memory 43,47 Y rotation calculator 44,48 X rotation calculator 51 shading calculator

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中島 達也 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 (72)発明者 井澤 康浩 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Tatsuya Nakajima 1-3-3 Nakamagome, Ota-ku, Tokyo Stock company Ricoh Co., Ltd. (72) Inventor Yasuhiro Izawa 1-3-6 Nakamagome, Ota-ku, Tokyo Stocks Company Ricoh

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 ポリゴン端点の法線に対して光線ベクト
ルをx,y,zのいずれかの座標軸に合わせるように回
転させて拡散反射光強度を算出した後、光線方向と視線
方向の差分量だけ視線ベクトルを座標軸に合わせるよう
に回転させて鏡面反射光強度を算出し、ポリゴン図形に
陰影を付けることを特徴とするシェーディング処理方
法。
1. A difference amount between a ray direction and a line-of-sight direction after rotating a ray vector with respect to a normal line of a polygon end point so as to match with any of x, y, and z coordinate axes and calculating diffuse reflected light intensity. A shading processing method characterized in that the line-of-sight vector is rotated so as to match the coordinate axis to calculate the specular reflection light intensity, and the polygon figure is shaded.
【請求項2】 ポリゴン端点の法線に対して光線ベクト
ルをx,y,zのいずれかの座標軸に合わせるように回
転する手段、この回転された光線ベクトルに基いて拡散
放射光強度を算出する手段、光線方向と視線方向との差
分を求める手段、この算出した差分だけ分視線ベクトル
を座標軸に合わせるよう回転させる手段、視線ベクトル
の回転に基いて鏡面反射光強度を算出する手段、前記拡
散放射光強度及び鏡面反射光強度に基いて、ポリゴン図
形に陰影を付ける手段、を具備してなるシェーディング
処理装置。
2. A means for rotating a light ray vector with respect to a normal line of a polygon end point so as to be aligned with any of x, y, and z coordinate axes, and a diffused radiation intensity is calculated based on the rotated light ray vector. Means, means for obtaining the difference between the ray direction and the line-of-sight direction, means for rotating the line-of-sight vector by the calculated difference so as to match the coordinate axis, means for calculating the specular reflection light intensity based on the rotation of the line-of-sight vector, and the diffuse radiation A shading processing apparatus comprising: means for shading a polygon figure based on the light intensity and the specular reflection light intensity.
JP7896493A 1993-03-12 1993-03-12 Shading processing method and its device Pending JPH06266853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7896493A JPH06266853A (en) 1993-03-12 1993-03-12 Shading processing method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7896493A JPH06266853A (en) 1993-03-12 1993-03-12 Shading processing method and its device

Publications (1)

Publication Number Publication Date
JPH06266853A true JPH06266853A (en) 1994-09-22

Family

ID=13676587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7896493A Pending JPH06266853A (en) 1993-03-12 1993-03-12 Shading processing method and its device

Country Status (1)

Country Link
JP (1) JPH06266853A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7015908B2 (en) 1999-12-03 2006-03-21 Namco Ltd. Image generation system and information storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7015908B2 (en) 1999-12-03 2006-03-21 Namco Ltd. Image generation system and information storage medium

Similar Documents

Publication Publication Date Title
US6456287B1 (en) Method and apparatus for 3D model creation based on 2D images
US6014144A (en) Rapid computation of local eye vectors in a fixed point lighting unit
US3816726A (en) Computer graphics clipping system for polygons
US8144158B2 (en) Display system having floating point rasterization and floating point framebuffering
EP1442390B1 (en) System and method for environment mapping
JP3588351B2 (en) System and method for creating real-time shadows of transparent objects
WO1996036011A1 (en) Graphics system utilizing homogeneity values for depth for occlusion mapping and texture mapping
US5877769A (en) Image processing apparatus and method
EP0442682B1 (en) System and method for displaying of colour images
EP0319165B1 (en) System for using barycentric coordinates as for polygon interpolation
US5280569A (en) Three dimensional model describing method
US7202877B2 (en) Sprite rendering
JPH06266853A (en) Shading processing method and its device
JP3233376B2 (en) Shading processing equipment
JP2001148032A (en) Method and device for plotting image, recording medium and program
JP3453410B2 (en) Image processing apparatus and method
JP2000057372A (en) Image processor, image processing method and storage medium
JPH07110873A (en) Picture processor
KR0180160B1 (en) Rendering method of 3-dimensional material
JPH05274446A (en) Graphics work station and method for generating three-dimensional graphics picture
JPH0234069B2 (en)
Zimmermann Visual simulation by means of a transputer network for a driving simulator
JPH08315179A (en) Three-dimensional graphic processor
JPH02253485A (en) Formation of drawing data for computer graphics
JPH06333059A (en) Three-dimensional image processor