[go: up one dir, main page]

JP3644460B2 - Von shading circuit - Google Patents

Von shading circuit Download PDF

Info

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
Application number
JP10290695A
Other languages
Japanese (ja)
Other versions
JPH08263695A (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.)
Digital Media Professionals Inc
Original Assignee
Digital Media Professionals Inc
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 Digital Media Professionals Inc filed Critical Digital Media Professionals Inc
Priority to JP10290695A priority Critical patent/JP3644460B2/en
Priority to CA002190938A priority patent/CA2190938A1/en
Priority to PCT/JP1996/000726 priority patent/WO1996029681A1/en
Priority to EP96906900A priority patent/EP0764921A4/en
Publication of JPH08263695A publication Critical patent/JPH08263695A/en
Priority to US08/754,237 priority patent/US5900881A/en
Application granted granted Critical
Publication of JP3644460B2 publication Critical patent/JP3644460B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

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・cosα (3)
で与えられ、(1)(2)および(3)式より三角函数変換を記憶素子で行い、また乗算および加算回路を用いた乗加算によってIp値を容易に求めることができる。(cosα)も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を用いたcosαを生成する記憶素子RAM7を経たのち乗算器5dにて反射係数Irとの乗算によって得る。以上から(3)式に基づきId・cosθとIr・cosαとを加算器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加算器
7cosα記憶素子
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 storage element 1 stores cosLv [cos (Lh−Nh) −1], the storage elements 2 and 4 store cosNv and cosNh, respectively, and the storage element 3 stores cos (Lv−Nv). The storage elements 2 and 4 are usually constituted by a ROM (Read only Memory) 1 and 3 by a RAM (Random Access Memory). As is clear from the variable of the triangular function, each of them has only one of the surface inclination components Nh and Nv, and the other is constant. This means that the capacity of the triangular function RAM or ROM is within the range that one input variable can take, and the capacity can be reduced. In FIG. 1, cos θ is obtained at the output of the adder 6a and cos α is obtained at the adder 6b by hardware implementation of the equation (2). 1/2 in the figure means 1-bit shift down of the connection. The diffusion component is multiplied by the coefficient Id and cos θ by the multiplier 5c, while the specular reflection component is passed through the storage element RAM 7 for generating cos n α using the specular reflectance n and then multiplied by the reflection coefficient Ir by the multiplier 5d. Get by multiplication. From the above, the final luminance Ip can be obtained by adding Id · cos θ and Ir · cos n α by the adder 6c based on the equation (3).
[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 cosNv storage element 3 cos (Lv-Nv) storage element 4 cosNh storage element 5a, 5b, 5c, 5d multipliers 6a, 6b, 6c adder 7 cos n α memory element

Claims (1)

曲面の法線ベクターおよび光源入射角をそれぞれ視点座標軸に対する水平および垂直角で定義し、そのうち面の法線ベクターを入力変数として、拡散および鏡面反射光を求めるフォンシェーディング回路において、水平および垂直角のそれぞれの入力変数毎に独立した記憶素子を用いて面の傾きと入射角、および視点軸と反射角の方向余弦をそれぞれ求めこれから拡散光成分と鏡面反射光成分を得る手段としてそれぞれ鏡面反射成分は記憶素子からなる鏡面反射率変換回路を経たのち鏡面反射係数と、また拡散光は拡散係数とそれぞれ乗算し、これら2つの成分を加算して反射光を得るフォンシェーディング回路。The normal vector and the light source incident angle on the curved surface are defined as the horizontal and vertical angles with respect to the viewpoint coordinate axis, respectively, and the horizontal and vertical angles are determined in the von shading circuit that calculates the diffuse and specular reflection light using the normal vector of the surface as the input variable. As a means to obtain the diffuse light component and the specular reflection component from the surface inclination and incidence angle, and the cosine of the viewing axis and the reflection angle, respectively, using an independent storage element for each input variable Is a phone shading circuit which passes through a specular reflectance conversion circuit comprising a memory element and then multiplies the specular reflection coefficient and diffused light by the diffusion coefficient and adds these two components to obtain reflected light.
JP10290695A 1995-03-22 1995-03-22 Von shading circuit Expired - Lifetime JP3644460B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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