JP2022119427A - Calculation device, calculation method, and program - Google Patents
Calculation device, calculation method, and program Download PDFInfo
- Publication number
- JP2022119427A JP2022119427A JP2021016520A JP2021016520A JP2022119427A JP 2022119427 A JP2022119427 A JP 2022119427A JP 2021016520 A JP2021016520 A JP 2021016520A JP 2021016520 A JP2021016520 A JP 2021016520A JP 2022119427 A JP2022119427 A JP 2022119427A
- Authority
- JP
- Japan
- Prior art keywords
- glitter
- normal
- subsurface
- reflectance
- information
- 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.)
- Pending
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 108
- 239000000463 material Substances 0.000 claims abstract description 236
- 239000011248 coating agent Substances 0.000 claims abstract description 22
- 238000000576 coating method Methods 0.000 claims abstract description 21
- 239000002932 luster Substances 0.000 claims description 31
- 238000010422 painting Methods 0.000 claims description 31
- 230000003746 surface roughness Effects 0.000 claims description 26
- 238000000034 method Methods 0.000 claims description 17
- 239000006185 dispersion Substances 0.000 claims description 13
- 238000003384 imaging method Methods 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 claims 2
- 239000003973 paint Substances 0.000 description 13
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000009877 rendering Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 239000000049 pigment Substances 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000011960 computer-aided design Methods 0.000 description 2
- 238000005315 distribution function Methods 0.000 description 2
- 230000003595 spectral effect Effects 0.000 description 2
- 230000002194 synthesizing effect Effects 0.000 description 2
- 240000006829 Ficus sundaica Species 0.000 description 1
- XAGFODPZIPBFFR-UHFFFAOYSA-N aluminium Chemical compound [Al] XAGFODPZIPBFFR-UHFFFAOYSA-N 0.000 description 1
- 229910052782 aluminium Inorganic materials 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000004615 ingredient Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011002 quantification Methods 0.000 description 1
- 238000002310 reflectometry Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Images
Landscapes
- Investigating Or Analysing Materials By Optical Means (AREA)
- Image Generation (AREA)
Abstract
Description
本発明は、計算装置、計算方法およびプログラムに関する。特に、光輝材を含んだ物体の表示色をコンピュータグラフィックスにより表現する技術に関する。 The present invention relates to a computing device, computing method and program. In particular, the present invention relates to a technique for expressing the display color of an object containing glittering materials by computer graphics.
自動車業界では、広告やプロモーション、およびデザイン段階において、コンピュータグラフィックス(以下CG:Computer Graphics)による映像表現が多く用いられている。自動車の中でも、外装の大半を占める塗板は、その複雑な構成によりCGによる正確な表現が試みられている。多くの塗板は、複数の層により構成されており、その層内にフレーク顔料を含有することでフレークによる光輝感(粒子性:フレークによるつぶつぶ感)や見る角度によって色彩が変化するフリップフロップ性からなる反射特性を持つ。こうした反射特性を、CGにより正確に表現することができれば、デザイン段階などにおいて物体に実際に塗料を塗布して仕上がりを確認する必要がなくなる。 In the automobile industry, image representation by computer graphics (hereinafter referred to as CG) is often used in advertisements, promotions, and design stages. Painted panels, which make up the majority of the exterior of automobiles, have been tried to accurately express with CG due to their complicated construction. Many coated plates are composed of multiple layers, and by containing flake pigments in the layers, the flakes have a glittering effect (granularity: flakes give a crushing feeling) and flip-flop properties that change the color depending on the viewing angle. It has a reflection characteristic of If such reflection characteristics can be accurately represented by CG, it will be unnecessary to actually apply paint to the object to check the finish at the design stage.
特許文献1には、偏角分光反射率を測定して、物体の塗装色をCG再現する技術が開示されている。この技術では、実測した偏角分光反射率を用いてCGを生成するため、見る角度によって色彩が変化する塗装面のフリップフロップ性を表現することができる。 Japanese Patent Laid-Open No. 2002-200002 discloses a technique for measuring the angular spectral reflectance and reproducing the paint color of an object by CG. In this technique, since CG is generated using the measured declination spectral reflectance, it is possible to express the flip-flop nature of the painted surface in which the color changes depending on the viewing angle.
フレークによる光輝感を表現する反射モデルがいくつか提案されている。例えば、非特許文献1では、塗板の見えを顔料による一様な双方向反射率分布関数(BRDF:Bidirectional Reflectance Distribution Function)と座標位置により変化するBTF(Bidirectional Texture Function)で表現する。BTFは見えを画像により表現する手法であり、光源・視線方向の違いによる見えの変化を画像として保存および再現する手法である。フレークもある方向から見た際の見えを画像として保存しておくことで表現する。
Several reflection models have been proposed to express the feeling of glitter caused by flakes. For example, in
また、非特許文献2に示すような3DCGソフトウェア開発会社が提供しているCar Paintシェーダ(反射モデル)では、クリアコート層、フレーク層、拡散反射を表現する顔料層のそれぞれを計算する。フレーク層では、乱数により生成された法線マップテクスチャをスケーリングして与えることでざらついた光輝感を表現する。
Also, in a Car Paint shader (reflection model) provided by a 3DCG software development company as shown in Non-Patent
また、非特許文献3では、塗板に内包されたフレークの数を塗板表面下の法線分布として定式化している。法線分布で表現される複数の法線からの光沢を計算することで、テクスチャの1画素内に複数存在するフレークによる光輝感を表現することができる。
Further, in Non-Patent
しかしながら、特許文献1に記載されているようなフリップフロップ性の表現のみでは塗板の表現としては不十分であり、フレークによる光輝感の表現が重要である。非特許文献1では、視点位置の変化による光輝感の変化をなめらかに表現するためには膨大な数の画像が必要となる。非特許文献2では、テクスチャの1画素に対して1個のフレークが存在することとなる。このため、視点位置の変化による光輝感の変化を表現することが難しい。非特許文献3では、光輝感の定量化に主眼が置かれているため、これを用いたCG生成法についての言及はない。
However, the expression of flip-flop properties alone as described in
フレークによる光輝感を表現しようとした場合には、視点距離に応じた見えの変化を表現する必要がある。非特許文献1の手法はイメージベースな手法であるため、塗板から離れたマクロな視点においては、フレークの影響が潰れてしまい光輝感を表現することが困難となる。逆に、塗板に近づいたミクロな視点においては、テクスチャ解像度が低く、20[μm]程であるフレークを細かく表現することが困難である。
When trying to express the feeling of brightness by flakes, it is necessary to express the change in appearance according to the viewpoint distance. Since the method of Non-Patent
非特許文献2のシェーダにおいては、マクロな視点において、フレークの表現による違和感をなくすためにフレーク減衰距離を設定可能としている。これは、設定した視点距離までに、徐々にフレークの影響をフェードアウトさせる処理である。しかし、マクロ視点においてもフレークによる影響は存在しているため、正しい表現とは言い難い。
In the shader of Non-Patent
そこで、非特許文献3にあるように、ある面積あたりの表面下法線の数を定義し、そこからの反射光を計算することでミクロ視点、及びマクロの両視点において、フレークによる光輝感を表現することが考えられる。ただし、マクロ視点においては、レンダリング解像度が低いため、塗板領域における1つの画素に相当する面積が広くなり、1つの画素が内包する表面下法線の数が膨大となる。この膨大な数の表面下法線をすべて表現しようとすると、膨大な計算時間が必要となる。
Therefore, as described in
本発明は、このような状況に鑑みてなされたものである。本発明は、光輝材を含んだ物体が塗装された状態をCGにて再現する場合において、マクロ視点であっても、少ない計算量により効率的に光輝感を表現することができる計算装置、計算方法およびプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances. The present invention provides a computing device and calculation that can efficiently express a feeling of glitter with a small amount of calculation even from a macro viewpoint when reproducing a painted state of an object containing a glitter material by CG. It aims at providing a method and a program.
上記の課題を解決するために、発明の実施形態の計算装置は、光輝材を含む物体における光輝感をコンピュータグラフィックスにより表現する画像の表示色を計算する計算装置であり、前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得する取得部と、前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算する表面下法線計算部と、前記光輝材情報、及び表面下法線計算部により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算する反射率計算部と、前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算する入射光計算部と、前記反射率計算部により計算された反射率、前記入射光計算部により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算する鏡面反射光計算部と、前記鏡面反射光計算部により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算する光輝感加算部と、前記光輝感加算部により計算された画素ごとの前記表示色を出力する出力部と、を備える。 In order to solve the above problems, a computing device according to an embodiment of the present invention is a computing device that calculates the display color of an image that expresses the feeling of glitter in an object containing a glittering material by computer graphics, and calculates the shape of the object. light source information indicating a light source that illuminates the object; camera information related to a camera that virtually captures the object; the number of glittering materials contained in a predetermined area; and the acquisition unit for acquiring painting information indicating the degree of distribution of and luster material information indicating the reflection characteristics of the luster material; a sub-surface normal calculation unit that calculates the sub-surface normal of the glittering material, and the above-mentioned glittering material information and the sub-surface normal calculated by the sub-surface normal calculation unit, the light source and the line-of-sight direction are changed to variables A reflectance calculation unit that calculates the reflectance of the glitter material according to the viewpoint distance from the viewpoint position of the camera to the object; and the glitter material drawn in the drawing pixels using the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the camera information. and the reflected light components calculated by the specular reflected light calculation unit are added for the number of the glitter materials included in the drawing pixel, and the display of the drawing pixel is performed. and an output unit configured to output the display color for each pixel calculated by the brightness addition unit.
上記の課題を解決するために、発明の実施形態の計算方法は、光輝材を含む物体における光輝感をコンピュータグラフィックスにより表現する画像の表示色を計算するコンピュータ装置が行う計算方法であり、取得部が、前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得し、表面下法線計算部が、前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算し、反射率計算部が、前記光輝材情報、及び表面下法線計算部により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算し、入射光計算部が、前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算し、鏡面反射光計算部が、前記反射率計算部により計算された反射率、前記入射光計算部により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算し、光輝感加算部が、前記鏡面反射光計算部により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算し、出力部が、前記光輝感加算部により計算された画素ごとの前記表示色を出力する。 In order to solve the above problems, the calculation method of the embodiment of the invention is a calculation method performed by a computer device for calculating the display color of an image that expresses the feeling of glitter in an object containing a glitter material by computer graphics. The section includes object shape information indicating the shape of the object, light source information indicating the light source that illuminates the object, camera information related to a camera that virtually captures the object, the number of the glittering materials contained in a predetermined area, and the glittering Painting information indicating the degree of distribution of the normal under the surface of each material and luster material information indicating the reflection characteristics of the luster material are acquired, and the sub-surface normal calculation unit calculates the distribution degree of the sub-surface normal and Using the object shape information, the normal under the surface of the glittering material included in the predetermined area is calculated, and the reflectance calculation unit calculates the normal under the surface calculated by the glittering material information and the normal under the surface Using the normal line, the reflectance of the glitter material with the light source and line-of-sight direction as variables is calculated according to the viewpoint distance from the viewpoint position of the camera to the object, and the incident light calculation unit calculates the light source information. is used to calculate the incident light for the drawing pixel to be drawn, and the specular reflected light calculation unit calculates the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the Using the camera information, the reflected light component of the glittering material to be drawn in the drawing pixel is calculated, and the brightness adding unit includes the reflected light component calculated by the specular reflection light calculating unit in the drawing pixel. The display color of the drawing pixel is calculated by adding up the number of the glittering materials, and the output unit outputs the display color for each pixel calculated by the glitter adding unit.
上記の課題を解決するために、発明の実施形態のプログラムは、光輝材を含む物体における光輝感をコンピュータグラフィックスにより表現する画像の表示色を計算するコンピュータ装置に、前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得する取得工程、前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算する表面下法線計算工程、前記光輝材情報、及び表面下法線計算工程により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算する反射率計算工程、前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算する入射光計算工程、前記反射率計算工程により計算された反射率、前記入射光計算工程により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算する鏡面反射光計算工程、前記鏡面反射光計算工程により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算する光輝感加算工程、前記光輝感加算工程により計算された画素ごとの前記表示色を出力する出力工程、を実行させるプログラムである。 In order to solve the above problems, a program according to an embodiment of the present invention provides a computer device that calculates the display color of an image that expresses the feeling of glitter in an object containing a glitter material by computer graphics. shape information, light source information indicating a light source that illuminates the object, camera information related to a camera that virtually captures the object, the number of the glittering materials contained in a predetermined area, and the distribution of the normals under the surface of each of the glittering materials an acquisition step of acquiring painting information indicating the degree of luster and luster material information indicating a reflection characteristic of the luster material; The subsurface normal calculation step of calculating the subsurface normal of the luster material with the light source and the line of sight direction as variables a reflectance calculation step of calculating the reflectance of according to the viewpoint distance from the viewpoint position of the camera to the object; calculating a reflected light component of the glittering material to be drawn on the drawing pixels using the calculating step, the reflectance calculated by the reflectance calculating step, the incident light calculated by the incident light calculating step, and the camera information; a specular reflected light calculation step for calculating a display color of the drawn pixel by adding the reflected light components calculated by the specular reflected light calculation step by the number of the glitter materials included in the drawn pixel; and an output step of outputting the display color for each pixel calculated by the brightness addition step.
本発明の実施形態によれば、光輝材を含んだ物体が塗装された状態をCGにて再現する場合において、マクロ視点であっても、少ない計算量により効率的に光輝感を表現することができる。 According to the embodiment of the present invention, when reproducing a painted state of an object containing a glittering material by CG, it is possible to express the feeling of glittering efficiently with a small amount of calculation even from a macro viewpoint. can.
以下、図面を参照して本発明の実施の形態を詳しく説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
表示装置1は、例えばPC(Personal Computer)、サーバ装置などのコンピュータ装置である。表示装置1は、光輝材を含んだ物体の表示色をコンピュータグラフィックスの技術を用いて描画する画像を生成し、生成した画像を表示する。表示装置1は、「計算装置」の一例である。
The
以下では、光輝材を含んだ塗装剤によって塗装された物体を描画する場合を例示して説明する。しかしながら、塗装に限定されることはない。少なくとも光輝材を含む物体であればよく、例えば、光輝材が練り込まれた物質を形成することにより製造された物体を描画するような場合にも適用することが可能である。 In the following, a case of drawing an object coated with a coating agent containing a luster material will be described as an example. However, it is not limited to painting. Any object that contains at least a luster material can be used. For example, the present invention can be applied to drawing an object manufactured by forming a substance into which a luster material is kneaded.
図1は、実施形態の表示装置1の構成例を示すブロック図である。表示装置1は、例えば、通信部11と、記憶部12と、制御部13と、CG表示部14とを備える。通信部11は、例えば、汎用の通信用IC(Integrated Circuit)などによって実現される。通信部11は、例えば、インターネット通信網などを介して外部の装置と通信し、外部の装置から送信された情報を受信し、受信した情報を記憶部12に記憶させる。
FIG. 1 is a block diagram showing a configuration example of a
記憶部12は、例えば、HDD(Hard Disk Drive)やフラッシュメモリなどの記憶装置(非一過性の記憶媒体を備える記憶装置)、或いはこれらの組合せによって実現される。記憶部12は、表示装置1の各構成要素を実現するためのプログラム、プログラムを実行する際に用いられる変数、及び各種の情報を記憶する。
The
記憶部12は、例えば、物体形状情報120と、塗装情報121と、光輝材情報122と、光源情報カメラ情報123とを記憶する。物体形状情報120は、物体の三次元形状を示す情報である。物体形状情報120は、例えば、CAD(Computer-Aided Design)などにより作成された仮想物体のポリゴン形状を示すデータであり、各ポリゴンの表面法線情報が含まれる。塗装情報121は、塗装の状態を示す情報である。塗装情報121は、例えば、描画する対象となる塗装について、塗装の種類ごとにその塗装に含まれる光輝材の分布の状態を示す情報が含まれる。光源情報カメラ情報123は、描画する際に用いる仮想的な光源、及び物体を撮像する仮想的なカメラの情報である。
The
ここで、塗装20と、塗装20に含まれる光輝材21との関係について、図2を用いて説明する。図2は、実施形態の光輝材を含む塗装を示す模式図である。
Here, the relationship between the
一般に、物体は、ある1点において唯一の法線を持ち、1個の反射ピークを持つ。しかし、図2に示すように、光輝材21を含む塗装20のような物体では、塗装20における表面の法線n0は一つに定まるが、表面下に存在する光輝材21の影響で反射ピークが複数存在する。そこで、本実施形態では、表面下に存在する光輝材21による法線nsiのことを表面下法線と定義する。ただし、iは光輝材の個数に応じた番号である。
In general, an object has only one normal and one reflection peak at one point. However, as shown in FIG. 2, in an object such as the
図2では、辺長(Δx、Δy)にて規定される所定面積の塗装20に、4個の光輝材21-1~21-4が含まれる場合の例が示されている。塗装20の表面における法線は、法線n0である。塗装20に含まれる光輝材21-1における表面下法線は、表面下法線ns1である。光輝材21-2における表面下法線は、表面下法線ns2である。光輝材21-3における表面下法線は、表面下法線ns3である。光輝材21-4における表面下法線は、表面下法線ns4である。
FIG. 2 shows an example in which four luster materials 21-1 to 21-4 are included in the
図3は、実施形態の塗装情報121の構成例を示す図である。塗装情報121は、例えば、「塗装No.」、「辺長x」、「辺長y」、「光輝材個数」、「法線分散」などの項目を備える。「塗装No.」は、塗装を一意に識別する識別情報である。「辺長x」と「辺長y」とは、塗装20の面積を規定する場合における、一方の辺長と他方の辺長とを示す情報である。「光輝材個数」は、「辺長x」及び「辺長y」にて規定される所定面積に含まれる光輝材21の個数を示す情報である。法線分散は、それぞれの光輝材21による表面下法線のばらつきの状態を示す情報(分散情報)であり、例えば、分散s2を示す情報である。ただし、sは、それぞれの光輝材21による表面下法線の標準偏差である。
FIG. 3 is a diagram showing a configuration example of the
この図の例では、塗装No.1にて識別される塗装20は、辺長(Δx1、Δy1)の所定面積内にN1個の光輝材21が含まれることが示されている。また、N1個の光輝材21のそれぞれによる表面下法線の分散がS1
2であることが示されている。
In the example of this figure, the paint No. It is shown that the
図4は、実施形態の光輝材情報122の構成例を示す図である。光輝材情報122は、例えば、「光輝材No.」、「鏡面反射係数」、「表面粗さ」などの項目を備える。「光輝材No.」は、光輝材を一意に識別する識別情報である。「鏡面反射係数」及び「表面粗さ」は、光輝材を、鏡面反射を示す鏡面反射モデルとした場合におけるパラメータである。この図の例では、光輝材No.1にて識別される光輝材21は、鏡面反射係数がks1であり、表面粗さがσ1
2であることが示されている。
FIG. 4 is a diagram showing a configuration example of the
図5は、実施形態の光源情報カメラ情報123の構成例を示す図である。光源情報カメラ情報123は、例えば、ユーザにより設定された情報、もしくは予め記憶された情報である。光源情報カメラ情報123は、例えば、「No.」、「光源情報」、「カメラ情報」などの項目を備える。「No.」は、光源情報及びカメラ情報の組合せを一意に識別する識別情報である。光源情報は、描画に用いる仮想的な光源の情報であり、例えば、ワールド座標系における光源の位置、及び光源の強度を示す情報である。カメラ情報は、描画に用いる仮想的なカメラの情報であり、例えば、ワールド座標系におけるカメラの位置、カメラの画角、及びレンダリング時の画素数などを示す情報である。この図の例では、No.1にて識別される光源情報は、光源の位置座標がPL1(xL1、yL1、zL1)、光源の強度がIL1であることが示されている。また、No.1にて識別されるカメラ情報は、カメラの位置座標がPc1(xc1、yc1、zc1)、カメラの画角が(θx1、θy1)、画素数が(U1、V1)であることが示されている。
FIG. 5 is a diagram showing a configuration example of the light source
図1の説明に戻り、制御部13は、表示装置1が備えるハードウェアとしてのCPU(Central Processing Unit)、GPU(Graphics Processing Unit)等のProcessing Unit(プロセッシングユニット)が記憶部12に記憶されたプログラムを実行することにより、機能が実現される。
Returning to the description of FIG. 1 , the
制御部13は、例えば、取得部130と、表面下法線計算部131と、反射率計算部132と、入射光計算部133と、鏡面反射光計算部134と、光輝感加算部135と、を備える。
The
取得部130は、描画に必要な種々の情報を取得する。具体的には、取得部130は、物体形状情報120、塗装情報121、光輝材情報122、及び光源情報カメラ情報123を取得する。取得部130は、取得した情報を、表面下法線計算部131に出力する。愚弟的には、取得部130は、物体形状情報120を表面下法線計算部131に出力する。
The
ここで、表面下法線計算部131が行う処理について、図6を用いて説明する。図6は、表面下法線計算部131が行う処理の説明に用いる図である。図6には、ミクロ視点およびマクロ視点のそれぞれにおいて光輝材が分布した状態が模式的に示されている。
Here, processing performed by the subsurface
表面下法線計算部131は、表面下法線を計算する。表面下法線計算部131は、取得部130から物体形状情報120を取得し、取得した情報に基づいて、描画対象となる画素に対応するポリゴンの法線n0を取得する。また、表面下法線計算部131は、取得部130から塗装情報121を取得し、取得した情報に基づいて、描画対象となる塗装の表面下法線のばらつきを示す分散情報を取得する。
The subsurface
塗装情報121には、分散情報として、例えば、塗装20の表面の法線n0方向を中心としたばらつきの度合いが分散s2にて示されている。この場合、表面下法線計算部131は、それぞれの表面下法線の天頂角を、平均が0(ゼロ)であり、且つ分散がs2とする正規分布Nd(0、s2)により計算する。また、表面下法線計算部131は、例えば、一様乱数により、表面下法線の方位角を求める。このようにして、表面下法線計算部131は、天頂角および方位角を計算することによって、光輝材21のそれぞれの表面下法線ベクトルnsを決定する。
In the
反射率計算部132は、1個の光輝材21の反射率を計算する。反射率計算部132は、物体形状情報120から描画の対象となる画素(以下、描画画素という)の位置座標を読み込んで取得する。反射率計算部132は、光源情報カメラ情報123から描画に用いる光源及びカメラの位置座標を取得する。反射率計算部132は、描画画素、光源及びカメラのそれぞれの位置座標を用いて、描画画素に対する光源方向ベクトルl、及び視線方向ベクトルvを導出する。また、反射率計算部132は、表面下法線計算部131により計算された表面下法線ベクトルns、光輝材情報122から読み込んだ塗装の鏡面反射係数ks、及び表面粗さσ2を取得する。反射率計算部132は、取得した情報を用いて、光輝材21の反射率を計算する。
The
ここで、本実施形態では、光輝材21の反射率を計算する際に、視点距離を考慮する。視点距離は、カメラの視点位置から描画の対象とする物体までの距離である。反射率計算部132は、視点距離に応じて、描画する際の解像度が適切な解像度となるように制御する。反射率計算部132が、視点距離を考慮して光輝材21の反射率を計算する方法について、図6を用いて説明する。
Here, in this embodiment, the viewpoint distance is taken into consideration when calculating the reflectance of the glitter material 21 . The viewpoint distance is the distance from the viewpoint position of the camera to the object to be drawn. The
図6は、実施形態の反射率計算部132が行う処理の説明に用いる図である。図6には、ミクロ、及びマクロ視点における光輝材分布の概要が模式的に示されている。レンダリング(描画)の際における透視投影を考えた場合、カメラ30、ウィンドウ31、ビューボリューム32の配置関係は図6の通りとなる。
FIG. 6 is a diagram used for explaining the processing performed by the
ウィンドウ31の中に存在する1つの画素に注目したとき、ミクロ視点、つまり物体がカメラ30に近い場合における描画範囲33は非常に小さい。この場合、小さい描画範囲33に含有される描画すべき光輝材の画像330の個数は少なくなる。対して、マクロ視点、つまり物体がカメラから遠い場合における描画範囲34は大きくなる。この場合、大きい描画範囲34に含有される描画すべき光輝材の画像340の個数は多くなる。
When focusing on one pixel existing in the
ウィンドウ31の中に存在する1つの画素における描画面積Sは、カメラの画角、画素数、及び距離dにより求めることができる。距離dは、カメラ30から描画範囲34までの距離(視点距離)である。また、塗装情報121には、辺長(Δx、Δy)からなる所定面積ΔS、及び所定面積内に含まれる光輝材の個数Nが記憶されている。これより、描画範囲に含まれる光輝材個数を、N×S/ΔSにより求めることができる。ここで、Nは所定面積ΔS内に含まれる光輝材の個数である。Sは描画面積である。ΔSは所定面積である。
The drawing area S of one pixel in the
ここで、一般的な光輝材の1個あたりの粒径は20[μm]程となり非常に小さい。このため、マクロ視点において、1つの画素に相当する描画範囲に存在する光輝材21の個数が膨大となる。よって、すべての光輝材21のそれぞれの反射率を計算するためには非常に長い時間を要してしまうことになる。 Here, the particle size per one glitter material is about 20 [μm], which is very small. Therefore, in the macro viewpoint, the number of glittering materials 21 existing in the rendering range corresponding to one pixel becomes enormous. Therefore, it takes a very long time to calculate the reflectance of each of the glittering materials 21 .
ところで、マクロ視点により、光輝材21を含んだ塗板を観察した際には、複数の光輝材21のそれぞれによる反射光が混ざり合い、1つの大きな広がりを持った反射光のように感じられるという性質がある。そこで、この性質を利用して、本実施形態では、複数の光輝材による反射光の和を、1つの光輝材21からの反射特性に基づいて近似的に算出する。具体的には、1つの光輝材21の反射特性により示される反射ローブを広げた特性を、複数の光輝材による反射特性として近似的に表現する。 By the way, when a coated plate containing the luster material 21 is observed from a macro viewpoint, the reflected light from each of the plurality of luster materials 21 is mixed, and the reflected light having a large spread is felt. There is Therefore, using this property, in the present embodiment, the sum of reflected light from a plurality of glittering materials is approximately calculated based on the reflection characteristics from one glittering material 21 . Specifically, the characteristics obtained by widening the reflection lobe indicated by the reflection characteristics of one glitter material 21 are approximately expressed as the reflection characteristics of a plurality of glitter materials.
ここで、複数の光輝材による反射光の和を近似的に表現する方法について、図7を用いて説明する。図7は、実施形態の光輝材による反射ローブ(反射光の放射輝度特性)を示す図である。図7の横軸は視線角度、縦軸は放射輝度を示す。 Here, a method for approximately representing the sum of reflected light from a plurality of glittering materials will be described with reference to FIG. FIG. 7 is a diagram showing reflection lobes (radiance characteristics of reflected light) by the glitter material of the embodiment. The horizontal axis in FIG. 7 indicates the line-of-sight angle, and the vertical axis indicates the radiance.
図7において、照明は、光輝材21の表面に対して垂直に、つまり表面の法線方向から入射している。よって、視線角度に依存して、光輝材21の反射率が変化し、それに伴い反射光の放射輝度も変化する。 In FIG. 7, the illumination is incident perpendicularly to the surface of the glitter material 21, that is, from the normal direction of the surface. Therefore, the reflectance of the glitter material 21 changes depending on the line-of-sight angle, and the radiance of the reflected light also changes accordingly.
単一(1つ)の光輝材21による反射ローブは、図7の実線で示すような鋭いピークを持つ。ウィンドウ31の中に存在する1つの画素が示す描画範囲に、描画すべき光輝材の画像が1個のみしか含まれないような視点距離(距離d1とする)から観察する場合、その光輝材による光輝感が、図7の実線で示すような鋭いピークを持つ特性として表現される。
A reflection lobe due to a single (one) glitter material 21 has a sharp peak as indicated by the solid line in FIG. When observing from a viewpoint distance (distance d1) such that only one image of the glittering material to be drawn is included in the drawing range indicated by one pixel in the
一方、同一の反射特性を持つ光輝材21を含む物体を、距離d1の2倍の視点距離(距離d2とする)から観察した場合を考える。距離d2から観察する場合、ウィンドウ31の中に存在する1つの画素が示す描画範囲には、描画すべき光輝材の画像が4個含まれることとなる。ここで、描画範囲を1次元として考えた際に、2個の光輝材からのそれぞれの反射特性が合成された特性として光輝感が表現される。
On the other hand, consider a case where an object including the luster material 21 having the same reflection characteristics is observed from a viewpoint distance (referred to as a distance d2) that is twice the distance d1. When observed from the distance d2, the drawing range indicated by one pixel in the
本実施形態では、この2個の光輝材21のそれぞれの反射率を計算する代わりに、2個の光輝材21による反射特性が、単一の光輝材21による反射ローブの広がりを2倍に広げた特性であるとみなして近似する。具体的には、2個の光輝材21による反射特性が、図7の破線で示すような緩やかなピークを持つ反射ローブであるとみなす。 In this embodiment, instead of calculating the reflectance of each of the two glittering materials 21, the reflection characteristics of the two glittering materials 21 double the spread of the reflection lobe due to a single glittering material 21. approximation is assumed to be the characteristics of Specifically, it is assumed that the reflection characteristics of the two glittering materials 21 are reflection lobes having gentle peaks as indicated by broken lines in FIG.
ここで、鏡面反射モデルの一例として、Wardモデルを考える。Wardモデルにおける反射率ρsは、光源・視線方向ベクトル(l,v)を変数として、下記の(1)式にて求められる。(1)式において、σは表面粗さ係数であり、ksは鏡面反射係数である。また、αは表面下法線ベクトルnsとハーフベクトルのなす角度である。ハーフベクトルは、光源・視線方向ベクトル(l,v)の中間の向きを表す単位ベクトルであり、視線方向と逆向きのベクトルと光線方向と逆向きのベクトルとを、ベクトル加算して正規化したベクトルである。 Consider the Ward model as an example of the specular reflection model. The reflectance ρ s in the Ward model is obtained by the following equation (1) using the light source/line-of-sight direction vector (l, v) as a variable. In equation (1), σ is the surface roughness coefficient and ks is the specular reflection coefficient. Also, α is the angle formed by the subsurface normal vector n s and the half vector. A half vector is a unit vector representing an intermediate direction of the light source/line-of-sight direction vector (l, v). is a vector.
(1)式に基づいて、Wardモデルでは、表面粗さσに比例するように、反射ローブの幅が決定される。よって、反射率計算部132は、反射ローブの幅を2倍に広げたい場合には、反射ローブの幅を2倍に広げた場合における表面粗さσ’を、元の光輝材21の持つ表面粗さσの2倍とすればよい。
Based on equation (1), the Ward model determines the width of the reflection lobe so as to be proportional to the surface roughness σ. Therefore, when it is desired to double the width of the reflection lobe, the
具体的に、上述した近似を用いる場合において、反射率計算部132は、以下の(2)式により、表面粗さσ’を計算する。(2)式において、Sは1つの画素に相当する描画範囲の面積である。ΔSは塗装情報121に記憶される辺長(x、y)にて規定される所定面積である。σは光輝材情報122に記憶される光輝材21の表面粗さである。
Specifically, when using the approximation described above, the
また、反射率計算部132は、以下の(3)式により、鏡面反射係数ks’を計算する。(3)式において、Sは1つの画素に相当する描画範囲の面積である。ΔSは塗装情報121に記憶される辺長(x、y)にて規定される所定面積である。ksは光輝材情報122に記憶される光輝材21の鏡面反射係数である。
Also, the
図7には、1個の光輝材による反射ローブの例が示されている。描画する際には、塗装情報121において示された所定面積ΔSに含まれる光輝材21の個数分に応じたそれぞれの反射率を計算する。例えば、所定面積ΔSに4個の光輝材21が含まれる場合であって、描画面積Sが所定面積ΔSに相当する場合には、従来通り、4個の光輝材21それぞれの反射率を計算する。この場合において、描画面積Sが所定面積ΔSの10倍に相当する場合には、従来であれば40個の光輝材21それぞれの反射率を計算する必要がある。これに対し、本実施形態では、(S/ΔS=)10個の光輝材21に相当する1つの光輝材(以下、統合光輝材という)を考え、統合光輝材による反射率を、近似的に算出する。そして、描画面積Sに4個の統合光輝材が含まれるとみなして、それぞれの統合光輝材の反射率を(近似的に)計算する。
FIG. 7 shows an example of a reflection lobe by one bright material. When drawing, each reflectance is calculated according to the number of glittering materials 21 included in the predetermined area ΔS indicated in the
具体的に、反射率計算部132は、(2)式により求めた近似的な表面粗さσ’、及び(3)式により求めた近似的な鏡面反射係数ks’を用いて、近似的な反射率を計算する。これにより、反射率計算部132は、マクロ視点において膨大な個数の光輝材21のそれぞれの反射特性を合成する計算を繰り返し行うことなく、ミクロ視点である場合と同じ要領で、マクロ視点における複数の光輝材による反射率を近似的に算出することができる。したがって、マクロ視点であっても、計算時間を増大させることなく、光輝感を近似的に表現することが可能となる。
Specifically, the
図1の説明に戻り、入射光計算部133は、入射光を計算する。入射光計算部133は、物体形状情報120から描画画素の位置座標(座標データPO)を取得する。入射光計算部133は、光源情報カメラ情報123から描画に用いる光源の位置座標(光源座標位置PL)、及び光源の強度(光源強度IL)を取得する。また、入射光計算部133は、表面下法線計算部131によって計算された表面下法線ベクトルnsを取得する。入射光計算部133は、取得した情報を用いて、光源から物体表面下の光輝材21に対して入射される光の放射照度Eiを計算する。例えば、入射光計算部133は、光源が点光源であった場合には、以下の(4)式を用いて、光の放射照度Eiを算出する。(4)式において、Eiは光の放射照度であり、ILは光源強度である。また、dLは光源と画素までの距離であり、θiは描画の対象とする光輝材21の表面下法線ベクトルnsと、入射される入射光とのなす角度である。
Returning to the description of FIG. 1, the incident
鏡面反射光計算部134は、描画画素に含まれる光輝材21による鏡面の反射光成分を計算する。鏡面反射光計算部134は、反射率ρsに、放射照度Eiを乗算することにより光輝材21による放射輝度Isを、反射光成分として計算する。鏡面反射光計算部134は、反射率ρsとして、反射率計算部132によって計算された値を用いる。鏡面反射光計算部134は、放射照度Eiとして、入射光計算部133によって計算された値を用いる。
The specular reflected
光輝感加算部135は、描画画素に含まれる光輝材21による光輝感を合成する。具体的に、光輝感加算部135は、描画する対象とする塗装20において、所定面積ΔSに含まれるN個分の光輝材21の反射光成分(放射輝度Is)を足し合わせた値を、塗装を表現する画素における表示色とする。
The
これにより、塗装を表現する全ての画素において、描画面積Sの大きさに関わらず、N個の光輝材21のそれぞれの反射光成分(放射輝度Is)が含まれた光輝感が表現されることとなる。しかも、描画面積Sの大きさが大きくなる程、光輝材21の反射ローブの幅が広くなるように近似しているため、マクロ視点の物体を描画する場合であっても、計算時間の増大を抑制しつつ、より実際の見た目に近い光輝感を表現することが可能である。 As a result, regardless of the size of the drawing area S, all the pixels that express the painting express a feeling of brilliance that includes the respective reflected light components (radiance I s ) of the N luminous materials 21. It will happen. Moreover, since the approximation is such that the width of the reflection lobe of the glittering material 21 increases as the size of the drawing area S increases, even when drawing an object from a macro viewpoint, an increase in calculation time can be avoided. While suppressing it, it is possible to express a feeling of brightness closer to the actual appearance.
CG表示部14は、描画する画像における全ての画素において計算された塗装色(表示色)をCGとして表示する。CG表示部14は、「出力部」の一例である。
The
ここで、表示装置1が光輝感を表現する処理の動作例を、図8を用いて説明する。図8は、本実施形態の表示装置1が行う処理の流れを示すフローチャートである。以下では、ある画素における塗装の光輝感を、その画素の表示色として計算する処理の流れを説明する。
Here, an operation example of processing for expressing the sense of brightness by the
ステップS1:
表示装置1は、物体形状情報120より、描画画素に対応する物体のポリゴン情報として、ポリゴンの位置座標、及びポリゴンの法線n0を取得する。
Step S1:
From the
ステップS2:
表示装置1は、光源情報カメラ情報123より、物体を照明する光源情報およびカメラの位置情報を取得する。
Step S2:
The
ステップS3:
表示装置1は、塗装情報121より、描画画素に対応する塗装20の情報として、所定面積ΔS、所定面積ΔSに含まれる光輝材21の個数N、及びそれぞれの光輝材21における表面下法線の分散s2を取得する。
Step S3:
From the
ステップS4:
表示装置1は、光輝材情報122より、描画画素に対応する塗装20に含まれる光輝材21に関する情報として、光輝材1個における鏡面反射係数ks、及び表面粗さσ2を取得する。表示装置1は、変数mを初期化し、変数m=0(ゼロ)とする。
Step S4:
From the
ステップS5:
表示装置1は、変数mが個数Nより大きいか否かを判定する。個数Nは、所定面積ΔSに含まれる光輝材21の個数であり、塗装情報121に記憶される情報である。表示装置1は、変数mが個数Nより小さい場合にはステップS6に進む。すなわち、表示装置1は、以下のステップS6からステップ9を、個数Nだけ繰り返す。
Step S5:
The
ステップS6:
表示装置1は、塗装情報121として取得した、光輝材21の表面下法線における分散情報を用いて、ガウス分布関数によって決定される、光輝材21のそれぞれの表面下法線を計算する。
Step S6:
The
ステップS7:
表示装置1は、ステップS6によって計算した光輝材21のそれぞれの表面下法線、光源情報カメラ情報123から取得した光源及びカメラの方向、光輝材情報122、及び描画画素における描画面積Sから、描画画素において描画する1個の光輝材による反射率(鏡面反射係数)を計算する。
Step S7:
The
この場合において、表示装置1は、描画面積Sと、予め設定された所定面積ΔSとの比を用いて、描画面積Sに含まれる光輝材21の個数を、所定面積ΔSに含まれる光輝材の個数と同数とみなした場合における光輝材の反射特性を近似的に算出し、近似的に算出した反射特性を用いて、光輝材の反射率を計算する。
In this case, the
ステップS8:
表示装置1は、描画画素において光輝材に入射する光の強度を計算する。
Step S8:
The
ステップS9:
表示装置1は、ステップS7により取得した鏡面反射係数、及びステップS8で計算した入射光強度から、描画画素における1個の光輝材から放たれる放射輝度Isを、光輝材の鏡面における反射光成分として計算する。
Step S9:
Based on the specular reflection coefficient obtained in step S7 and the incident light intensity calculated in step S8, the
ステップS10:
表示装置1は、変数mをインクリメントし、ステップS5に示す処理に戻る。表示装置1は、ステップS5において、表示装置1は、変数mが個数Nより大きい場合にはステップS11に進む。
Step S10:
The
ステップS11:
表示装置1は、ステップS6~S10を繰り返すごとに算出したN個の光輝材それぞれにおける反射光成分(放射輝度Is)を足し合わせた値を、描画画素の表示色とする。
Step S11:
The
上述したフローチャートでは、N個分の放射輝度Isを計算した後に、それぞれの放射輝度Isを足し合わせる場合を例示して説明したが、これに限定されることはない。放射輝度Isを計算する度に、計算した放射輝度Isを足し合わせる処理をN回じっしすることにより表示色が算出されるようにしてもよい。 In the flowchart described above, the case where the respective radiances I s are added after calculating the radiances I s for N pieces has been exemplified and explained, but the present invention is not limited to this. The display color may be calculated by performing the process of adding the calculated radiance I s N times each time the radiance I s is calculated.
以上説明したように、実施形態の表示装置1は、取得部130と、表面下法線計算部131と、反射率計算部132と、入射光計算部133と、鏡面反射光計算部134と、光輝感加算部135と、CG表示部14とを備える。取得部130は、物体形状情報120、塗装情報121、光輝材情報122、及び光源情報カメラ情報123を取得する。表面下法線計算部131は、塗装情報121の表面下法線の分布度合、及び物体形状情報120を用いて、所定面積ΔSに含まれる光輝材21の表面下法線を計算する。反射率計算部132は、光輝材情報122、及び表面下法線計算部131により計算された表面下法線を用いて、光輝材21の反射率を計算する。反射率は、光源及び視線方向を変数とする。反射率計算部132は、距離dに応じて光輝材21の反射率を計算する。距離dはカメラの視点位置から物体までの視点距離である。入射光計算部133は、光源情報を用いて、描画画素に対する入射光を計算する。鏡面反射光計算部134は、反射率計算部132により計算された反射率、入射光計算部133により計算された入射光、及びカメラ情報を用いて、描画画素に描画する光輝材21の反射光成分を計算する。光輝感加算部135は、鏡面反射光計算部134により計算された反射光成分を、描画画素に含める光輝材の個数分足し合わせて、描画画素の表示色を計算する。CG表示部14は、光輝感加算部135により計算された画素ごとの表示色を出力(表示)する。これにより、実施形態の表示装置1では、視点距離に応じて光輝材21の反射率を計算することができ、視点距離に応じた適切な分解能で物体を表現するような反射率を算出することが可能となる。したがって、マクロ視点であっても、少ない計算量により効率的に光輝感を表現することができる。
As described above, the
また、実施形態の表示装置1では、反射率計算部132は、マクロ視点における描画面積に含まれる光輝材21の個数が、ミクロ視点における描画面積に含まれる光輝材21の個数と同数となるように、複数の光輝材21を統合した統合光輝材がマクロ視点における描画面積に含まれるとする。反射率計算部132は、光輝材21の反射特性、マクロ視点における描画面積とミクロ視点における描画面積との比に基づいて、統合光輝材における反射光成分を計算する。これにより、実施形態の表示装置1では、マクロ視点であっても、ミクロ視点と同等の計算により表示色を計算することができる。しかも、統合光輝材における反射光成分を、統合前の個々の光輝材21の反射特性と面積比(S/ΔS)に基づいて計算することができるため、マクロ視点における反射特性を、視点距離に応じた特性となるように計算することが可能である。したがって、マクロ視点であっても、少ない計算量により効率的に光輝感を表現することができる。
In addition, in the
また、実施形態の表示装置1では、反射率計算部132は、描画面積Sに応じて、光輝材21の反射光における、視線角度に応じた放射輝度の広がりを制御する。これにより、実施形態の表示装置1では、描画面積Sに応じた反射率を計算することができる。したがって、上述した効果と同等の効果を奏する。
In addition, in the
また、実施形態の表示装置1では、反射率計算部132は、描画面積Sに応じて、光輝材情報122における光輝材21の表面粗さσ2を変化させることにより、光輝材21の反射光における視線角度に応じた放射輝度の広がりを制御する。これにより、実施形態の表示装置1では、描画面積Sに応じた表面粗さσ2を計算することにより、反射率を計算することができる。したがって、上述した効果と同等の効果を奏する。
In addition, in the display device 1 of the embodiment, the
また、実施形態の表示装置1では、反射率計算部132は、描画面積Sに含まれる光輝材21の個数が、所定面積ΔSに含まれる光輝材21の個数と同数とする。これにより、実施形態の表示装置1では、描画面積Sに関わらず、所定面積ΔSの物体を描画する場合と同様な計算量にて、表示色を計算することができる。
In addition, in the
また、実施形態の表示装置1では、反射率計算部132は、描画面積Sに含まれる光輝材21の個数が、予め定められた所定面積ΔSに含まれる光輝材21の個数と同数となるように、複数の光輝材21を統合した統合光輝材が描画面積Sに含まれると仮定する。反射率計算部132は、光輝材21の表面粗さσ2に対する統合光輝材の表面粗さσ’2の比が、所定面積ΔSに対する描画面積Sの比と同じ比率となるように、統合光輝材の表面粗さσ’2を決定する。これにより、実施形態の表示装置1では、描画面積Sに応じて、適切な統合光輝材の表面粗さσ’2を決定することができる。
In addition, in the
上述した実施形態では、塗装を表現する1つの画素における光輝感を表現する際に、画素の描画面積Sと予め設定された所定面積ΔSとの比を用いて反射光を計算するようにした。これにより、視点距離に応じた光輝感を表現することができる。特に、本実施形態では、マクロ視点において膨大な数の光輝材からの反射光を計算する必要がなく、ミクロ視点と同等に、高速に光輝感を表現することが可能である。 In the above-described embodiment, when expressing the feeling of brightness in one pixel expressing painting, the reflected light is calculated using the ratio of the drawing area S of the pixel and the preset predetermined area ΔS. As a result, it is possible to express a sense of brilliance according to the viewpoint distance. In particular, in the present embodiment, it is possible to express the feeling of brightness at a high speed in the same manner as in the micro-viewpoint without the need to calculate reflected light from a huge number of glittering materials from the macro-viewpoint.
また、上述した実施形態においては、光輝感の表現を中心として記述した。しかし、もちろん塗装では、最も上層のクリアコート層表面における鏡面反射や、下層部の顔料層における拡散反射も発生する。こうした層におけるそれぞれの反射光を、別途計算してCG表示部14において足し合わせることで、より複雑な塗装色として表現することも想定される。
Further, in the above-described embodiments, the description has focused on the representation of the feeling of brilliance. However, of course, in painting, specular reflection occurs on the surface of the uppermost clear coat layer and diffuse reflection occurs on the lower pigment layer. It is conceivable that the reflected light from each of these layers may be separately calculated and added together in the
また、上述した実施形態において、表面粗さσ’2、及び鏡面反射係数ks’は、所定面積ΔSと描画面積Sとの比を用いて計算されている。他にも、ある解像度に対する視点距離の関係から、上記のパラメータ(表面粗さσ’2、及び鏡面反射係数ks’)を変更したり補正したりすることも考えられる。 Further, in the above-described embodiment, the surface roughness σ' 2 and the specular reflection coefficient ks' are calculated using the ratio of the predetermined area ΔS and the drawing area S. In addition, it is conceivable to change or correct the above parameters (surface roughness σ′ 2 and specular reflection coefficient ks′) based on the relationship of viewpoint distance to a certain resolution.
また、上述した実施形態において、鏡面反射係数ks、ks’、表面粗さσ2、σ’2などのパラメータが、RGBの各色で設定されてもよい。これにより、光輝材21の色を表現することができる。 Further, in the above-described embodiment, parameters such as specular reflection coefficients ks, ks', surface roughness σ 2 , σ' 2 may be set for each color of RGB. Thereby, the color of the luster material 21 can be expressed.
また、上述した実施形態では、鏡面反射光計算部134により個々の光輝材21における放射輝度Is(鏡面反射放射輝度)を計算した後に、光輝感加算部135において放射輝度Isの足し合わせを実施している。しかし、反射率計算部132により計算された各光輝材21における反射率を事前に足し合わせてから、鏡面反射光計算部134によりカメラ方向に対する鏡面反射光を計算してもよい。
In the above-described embodiment, after the radiance I s (specular reflection radiance) of each glittering material 21 is calculated by the specular
また、上述した実施形態では、反射特性を推定する場合に用いる反射モデルが、Wardモデルである場合を例示して説明した。しかしながらこれに限定されない。Wardモデルに限らず、如何なるモデルを用いて反射特性が推定されてもよい。例えば、Cook-Torranceのような金属反射に適したモデルを採用し、アルミフレークのような光輝感を表現するようにしてもよい。 Further, in the above-described embodiment, the case where the reflection model used when estimating the reflection characteristics is the Ward model has been exemplified and explained. However, it is not limited to this. Any model other than the Ward model may be used to estimate the reflection characteristics. For example, a model suitable for metallic reflection, such as Cook-Torrance, may be employed to express the luster of aluminum flakes.
上述した実施形態における表示装置1の全部または一部をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。
All or part of the
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the embodiment of the present invention has been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and design and the like are included within the scope of the gist of the present invention.
1…表示装置(計算装置)、11…通信部、12…記憶部、13…制御部、120…物体形状情報、121…塗装情報、122…光輝材情報、130…取得部、131…表面下法線計算部、132…反射率計算部、133…入射光計算部、134…鏡面反射光計算部、135…光輝感加算部、14…CG表示部
DESCRIPTION OF
Claims (9)
前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得する取得部と、
前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算する表面下法線計算部と、
前記光輝材情報、及び表面下法線計算部により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算する反射率計算部と、
前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算する入射光計算部と、
前記反射率計算部により計算された反射率、前記入射光計算部により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算する鏡面反射光計算部と、
前記鏡面反射光計算部により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算する光輝感加算部と、
前記光輝感加算部により計算された画素ごとの前記表示色を出力する出力部と、
を備える計算装置。 A computing device for calculating the display color of an image that expresses the feeling of glitter in an object containing a glitter material by computer graphics,
Object shape information indicating the shape of the object, light source information indicating a light source for illuminating the object, camera information regarding a camera for virtually imaging the object, the number of the glittering materials contained in a predetermined area, and the glittering materials, respectively. an acquisition unit that acquires coating information indicating the degree of distribution of normals under the surface of and luster material information indicating the reflection characteristics of the luster material;
a subsurface normal calculation unit that calculates the subsurface normal of the luster material included in the predetermined area using the distribution degree of the subsurface normal and the object shape information;
Using the glitter material information and the subsurface normal calculated by the subsurface normal calculation unit, the reflectance of the glitter material with the light source and line of sight as variables is calculated from the viewpoint position of the camera to the object. a reflectance calculation unit that calculates according to the viewpoint distance;
an incident light calculation unit that calculates incident light for a drawing pixel to be drawn using the light source information;
specular reflection for calculating the reflected light component of the glittering material to be drawn in the drawing pixel using the reflectance calculated by the reflectance calculator, the incident light calculated by the incident light calculator, and the camera information; an optical calculation unit;
a brightness addition unit that calculates the display color of the drawing pixel by adding the reflected light components calculated by the specular reflection calculation unit by the number of the glitter materials included in the drawing pixel;
an output unit that outputs the display color for each pixel calculated by the brightness addition unit;
A computing device comprising
請求項1に記載の計算装置。 The reflectance calculation unit determines that the number of the glittering materials included in the drawing area of the object drawn in the drawing pixel at the macro viewpoint with the large viewpoint distance is included in the drawing area at the micro viewpoint with the small viewpoint distance. Assume that an integrated glittering material obtained by integrating a plurality of glittering materials is included in the drawing area in the macro viewpoint so that the number of the glittering materials is the same as the number of the glittering materials, and the reflection characteristics of the glittering material and the drawing in the macro viewpoint calculating the reflectance in the integrated glitter based on the ratio of the area to the drawing area in the micro perspective;
2. The computing device of claim 1.
請求項1又は請求項2に記載の計算装置。 The glitter material information is information indicating the specular reflection coefficient of the glitter material in the specular reflection model and the surface roughness of the glitter material.
3. A computing device according to claim 1 or claim 2.
前記正規分布は、前記描画画素に描画する物体における表面法線を中心とする前記分散にて示されるばらつきを持ち、前記表面法線に対する天頂角が平均0となる分布である、
請求項1から請求項3のいずれか一項に記載の計算装置。 The subsurface normal calculation unit acquires, as coating information, information indicating dispersion according to a normal distribution as the degree of variation of the subsurface normal of the glitter material, and uses the dispersion to determine the normal line of the glitter material. to calculate
The normal distribution is a distribution that has a variation represented by the variance centered on the surface normal of the object to be drawn on the drawing pixels, and the zenith angle with respect to the surface normal is 0 on average.
4. A computing device according to any one of claims 1 to 3.
請求項1から請求項4のいずれか一項に記載の計算装置。 The reflectance calculation unit controls the spread of radiance according to the line-of-sight angle in the reflected light of the glitter material according to the drawing area of the object drawn in the drawing pixels.
5. A computing device according to any one of claims 1 to 4.
請求項1から請求項5のいずれか一項に記載の計算装置。 The reflectance calculation unit changes the surface roughness of the glitter material in the glitter material information according to the drawing area of the object to be drawn in the drawing pixels, thereby changing the line-of-sight angle of the reflected light of the glitter material. controls the spread of radiance according to
A computing device according to any one of claims 1 to 5.
請求項1から請求項6のいずれか一項に記載の計算装置。 The reflectance calculation unit calculates a number of the glitter materials so that the number of the glitter materials included in the drawing area of the object drawn in the drawing pixels is the same as the number of the glitter materials included in a predetermined area. is included in the drawing area, and the ratio of the surface roughness of the integrated glitter material to the surface roughness of the glitter material is the same as the ratio of the drawing area to the predetermined area Determining the surface roughness of the integrated glitter material so that the ratio is
7. A computing device according to any one of claims 1-6.
取得部が、前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得し、
表面下法線計算部が、前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算し、
反射率計算部が、前記光輝材情報、及び表面下法線計算部により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算し、
入射光計算部が、前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算し、
鏡面反射光計算部が、前記反射率計算部により計算された反射率、前記入射光計算部により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算し、
光輝感加算部が、前記鏡面反射光計算部により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算し、
出力部が、前記光輝感加算部により計算された画素ごとの前記表示色を出力する、
計算方法。 A calculation method performed by a computer device for calculating the display color of an image that expresses the feeling of glitter in an object containing a glitter material by computer graphics,
An acquisition unit obtains object shape information indicating the shape of the object, light source information indicating a light source that illuminates the object, camera information regarding a camera that virtually captures the object, the number of the glittering materials included in a predetermined area, and the Acquiring painting information indicating the degree of distribution of normals under the surface of each of the glittering materials, and glittering material information indicating the reflection characteristics of the glittering materials,
a subsurface normal calculation unit, using the distribution degree of the subsurface normal and the object shape information, calculates the subsurface normal of the glitter material included in the predetermined area;
A reflectance calculation unit uses the glitter material information and the subsurface normal calculated by the subsurface normal calculation unit to calculate the reflectance of the glitter material with the light source and line of sight as variables from the viewpoint of the camera. According to the viewpoint distance from the position to said object, calculate
an incident light calculation unit, using the light source information, calculates incident light for a drawing pixel to be drawn;
A specular reflected light calculation unit uses the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the camera information to calculate the reflection of the glitter material to be drawn on the drawing pixels. Calculate the light component,
a glitter addition unit adds the reflected light components calculated by the specular reflection light calculation unit by the number of the glitter materials included in the drawing pixel to calculate the display color of the drawing pixel;
An output unit outputs the display color for each pixel calculated by the brightness adding unit;
Method of calculation.
前記物体の形状を示す物体形状情報、前記物体を照明する光源を示す光源情報、前記物体を仮想的に撮像するカメラに関するカメラ情報、所定面積に含まれる前記光輝材の個数と前記光輝材のそれぞれの表面下法線の分布度合とを示す塗装情報、及び前記光輝材による反射特性を示す光輝材情報を取得する取得工程、
前記表面下法線の分布度合及び前記物体形状情報を用いて、前記所定面積に含まれる光輝材の表面下法線を計算する表面下法線計算工程、
前記光輝材情報、及び表面下法線計算工程により計算された前記表面下法線を用いて、光源及び視線方向を変数とした光輝材の反射率を、前記カメラの視点位置から前記物体までの視点距離に応じて、計算する反射率計算工程、
前記光源情報を用いて、描画する対象となる描画画素に対する入射光を計算する入射光計算工程、
前記反射率計算工程により計算された反射率、前記入射光計算工程により計算された入射光、及び前記カメラ情報を用いて、前記描画画素に描画する前記光輝材の反射光成分を計算する鏡面反射光計算工程、
前記鏡面反射光計算工程により計算された前記反射光成分を、前記描画画素に含める前記光輝材の個数分足し合わせて、前記描画画素の表示色を計算する光輝感加算工程、
前記光輝感加算工程により計算された画素ごとの前記表示色を出力する出力工程、
を実行させるプログラム。 A computer device that calculates the display color of an image that expresses the feeling of glitter in an object containing a glitter material by computer graphics,
Object shape information indicating the shape of the object, light source information indicating a light source for illuminating the object, camera information regarding a camera for virtually imaging the object, the number of the glittering materials contained in a predetermined area, and the glittering materials, respectively. Acquisition step of acquiring coating information indicating the degree of distribution of normals under the surface of and glitter material information indicating the reflection characteristics of the glitter material,
a subsurface normal calculation step of calculating the subsurface normal of the glittering material included in the predetermined area using the distribution degree of the subsurface normal and the object shape information;
Using the glitter material information and the subsurface normal calculated by the subsurface normal calculation step, the reflectance of the glitter material with the light source and line of sight as variables is calculated from the viewpoint position of the camera to the object. a reflectance calculation step of calculating according to the viewpoint distance;
an incident light calculation step of calculating incident light for a drawing pixel to be drawn using the light source information;
Specular reflection for calculating the reflected light component of the glittering material to be drawn on the drawing pixels, using the reflectance calculated by the reflectance calculation step, the incident light calculated by the incident light calculation step, and the camera information. optical calculation process,
a brightness addition step of calculating the display color of the drawing pixel by adding the reflected light components calculated in the specular reflected light calculation step by the number of the glittering materials included in the drawing pixel;
an output step of outputting the display color for each pixel calculated by the brightness adding step;
program to run.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021016520A JP2022119427A (en) | 2021-02-04 | 2021-02-04 | Calculation device, calculation method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021016520A JP2022119427A (en) | 2021-02-04 | 2021-02-04 | Calculation device, calculation method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022119427A true JP2022119427A (en) | 2022-08-17 |
Family
ID=82848470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021016520A Pending JP2022119427A (en) | 2021-02-04 | 2021-02-04 | Calculation device, calculation method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022119427A (en) |
-
2021
- 2021-02-04 JP JP2021016520A patent/JP2022119427A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10540810B2 (en) | System and method of rendering a graphical object with modification in structure | |
JP2006277555A (en) | Method, apparatus and program for generating granular metallic paint color image | |
US9905045B1 (en) | Statistical hair scattering model | |
Westin et al. | A comparison of four BRDF models | |
Chermain et al. | A microfacet-based BRDF for the accurate and efficient rendering of high-definition specular normal maps | |
Guarnera et al. | Material capture and representation with applications in virtual reality | |
US9342901B2 (en) | Material data processing pipeline | |
JP2022119427A (en) | Calculation device, calculation method, and program | |
US20230343051A1 (en) | Visualizing the appearances of at least two materials | |
US20230260237A1 (en) | Visualizing the appearance of at least two materials | |
JP4764963B2 (en) | Image processing device | |
Gierlinger et al. | Rendering techniques for mixed reality | |
AU2017228700A1 (en) | System and method of rendering a surface | |
EP3937133A1 (en) | Generating a destination texture from a plurality of source textures | |
JP7412610B2 (en) | Using bidirectional texture functions | |
US20230298248A1 (en) | Texture Interpolation | |
EP4209998A1 (en) | Method, computer and computer program for modifying texture images | |
Guarnera et al. | Capturing and representing brdfs for virtual reality | |
Yamaguchi | A parametric reflectance approximation for rendering Japanese lacquerware and Maki-e | |
JP2012141834A (en) | Fine irregular surface object drawing circuit | |
Liu et al. | Environment Lighting for Point Sampled Geometry | |
Mihálik et al. | Image-based BRDF Representation | |
Wang et al. | Reflectance Reconstruction of Objects with Spatially Varying Materials | |
Claustres-CTO | Photorealistic Imaging | |
Kalghatgi | Measurement, modeling and perception of painted surfaces: A Multi-scale analysis of the touch-up problem |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240124 |