JPH0527154B2 - - Google Patents

Info

Publication number
JPH0527154B2
JPH0527154B2 JP22392284A JP22392284A JPH0527154B2 JP H0527154 B2 JPH0527154 B2 JP H0527154B2 JP 22392284 A JP22392284 A JP 22392284A JP 22392284 A JP22392284 A JP 22392284A JP H0527154 B2 JPH0527154 B2 JP H0527154B2
Authority
JP
Japan
Prior art keywords
brightness
dimensional
light
display surface
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP22392284A
Other languages
Japanese (ja)
Other versions
JPS61103277A (en
Inventor
Toshihisa Aoshima
Tooru Sakaihara
Shigeo Tsujioka
Seiichi Kanema
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP22392284A priority Critical patent/JPS61103277A/en
Publication of JPS61103277A publication Critical patent/JPS61103277A/en
Publication of JPH0527154B2 publication Critical patent/JPH0527154B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の利用分野] 本発明は図形処理装置に関し、特に、三次元図
形の処理における表示物体のシエーデイング(陰
付け)に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a graphic processing device, and particularly to shading of a display object in processing three-dimensional graphics.

[従来の技術] 図形処理装置において、三次元図形をCRT等
の表示装置に表示する場合に、表示された物体に
自然な感じを与えるため、光反射モデルに基づい
てシエーデイングを行うことは、周知であり、例
えば次のような文献がある。
[Prior Art] It is well known that when displaying a three-dimensional figure on a display device such as a CRT in a figure processing device, shading is performed based on a light reflection model in order to give a natural feel to the displayed object. For example, there are the following documents:

Bui−Tuong Phoug,“Illumination for
Computer−Generated Pictures”,
Communications of ACM,18(6),June
1975,pp.311〜317. J.D.Foly,A.Van Dam,“Fundamentals of
Interactive Computer Graphics”,Addison
Wesely Publishing Company. James F.Blinn,“Models of Light
Reflection for Computer Synthesized
Pictures”,SIGGRAPH'77 Proceeding. 詳細は前記文献(特にJ.D.Foly他の著書)にゆ
ずり、反射モデルによるシエーデイングの原理を
以下に概説する。第2図はBlinnが紹介した反射
モデルであつて、N→は反射点Pにおける反射面の
単位法線ベクトル(点Pにおける接平面に垂直な
長さ1のベクトル)、L→は反射点Pから光源に向
かう単位ベクトル、V→は反射点Pから視点に向か
う単位ベクトルである。H→はL→とV→の和の向きの
単位ベクトルであり、したがつてH→はL→とV→のな
す角をちようど二分している。このモデルにおい
て、反射点Pにおける視点方向の光の強度(輝
度)Iは(1)式で表わされる。
Bui−Tuong Phoug, “Illumination for
“Computer-Generated Pictures”
Communications of ACM, 18(6), June
1975, pp. 311-317. JDFoly, A. Van Dam, “Fundamentals of
Interactive Computer Graphics”, Addison
Wesely Publishing Company. James F. Blinn, “Models of Light
Reflection for Computer Synthesized
Pictures”, SIGGRAPH'77 Proceeding. The details are given in the above-mentioned literature (especially the book by JDFoly et al.), and the principle of shedding using a reflection model is summarized below. Figure 2 shows the reflection model introduced by Blinn, and N→ is the unit normal vector of the reflective surface at the reflective point P (a vector with a length of 1 perpendicular to the tangent plane at the point P), L→ is the unit vector from the reflective point P toward the light source, and V→ is the vector from the reflective point P to the viewpoint. H→ is a unit vector in the direction of the sum of L→ and V→, so H→ just bisects the angle formed by L→ and V→.In this model, , the intensity (luminance) I of light in the viewpoint direction at the reflection point P is expressed by equation (1).

I=IaKa+Ip(Kd(N→・L→)+Ka(N→・H→)
n)(1) ただし Ia:周囲光の強度 Ka:周囲光反射係数 Ip:光源からの光の強度 Kd:拡散反射係数 Ka:直接反射係数 n:物体の表面粗さに依存する量で、数十か
ら数百の間の数。
I=IaKa+Ip(Kd(N→・L→)+Ka(N→・H→)
n ) (1) where Ia: Intensity of ambient light Ka: Reflection coefficient of ambient light Ip: Intensity of light from the light source Kd: Diffuse reflection coefficient Ka: Direct reflection coefficient n: A quantity that depends on the surface roughness of the object, and is a number A number between ten and hundreds.

なお、“・”記号はベクトルの内積を表わす。 Note that the symbol "." represents the inner product of vectors.

曲面で囲まれた三次元物体の表示は次のように
行われる。曲面で囲まれた三次元の表示物体は、
まず複数のパツチ面と呼ばれる多角形の面からな
る多面体で近似され、この多面体の各頂点には、
本来の曲面の該当する点の単位法線ベクトルが与
えられる。ここで、表示物体として、頂点や各稜
線部分に丸味を付けた三角錐上のお椀型(たとえ
ば航空機の先端部分の形状)の物体を考える。い
ま、この物体を紙面上に伏せて設置したものとす
る。このとき、第3図において、表示物体を近似
する多面体1は、パツチ面11〜13で構成さ
れ。各頂点1〜4の単位法線ベクトルがそれぞれ
N→1〜N→4である。
A three-dimensional object surrounded by a curved surface is displayed as follows. A three-dimensional display object surrounded by a curved surface is
First, it is approximated by a polyhedron consisting of multiple polygonal faces called patch faces, and each vertex of this polyhedron has
The unit normal vector of the corresponding point on the original curved surface is given. Here, as a display object, a bowl-shaped object (for example, the shape of the tip of an airplane) on a triangular pyramid with rounded apexes and edges is considered. Now, assume that this object is placed face down on the paper surface. At this time, in FIG. 3, the polyhedron 1 that approximates the displayed object is composed of patch surfaces 11 to 13. The unit normal vectors of the vertices 1 to 4 are N→ 1 to N→ 4 , respectively.

[発明が解決しようとする課題] ここで、表示物体を近似する多面体の各頂点の
光の強度、すなわち、各頂点1〜4の輝度を(1)式
にて計算し、頂点の輝度からパツチ面11〜13
を表示するのに必要な各ドツト(画素)の輝度を
補間して求めることにより、シエーデイングを行
うことができる。この方法はグーローシエーデイ
ングと呼ばれるものである。また、これにかかわ
る別の方法として、表示物体を近似する多面体の
各頂点の単位法線ベクトルからパツチ面11〜1
3を表示するのに必要な各ドツト(画素)の単位
法線ベクトルを補間して求め、各ドツト(画素)
の輝度を(1)式にて計算することによりシエーデイ
ングを行なうこともできる。この方法はフオング
シエーデイングと呼ばれる。
[Problems to be Solved by the Invention] Here, the intensity of light at each vertex of a polyhedron that approximates a display object, that is, the brightness of each vertex 1 to 4, is calculated using equation (1), and the brightness of each vertex is calculated from the brightness of the vertex. Surfaces 11-13
Shading can be performed by interpolating and finding the luminance of each dot (pixel) necessary to display the image. This method is called Gouraud shedding. Another method related to this is to patch surfaces 11 to 1 from the unit normal vector of each vertex of a polyhedron that approximates the display object.
Interpolate and find the unit normal vector of each dot (pixel) necessary to display 3.
Shading can also be performed by calculating the brightness of using equation (1). This method is called Fongshading.

ところで、従来の装置では、1つの面について
1組の反射係数(材質係数)を与えていた。ま
た、(1)式に基づいて輝度を計算するときは、法線
ベクトルと光源方向ベクトルの内積が負となる
と、負の光は存在しないので、単純にその符号を
交換して、正の値に変換して処理をしていた。し
かし、これでは見える面が表でも裏でも同じ材質
で表示され、また、光源が正反対の方向に常に対
で存在するかの様に表示されることになる。一般
に、法線ベクトルが正の方向(矢印のある方向)
の面が表面、逆の方向の面が裏面と定義される。
第4図a,bのような円筒形の一部を構成する曲
面を考える。ここでは、円筒の外側の面を表面、
内側の面を裏面とする。このとき、第4図aのよ
うに物体の左側に光源が存在する場合は、円筒の
ハツチング部分15は表面が見えるが、光の当た
らない面となる。また、白色部分17は裏面が見
え、しかも光が当たらない面となる。第4図bの
ように物体の右側に光源が存在する場合は、円筒
のハツチング部分16は裏面が見えて、かつ光が
当たる面となる。また、白色部分18は表面が見
えて、かつ光が当たる面となる。このように表面
が見えても、その部分に光が当たる場合と当たら
ない場合とがある。同様に裏面が見えても光が当
たる場合と当たらない場合がある。しかし、従来
の装置では、1つの面には1組の反射係数(材質
係数)のみを与え、法線ベクトルと光源方向ベク
トルの内積が負になると、その符号を機械的に変
換して処理を行つていた。この内積が負となると
きに符号を交換する操作は、実際に存在する光源
にたいして、全く逆の方向に同じ強度を持つた光
源を仮想的に配置することに等しい。また、反射
係数(材質係数)を1組とすることは、裏面が見
えても表面と同じ反射特性であるとして計算する
ことになる。さて、法線ベクトルと光源方向ベク
トルの内積が負になる場合は、面と光源の向きの
なす角度が90度をこえる場合で、第4図a,bに
示すように、表面が見えているが、その面には光
が当らない場合15と、裏面が見えてしかも光が
当る場合16の2通りが考えられる。従来の装置
では、裏面の表示や実際に光が当たるか当たらな
いかを考慮していないため、前記2通りの差を表
示できない欠点があつた。また、法線ベクトルと
光源方向ベクトルの内積が正となる場合は、面と
光源の向きのなす角度が90度以内の場合で、第4
図a,bに示すように裏面が見えて光が当たらな
い場合17と、表面が見えてしかも光が当たる場
合18の2通りある。従来の装置では同様に、こ
の2通りの差を表示出来ない欠点があつた。結
局、従来の装置では表面が見えて光が当たる場
合、表面が見えて光が当たらない場合。裏面が見
えて光が当たる場合、裏面が見えて光が当たらな
い場合の合計4通りの場合が存在するが、それら
の差を表示出来ない欠点を持つていた。
By the way, in conventional devices, one set of reflection coefficients (material coefficients) is given to one surface. Also, when calculating brightness based on equation (1), if the inner product of the normal vector and the light source direction vector is negative, there is no negative light, so simply exchange the sign and get a positive value. was converted and processed. However, in this case, the visible surfaces are displayed using the same material both on the front and back, and the light sources are displayed as if they always exist in pairs in opposite directions. In general, the normal vector is in the positive direction (the direction of the arrow)
The surface is defined as the front surface, and the surface in the opposite direction is defined as the back surface.
Consider a curved surface that forms part of a cylindrical shape, as shown in Figures 4a and 4b. Here, the outer surface of the cylinder is the surface,
The inside side is the back side. At this time, if a light source is present on the left side of the object as shown in FIG. 4a, the surface of the cylindrical hatched portion 15 is visible but is not illuminated by light. Further, the white portion 17 is a surface where the back surface is visible and is not exposed to light. When the light source is on the right side of the object as shown in FIG. 4b, the hatched portion 16 of the cylinder becomes a surface on which the back surface is visible and is illuminated by light. Further, the white portion 18 is a surface that is visible and is exposed to light. Even if you can see the surface in this way, there are times when light hits that part and times when it doesn't. Similarly, even if the back side is visible, the light may or may not hit it. However, in conventional devices, only one set of reflection coefficients (material coefficients) is given to one surface, and when the inner product of the normal vector and the light source direction vector becomes negative, the sign is mechanically converted and processing is performed. I was gone. The operation of exchanging the sign when the inner product is negative is equivalent to virtually arranging a light source having the same intensity in the completely opposite direction with respect to the actually existing light source. Moreover, setting the reflection coefficients (material coefficients) to one set means that calculations are made assuming that even if the back surface is visible, it has the same reflection characteristics as the front surface. Now, if the inner product of the normal vector and the light source direction vector is negative, it means that the angle between the surface and the light source exceeds 90 degrees, and the surface is visible as shown in Figure 4 a and b. However, there are two possible cases: 15, where no light hits that side, and 16, where the back side is visible and is hit by light. Conventional devices have the drawback of not being able to display the difference between the two types, since they do not take into account the display on the back side or whether or not light actually hits the screen. Also, if the inner product of the normal vector and the light source direction vector is positive, the angle between the surface and the light source is within 90 degrees, and the fourth
As shown in Figures a and b, there are two cases: a case 17 where the back side is visible and no light hits it, and a case 18 where the front side is visible and the light hits it. Conventional devices similarly have the drawback of not being able to display the difference between these two types. After all, with conventional equipment, there are cases where the surface is visible and the light falls on it, and cases where the surface is visible and the light does not fall on it. There are four cases in total: when the back side is visible and the light hits it, and when the back side is visible and the light doesn't hit it, but it has the drawback of not being able to display the difference between them.

本発明の目的は、三次元図形の表示における図
形の表裏の区別を含むシエーデイングを行う装置
を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an apparatus that performs shading, including distinguishing between the front and back sides of a three-dimensional figure, in a display of a three-dimensional figure.

[課題を解決するための手段] 反射係数が一定な表示物体を考えると、その物
体上では(1)式は、2つの内積の関係であり、しか
も内積の値は−1から1の範囲であるから、あら
かじめ物体の反射係数(材質係数)について一連
の内積に対する輝度テーブルを用意し、内積の計
算結果から輝度テーブルを参照するようにするこ
とができる。
[Means for solving the problem] Considering a display object with a constant reflection coefficient, on that object Equation (1) is a relationship between two inner products, and the value of the inner product is in the range of -1 to 1. Therefore, a brightness table for a series of inner products of the reflection coefficient (material coefficient) of an object can be prepared in advance, and the brightness table can be referenced from the calculation result of the inner product.

[作用] ここで、輝度テーブルは、表と裏の材質係数
(反射係数)に対応して、最低2組以上を用意す
る。輝度テーブルは内積の正および負の領域につ
いて作成しておく。また、各表示図形には予め表
と裏に対応して、参照するテーブルの組を選択す
る表の材質インデツクスと、裏の材質インデツク
スを設定しておく。さらに従来からの習慣に従
い、CRTなどの表示画面に平行な方向にX,Y
座標軸を設定しさらに、これに垂直な方向にZ座
標軸を定め、画面から手前の方向にZ軸の正の方
向をとる。このようにZ軸を定めておいて、表裏
の判定は、その図形のZ方向の法線ベクトル成分
の正負によつて行い、表裏で異なる材質インデツ
クスを選択するようにする。また裏の場合は正負
を反転した法線ベクトルに対して内積計算を行
う。これにより、表で光の当らない部分と、裏で
光の当る部分などの表示を区別して行えるように
する。
[Function] Here, at least two sets of brightness tables are prepared corresponding to the material coefficients (reflection coefficients) of the front and back sides. A brightness table is created for the positive and negative regions of the inner product. Further, for each display figure, a front material index and a back material index for selecting a set of tables to be referred to are set in advance in correspondence with the front and back sides. Furthermore, in accordance with traditional practice,
Set the coordinate axes, and then set the Z coordinate axis in a direction perpendicular to this, with the positive direction of the Z axis pointing toward you from the screen. With the Z-axis determined in this way, the front and back sides of the figure are determined based on the sign of the normal vector component in the Z direction of the figure, and different material indexes are selected for the front and back sides. In addition, in the case of tails, the inner product calculation is performed on the normal vector whose sign is reversed. This makes it possible to distinguish between displaying areas that are not exposed to light on the front and areas that are exposed to light on the back.

[実施例] 第1図は、本発明の実施例の全体構成を示す。
座標変換プロセツサ20は、ホストコンピユータ
10から、近似多面体の各頂点の座標及び単位法
線ベクトルを受取つて、必要に応じて座標の回
転、平行移動などの処理を行う。その結果これら
の値は、最終的にはCRTなどの表示画面に平行
な方向にX−Y軸を、これに垂直で画面からの手
前の方向にZ軸を定めた座標系の値に変換され
る。この処理内容は、本発明と直接の関係はな
く、前掲のFoly他の著書に詳述されている。ま
た、座標変換プロセツサ20は、ホストコンピユ
ータ10から、近似多面体の各面について、表の
材質インデツクスと裏の材質インデツクス及び面
の表示モードを受け取る。
[Embodiment] FIG. 1 shows the overall configuration of an embodiment of the present invention.
The coordinate transformation processor 20 receives the coordinates of each vertex of the approximate polyhedron and the unit normal vector from the host computer 10, and performs processes such as rotation and translation of the coordinates as necessary. As a result, these values are ultimately converted to values in a coordinate system with the X-Y axes running parallel to the display screen of a CRT, etc., and the Z-axis perpendicular to this and pointing toward you from the screen. Ru. The contents of this process are not directly related to the present invention and are detailed in the above-mentioned book by Foly et al. The coordinate transformation processor 20 also receives from the host computer 10 the front material index, the back material index, and the surface display mode for each surface of the approximate polyhedron.

プロセツサ20は、表示モードが枠(ワイヤフ
レーム)表示のときは近似多面体の各稜線を折線
(ポリライン)として、また、表示モードが面
(シエーデイング)表示のときは、近似多面体の
各面を面(ポリゴン)として画素発生プロセツサ
30に転送する。このとき、本来折線には表裏は
ないが、表面が見えるのか、裏面が見えるのかを
区別できるように、その折点となつている近似多
面体の頂点の法線ベクトルで、各線分の表裏を判
別できるようにする。このようにして、プロセツ
サ20からの線分、面の図形は、その頂点座標と
単位法線ベクトルの形式で法線付ポリラインまた
は法線付ポリゴンとして、要素発生プロセツサ3
0に与えられる。また同時に表と裏の材質インデ
ツクスが与えられる。この材質インデツクスは前
記の通り、材質ごとに異なる内容をもつ輝度テー
ブルの組を選択するものである。
The processor 20 converts each edge of the approximate polyhedron into a polyline when the display mode is a frame (wire frame) display, and converts each face of the approximate polyhedron into a polyline when the display mode is a surface (shading) display. The data is transferred to the pixel generation processor 30 as a polygon). At this time, a broken line originally does not have front or back sides, but in order to distinguish whether the front side or the back side is visible, the front and back sides of each line segment are determined based on the normal vector of the vertex of the approximate polyhedron that is the break point. It can be so. In this way, the line segments and plane figures from the processor 20 are converted to the element generation processor 3 as polylines with normals or polygons with normals in the form of their vertex coordinates and unit normal vectors.
given to 0. At the same time, the front and back material indices are given. As described above, this material index selects a set of brightness tables having different contents for each material.

41と42の内積計算プロセツサで、要素発生
プロセツサ30から法線ベクトルN→と光源方向
L→、光源・視線中間方向H→を入力として、それぞ
れ内積(N→・L→),(N→・H→)を計算し、表あ
るい
は裏の材質インデツクスをレジスタ43より受け
て、輝度テーブルの参照アドレスを出力する。表
裏の判定は基本的には法線ベクトルのZ成分の正
負によつて行うが、その詳細はグーローシエーデ
イングとフオングシエーデイングで異なる。ま
た、どの法線ベクトルを用いるかでも異なる。ま
ず、フオングシエーデイングのときは、多角形の
各頂点における法線ベクトルから補間によつて、
その多角形を表示するのに必要なドツト(画素)
のそれぞれについて法線ベクトルを求める。した
がつて、表裏の判定は、画素発生プロセツサ30
が図形各点の法線ベクトルN→を算出したとき、そ
のZ成分の正負によつて行い、裏の場合は法線ベ
クトルN→の各成分の正負を反転する。またレジス
タ43に表または裏の材質インデツクスを設定す
る。しかし、現行のCRTでは画面上で3×3mm2
の図形でも、これを表示するのに必要なドツト
(画素)は100(=10×10)ドツト程度になるので、
このようなドツト(画素)ごとの表裏判定とレジ
スタ設定は一般に大変な回数となり、多角形単位
の判定となることも考えられる。この場合は、多
角形の各頂点の法線ベクトルの平均値をその面の
法線ベクトルとする。さらには、簡単に多角形を
定義する最初の頂点の法線ベクトルで代用するこ
とも考えられる。グーローシエーデイングの場合
は、ドツト(画素)ごとの法線ベクトルは求めな
いで、フオングシエーデイングの省略形と同じ方
式で表裏の判定を行える。また、折線の場合は、
各線分ごとにその両端の法線ベクトルの平均値ま
たは始点側の法線ベクトルで表裏の判定を行なう
ことが出来る。
Inner product calculation processors 41 and 42 input the normal vector N→, light source direction L→, and light source/line-of-sight intermediate direction H→ from the element generation processor 30, and calculate inner products (N→・L→) and (N→・H→), receives the front or back material index from the register 43, and outputs the reference address of the brightness table. The determination of front and back is basically made based on the positive or negative of the Z component of the normal vector, but the details differ between Gouraud shading and Fong shading. It also depends on which normal vector is used. First, when performing Fongshading, by interpolating from the normal vector at each vertex of the polygon,
Dots (pixels) required to display the polygon
Find the normal vector for each. Therefore, the determination of front and back is performed by the pixel generation processor 30.
When calculating the normal vector N→ of each point of the figure, this is done based on the sign of its Z component, and in the case of tails, the sign of each component of the normal vector N→ is reversed. Also, the front or back material index is set in the register 43. However, with current CRTs, the screen size is 3 x 3 mm 2
The number of dots (pixels) required to display this figure is approximately 100 (=10×10), so
Generally, such front/back determination and register setting for each dot (pixel) requires a large number of times, and it may be necessary to perform the determination for each polygon. In this case, the average value of the normal vectors of each vertex of the polygon is taken as the normal vector of that face. Furthermore, it is also possible to simply substitute the normal vector of the first vertex that defines the polygon. In the case of Gouroshading, the normal vector for each dot (pixel) is not determined, and the front and back sides can be determined using the same method as the abbreviation of Fongshading. Also, in the case of a broken line,
For each line segment, it is possible to determine whether the line is front or back based on the average value of the normal vectors at both ends or the normal vector on the starting point side.

輝度テーブル51〜56は、前記両内積の各値
に対応して周囲光反射と拡散反射の和に相当する
輝度Iadと直接反射に相当する輝度Isとを赤成分
(R)、緑成分(G)、青成分(B)に分けて記憶
している。
The brightness tables 51 to 56 calculate the brightness Iad corresponding to the sum of ambient light reflection and diffuse reflection and the brightness Is corresponding to direct reflection corresponding to each value of both inner products, into a red component (R) and a green component (G). ) and blue component (B).

ここにおいて、(1)式では、表示物体から光源が
充分遠くにある場合、Ia及びIpは、表示物体上
で、一定であると考えることができる。したがつ
て、(1)式は、第1項及び第2項からなる部分と第
3項からなる部分との2部分からなり、それぞれ
の部分を単一の内積の関数として処理することが
できるものである。したがつて、それぞれの部分
に対応して、2つのテーブルを作ればよいことに
なる。表示物体が複数個の異なつた材質からなる
場合には、各材質の拡散反射係数、直接反射係数
を用いて計算した複数組のテーブルを作ればよ
い。
Here, in equation (1), if the light source is sufficiently far from the display object, Ia and Ip can be considered to be constant on the display object. Therefore, equation (1) consists of two parts: a part consisting of the first and second terms, and a part consisting of the third term, and each part can be treated as a function of a single inner product. It is something. Therefore, it is sufficient to create two tables corresponding to each part. When the display object is made of a plurality of different materials, it is sufficient to create a plurality of sets of tables calculated using the diffuse reflection coefficient and direct reflection coefficient of each material.

本実施例において、輝度テーブルの内容は、第
5図に示すように、内積の正と負の一連の値に対
して記憶されており、正の部分は当る部分の輝
度、負の部分は、光の当らない部分の輝度成分で
ある。さらに本実施例では、16種類の材質係数に
対する輝度データの組をテーブルに記憶できるよ
うになつており、表・裏の材質インデツクスは0
〜15の値を選択できる。
In this embodiment, the contents of the brightness table are stored for a series of positive and negative values of the inner product, as shown in FIG. This is the luminance component of the part that is not illuminated by light. Furthermore, in this embodiment, sets of brightness data for 16 types of material coefficients can be stored in a table, and the material index for the front and back sides is 0.
~15 values can be selected.

これらの輝度データは、光の反射モデルによつ
て予め計算した表裏のデータである。一つ一つの
データはテーブルのプレーン511に記憶されて
いる。プレーンは材質毎に256ケ並んでいる。こ
の256ケのプレーンは、表・裏夫々に128ケずつ割
り当てられ、内積を0から1までと−1から0ま
でをそれぞれ128等分した時の輝度を順に記憶し
ている。
These brightness data are front and back data calculated in advance using a light reflection model. Each piece of data is stored in a plane 511 of the table. There are 256 planes arranged for each material. These 256 planes are assigned 128 to each of the front and back sides, and sequentially store the brightness when the inner product is divided into 128 equal parts from 0 to 1 and from -1 to 0, respectively.

輝度テーブル51〜56から読出された輝度情
報は、各色成分ごとに、加算器61〜63によつ
て和がとられ、フオングシエーデイングのとき
は、これによつて各ドツト(画素)の輝度が求め
られたことになり、その結果をフレームメモリ7
1〜73に書き込む。グーローシエーデイングの
ときは、加算器61〜63で和をとることによつ
て、近似多面体の頂点の輝度を求めたことにな
り、その結果を再度画素発生プロセツサ30に読
み込み(図示せず)、近似多面体の各々の面であ
るパツチ面の各ドツトの輝度を頂点の輝度から補
間して求めフレームバツフア71〜73に書込む
(図示せず)。パツチ面各ドツトの輝度の補間およ
びフレームバツフアへの書込み処理については、
前掲のFloy他の著書に詳述されている。
The brightness information read from the brightness tables 51 to 56 is summed for each color component by adders 61 to 63, and in the case of color shaded, the brightness of each dot (pixel) is calculated by this. has been calculated, and the result is stored in frame memory 7.
Write in numbers 1 to 73. In the case of Gouraud shedding, the brightness of the vertices of the approximate polyhedron is calculated by calculating the sum in the adders 61 to 63, and the result is read into the pixel generation processor 30 again (not shown). , the brightness of each dot on the patch plane, which is each face of the approximate polyhedron, is determined by interpolation from the brightness of the vertex and written into frame buffers 71 to 73 (not shown). Regarding the interpolation of the brightness of each dot on the patch surface and the writing process to the frame buffer,
This is detailed in the book by Floy et al., cited above.

フレームバツフアから、DA変換器81〜83
を経てCRTモニタ9の輝度を制御し、シエーデ
イングが実現される。
From the frame buffer, DA converters 81 to 83
Through this, the brightness of the CRT monitor 9 is controlled, and shading is achieved.

本実施例によれば、輝度テーブルの参照によ
り、各画素ごとの内積が得られた後は、(1)式の演
算を逐一行う場合に比べ処理が高速化すると共
に、表で光の当らない点と、裏で光の当る点の表
示などを区別して行えるようにする。
According to this embodiment, after the inner product for each pixel is obtained by referring to the brightness table, the processing speed is faster than when calculating equation (1) one by one, and the table is not exposed to light. To be able to distinguish between a point and a point illuminated by light on the back.

[発明の効果] 本発明によれば、図形各点の表裏の判定によ
り、参照する輝度テーブルの組を選択できるの
で、光の当たる点と当らない点、表と裏を区別し
た表示が高速に行える利点がある。
[Effects of the Invention] According to the present invention, it is possible to select a set of brightness tables to refer to by determining the front and back sides of each point of a figure, so that the display that distinguishes the points hit by light and the points not hit by light, and the front and back sides can be quickly performed. There are advantages to doing so.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明実施例の全体構成図、第2図は
光の反射モデルの構成図、第3図は表示近似多面
体を示す図、第4図は面の表裏と光の関係を示す
図、第5図は輝度テーブルの詳細説明図である。 30……画像発生プロセツサ、41,42……
内積計算プロセツサ、51〜56……輝度テーブ
ル。
Fig. 1 is an overall configuration diagram of an embodiment of the present invention, Fig. 2 is a configuration diagram of a light reflection model, Fig. 3 is a diagram showing a display approximate polyhedron, and Fig. 4 is a diagram showing the relationship between the front and back of a surface and light. , FIG. 5 is a detailed explanatory diagram of the brightness table. 30... Image generation processor, 41, 42...
Inner product calculation processor, 51-56... Brightness table.

Claims (1)

【特許請求の範囲】 1 三次元図形の表示にあたり、該三次元図形の
表示面の点の輝度を、該点の法線方向ベクトルと
光源方向ベクトルと視点方向ベクトルと該表示面
の光の反射係数を示す材質係数とから算出して、
該三次元図形を表示する図形シエーデイング装置
において、上記表示面の表裏の判定を行い、表な
らば表の材質係数で上記輝度を算出し、裏ならば
裏の材質係数で上記輝度を算出することを特徴と
する図形シエーデイング装置。 2 該表示面の表裏の判定を該法線方向ベクトル
により行うことを特徴とする特許請求の範囲第1
項記載の図形シエーデイング装置。 3 該三次元図形を多面体で近似し、該多面体を
構成する多角形の各点を該三次元図形の表示面の
点とすることにより該表示面の輝度を算出するこ
とを特徴とする特許請求の範囲第1項記載の図形
シエーデイング装置。 4 該三次元図形を多面体で近似し、該多面体を
構成する多角形の各頂点を該三次元図形の表示面
の点とすることにより該表示面の輝度を算出する
と共に、該多角形の内部の点の輝度は該頂点の該
輝度から補間して算出することを特徴とする特許
請求の範囲第1項記載の図形シエーデイング装
置。
[Claims] 1. When displaying a three-dimensional figure, the brightness of a point on the display surface of the three-dimensional figure is determined by the normal direction vector of the point, the light source direction vector, the viewpoint direction vector, and the reflection of light on the display surface. Calculated from the material coefficient indicating the coefficient,
In the figure shading device that displays the three-dimensional figure, it is determined whether the display surface is front or back, and if it is the front side, the brightness is calculated using the material coefficient of the front side, and if it is the back side, the brightness is calculated using the material coefficient of the back side. A figure shading device featuring: 2. Claim 1, characterized in that the front and back sides of the display surface are determined based on the normal direction vector.
Figure shading device as described in Section 1. 3. A patent claim characterized in that the luminance of the display surface of the three-dimensional figure is calculated by approximating the three-dimensional figure with a polyhedron and setting each point of the polygons constituting the polyhedron as a point on the display surface of the three-dimensional figure. The figure shading device according to item 1. 4 Approximating the three-dimensional figure with a polyhedron, and calculating the brightness of the display surface by making each vertex of the polygon constituting the polyhedron a point on the display surface of the three-dimensional figure, and calculating the brightness of the display surface of the three-dimensional figure. 2. The graphic shading apparatus according to claim 1, wherein the brightness of the point is calculated by interpolation from the brightness of the vertex.
JP22392284A 1984-10-26 1984-10-26 Pattern shading device Granted JPS61103277A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22392284A JPS61103277A (en) 1984-10-26 1984-10-26 Pattern shading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22392284A JPS61103277A (en) 1984-10-26 1984-10-26 Pattern shading device

Publications (2)

Publication Number Publication Date
JPS61103277A JPS61103277A (en) 1986-05-21
JPH0527154B2 true JPH0527154B2 (en) 1993-04-20

Family

ID=16805812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22392284A Granted JPS61103277A (en) 1984-10-26 1984-10-26 Pattern shading device

Country Status (1)

Country Link
JP (1) JPS61103277A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61239372A (en) * 1985-04-16 1986-10-24 Fanuc Ltd Method for discriminating surface and back of face
GB2207585B (en) * 1987-07-27 1992-02-12 Sun Microsystems Inc Method and apparatus for shading images
JP3387750B2 (en) * 1996-09-02 2003-03-17 株式会社リコー Shading processing equipment

Also Published As

Publication number Publication date
JPS61103277A (en) 1986-05-21

Similar Documents

Publication Publication Date Title
US5224208A (en) Gradient calculation for texture mapping
US5704024A (en) Method and an apparatus for generating reflection vectors which can be unnormalized and for using these reflection vectors to index locations on an environment map
US5357599A (en) Method and apparatus for rendering polygons
US6417858B1 (en) Processor for geometry transformations and lighting calculations
US5896136A (en) Computer graphics system with improved blending
US7508394B1 (en) Systems and methods of multi-pass data processing
US7116337B2 (en) Transparent depth sorting
JP3294149B2 (en) Three-dimensional texture mapping processing device and three-dimensional image generation device using the same
US6005580A (en) Method and apparatus for performing post-process antialiasing of polygon edges
US6961065B2 (en) Image processor, components thereof, and rendering method
US6078333A (en) Images and apparatus for carrying out the method
US20040061700A1 (en) Image processing apparatus and method of same
JPH04222071A (en) Method and apparatus for texture mapping
WO2008013605A1 (en) Real-time gpu rendering of piecewise algebraic surfaces
KR100559127B1 (en) Image processing device
GB2302001A (en) Computer graphics system having per pixel depth cueing
JP2003504697A (en) Anti-aliasing of subsampled texture edges
EP0676724A2 (en) Texture mapping method and image processing apparatus
JPH0527154B2 (en)
US6894696B2 (en) Method and apparatus for providing refractive transparency in selected areas of video displays
JP4714919B2 (en) Rendering device, recording medium, and program
JP2004054634A (en) Picture processor and its method
KR19990078036A (en) Method and apparatus for implementing efficient floating point Z-buffering
JP4419480B2 (en) Image processing apparatus and method
JP2528875B2 (en) Shading display device for three-dimensional figures