Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0772915B2 - Graphic shading device - Google Patents
[go: Go Back, main page]

JPH0772915B2 - Graphic shading device - Google Patents

Graphic shading device

Info

Publication number
JPH0772915B2
JPH0772915B2 JP61046146A JP4614686A JPH0772915B2 JP H0772915 B2 JPH0772915 B2 JP H0772915B2 JP 61046146 A JP61046146 A JP 61046146A JP 4614686 A JP4614686 A JP 4614686A JP H0772915 B2 JPH0772915 B2 JP H0772915B2
Authority
JP
Japan
Prior art keywords
brightness
luminance
reflection component
normal
interpolation
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
JP61046146A
Other languages
Japanese (ja)
Other versions
JPS62204386A (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.)
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 JP61046146A priority Critical patent/JPH0772915B2/en
Publication of JPS62204386A publication Critical patent/JPS62204386A/en
Publication of JPH0772915B2 publication Critical patent/JPH0772915B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は計算機を用いてCRT画面などに三次元曲面をそ
の曲率に応じて濃淡付け(シェーディング)して表示す
る装置に係り、上記のシェーディング処理を高速に実行
するのに好適な図形シェーディング装置に関する。
The present invention relates to an apparatus for displaying a three-dimensional curved surface on a CRT screen or the like by shading it on a CRT screen or the like using a computer. The present invention relates to a graphic shading device suitable for executing processing at high speed.

〔発明の背景〕[Background of the Invention]

計算機を利用して二次元方程式や三次方程式で記述され
た三次元曲面(球面やスプライン曲面)をCRT画面など
に曲面の幾何形状,曲面の光の反射特性,光源位置,光
源強度,視点位置に応じて濃淡付けをしてあたかもテレ
ビカメラで実物を撮影したかのような表示を行なう図形
シェーディング装置が知られている。このとき曲面の方
程式から直接的に曲面上の各点の輝度を計算すると計算
量がぼう大となるため、一般に曲面上に多数のサンプル
点をとり、その点におけるデータから曲面上の各点の輝
度を近似計算する手段が用いられる。サンプル点のデー
タから曲面を表示する方法としてはフォリー(J.D.Fol
y)他著,“ファンダメンタルズ・オブ・インターアク
ティブ・コンピュータ・グラフィックス(Fundamentals
of Interactive Computer Graphics)",アディスン・
ウェズ・リー・パブリッシング・カンパニー(Addison
Wesely Publishing Company)刊,第580〜584頁に記述
されているように、 サンプル点が作る多面体を考え、多面体を構成する
各面についてその平均輝度を計算して各面をその輝度で
均一に表示する多面体表示法(Constant Shading) 各サンプル点における面の向き(法線ベクトル)の
データから各サンプル点における輝度を計算し、その他
の点の輝度は各サンプル点からの距離に応じた比例配分
(線形補間)により、サンプル点における輝度から求め
る輝度補間法(Intensity Interpolation Shadingまた
はGouraud Shading) 各サンプル点における法線ベクトルのデータからそ
の他の点の法線ベクトルをサンプル点からの距離に応じ
て線形補間して計算し、この法線ベルトルに基づいてそ
の点の輝度を求める法線補間法(Normal−vector Inter
polation Shading)がある。一般に曲面上のサンプル点
に関して同じデータが得られる場合には、,,の
順で曲面の表示精度が良くなり、より曲面らしい表示が
得られる。しかしまたこの,,の順で計算量が多
くなり処理に時間を要したり、高速化のために複雑な装
置を必要とする。たとえば、およびの方法を高速に
実行する図形シェーディング装置としてそれぞれに特公
昭57−57715号公報・「濃淡図形発生装置」および本出
願人による特開昭61−70666号公報・「図形シェーディ
ング装置」がある。
Use a computer to display a 3D curved surface (spherical surface or spline curved surface) described by a 2D equation or a cubic equation on a CRT screen, etc., on the curved surface geometry, light reflection characteristics of the curved surface, light source position, light source intensity, and viewpoint position. There is known a figure shading device which makes a display corresponding to a real object photographed by a television camera by changing the density. At this time, if the brightness of each point on the curved surface is calculated directly from the equation of the curved surface, the amount of calculation is very large. Therefore, in general, many sample points are taken on the curved surface, and the data at that point A means for approximating the brightness is used. The method of displaying a curved surface from the data of sample points is Folly (JDFol
y) et al., “Fundamentals of Interactive Computer Graphics (Fundamentals)
of Interactive Computer Graphics) ", Addison
Wes Lee Publishing Company (Addison
As described in Wesely Publishing Company), pp. 580-584, consider a polyhedron created by sample points, calculate the average brightness of each surface that constitutes the polyhedron, and display each surface uniformly at that brightness. Polynomial display method (Constant Shading) The brightness at each sample point is calculated from the data of the surface orientation (normal vector) at each sample point, and the brightness at other points is proportionally distributed according to the distance from each sample point ( Luminance interpolation method (Intensity Interpolation Shading or Gouraud Shading) obtained from the luminance at the sample point by linear interpolation) The normal interpolation method (Normal-vector Interpolation)
polation Shading). Generally, when the same data is obtained for sample points on a curved surface, the curved surface display accuracy improves in the order of ,,, and a more curved surface-like display can be obtained. However, the calculation amount increases in this order, and the processing takes time, and a complicated device is required for speeding up. For example, Japanese Patent Publication No. 57-57715 and "Gray Figure Generator" and Japanese Patent Application Laid-Open No. 61-70666 and "Graphic Shading Apparatus", respectively, are known as figure shading apparatuses for executing the above methods at high speed. is there.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかしそれでも表示図形数が多くなると処理に時間を要
し、表示が終了するまでのオペレータの待ち時間が長く
なる。それでは作業能率が悪いが、さらにオペレータの
待ちによるイライラがつのり、オペレータの精神的負担
も大きくなる。このオペレータの待ちによるイライラを
解消し、作業能率を高めるには、なお一層の図形シェー
ディング装置が必要である。
However, even if the number of displayed figures increases, the processing takes time, and the waiting time of the operator until the display ends becomes long. Although the work efficiency is poor, the operator's waiting is frustrating and the operator's mental burden becomes heavy. In order to eliminate the annoyance caused by the waiting of the operator and improve the work efficiency, a further graphic shading device is required.

本発明の目的は、上記従来技術の課題を解決すべく、表
示する三次元物体図形に対して線形補間法及び法線補間
法による輝度計算を高速に実行してシェーディングされ
た輝度に基づいて表示手段に三次元物体の図形を表示で
きるようにした図形シェーディング装置を提供すること
にある。
An object of the present invention is to solve the above-mentioned problems of the prior art by executing high-speed luminance calculation by a linear interpolation method and a normal interpolation method for a three-dimensional object figure to be displayed, and displaying based on the shaded luminance. It is an object of the present invention to provide a figure shading device capable of displaying a figure of a three-dimensional object on the means.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、上記目的を達成するために、表示手段への三
次元図形の表示にあたり、表示図形上の各ドットの輝度
を算出してシェーディングを行ってメモリに記憶させる
図形シェーディング装置において、前記ドットの輝度の
周囲光反射成分と拡散反射成分との各々をサンプル点の
輝度の周囲光反射成分と拡散反射成分との各々に基づい
て輝度線形補間法によって計算する輝度線形補間手段
と、前記ドットの輝度の鏡面反射成分をサンプル点の法
線ベクトルに基づいて法線補間法によって計算する法線
補間手段と、サンプル点の輝度の平均値を求め、かつそ
れを前記ドットに割り当てる方法によって前記ドットの
輝度の計算を行う輝度平均値計算手段と、前記ドットの
属する図形が平面とみなせるか否かを判定する平面性判
定手段と、前記平面性判定手段で図形が平面とみなせる
と判定した場合には前記輝度平均値計算手段から出力さ
れるドットの輝度を選択し、前記平面性判定手段で図形
が平面とみなせないと判定した場合には前記輝度線形補
間手段から得られるドットの輝度を選択し、図形が平面
とみなせずに更に鏡面反射が生じるとみなしたときには
前記法線補間手段から得られるドットの輝度の鏡面反射
成分を前記輝度線形補間手段から得られるドットの輝度
に加算して選択する選択手段とを備え、該選択手段で選
択された各ドットの輝度を前記メモリに記憶させること
を特徴とするものである。
In order to achieve the above object, the present invention provides a graphic shading device for displaying a three-dimensional graphic on a display means, calculating the brightness of each dot on the display graphic, performing shading, and storing the result in a memory. Luminance linear interpolation means for calculating each of the ambient light reflection component and the diffuse reflection component of the luminance of each of the dots by the luminance linear interpolation method based on each of the ambient light reflection component and the diffuse reflection component of the luminance of the sample point; Normal interpolation means for calculating the specular reflection component of the brightness by the normal interpolation method based on the normal vector of the sample point, and obtaining the average value of the brightness of the sample point, and assigning it to the dot Brightness average value calculating means for calculating brightness, flatness determining means for determining whether the figure to which the dot belongs can be regarded as a plane, and the plane When the determination means determines that the figure can be regarded as a plane, the brightness of the dots output from the brightness average value calculation means is selected, and when the flatness determination means determines that the figure cannot be regarded as a plane, When the luminance of dots obtained from the luminance linear interpolating means is selected and it is considered that the figure is not regarded as a plane but further specular reflection occurs, the specular reflection component of the luminance of dots obtained by the normal interpolation means is subjected to the luminance linear interpolation. And a selecting unit for selecting by adding to the brightness of the dot obtained from the means, and storing the brightness of each dot selected by the selecting unit in the memory.

さらに、本発明においては、鏡面反射成分の角度の関係
を調べ、それによって鏡面反射成分が無視できるか否か
判定し、その結果にもとづいて、鏡面反射成分の計算を
省略するか否かを決定する図形シェーディング方式を提
供する。さらに又、本発明においては、表示面が平面と
みなせるか否かを判定し、平面とみなせると判定した場
合には多面体表示法によって輝度計算を行なうよう切替
える図形シェーディング方式を提供する。
Furthermore, in the present invention, the relationship between the angles of the specular reflection components is examined, and thereby it is determined whether the specular reflection components can be ignored, and based on the result, it is determined whether or not the calculation of the specular reflection components is omitted. A graphic shading method is provided. Furthermore, the present invention provides a figure shading method in which it is determined whether or not the display surface can be regarded as a flat surface, and when it is determined that the display surface can be regarded as a flat surface, the polyhedron display method is switched to perform luminance calculation.

〔作用〕[Action]

表示対象曲面上の各点の輝度は後述するように周囲光反
射成分,拡散反射成分,鏡面反射成分の3つの成分から
構成される。従来、輝度補間法(線形補間法)と法線補
間法は全く別の内容と考えられていた。しかし、両者の
周囲光反射成分と拡散反射成分の計算法は、本件発明者
により、同値であることがわかった。この性質を利用す
ると周囲光反射成分と拡散反射成分の計算は輝度補間法
で行なう方が簡単であるから、法線補間法によるよりも
輝度補間法による方が高速に計算できる。したがって法
線補間法による表示のときは鏡面反射成分は法線補間法
で計算し、周囲光反射成分と拡散反射成分は輝度補間法
で計算することにすると高速に処理できることになる。
The brightness of each point on the curved surface to be displayed is composed of three components, an ambient light reflection component, a diffuse reflection component, and a specular reflection component, as described later. Conventionally, the luminance interpolation method (linear interpolation method) and the normal interpolation method have been considered as completely different contents. However, the inventors of the present invention have found that the calculation method of the ambient light reflection component and the diffuse reflection component of both is the same value. When this property is used, it is easier to calculate the ambient light reflection component and the diffuse reflection component by the luminance interpolation method, so that the luminance interpolation method can perform the calculation faster than the normal interpolation method. Therefore, when displaying by the normal interpolation method, the specular reflection component is calculated by the normal interpolation method, and the ambient light reflection component and the diffuse reflection component are calculated by the luminance interpolation method, which enables high-speed processing.

つぎに、鏡面反射成分は指向性が極めて強く、特定の角
度でのみ生じ、その角度からずれるとほとんど生じない
性質をもっている。しかし従来は鏡面反射が極めて弱
く、実質的には無視できるような場合でもその値を計算
していた。この計算には後述するようにベクトルの内積
計算とその結果のn乗(n=50〜200)の計算が必要で
あり、大変に計算量が多い。したがって大変に無駄な計
算をしていたことになる。そこで鏡面反射成分について
はまず角度の関係を調べ、鏡面反射が無視できるか否か
を判定し、鏡面反射が無視できる場合にはその計算を省
略するようにすると、計算時間をかなり短縮できる。
Next, the specular reflection component has extremely strong directivity, and has a property that it occurs only at a specific angle and hardly occurs when deviating from that angle. However, conventionally, the value was calculated even when the specular reflection was extremely weak and could be practically ignored. This calculation requires vector inner product calculation and nth power (n = 50 to 200) of the result, as will be described later, and thus the calculation amount is very large. Therefore, it means that the calculation was extremely useless. Therefore, regarding the specular reflection component, the angle relationship is first examined to determine whether or not specular reflection can be ignored. If specular reflection can be ignored, the calculation time can be shortened considerably by omitting the calculation.

さらに、サンプル点が平面上に存在するとみなせる場合
にも計算の簡単化が可能である。表示対象面が平面でそ
の平面が曲面で切り取られているような場合などでは平
面と曲面の交線を求めるために平面上に多数のサンプル
点をとり、微小平面に分割する。この場合はサンプル点
は平面上にあるから多面体表示法,輝度補間法,法線補
間法で求めた輝度の計算結果はすべて同じになる。した
がって輝度補間法および法線補間法の場合でも、サンプ
ル点における法線ベクトルを調べ、平面上に存在すると
みなせ多面体表示法で代用できるかどうかの判定を行な
い、代用可の場合は多面体表示法で計算することによっ
て処理を高速化することができる。また同一平面上にあ
る微少面は光源および視点が無限遠にあるとみなせる場
合はすべて同一輝度となるから、同一平面上にあるか否
かの判定を行ない、同一平面上にあると判定された場合
はすでに求めた輝度をその平面の輝度とすることによっ
て計算を省略でき、処理を高速化することができる。
Furthermore, the calculation can be simplified even when the sample points can be regarded as existing on a plane. In the case where the display target surface is a flat surface and the flat surface is cut off by a curved surface, many sample points are taken on the flat surface and divided into minute flat surfaces in order to find the line of intersection between the flat surface and the curved surface. In this case, since the sample points are on the plane, the brightness calculation results obtained by the polyhedron display method, the brightness interpolation method, and the normal interpolation method are all the same. Therefore, even in the case of the luminance interpolation method and the normal interpolation method, the normal vector at the sample point is examined, it can be considered that it exists on the plane, and it is determined whether the polyhedral display method can be substituted. If the substitution is possible, the polyhedral display method is used. The calculation can speed up the process. If the light source and the viewpoint are at infinity, the microscopic surfaces on the same plane all have the same brightness, so it is judged whether they are on the same plane or not. In that case, the calculation can be omitted by setting the already obtained luminance as the luminance of the plane, and the processing can be speeded up.

〔実施例〕〔Example〕

本発明の実施例を詳述するに先きだち、まず輝度補間法
と法線補間法による輝度の計算において周囲光反射成分
と拡散反射成分の計算が同値であることを示し、つぎに
その性質を利用した図形シェーディング装置の構成例を
示す。
Before describing the embodiments of the present invention in detail, first, it is shown that the calculation of the ambient light reflection component and the diffuse reflection component is the same in the calculation of the luminance by the luminance interpolation method and the normal interpolation method. The structural example of the figure shading apparatus using is shown.

物体表面の輝度を物体表面の向き(法線ベクトル),面
の反射系数,光源位置,光源強度,視点位置の関係とし
て表わす方法は周知であり、たとえばブリン(J.F.Blin
n)著、“モデルズ・オブ・ライト・リフレクション・
フォー・コンピュータ・シンセサイズド・ピクチャーズ
(Models of Light Reflection for Computer Synthesi
zed Pictures)”シーグラフ(SIGGRAPH)'77プロシー
ディング(Proceeding)によると、次のようである。
It is well known to express the brightness of an object surface as a relationship among the direction of the object surface (normal vector), the reflection coefficient of the surface, the light source position, the light source intensity, and the viewpoint position.
n), “Models of Light Reflection
Models of Light Reflection for Computer Synthesi
zed Pictures) ”according to SIGGRAPH '77 Proceeding.

いま、第2図の反射モデルによるシェーディングの原理
を説明する。第2図において、 :反射点Pにおける反射面の向きを示す単位法線ベク
トル :反射点Pから見た光源の方向を示す単位ベクトル :反射点Pから見た視点の方向を示す単位ベクトル :LとVで示す方向の中間の方向を示す単位ベクトル と各ベクトルを定義する。このとき視点から見た反射点
Pにおける光の強度(輝度)Iはその赤,緑,青成分ご
とに I=KaIa+Is{Kd(・)+Ks(・)}(1) となる。ここでKaIaは周囲光反射成分,KdIs(・)
は拡散反射成分,KsIs(・)は鏡面反射成分であ
り、輝度Iはこの3成分の和で与えられる。ただし、 Ia:周囲光の表示面への入射強度 Is:光源からの表示面に入射する光の強度 Ka:周囲光反射係数 Kd:拡散反射係数 Ks:鏡面反射係数 n:鏡面反射の指向性指数 である。なお(・)はベクトルの内積を表わす。式
(1)の輝度計算法と法線補間法などの3種類の輝度計
算法との原則的な関係は次のようである。多面体表示法
と輝度補間法ではサンプル点においてのみ式(1)の計
算を行なう。法線補間法ではすべての点について法線ベ
クトルを求め、その結果を用いてすべての点において式
(1)の計算を行なう。具体例としていま、第3図に示
すような楕円体を表示する場合を考える。このとき楕円
体表面にP1,P2,P3,P4…のようなサンプル点が存在する
とする。するとたとえばサンプル点P1,P2,P3に対して距
離比で第3図に示したような関係のある点Pにおける輝
度Ipは3つの方法でそれぞれ次のようにして計算され
る。
Now, the principle of shading based on the reflection model of FIG. 2 will be described. In FIG. 2: is a unit normal vector indicating the direction of the reflecting surface at the reflection point P: is a unit vector indicating the direction of the light source viewed from the reflection point P: is a unit vector indicating the direction of the viewpoint viewed from the reflection point P: L Each vector is defined with a unit vector indicating an intermediate direction between the directions indicated by and V. At this time, the light intensity (luminance) I at the reflection point P viewed from the viewpoint is I = KaIa + Is {Kd (•) + Ks (•) n } (1) for each of the red, green, and blue components. Where KaIa is the ambient light reflection component, KdIs (・)
Is a diffuse reflection component, KsIs (·) n is a specular reflection component, and the brightness I is given by the sum of these three components. Where Ia: Incident intensity of ambient light on the display surface Is: Intensity of light incident on the display surface from the light source Ka: Ambient light reflection coefficient Kd: Diffuse reflection coefficient Ks: Specular reflection coefficient n: Specular directivity index Is. Note that (·) represents the inner product of the vectors. The principle relationship between the brightness calculation method of Expression (1) and three kinds of brightness calculation methods such as the normal interpolation method is as follows. In the polyhedron display method and the luminance interpolation method, the equation (1) is calculated only at the sample points. In the normal interpolation method, the normal vector is obtained for all points, and the result is used to calculate equation (1) at all points. As a specific example, consider the case of displaying an ellipsoid as shown in FIG. At this time, it is assumed that sample points such as P 1 , P 2 , P 3 , P 4 ... Exist on the surface of the ellipsoid. Then, for example, the brightness Ip at the point P having the relationship as shown in FIG. 3 in the distance ratio with respect to the sample points P 1 , P 2 , P 3 is calculated by the following three methods, respectively.

まず多面体表示法のときは第4図に示したように、P1,P
2,P3における輝度I1,I2,I3を求め、P点の輝度IpはPの
位置に関係なく で計算する。
First, in the polyhedron display method, as shown in Fig. 4, P 1 , P
2, obtains the luminance I 1, I 2, I 3 in the P 3, the brightness Ip at the point P, regardless of the position of the P Calculate with.

輝度補間法の場合は、第4図に示したようにまず辺P
1P2,P1P3上の点Pa,Pbにおける輝度Ia,Ibを求め、さらに
このIa,IbからIpを求める。このときIa,IbはP1とP2,P1
とP3に対する距離の比でI1,I2,I3から定める。その結
果、 Ia=αI1+(1−α)I2 (3) Ib=βI1+(1−β)I3 (4) である。同じくIpはPaとPbからの距離の比で定め、 Ip=γIa+(1−γ)Ib (5) である。そこで式(5)に式(3)(4)を代入して整
理すると Ip={α・γ+β(1−γ)}I1+(1−a)γI2 +(1−β)(1−γ)I3 (6) となる。ただし、 である。ここで次の仮定を定める。周囲光強度Iaは、表
示対象面上のすべての点に均等に入射する。光源は平行
光線または無限遠の点光源とし光源方向ベクトルLおよ
び光源からの入射強度Isも同じく表示対象面上のすべて
の点で同一であるとする。面の光学的性質すなわち反射
係数Ka,Kd,Ks,指向性指数nは1つの表示対象面上では
すべての点で同一であるとする。視点も無限遠にあり、
視点方向ベクトルVも面上のすべての点で同一であると
する。したがって中間ベクトルHも面上のすべての点で
同一であるとする。このときI1,I2,I3は次のように表わ
される。
In the case of the luminance interpolation method, as shown in FIG.
The luminances Ia and Ib at points Pa and Pb on 1 P 2 and P 1 P 3 are obtained, and Ip is obtained from these Ia and Ib. At this time, Ia and Ib are P 1 and P 2 and P 1
And the ratio of the distances to P 3 are determined from I 1 , I 2 , and I 3 . As a result, Ia = αI 1 + (1-α) I 2 (3) Ib = βI 1 + (1-β) I 3 (4). Similarly, Ip is determined by the ratio of the distances from Pa and Pb, and Ip = γIa + (1-γ) Ib (5). Therefore, substituting equations (3) and (4) into equation (5) and rearranging, Ip = {α · γ + β (1-γ)} I 1 + (1-a) γI 2 + (1-β) (1- γ) I 3 (6). However, Is. Here, the following assumptions are made. The ambient light intensity Ia is evenly incident on all points on the display target surface. The light source is a parallel light beam or a point light source at infinity, and the light source direction vector L and the incident intensity Is from the light source are also the same at all points on the display target surface. It is assumed that the optical properties of the surface, that is, the reflection coefficients Ka, Kd, Ks and the directivity index n are the same at all points on one display target surface. The viewpoint is infinite,
The viewpoint direction vector V is also the same at all points on the surface. Therefore, the intermediate vector H is also the same at all points on the surface. At this time, I 1 , I 2 , and I 3 are expressed as follows.

I1=KaIa+Is{Kd(・)+Ks(・} I2=KaIa+Is{Kd(・)+Ks(・
(7) I3=KaIa+Is{Kd(・)+Ks(・} この式(7)を式(6)に代入し整理すると Ip=KaIa+IsKd〔{α・γ+β(1−γ)}(・
) +(1−α)γ(・) +(1−β)(1−γ)(・)〕 +IsKs〔{α・γ+β(1−γ)}(・ +(1−α)γ(・ +(1−β)(1−γ)(・〕 (8) となる。
I 1 = KaIa + Is {Kd (・1 ) + Ks (・1 ) n } I 2 = KaIa + Is {Kd (・2 ) + Ks (・2 ) n }
(7) I 3 = KaIa + Is {Kd (· 3) + Ks (· 3) n} When this equation (7) to organize into equation (6) Ip = KaIa + IsKd [{α · γ + β (1 -γ)} (・
1 ) + (1-α) γ (· 2 ) + (1-β) (1-γ) (· 3 )] + IsKs [{α · γ + β (1-γ)} (· 1 ) n + (1- α) γ (· 2 ) n + (1-β) (1-γ) (· 3 ) n ] (8).

法線補間法の場合はまず点Pにおける法線ベクトルp
を求め、その値をもとに点Pにおける輝度Ipを計算す
る。点Pにおける法線ベクトルpは点P1,P2,P3におけ
る法線ベクトル1,2,から次のようにして求め
る。まず辺P1P2上の点PaおよびP1P3上の点Pbにおける法
線ベクトルa,bを1,2,を用いて、次のよう
に点間距離の比によって定める。
In the case of the normal interpolation method, first, the normal vector p at the point P
Is calculated, and the brightness Ip at the point P is calculated based on that value. The normal vector p at the point P is obtained from the normal vectors 1 , 2 and 3 at the points P 1 , P 2 and P 3 as follows. First side point P 1 on the P 2 Pa and P 1 P 3 on the normal vector a at a point Pb of using the 1, 2, 3 b, defined by the ratio of epilepsy distance as follows.

a=α+(1−α) (9) b=β+(1−β) (10) つぎに法線ベクトルpは点Pと点Pa,Pbとの距離の比
を用いて、IaとIbから次のように定める。
a = α 1 + (1-α) 2 (9) b = β 1 + (1-β) 3 (10) Next, the normal vector p is calculated by using the ratio of the distances between the point P and the points Pa and Pb. , Ia and Ib are defined as follows.

p=γIa+(1−γ)Ib (11) そこで式(11)に式(9),(10)を代入して整理する
と p={α・γ+B(1−γ)} +(1−α)γ +(1−β)(1−γ) (12) となる。そこで式(8)を導びいたときと同じ仮定を考
えると、点Pにおける輝度Ipは Ip=KaIa+Is{Kd(・p)+Ks(・p)
(13) となる。これに式(12)を代入すると Ip =KaIa+IsKd〔{α・γ+β(1−γ)}(・) +(1−α)γ(・) +(1−β)(1−γ)(・)〕 +IsKs(・p) (14) が得られる。
p = γIa + (1-γ) Ib (11) Then, by substituting the equations (9) and (10) into the equation (11), p = {α · γ + B (1-γ)} 1 + (1-α ) Γ 2 + (1-β) (1-γ) 3 (12). Considering the same assumption as when deriving equation (8), the brightness Ip at the point P is Ip = KaIa + Is {Kd (· p) + Ks (· p) n }.
(13) Substituting equation (12) into this, Ip = KaIa + IsKd [{α ・ γ + β (1-γ)} (・1 ) + (1-α) γ (・2 ) + (1-β) (1-γ) (・3 )] + IsKs (・ p) n (14) is obtained.

ここで式(8)と(14)を比較する。それぞれ係数Kaを
持った項が周囲光反射成分,係数Kdを持った項が拡散反
射成分,係数Ksを持った項が鏡面反射成分である。これ
らの各成分を比較すると、周囲光反射成分と拡散反射成
分はまったく同じであることがわかる。すなわち輝度補
間法と法線補間法で求めた周囲光反射成分と拡散反射成
分は同じ値である。いっぽう鏡面反射成分は輝度補間の
場合は(・)のただひとつの項のみであるが、法
線補間の場合は(・)のn次の多項式となり、一般
には異なる値を持つ。
Here, equations (8) and (14) are compared. The term with coefficient Ka is the ambient light reflection component, the term with coefficient Kd is the diffuse reflection component, and the term with coefficient Ks is the specular reflection component. Comparing these components, it can be seen that the ambient light reflection component and the diffuse reflection component are exactly the same. That is, the ambient light reflection component and the diffuse reflection component obtained by the luminance interpolation method and the normal interpolation method have the same value. On the other hand, the specular reflection component is only one term of (.) N in the case of luminance interpolation, but it is an nth degree polynomial of (.) In the case of normal interpolation and generally has different values.

次に鏡面反射成分の性質について考えてみると((・
)値の範囲は、0≦(・)≦1であり、指向性指
数nは一般に50〜200の値であるから(・)
(・)=1の近傍でのみほぼ1の値をもち、その他
の場合はほぼ0の値を持つ。つまり鏡面反射は角度に非
常に敏感であり、特定の角度でのみ強い反射が生じ、こ
の角度からはずれると急激に反射は小さくなり、大部分
の角度ではその値はほぼ0である。したがって鏡面反射
がほぼ0のときは上述の周囲光反射成分と拡散反射成分
の性質から輝度補間で求めた輝度と法線補間で求めた輝
度は同じになる。この性質を利用すると鏡面反射が無視
できるときは、法線補間法による輝度計算は輝度補間法
で代用しても良いことになる。法線補間法で計算する場
合は前述のように各表示点の法線ベクトルを求め、さら
に光源方向ベクトルとの内積を求める必要があるから、
単純な線形補間て求まる輝度補間のほうがこの方法によ
り以前よりはるかに高速に各点の輝度を求めることがで
きることがわかる。
Next, consider the properties of the specular reflection component ((・
) The range of values is 0 ≦ (·) ≦ 1, and the directivity index n is generally a value of 50 to 200. (·) n has a value of almost 1 only in the vicinity of (·) = 1. , Otherwise, it has a value of almost 0. That is, specular reflection is very sensitive to angle, and strong reflection occurs only at a specific angle, and when it deviates from this angle, the reflection sharply decreases, and the value is almost 0 at most angles. Therefore, when the specular reflection is almost zero, the luminance obtained by the luminance interpolation and the luminance obtained by the normal interpolation are the same due to the properties of the ambient light reflection component and the diffuse reflection component described above. If the specular reflection can be ignored by utilizing this property, the brightness calculation by the normal interpolation method may be replaced by the brightness interpolation method. When calculating with the normal interpolation method, it is necessary to find the normal vector of each display point as described above, and to find the inner product with the light source direction vector,
It can be seen that the luminance interpolation obtained by simple linear interpolation can obtain the luminance of each point much faster than before by this method.

次にサンプル点が1つの平面上に存在するときについて
考える。前述のように、平面が曲線で切り取られる場
合、その交線を求めるのに平面を微小な多角形に分割し
て近似計算する。この平面を表示するときこの多角形の
頂点がそのままサンプル点となる場合が多い。この場合
は平面上に多数のサンプル点が存在することになるが、
このような場合はサンプル点およびその間の点はすべて
同一の輝度となるから、輝度補間や法線補間のによる厳
密な計算は必要とではなく、多面体表示で十分である。
したがって、まずサンプル点の法線ベクトルを調べ法線
ベクトルが等しいと見なせる場合には平面と判定して多
面体表示を行なうことにより、計算量を少なくできる。
さらにこのときも鏡面反射を無視できるか否かの判定を
行なうことにより、鏡面反射が無視できる場合はサンプ
ル点における鏡面反射成分の計算を省略することができ
る。
Next, consider the case where the sample points are on one plane. As described above, when the plane is cut out by a curved line, the plane is divided into minute polygons and an approximate calculation is performed in order to find the line of intersection. When this plane is displayed, the vertices of this polygon are often sample points as they are. In this case, many sample points exist on the plane,
In such a case, since the sample points and all points between them have the same brightness, exact calculation by brightness interpolation or normal interpolation is not necessary, and polyhedron display is sufficient.
Therefore, the amount of calculation can be reduced by first checking the normal vectors of the sample points and determining that the normal vectors are equal to each other and performing the polyhedral display when the normal vectors are judged to be equal.
Further, also at this time, it is possible to omit the calculation of the specular reflection component at the sample point when the specular reflection can be ignored by determining whether the specular reflection can be ignored.

第1図にこれらの考え方を用いた本発明の図形シェーデ
ィング装置の実施例を示す。図形シェーディング装置20
0はホスト計算機100の制御のもとでシェーディングデー
タを発生し、その結果をフレームメモリ300に出力す
る。フレームメモリ100に記憶されたシェーディングデ
ータはカラーCRT400に読出され、その管面に表示され
る。図形シェーディング装置200はマイクロコンピュー
タ10と法線補間輝度計算回路50,輝度補間回路21,セレク
タ53,28,レジスタ14,16,18,ゲート51,アダー52で構成さ
れる。マイクロコンピュータ10は中央処理装置11とメモ
リ12で構成される。なお、中央処理装置11はその機能を
ブロック化して示してあるが、通常の中央処理装置が使
用される。ここで、図形シェーディング装置の機能の概
要はつぎのようである。まず図形シェーディング装置20
0は、ホスト計算機100から法線補間,輝度補間,多面体
表示のいずれのモードで表示を行なうかの表示モードデ
ータ,光源位置,光源強度Ia,Is,視点位置の表示法
のデータを受領する。次に表示対象物体ごとに物体表面
の光学的特性データを受領する。そしてサンプル点の幾
何学的データを受領して、表示対象物体表面の輝度を計
算して、フレームメモリ300に出力する。以下にその動
作の詳細を説明する。
FIG. 1 shows an embodiment of the figure shading apparatus of the present invention using these ideas. Figure shading device 20
0 generates shading data under the control of the host computer 100 and outputs the result to the frame memory 300. The shading data stored in the frame memory 100 is read by the color CRT 400 and displayed on the screen. The figure shading device 200 comprises a microcomputer 10, a normal interpolation luminance calculation circuit 50, a luminance interpolation circuit 21, selectors 53 and 28, registers 14, 16, and 18, a gate 51, and an adder 52. The microcomputer 10 comprises a central processing unit 11 and a memory 12. Although the central processing unit 11 is shown as having its function divided into blocks, an ordinary central processing unit is used. Here, the outline of the function of the graphic shading device is as follows. First, figure shading device 20
0 receives from the host computer 100 display mode data indicating which of normal interpolation mode, luminance interpolation mode, and polyhedron display mode is used for display, light source position, light source intensities Ia, Is, and viewpoint position display method data. Next, the optical characteristic data of the object surface is received for each object to be displayed. Then, the geometric data of the sample points is received, the brightness of the surface of the display target object is calculated, and the calculated brightness is output to the frame memory 300. The details of the operation will be described below.

まずホスト計算機100から図形シェーディング装置200に
多面体表示,輝度補間,法線補間のいずれで輝度計算を
行なうかの表示モードデータが転送される。さらに周囲
光源強度Ia,濃淡付けのための光源強度Is,その光源の方
向を示す光源方向ベクトル,視点方向ベクトルが転
送される。次に表示物体に関するデータが転送され、ま
ず最初の物体の表面の反射係数Ka,Kd,Ksおよび指向性指
数nが転送される。以下、物体表面の光学的特性が変化
するたびにこの反射係数と指数のデータが転送される。
次に、文体表面のサンプル点の座標値P1,P2,P3…と法線
ベクトル1,2,…が転送される。このときの転送
の単位はP1,P2,P3…が1つの多角形を形成する単位であ
る。図形シェーディング装置200は1つの多角形につい
て輝度計算の処理を行ない、それが終了するとつぎの多
角形を形成するサンプル点データを受けとり、その多角
形の処理を行なう。
First, display mode data indicating which of polyhedron display, luminance interpolation, and normal interpolation is used for luminance calculation is transferred from the host computer 100 to the figure shading device 200. Further, the ambient light source intensity Ia, the light source intensity Is for shading, the light source direction vector indicating the direction of the light source, and the viewpoint direction vector are transferred. The data relating to the display object is then transferred, first the reflection coefficients Ka, Kd, Ks and the directivity index n of the surface of the first object. Hereinafter, the reflection coefficient and index data are transferred each time the optical characteristics of the object surface change.
Next, the coordinate values P 1 , P 2 , P 3 ... And the normal vector 1 , 2 , 3, ... Of the sample points on the surface of the style are transferred. The unit of transfer at this time is a unit in which P 1 , P 2 , P 3, ... Form one polygon. The figure shading device 200 performs the brightness calculation processing for one polygon, and when the processing is completed, receives the sample point data forming the next polygon and processes the polygon.

このときホスト計算機100から転送されたデータは、マ
イクロコンピュータ10のメモリ12に記憶され、必要に応
じて中央処理装置11に読出され、必要な処理が行なわれ
る。まず中央処理装置11はモードデータが転送される
と、それをメモリ12に記憶する。そして、モード判定を
行ない、その結果をモードレジスタ14へ出力する処理13
を行なう。つぎに光源や視点に関する情報を受けとると
その内容をメモリ12に記憶する。物体表面の光学的特性
データの情報を受けとった場合も、メモリ12にその値を
記憶する。次に1つの多角形を形成するサンプル点デー
タを受けとると、それをメモリ12に記憶する。そして、
法線ベクトルデータ1,2,3,…から平面性の判定を
行ない、その結果を平面性レジスタ16に出力する処理15
を行なう。さらに光源方向ベクトル,視点方向ベクト
ルを読出し、法線ベクトル1,2,3,…と比較して
鏡面反射無視の可否の判定を行ない、その結果を鏡面反
射レジスタ18に出力する処理17を行なう。50はたとえは
特開昭61−70666号公報に示された法線補間輝度計算回
路であり、鏡面反射成分を法線補間法で計算してその値
を出力する回路である。法線補間モードのときは中央処
理装置11は、この法線補間輝度計算回路50が必要とする
データのメモリ12からの転送と法線補間輝度計算回路50
の起動の2つの処理20を行なう。21はたとえば特公昭57
−57715号公報に示された輝度補間回路である。輝度補
間モードのとき、中央処理装置11はメモリ12からデータ
を読出し、サンプル点における輝度I1,I2,I3…の計算処
理22を行ない、さらにその結果を輝度補間回路21に転送
する処理23を行なう。多面体表示モードのときは、輝度
の平均値の計算とその出力の処理24を行なう。なお処理
22における各サンプル点の輝度計算の手順は第6図に示
すようである。まず周囲光反射成分と拡散反射成分の輝
度の計算を行ない、その後鏡面反射の有無を判定して、
有の場合はその成分を計算して加算する処理を行なう。
At this time, the data transferred from the host computer 100 is stored in the memory 12 of the microcomputer 10 and read by the central processing unit 11 as necessary to perform the necessary processing. First, the central processing unit 11 stores the mode data in the memory 12 when the mode data is transferred. Then, the process 13 of performing mode determination and outputting the result to the mode register 14
Do. Next, when the information on the light source and the viewpoint is received, the contents are stored in the memory 12. When the information of the optical characteristic data of the object surface is received, the value is stored in the memory 12. Next, when the sample point data forming one polygon is received, it is stored in the memory 12. And
Processing for determining flatness from the normal vector data 1 , 2 , 3 , ... And outputting the result to the flatness register 16 15
Do. Further, the light source direction vector and the viewpoint direction vector are read out, compared with the normal vectors 1 , 2 , 3 , ... To determine whether or not specular reflection can be ignored, and the result 17 is output to the specular reflection register 18. Reference numeral 50 is, for example, a normal interpolation luminance calculation circuit disclosed in Japanese Patent Laid-Open No. 61-70666, which is a circuit for calculating the specular reflection component by the normal interpolation method and outputting the value. In the normal interpolation mode, the central processing unit 11 transfers the data required by the normal interpolation brightness calculation circuit 50 from the memory 12 and the normal interpolation brightness calculation circuit 50.
The two processes 20 for starting the are executed. 21 is, for example, Japanese Patent Sho 57
This is the luminance interpolation circuit disclosed in Japanese Patent Publication No. 57715. In the luminance interpolation mode, the central processing unit 11 reads data from the memory 12, performs a calculation process 22 of the luminances I 1 , I 2 , I 3 ... At the sample points, and further transfers the result to the luminance interpolation circuit 21. Do 23. In the polyhedron display mode, the calculation of the average value of the luminance and the processing 24 of its output are performed. Processing
The procedure for calculating the luminance of each sample point in 22 is as shown in FIG. First, the brightness of the ambient light reflection component and the diffuse reflection component is calculated, and then the presence or absence of specular reflection is determined,
If there is, the component is calculated and added.

第1図にもどって、輝度補間回路21は輝度補間による輝
度計算を行ない、表示点の輝度と画面上のアドレス信号
を出力する。中央処理装置11は処理24で輝度補間による
輝度計算を行ない、表示点の輝度と画面上のアドレス信
号を出力する。処理24は平均して求めた表示点の輝度と
画面上のアドレス信号を出力する。
Returning to FIG. 1, the brightness interpolation circuit 21 performs brightness calculation by brightness interpolation and outputs the brightness of the display point and the address signal on the screen. The central processing unit 11 performs brightness calculation by brightness interpolation in process 24 and outputs the brightness of the display point and the address signal on the screen. The process 24 outputs the luminance of the display point obtained by averaging and the address signal on the screen.

この装置では法線補間モードのときは鏡面反射成分は法
線補間輝度計算回路50で求め、周囲光反射成分と拡散反
射成分は輝度補間回路21で求め、その和をアダー52で計
算して出力する。鏡面反射が無視できる場合は鏡面反射
レジスタ18の出力によリゲート51で法線補間輝度計算回
路50の出力を阻止し、輝度補間回路21の出力のみがアダ
ー52から得られるようにする。平面とみなせると判定さ
れた場合は、セレクタ53によって平面性レジスタ16の内
容にしたがって処理24とアダー52の出力から処理24の出
力を選択する。
In this device, in the normal interpolation mode, the specular reflection component is obtained by the normal interpolation luminance calculation circuit 50, the ambient light reflection component and the diffuse reflection component are obtained by the luminance interpolation circuit 21, and the sum is calculated by the adder 52 and output. To do. When the specular reflection can be ignored, the output of the specular reflection register 18 blocks the output of the normal interpolation luminance calculation circuit 50 by the gate 51 so that only the output of the luminance interpolation circuit 21 can be obtained from the adder 52. When it is determined that the plane can be regarded as a plane, the selector 53 selects the output of the processing 24 from the outputs of the processing 24 and the adder 52 according to the contents of the planarity register 16.

セレクタ28はモードレジスタ14の内容により、セレクタ
53の出力,輝度補間回路21からの出力,処理24の結果の
いずれかひとつを選択してフレームメモリ300に出力す
る。法線補間輝度計算回路50,輝度補間回路21,及び処理
24が出力する画面上のアドレス信号はフレームメモリ30
0のアドレス信号ともなっており、フレームメモリ300の
そのアドレスに同じく法線補間輝度計算回路50,輝度補
間回路21,及び処理24が出力する輝度データが記憶され
る。その結果、フレームメモリ300に輝度計算の全結果
が記憶される。この内容を読出してCRT400に表示するこ
とにより、濃淡付けされた曲面の表示がCRTの管面に出
現する。
The selector 28 is a selector depending on the contents of the mode register 14.
One of the output of 53, the output from the luminance interpolation circuit 21, and the result of processing 24 is selected and output to the frame memory 300. Normal interpolation luminance calculation circuit 50, luminance interpolation circuit 21, and processing
The address signal on the screen output by 24 is the frame memory 30.
It also serves as an address signal of 0, and the normal line interpolation luminance calculation circuit 50, the luminance interpolation circuit 21, and the luminance data output by the processing 24 are stored at the address of the frame memory 300. As a result, all the results of the brightness calculation are stored in the frame memory 300. By reading out this content and displaying it on the CRT 400, the display of the shaded curved surface appears on the tube surface of the CRT.

この実施例における処理22の手順を第6図に示す。この
場合は、法線補間モードで、輝度補間回路21を使用する
とき、回路21に鏡面反射成分が入力されないようにする
制御を行なう。また平面とみなせると判定されたときは
法線補間輝度計算回路50と輝度補間回路21を使用しない
で多面体表示を行なうのでこの22の処理に鏡面反射成分
が含まれるようにする。そのために80〜83の処理を行な
う。
The procedure of process 22 in this embodiment is shown in FIG. In this case, when the luminance interpolation circuit 21 is used in the normal interpolation mode, control is performed so that the specular reflection component is not input to the circuit 21. When it is determined that the plane can be regarded as a plane, the normal interpolation luminance calculation circuit 50 and the luminance interpolation circuit 21 are not used to display a polyhedron, so that the processing of 22 includes a specular reflection component. Therefore, the processing of 80 to 83 is performed.

本発明の実施例において、同一平面上の微小面が多数出
現する場合は、第1図の処理24における計算結果を記憶
する領域をメモリ12に設け、第7図に示すように、91で
平面と判定した場合は92のようにさらに前回の平面と同
じ平面かを調べ、異なっておればその平面の輝度を93で
計算し、その結果を94で記憶する。同じ平面であるなら
ば95のように前回の輝度を読み出し、今回の輝度とす
る。
In the embodiment of the present invention, when a large number of minute surfaces on the same plane appear, an area for storing the calculation result in the process 24 of FIG. 1 is provided in the memory 12, and as shown in FIG. If it is determined that the plane is the same plane as the previous plane, as in 92, the brightness of the plane is calculated in 93 if different, and the result is stored in 94. If it is on the same plane, the previous brightness is read out as 95, and this is the current brightness.

〔発明の効果〕〔The invention's effect〕

本発明によれば、三次元物体の図形を表示する際、各ド
ットPの輝度Ipのうち、周囲光反射成分の輝度と拡散反
射成分の輝度との各々をサンプル点の座標Piに基づいて
線形補間手段による線形補間法によって算出し、前記反
射点Pの輝度Ipのうち、鏡面反射成分の輝度については
サンプル点の単位法線ベクトルNiに基づいて法線補間手
段による法線補間法によって算出するようにし、しかも
平面と判定される表面においてはサンプル点において算
出される輝度の平均値を取るようにしたので、三次元物
体の図形における輝度のシェーディング計算の高速化が
図れ、しかも簡単な装置構成により実現することができ
る効果を奏する。
According to the present invention, when displaying a figure of a three-dimensional object, among the brightness Ip of each dot P, the brightness of the ambient light reflection component and the brightness of the diffuse reflection component are linearly calculated based on the coordinates Pi of the sample points. The brightness of the specular reflection component of the brightness Ip of the reflection point P is calculated by the normal interpolation method by the normal interpolation means based on the unit normal vector Ni of the sample point. In addition, since the average value of the brightness calculated at the sample points is taken on the surface determined to be a plane, the speed of the shading calculation of the brightness in the figure of the three-dimensional object can be increased, and the device configuration is simple. There is an effect that can be realized by.

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

第1図は本発明の実施例の装置構成を示す図、第2図は
輝度計算に用いるベクトルの定義を示す図、第3図は楕
円体上のサンプル点と表示点の位置関係を説明する図、
第4図は輝度補間法における輝度計算法を説明する図、
第5図は法線補間法を説明する図、第6図は本発明の実
施例における中央処理装置内での輝度計算手順を示す
図、第7図は同一平面上の微少面が多数出現する場合の
輝度計算手順を示す図である。 100……ホスト計算機、200……図形シェーディング装
置、 300……フレームメモリ、400……CRT、 10……マイクロコンピュータ、11……中央処理装置、 12…メモリ、21……輝度補間回路、 14…モードレジスタ、16……平面性レジスタ、 18……鏡面反射レジスタ、 50……法線補間法による鏡面反射成分計算回路、 52……アダー。
FIG. 1 is a diagram showing a device configuration of an embodiment of the present invention, FIG. 2 is a diagram showing a definition of a vector used for brightness calculation, and FIG. 3 is a diagram showing a positional relationship between sample points and display points on an ellipsoid. Figure,
FIG. 4 is a diagram for explaining the brightness calculation method in the brightness interpolation method,
FIG. 5 is a diagram for explaining the normal interpolation method, FIG. 6 is a diagram showing a luminance calculation procedure in the central processing unit in the embodiment of the present invention, and FIG. 7 shows many minute planes on the same plane. It is a figure which shows the brightness calculation procedure in the case. 100 ... Host computer, 200 ... Graphic shading device, 300 ... Frame memory, 400 ... CRT, 10 ... Microcomputer, 11 ... Central processing unit, 12 ... Memory, 21 ... Luminance interpolation circuit, 14 ... Mode register, 16 ... Planarity register, 18 ... Specular reflection register, 50 ... Specular reflection component calculation circuit by normal interpolation method, 52 ... Adder.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 辻岡 重夫 神奈川県横浜市戸塚区吉田町292番地 株 式会社日立製作所マイクロエレクトロニク ス機器開発研究所内 (72)発明者 仙田 修一 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (56)参考文献 特開 昭62−186373(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Shigeo Tsujioka Inventor Shigeo Tsujioka, 292 Yoshida-cho, Totsuka-ku, Yokohama, Kanagawa, Ltd. Microelectronics Equipment Development Laboratory, Hitachi, Ltd. 5-2-1, Hitachi Ltd. Omika factory (56) References JP-A-62-186373 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】表示手段への三次元図形の表示にあたり、
表示図形上の各ドットの輝度を算出してシェーディング
を行ってメモリに記憶させる図形シェーディング装置に
おいて、 前記ドットの輝度の周囲光反射成分と拡散反射成分の各
々をサンプル点の輝度の周囲光反射成分と拡散反射成分
の各々に基づいて輝度線形補間法によって計算する輝度
線形補間手段と、 前記ドットの輝度の鏡面反射成分をサンプル点の法線ベ
クトルに基づいて法線補間法によって計算する法線補間
手段と、 サンプル点の輝度の平均値を求め、かつそれを前記ドッ
トに割り当てる方法によって前記ドットの輝度の計算を
行う輝度平均値計算手段と、 前記ドットの属する図形が平面とみなせるか否かを判定
する平面性判定手段と、 前記平面性判定手段で図形が平面とみなせると判定した
場合には前記輝度平均値計算手段から出力されるドット
の輝度を選択し、前記平面性判定手段で図形が平面とみ
なせないと判定した場合には前記輝度線形補間手段から
得られるドットの輝度を選択し、図形が平面とみなせず
に更に鏡面反射が生じるとみなしたときには前記法線補
間手段から得られるドットの輝度の鏡面反射成分を前記
輝度線形補間手段から得られるドットの輝度に加算して
選択する選択手段とを備え、 該選択手段で選択された各ドットの輝度を前記メモリに
記憶させることを特徴とする図形シェーディング装置。
1. When displaying a three-dimensional figure on a display means,
In a figure shading device for calculating the brightness of each dot on a display figure and performing shading and storing it in a memory, each of the ambient light reflection component and the diffuse reflection component of the dot brightness is the ambient light reflection component of the sample point brightness. And a linear interpolation method for calculating a specular reflection component of the brightness of the dot by a normal interpolation method based on a normal vector of sample points Means, a brightness average value calculating means for calculating the average value of the brightness of the sample points, and calculating the brightness of the dots by the method of assigning it to the dots, and whether the figure to which the dots belong can be regarded as a plane. Flatness determining means for determining, and if the flatness determining means determines that the figure can be regarded as a plane, the brightness average value calculating means When the brightness of the dots to be output is selected and the flatness judging means judges that the figure cannot be regarded as a plane, the brightness of the dot obtained from the brightness linear interpolating means is selected and the figure is not regarded as a plane. Further, when specular reflection is considered to occur, the specular reflection component of the luminance of the dot obtained from the normal interpolation means is added to the luminance of the dot obtained from the luminance linear interpolation means to select it. A figure shading device characterized in that the brightness of each dot selected by the means is stored in the memory.
JP61046146A 1986-03-05 1986-03-05 Graphic shading device Expired - Lifetime JPH0772915B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61046146A JPH0772915B2 (en) 1986-03-05 1986-03-05 Graphic shading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61046146A JPH0772915B2 (en) 1986-03-05 1986-03-05 Graphic shading device

Publications (2)

Publication Number Publication Date
JPS62204386A JPS62204386A (en) 1987-09-09
JPH0772915B2 true JPH0772915B2 (en) 1995-08-02

Family

ID=12738827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61046146A Expired - Lifetime JPH0772915B2 (en) 1986-03-05 1986-03-05 Graphic shading device

Country Status (1)

Country Link
JP (1) JPH0772915B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0269882A (en) * 1988-09-06 1990-03-08 Toshiba Corp Picture processing system
JPH02191995A (en) * 1989-01-20 1990-07-27 Daikin Ind Ltd Method and device for displaying semitransparent surface
JPH0371271A (en) * 1989-08-10 1991-03-27 Daikin Ind Ltd Method and device for detecting hit
JPH04125787A (en) * 1990-09-17 1992-04-27 Hitachi Ltd Method and device for displaying three-dimensional graphic
TW335466B (en) * 1995-02-28 1998-07-01 Hitachi Ltd Data processor and shade processor
JP3387750B2 (en) * 1996-09-02 2003-03-17 株式会社リコー Shading processing equipment
WO2006077710A1 (en) * 2005-01-19 2006-07-27 Matsushita Electric Industrial Co., Ltd. Image conversion method, texture mapping method, image conversion device, server client system, and image conversion program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0754554B2 (en) * 1986-02-13 1995-06-07 工業技術院長 Display processing method

Also Published As

Publication number Publication date
JPS62204386A (en) 1987-09-09

Similar Documents

Publication Publication Date Title
KR960012670B1 (en) Method and apparatus for adaptive phong shading
US6621925B1 (en) Image processing apparatus and method and information providing medium
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
US5369737A (en) Normalization of vectors associated with a display pixels of computer generated images
US6833830B2 (en) Method and apparatus for providing shading in a graphic display system
US6437781B1 (en) Computer graphics system having per pixel fog blending
US5673374A (en) Method and apparatus for non-disturbed specular reflections on textured surfaces
EP0933729A2 (en) Three-dimensional graphics accelerator
EP0447195B1 (en) Pixel interpolation in perspective space
US6304265B1 (en) System for distinguishing front facing and back facing primitives in a computer graphics system using area calculations in homogeneous coordinates
JP4160261B2 (en) Improved method and apparatus for pixel-by-pixel MIP mapping and three-line filtering
EP0740272A2 (en) Method and apparatus for fast rendering of three-dimensional objects
GB2327178A (en) Anti-aliaising method using sub-sample pixels and corresponding sub-scan lines
US5029225A (en) Texture mapping apparatus
JPH04213779A (en) System and method for displaying color image
JP2006107093A (en) Image processor and program
JPH0772915B2 (en) Graphic shading device
JP2692783B2 (en) System and method for generating a two-dimensional representation of a three-dimensional object
US5499324A (en) Graphic display apparatus with improved shading capabilities
JP3629243B2 (en) Image processing apparatus and method for rendering shading process using distance component in modeling
US5926183A (en) Efficient rendering utilizing user defined rooms and windows
US6333742B1 (en) Spotlight characteristic forming method and image processor using the same
EP0907148A2 (en) Computer graphics hardware for lighting effects
US6590582B1 (en) Clipping processing method
US6346949B1 (en) Three-dimensional form data processor retaining information on color boundaries of an object when thinning coordinate data