JPH0146915B2 - - Google Patents
Info
- Publication number
- JPH0146915B2 JPH0146915B2 JP59254960A JP25496084A JPH0146915B2 JP H0146915 B2 JPH0146915 B2 JP H0146915B2 JP 59254960 A JP59254960 A JP 59254960A JP 25496084 A JP25496084 A JP 25496084A JP H0146915 B2 JPH0146915 B2 JP H0146915B2
- Authority
- JP
- Japan
- Prior art keywords
- shadow
- value
- buffer memory
- memory
- shading
- 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
Links
- 238000000034 method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明はZ−buffer隠面消去装置に影付処理機
能を設けた図形処理装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a graphic processing device in which a Z-buffer hidden surface erasing device is provided with a shadow processing function.
(従来の技術)
三次元図形表示に必要な隠面消去処理として、
処理が単純でハードウエア化に適しているという
ことでZ−buffer法が用いられている(例えば、
日経エレクトロニクス6‐18(1984)日経マグロ
ウヒル社P.225−226)。(Prior art) Hidden surface removal processing necessary for displaying three-dimensional figures,
The Z-buffer method is used because the processing is simple and suitable for hardware implementation (for example,
Nikkei Electronics 6-18 (1984) Nikkei McGraw-Hill P.225-226).
(発明が解決しようとする問題点)
しかしながら、Z−buffer法は1画素毎に1つ
の奥行き値を保持しているので処理の履歴を残す
ことができないため影付処理に適用することは困
難であり(例えば、電子通信学会技術研究報告
EC 82−67 P.93)、Z−buffer法による付影処理
が組込まれた図形処理装置は発表されていなかつ
た。(Problem to be solved by the invention) However, since the Z-buffer method retains one depth value for each pixel, it is difficult to apply it to shadow processing because it cannot leave a history of processing. Yes (for example, Institute of Electronics and Communication Engineers technical research report
EC 82-67 P.93), no graphic processing device incorporating shading processing using the Z-buffer method had been announced.
(問題点を解決するための手段)
本発明は演算部、フレームバツフアメモリ、Z
−bufferメモリからなるZ−buffer隠面消去用の
図形処理装置において、第1図に示すように影度
数を格納するカウンタメモリ104と、カウント
手段101と、影付手段105とを備えたことを
特徴とする図形処理装置である。(Means for Solving the Problems) The present invention provides an arithmetic unit, a frame buffer memory, a Z
A graphic processing device for Z-buffer hidden surface elimination consisting of a -buffer memory is equipped with a counter memory 104 for storing a shading frequency, a counting means 101, and a shading means 105, as shown in FIG. This is a graphic processing device with special features.
(作用)
第1図において、Z−bufferメモリ103に格
納されている隠面消去処理後の可視画素の奥行き
Z値と、ホスト計算機またはグラフイツクス専用
プロセツサにより求めたシヤドーポリゴンおよび
光源に対して裏となる面ポリゴンの奥行きZ値と
をカウント手段101により比較してカウンタメ
モリ104の影度数をカウントする。影付手段1
05により前記カウンタメモリ104の最終値に
基づいてフレームバツフアメモリ102の値を所
定値に更新し影付を行う。前記カウント手段10
1の比較手段のハードウエアは隠面消去処理と共
用することができる。(Function) In FIG. 1, the depth Z value of the visible pixel after hidden surface removal processing stored in the Z-buffer memory 103 and the shadow polygon and light source calculated by the host computer or graphics processor are shown. The counting means 101 compares the depth Z value of the surface polygon to count the shadow degree in the counter memory 104. Shading means 1
05, the value in the frame buffer memory 102 is updated to a predetermined value based on the final value in the counter memory 104, and shading is performed. The counting means 10
The hardware of the comparison means 1 can be shared with the hidden surface removal process.
(実施例)
第2図は本発明の実施例を示すブロツク図であ
つて、1は演算部、2は画素毎に輝度および色情
報を記憶するフレームバツフアメモリ、3は画素
毎に奥行Zを格納するZ−bufferメモリ、4は影
度数をカウントするカウンタメモリ、5はバス、
6は図形処理装置、7はホスト計算機またはグラ
フイツクス専用プロセツサである。第3図はシヤ
ドーポリゴン生成の説明図であつて、Pは光源、
Qは多面体である。(Embodiment) FIG. 2 is a block diagram showing an embodiment of the present invention, in which 1 is a calculation unit, 2 is a frame buffer memory that stores brightness and color information for each pixel, and 3 is a depth Z for each pixel. 4 is a counter memory that counts the number of shadows, 5 is a bus,
6 is a graphics processing device, and 7 is a host computer or a dedicated graphics processor. FIG. 3 is an explanatory diagram of shadow polygon generation, where P is a light source,
Q is a polyhedron.
本実施例の動作を第2図、第3図に基づいて以
下説明する。本実施例では、3次元図形表示にお
ける手前の物体で隠れる面を表示しないようにす
る隠面消去処理と光源に対して陰となる面に影を
付ける付影処理を行つているが、まず隠面消去処
理について説明する。第2図に示すホスト計算機
またはグラフイツクス専用プロセツサ7により、
第3図に示す多面体Qの面ポリゴンABC,
ADB,BDC,ADCを視点座標系に変換し、表示
装置6へ転送する。第2図に示す図形処理装置6
の演算部1は、視点座標変換された前記各面ポリ
ゴンについてZ−buffer法による隠面消去処理を
行なう。すなわち、第2図に示すフレームバツフ
アメモリ2、Z−bufferメモリ3を予め背景色、
奥行き最大値でそれぞれ満たしておく。前記各面
ポリゴンについて画素毎に、その座標(i、j)
に対応する奥行きZ(i、j)とZ−bUfferメモ
リ3に記憶してある奥行きZM(i、j)とを比較
し、ZM(i、j)>Z(i、j)ならばフレームバ
ツフアメモリ2の値I(i、j)を前記画素の色
情報(輝度も含む)C(i、j)に置換え、Z−
bufferメモリ3の値ZM(i、j)を前記画素の奥
行きZ(i、j)に置換える。ZM(i、j)≦Z
(i、j)ならばフレームバツフアメモリ2、Z
−bufferメモリ3の値I(i、j)、ZM(i、j)
の更新は行なわない。以上の処理によつて、手前
の物体で隠れる面は表示されないよう消去され
る。 The operation of this embodiment will be explained below based on FIGS. 2 and 3. In this example, hidden surface removal processing is performed to avoid displaying surfaces hidden by objects in the foreground in 3D graphic display, and shadow adding processing is performed to add shadows to surfaces that are in shadow relative to the light source. The surface erasing process will be explained. The host computer or graphics dedicated processor 7 shown in FIG.
Surface polygon ABC of polyhedron Q shown in Fig. 3,
ADB, BDC, and ADC are converted into a viewpoint coordinate system and transferred to the display device 6. Graphic processing device 6 shown in FIG.
The calculation unit 1 performs hidden surface removal processing using the Z-buffer method on each surface polygon whose viewpoint coordinates have been transformed. That is, the frame buffer memory 2 and Z-buffer memory 3 shown in FIG.
Fill each with the maximum depth value. For each pixel of each surface polygon, its coordinates (i, j)
Compare the depth Z (i, j) corresponding to the depth Z M (i, j) stored in the Z-bUffer memory 3, and if Z M (i, j) > Z (i, j) Replace the value I (i, j) of the frame buffer memory 2 with the color information (including brightness) C (i, j) of the pixel, and calculate Z-
The value Z M (i, j) in the buffer memory 3 is replaced with the depth Z (i, j) of the pixel. Z M (i, j)≦Z
If (i, j), frame buffer memory 2, Z
−Buffer memory 3 value I (i, j), Z M (i, j)
will not be updated. Through the above processing, surfaces hidden by objects in the foreground are erased so that they are not displayed.
次に付影処理について説明する。第2図に示す
ホスト計算機またはグラフイツクス専用プロセツ
サ7により、第3図に示す光源Pからの光が多面
体Qにより遮られたことによつて生ずる影空間を
定義するシヤドーポリゴンAEFG,CBFG,
AEGCを求めて視点座標系に変換し、該変換した
シヤドーポリゴンと先に求めた多面体Qの面ポリ
ゴンのうち光源Pに対して裏となる面ポリゴンと
を視点に対する表・裏に分類して第2図に示す図
形処理装置6に転送する。図形処理装置6の演算
部1は転送されてきたデータにより付影処理を行
なう。すなわち、第2図に示すカウンタメモリ4
の値Cu(i、j)つまり影度数を予め零に設定し
ておく。Z−bufferメモリ3には前述の隠面消去
処理による最終結果が格納されている。そこで前
記シヤドーポリゴンおよび光源Pに対して裏とな
る面ポリゴンの各画素について、その画素の奥行
きZS(i、j)とZ−bufferメモリ3の値ZM(i、
j)とを比較し、カウンタメモリ4の影度数を制
御する。この処理は前記各シヤドーポリゴン、面
ポリゴン毎に実行される。詳しくいえば、
(a) 表のシヤドーポリゴン、面ポリゴンについて
ZS(i、j)≦ZM(i、j)ならばCu(i、j)
←Cu(i、j)+1
ZS(i、j)>ZM(i、j)ならば何もしな
い。 Next, shading processing will be explained. The host computer or graphics processor 7 shown in FIG. 2 uses shadow polygons AEFG, CBFG,
Find the AEGC and convert it to the viewpoint coordinate system, and classify the transformed shadow polygons and the surface polygons of the polyhedron Q obtained earlier that are the back side with respect to the light source P into front and back sides with respect to the viewpoint. The data is transferred to the graphic processing device 6 shown in FIG. The calculation unit 1 of the graphic processing device 6 performs shading processing using the transferred data. That is, the counter memory 4 shown in FIG.
The value C u (i, j), that is, the shadow degree, is set to zero in advance. The Z-buffer memory 3 stores the final result of the hidden surface removal process described above. Therefore, for each pixel of the surface polygon that is behind the shadow polygon and light source P, the depth Z S (i, j) of that pixel and the value Z M (i,
j) to control the shadow frequency of the counter memory 4. This process is executed for each shadow polygon and surface polygon. In detail, (a) For the shadow polygon and surface polygon in the table, if Z S (i, j)≦Z M (i, j), then C u (i, j)
←C u (i, j) + 1 If Z S (i, j) > Z M (i, j), do nothing.
(b) 裏のシヤドーポリゴン、面ポリゴンについて
ZS(i、j)≦ZM(i、j)ならばCu(i、j)
←Cu(i、j)−1
ZS(i、j)>ZM(i、j)ならば何もしな
い。(b) Regarding the back shadow polygon and surface polygon, if Z S (i, j)≦Z M (i, j), then C u (i, j)
←C u (i, j)-1 If Z S (i, j) > Z M (i, j), do nothing.
となる。すべての表・裏のシヤドーポリゴン、面
ポリゴンについて前記(a)、(b)の処理を終了した
後、前記カウンタメモリ4の値Cu(i、j)を読
み出し、
Cu(i、j)≧1ならばI(i、j)←CS
Cu(i、j)=0ならば何もしない
とする。ここでCSは影の色情報である。以上によ
り付影処理が完了する。becomes. After completing the processes (a) and (b) for all the front and back shadow polygons and surface polygons, the value C u (i, j) of the counter memory 4 is read out, and C u (i, j )≧1, then I(i, j)← CS C u (i, j)=0, nothing is done. Here, C S is the color information of the shadow. With the above steps, the shading process is completed.
なお、前記画素の奥行きZS(i、j)とZ−
bufferメモリ3の値ZM(i、j)とを比較する手
段のハードウエアは隠面消去処理と共用すること
ができる。 Note that the depth of the pixel Z S (i, j) and Z−
The hardware of the means for comparing the value Z M (i, j) of the buffer memory 3 can be shared with the hidden surface removal process.
前記フレームバツフアメモリ2に格納された色
情報に基づいてデイスプレイを表示すれば隠面消
去処理、付影処理の施された図形が表示される。 When the display is displayed based on the color information stored in the frame buffer memory 2, a figure that has been subjected to hidden surface removal processing and shading processing is displayed.
(発明の効果)
本発明は以上説明したようにZ−buffer隠面消
去用ハードウエアに影度数を格納するカウンタメ
モリを設けることにより、容易に影付処理を付加
することができるようにした。(Effects of the Invention) As described above, the present invention provides the Z-buffer hidden surface removal hardware with a counter memory for storing the number of shadows, thereby making it possible to easily add shadow processing.
第1図は本発明の構成を明示する図、第2図は
本発明の実施例のブロツク図、第3図はシヤドー
ポリゴンの生成の説明図である。
1……演算部、2……フレームバツフアメモ
リ、3……Z−bufferメモリ、4……カウンタメ
モリ、5……バス、6……図形処理装置、7……
ホスト計算機またはグラフイツクス専用プロセツ
サ。
FIG. 1 is a diagram clearly showing the configuration of the present invention, FIG. 2 is a block diagram of an embodiment of the present invention, and FIG. 3 is an explanatory diagram of the generation of shadow polygons. DESCRIPTION OF SYMBOLS 1... Arithmetic unit, 2... Frame buffer memory, 3... Z-buffer memory, 4... Counter memory, 5... Bus, 6... Graphic processing device, 7...
Host computer or dedicated graphics processor.
Claims (1)
bufferメモリからなるZ−buffer隠面消去用の図
形処理装置において、 影度数を格納するカウンタメモリと、隠面消去
処理後の可視画素の奥行きZ値とシヤドーポリゴ
ンおよび光源に対して裏となる面ポリゴンの奥行
きZ値とを比較して前記影度数をカウントするカ
ウント手段と、前記カウンタメモリの最終値に基
づいて影付を行なう影付手段とを備えたことを特
徴とする図形処理装置。[Claims] 1. Arithmetic unit, frame buffer memory, Z-
In a Z-buffer hidden surface removal graphic processing device consisting of a buffer memory, there is a counter memory that stores the shadow frequency, and a counter memory that stores the depth Z value of the visible pixel after hidden surface removal processing, shadow polygons, and the back side for the light source. A graphic processing device comprising: a counting means for counting the degree of shading by comparing it with a depth Z value of a surface polygon; and a shading means for performing shading based on the final value of the counter memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59254960A JPS61133483A (en) | 1984-12-04 | 1984-12-04 | Graphic processing unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59254960A JPS61133483A (en) | 1984-12-04 | 1984-12-04 | Graphic processing unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS61133483A JPS61133483A (en) | 1986-06-20 |
JPH0146915B2 true JPH0146915B2 (en) | 1989-10-11 |
Family
ID=17272255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59254960A Granted JPS61133483A (en) | 1984-12-04 | 1984-12-04 | Graphic processing unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61133483A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8339397B2 (en) | 2003-03-10 | 2012-12-25 | Sharp Kabushiki Kaisha | Method and apparatus for high-speed shadowing using shadow volumes |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63219080A (en) * | 1987-03-09 | 1988-09-12 | Matsushita Electric Ind Co Ltd | Image converting device |
-
1984
- 1984-12-04 JP JP59254960A patent/JPS61133483A/en active Granted
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8339397B2 (en) | 2003-03-10 | 2012-12-25 | Sharp Kabushiki Kaisha | Method and apparatus for high-speed shadowing using shadow volumes |
Also Published As
Publication number | Publication date |
---|---|
JPS61133483A (en) | 1986-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8803879B1 (en) | Omnidirectional shadow texture mapping | |
US7348989B2 (en) | Preparing digital images for display utilizing view-dependent texturing | |
US4924414A (en) | Apparatus and method for obtaining priority numbers for drawing figures forming a display figure | |
US9508191B2 (en) | Optimal point density using camera proximity for point-based global illumination | |
EP3340183B1 (en) | Graphics processing employing cube map texturing | |
CN107464286B (en) | Method, device, equipment and readable medium for repairing holes in three-dimensional city model | |
KR20060052042A (en) | Method for hardware accelerated anti-aliasing in 3d | |
CN111145329B (en) | Model rendering method, system and electronic device | |
US20050017974A1 (en) | System and method for shadow rendering | |
CN108022202A (en) | A kind of advanced blanking geometry engines structure | |
CN114529647A (en) | Object rendering method, device and apparatus, electronic device and storage medium | |
JPH0146915B2 (en) | ||
US20230206567A1 (en) | Geometry-aware augmented reality effects with real-time depth map | |
Yu | Efficient visibility processing for projective texture mapping | |
JP2004519044A (en) | Computer 3D graphic volume clipping | |
CN110738719A (en) | Web3D model rendering method based on visual range hierarchical optimization | |
Shivani | An efficient front‐to‐back depth‐buffer algorithm for real‐time rendering of partially occluded game objects in absence of GPU | |
Swan et al. | Slice-based volume rendering | |
JPH1031755A (en) | Three-dimensional graphic implicit-surface erasing processor | |
CN1501326A (en) | 3D digital image processor and visibility processing method used thereon | |
Worrall et al. | Dynamic discontinuities for radiosity | |
JPH0664621B2 (en) | Image generation method | |
JPH0234069B2 (en) | ||
Yuan et al. | P-buffer: a hidden-line algorithm in image-space | |
JPH02127785A (en) | Picture display device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |