JP3644460B2 - Von shading circuit - Google Patents
Von shading circuit Download PDFInfo
- Publication number
- JP3644460B2 JP3644460B2 JP10290695A JP10290695A JP3644460B2 JP 3644460 B2 JP3644460 B2 JP 3644460B2 JP 10290695 A JP10290695 A JP 10290695A JP 10290695 A JP10290695 A JP 10290695A JP 3644460 B2 JP3644460 B2 JP 3644460B2
- Authority
- JP
- Japan
- Prior art keywords
- cos
- light
- specular reflection
- component
- circuit
- 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
Links
- 238000009792 diffusion process Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000000034 method Methods 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- 238000009877 rendering Methods 0.000 description 1
Images
Landscapes
- Image Generation (AREA)
Description
この発明は光源を考慮したコンピュータ・グラフィックスのレンダリング技術の一つとして知られているフォンシェーディングモデルのハードウェア化に関するものであり、コンピュータ・グラフィックス映像の高速生成装置に利用されるものである。
【0001】
[従来の技術]
従来、フォンシェーディングをハードウェアで実現する方法は特願平4−255313に示されている。この方式は面の傾き(法線ベクター)と、光源からの入射角を視点座標軸に対して水平および垂直角の2つの成分で定義し、それぞれの成分毎に独立して拡散および鏡面反射を同時に、記憶素子内において求め、これら独立した傾き成分を平均値化によって合成し、最終なデータを得ている。これら成分毎に拡散および鏡面反射計算をそれぞれ1組の記億素子を用いて得ることからLSI化に適した回路であった。一方、フォンシェーディングのモデルでは求める反射光Ipは拡散成分と鏡面反射成分の和として定義されている。従来は前述したようにこのIpを得るため水平成分Iphと垂直成分Ipvを成分毎に求めた。しかし、1つのテーブル内で拡散および鏡面反射成分を傾き成分毎に同時に求め、これを平均化合成する方法は特定の傾き条件(一方が0゜と他方が90゜に近くなるような状態)では真のフォンシェーディングモデルから得られる値に対して誤差を生じる結果となっている。この発明はこの誤差を最小化するための回路を提供することを目的としている。
【0002】
[課題を解決するための手段]
この発明では面の傾を水平および垂直の2つの成分NhおよびNvで定義する一方、フォンシェーディングモデルから変数が式内においてNhおよびNvそれぞれ独立して函数項を構成するように新たな数式化モデルを導出し、この結果、入力変数の範囲を1変数内とした記憶素子を用いて各函数項を算出し、これらを乗算器および加算器を用いて拡散項成分と鏡面反射光成分を求めるものである。この数式モデルは次のように表される。光源入射角と面の法線ベクトルとの角度θに対し方向余弦
cosθは
cosθ=cosNv{cosLv [cos(Lh−Nh)−1]} +cos(Lv−Nv) (1)
となり、ここでLhおよびLvは光源からの入射角を視点座標軸に対する水平Lhおよび垂直角Lv成分で表したものである。また視点軸と反射角との差αに関して
cosα=2cosNh・cosNv・cosθ−cosLh・cosLv
あるいは
cosα≒ (cosθ+cosNH・cosNv)/2 (2)
となる。ここで光源からの光の入射角LhおよびLvはフレーム毎にユニークであり、回路構成上は一定値と見なすことができるため、(1)および(2)式の各三角函数項はそれぞれ1つの入力変数で成立している。すなわち函数値をROMでテーブル化する場合、そのアドレスはNhあるいはNvなどの1つの変数範囲内に留まる。フォンシェーディングモデルによる反射光Ipは拡散係数をId、鏡面反射係数をIr、反射率をnとすると
Ip=Id・cosθ+Ir・cosnα (3)
で与えられ、(1)(2)および(3)式より三角函数変換を記憶素子で行い、また乗算および加算回路を用いた乗加算によってIp値を容易に求めることができる。(cosα)nもcosαをアドレスとする記憶素子によって変換する。この発明の特徴は(1)、(2)および(3)式から明らかなように、曲面の法線を入力として、フォンシェーディングモデルによる反射光Ipが記憶素子、乗算器および加算器によって各点毎に1クロック以内に求めることができることである。演算の遅延はそれぞれの回路素子のスイッチング速度のみであり、それぞれの演算に複数のクロックを必要としない。
【0003】
[実施例]
前記の(1)(2)および(3)式に基づくこの発明に関するフォシェーディング回路を1図に示す。回路の入力変数はそれぞれ水平および垂直角で定義される曲面の傾きNhおよびNvであり、記憶素子1〜4、乗算器5a、5bおよび加算器6a、6bを用いて(3)式に示すそれぞれの方向余弦cosθおよびcosαを生成する。記憶素子1にはcosLv[cos(Lh−Nh)−1]が、また記憶素子2および4にはそれぞれcosNvとcosNhが、また記憶素子3にはcos(Lv−Nv)を記憶する。記憶素子2および4はROM(Read only Memory)1、および3はRAM(Random Accss Memory)で通常構成する。三角函数の変数から明らかなようにそれぞれは面の傾き成分NhおびNvの一方のみとし、他はコンスタントである。このことは三角函数用RAMあるいはROMの容量は1つの入力変数の取り得る範囲となり、小容量化が可能となる。1図において、(2)式のハードウェア化によって加算器6aの出力にてcosθがまた加算器6bにおいてcosαが得られる。図中の1/2は結線の1ビットシフトダウンを意味する。拡散成分は乗算器5cにて係数Idとcosθとの乗算、一方鏡面反射成分は鏡面反射率nを用いたcosnαを生成する記憶素子RAM7を経たのち乗算器5dにて反射係数Irとの乗算によって得る。以上から(3)式に基づきId・cosθとIr・cosnαとを加算器6cにて加算して最終輝度Ipを得ることができる。
【0004】
[発明の効果]
この本発明により演算誤差の少ないフォン・シェーディングモデルのハードウェア回路が構成できる。この結果、リアルタイムでハイライティング効果のある3次元物体の表示が可能となり、コンピュータ・グラフィックスによるバーチャル・リアリティの実現技術に重要な役割をもつ。
【図の簡単な説明】
【図1】本発明のフォンシェーディング回路
【符号の説明】
1 cosLv[cos(Lh−Nh)−1]記憶素子
2 cosNv記憶憶素子
3 cos(Lv−Nv)記憶素子
4 cosNh記憶素子
5a,5b,5c,5d乗算器
6a,6b,6c加算器
7cosnα記憶素子The present invention relates to hardware implementation of a phone shading model, which is known as one of computer graphics rendering technologies considering light sources, and is used in a computer graphics video high-speed generation device. .
[0001]
[Conventional technology]
Conventionally, a method for realizing phone shading by hardware is disclosed in Japanese Patent Application No. 4-255313. In this method, the surface inclination (normal vector) and the incident angle from the light source are defined by two components, the horizontal and vertical angles with respect to the viewpoint coordinate axis, and diffusion and specular reflection are simultaneously performed independently for each component. In the storage element, these independent gradient components are synthesized by averaging and final data is obtained. Since diffusion and specular reflection calculations were obtained for each of these components using a set of memory elements, the circuit was suitable for LSI implementation. On the other hand, in the von shading model, the reflected light Ip to be obtained is defined as the sum of the diffuse component and the specular reflection component. Conventionally, as described above, the horizontal component Iph and the vertical component Ipv are obtained for each component in order to obtain this Ip. However, the diffusion and specular reflection components in one table are obtained simultaneously for each inclination component, and the method of averaging and combining them is a specific inclination condition (one is close to 0 ° and the other is close to 90 °). This results in an error with respect to the value obtained from the true phone shading model. An object of the present invention is to provide a circuit for minimizing this error.
[0002]
[Means for solving problems]
In the present invention, a new mathematical model is defined in which the inclination of the surface is defined by two components, Nh and Nv, horizontal and vertical, while the variables form the function terms independently from each other in the equation from the von shading model. As a result, each function term is calculated by using a storage element in which the range of the input variable is within one variable, and the diffusion term component and the specular reflection component are obtained using a multiplier and an adder. It is. This mathematical model is expressed as follows. The direction cosine cos θ is cos θ = cos Nv {cos Lv [cos (Lh−Nh) −1]} + cos (Lv−Nv) (1) with respect to the angle θ between the light source incident angle and the normal vector of the surface.
Here, Lh and Lv represent the incident angle from the light source as horizontal Lh and vertical angle Lv components with respect to the viewpoint coordinate axis. Further, regarding the difference α between the viewpoint axis and the reflection angle, cos α = 2 cos Nh · cos Nv · cos θ−cos Lh · cos Lv
Or cos α≈ (cos θ + cos NH · cos Nv) / 2 (2)
It becomes. Here, since the incident angles Lh and Lv of the light from the light source are unique for each frame and can be regarded as a constant value in terms of the circuit configuration, each triangular function term in the equations (1) and (2) is one each. It is established with input variables. That is, when the function values are tabulated in the ROM, the addresses remain within one variable range such as Nh or Nv. Reflected light Ip by the von shading model is Id = Id · cos θ + Ir · cos n α (3) where Id is the diffusion coefficient, Ir is the specular reflection coefficient, and n is the reflectance.
The Ip value can be easily obtained by performing trigonometric function conversion with a storage element from the equations (1), (2) and (3), and multiplying and adding using a multiplication and addition circuit. (Cos α) n is also converted by a memory element having cos α as an address. As is clear from the equations (1), (2) and (3), the feature of the present invention is that the reflected light Ip by the von shading model is received at each point by the storage element, multiplier and adder using the normal of the curved surface as input. It can be obtained within one clock every time. The calculation delay is only the switching speed of each circuit element, and a plurality of clocks are not required for each calculation.
[0003]
[Example]
FIG. 1 shows a fogging circuit according to the present invention based on the above equations (1), (2) and (3). The input variables of the circuit are the slopes Nh and Nv of the curved surface defined by the horizontal and vertical angles, respectively. Direction cosines cos θ and cos α are generated. The
[0004]
[The invention's effect]
According to the present invention, a hardware circuit of a von shading model with a small calculation error can be configured. As a result, it is possible to display a three-dimensional object having a highlighting effect in real time, and it plays an important role in the technology for realizing virtual reality by computer graphics.
[Brief description of figure]
FIG. 1 shows a phone shading circuit according to the present invention.
1 cosLv [cos (Lh-Nh) -1] storage element 2
Claims (1)
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10290695A JP3644460B2 (en) | 1995-03-22 | 1995-03-22 | Von shading circuit |
CA002190938A CA2190938A1 (en) | 1995-03-22 | 1996-03-21 | Computer graphics circuit |
PCT/JP1996/000726 WO1996029681A1 (en) | 1995-03-22 | 1996-03-21 | Computer graphics circuit |
EP96906900A EP0764921A4 (en) | 1995-03-22 | 1996-03-21 | Computer graphics circuit |
US08/754,237 US5900881A (en) | 1995-03-22 | 1996-11-20 | Computer graphics circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10290695A JP3644460B2 (en) | 1995-03-22 | 1995-03-22 | Von shading circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08263695A JPH08263695A (en) | 1996-10-11 |
JP3644460B2 true JP3644460B2 (en) | 2005-04-27 |
Family
ID=14339912
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10290695A Expired - Lifetime JP3644460B2 (en) | 1995-03-22 | 1995-03-22 | Von shading circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3644460B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102014118892A1 (en) | 2014-12-17 | 2016-06-23 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Carbon membrane, process for producing carbon membranes and their use |
-
1995
- 1995-03-22 JP JP10290695A patent/JP3644460B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH08263695A (en) | 1996-10-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5900881A (en) | Computer graphics circuit | |
JP3021368B2 (en) | Bump mapping rendering method using pixel normal vector and rendering apparatus embodying the same | |
US5659671A (en) | Method and apparatus for shading graphical images in a data processing system | |
JP3103118B2 (en) | Texture synthesis apparatus and method | |
JPH1079046A (en) | Shading processor | |
EP0128789A1 (en) | Method for realising a geometrical tranformation on a video picture, and device for carrying out this method | |
JPH09231404A (en) | Picture processing method for displaying object, and device therefor | |
US5739820A (en) | Method and apparatus for specular reflection shading of computer graphic images | |
US6552726B2 (en) | System and method for fast phong shading | |
EP0567219B1 (en) | Video special effects apparatus and method | |
JPH0434159B2 (en) | ||
JP3644460B2 (en) | Von shading circuit | |
US5990894A (en) | Method for implementing the power function DP and computer graphics system employing the same | |
EP0125989B1 (en) | Method of generating a video picture comprising a geometric figure, and form generator carrying out this method | |
US7034827B2 (en) | Extension of fast phong shading technique for bump mapping | |
US5225824A (en) | Apparatus for generating video special effects | |
JP4456070B2 (en) | Light reflection intensity calculation circuit | |
US20030184546A1 (en) | Image processing method | |
EP0621728B1 (en) | Image transformation apparatus and method | |
JP3002670B1 (en) | House coordination support system and recording medium | |
JPH07296187A (en) | Image display processor | |
JP3352755B2 (en) | 3D image rendering device | |
JPH1063874A (en) | Spot lighting circuit | |
JP3733502B2 (en) | Bump map shading circuit | |
JPH08263694A (en) | Bump-map shading circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040727 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20040730 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040811 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20041102 |
|
R155 | Notification before disposition of declining of application |
Free format text: JAPANESE INTERMEDIATE CODE: R155 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050125 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090210 Year of fee payment: 4 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090210 Year of fee payment: 4 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100210 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110210 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110210 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110210 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130210 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130210 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130210 Year of fee payment: 8 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |