WO2005124691A1 - 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法 - Google Patents

物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法 Download PDF

Info

Publication number
WO2005124691A1
WO2005124691A1 PCT/JP2004/008770 JP2004008770W WO2005124691A1 WO 2005124691 A1 WO2005124691 A1 WO 2005124691A1 JP 2004008770 W JP2004008770 W JP 2004008770W WO 2005124691 A1 WO2005124691 A1 WO 2005124691A1
Authority
WO
WIPO (PCT)
Prior art keywords
viewpoint
texture
btf
illumination
index
Prior art date
Application number
PCT/JP2004/008770
Other languages
English (en)
French (fr)
Inventor
Hiroshi Kawasaki
Ryo Furukawa
Original Assignee
Techno Dream 21 Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Techno Dream 21 Co., Ltd. filed Critical Techno Dream 21 Co., Ltd.
Priority to PCT/JP2004/008770 priority Critical patent/WO2005124691A1/ja
Priority to JP2006514640A priority patent/JP4394122B2/ja
Publication of WO2005124691A1 publication Critical patent/WO2005124691A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects

Definitions

  • the present invention samples the reflection characteristics of the surface of a real object and generates a surface reflection model expressed as a bidirectional texture function (hereinafter referred to as “BTF”) from those samples.
  • BTF bidirectional texture function
  • the present invention relates to a method of efficiently rendering an arbitrary shape model by using a generated shade model using a programmable shader.
  • the BTF is a model that formulates a texture that can be reproduced in any light source direction and viewpoint direction, and is a function that uses the light source direction, viewpoint direction, and texture coordinates as parameters.
  • the present invention includes, as an elemental technology thereof, a method of efficiently interpolating a viewpoint from a plurality of viewpoint-dependent texture samples using a programmable shader.
  • measured object In order to reproduce a specific object (hereinafter referred to as “measured object”) with a high degree of realism using a three-dimensional computer graphic (hereinafter referred to as “CG”), the shape of the measured object and the surface There is a need to express the texture as data.
  • CG three-dimensional computer graphic
  • the shape of the surface of the measurement object can be measured in some detail by using a shape measurement device such as a laser range scanner.
  • BRDF Bidirectional reflection distribution function (Bidirectional Reflectance Distribution Function) Function
  • BRDF Bidirectional Reflectance Distribution Function
  • BRDF Bidirectional Reflectance Distribution Function
  • BRDF has been widely used, for example, as it has been adopted in ordinary modeling software.However, when the surface of an object has a texture and the texture of the material changes depending on the location, the BRDF changes depending on the position of points on the surface. I do. In such cases, the method of expressing BRDF is still at the research stage.
  • a fine shape hereinafter referred to as a “mesoscopic shape” of a visually recognizable size, for example, a fine bump (bump) or a weave in a cloth, the appearance of the object changes.
  • BRDF alone is not enough to express the transformation.
  • BTF Non-Patent Document 2
  • the BTF is a formula that expresses the change in the appearance of the object surface when the viewpoint direction and the light source direction are continuously changed as a function representing an image with the viewpoint direction and the light source direction as parameters.
  • BTF is not only an extension of BRDF, but also helps model and render changes in appearance due to the fine shape of the surface. Examples of applications include textures such as cloth with fine irregularities, and expressions such as grass and asphalt. With BTF, it is possible to represent many types of objects that cannot be represented by conventional methods.
  • a video board mounted on a general personal computer includes a programmable vertex shader, a programmable pixel shader (hereinafter simply referred to as a “vertex shader” and a “pixel shader”, and (Referred to collectively as “programmable shaders”)).
  • processing performed inside the GPU which is an image processing device on the video board, such as coordinate transformation processing of vertex positions of object shape data, texture mapping processing for each pixel, etc. Can be controlled by a user programmatically.
  • Non-Patent Document 1 Japanese Patent Application Laid-Open No. 2000-090715
  • Non-Patent Document N Greene, "Environment Mapping and
  • Non-Patent Document 2 K. Dana and B. Van Ginneken and S. Nayar and J. oenderink, "Reflectance and texture of real-world surfaces", “ACM Transactions on Graphics”, “1999”, vol. 18, no. “1”, pp. 1-34 "
  • Non-Patent Document 3 "Theory for off-specular reflection from roughened surfaces", J. Opt. Soc. Am., Vol. 57, pp. 1105-1104, 1967, by K. E. Torrance and E. M. Sparrow
  • Non-Patent Document 4 Sloan and Peter-Pike and Jan Kautz and John
  • Non-Patent Document 5 "Texture and reflection in computer generated images" Communications of the ACM, vol. 19, no. 10, pp. 542-547, Oct. 1976, by J. F. Blinn and M. E. Newell.
  • Non-Patent Document 6 "Pyramidal Parametrics” by L. Williams
  • Non-Patent Document 10 H.W.Jensen, S.R.Marschner, M. Levoy and P.
  • Non-Patent Document 1 "Environment Matting Extensions: Towards Higher Accuracy and Real-Time Capture", SIGGRAPH 2000, pp. 121-130, July 2000, by Chuang, Zongker, Hindorff, Curless, Salesin, and Szeliski.
  • the present invention is a method for performing the above-described rendering in real time.
  • the BTF is applied to the shape data and rendered using the functions of the vertex shader and the pixel shader.
  • rendering the texture by pasting it onto the shape data is called “mapping” to the shape data of the texture.
  • rendering by applying BTF to the shape data is referred to as “mapping”. write.
  • BTF data is obtained by photographing a real measurement object or by combining an image of the measurement object represented by the data using CG. At this time, an actual image or a composite image of the target object is photographed or generated while changing the light source direction and the viewpoint direction. This process is called “BTF sampling”.
  • Sampling a real measurement object requires taking pictures of the measurement object under a huge variety of conditions.
  • the sampling of a real measurement object is performed by a sampling device (hereinafter referred to as a patent document 1).
  • the sampled BTF data (hereinafter referred to as “; BTF sample image set”) was acquired only in discrete light source directions and viewpoint directions.
  • BTF sample image set In order to map BTF to shape data in arbitrary light source direction and viewpoint direction, it is necessary to define BTF in continuous light source direction and viewpoint direction.
  • the texture memory on the video board In the data area that the pixel shader can read, the only place where large data can be stored is the texture memory on the video board. Therefore, in order to render the BTF efficiently using the vertex and pixel shaders, it is necessary to represent the BTF data as texture data.
  • a set of BTF sample images is approximated, compressed, and represented as a plurality of texture data that can be stored in a texture memory.
  • the change in BTF can be due to a change in the direction of the light source or a change in the direction of the viewpoint.
  • the change in the BTF due to the change in the light source direction is a response function of the radiance to a point light source located in each illumination direction, which is described as "BTF lighting response” or "BTF light source dependent change”.
  • BTF lighting response or "BTF light source dependent change”.
  • BTF viewpoint-dependent change A change in BTF due to a change in direction.
  • the illumination response of the BTF is stored as a parameter of a spherical function representing the illumination response.
  • a parameter representing a spherical function a coefficient vector based on a spherical harmonic function can be used as in Non-Patent Document 4.
  • this parameter is defined as a two-dimensional pixel value.
  • approximation of viewpoint-dependent change of BTF is performed by weighted averaging of texture data of multiple viewpoints and interpolating the data of those viewpoints.
  • the value of the sample corresponding to the viewpoint in the direction close to that viewpoint (hereinafter referred to as “nearby viewpoint”) is multiplied by the weight determined by the position of the given viewpoint, and the sum of the values is calculated.
  • the index of the neighboring viewpoint corresponding to each viewpoint direction and the weight of each neighboring viewpoint are stored in the cube texture (“Cube Map J”).
  • the cube texture representing the near-view index function and the near-view weight function may be stored in the texture memory or the main memory.
  • the selection of the nearby viewpoint and the calculation of the weight of the nearby viewpoint are performed by a vertex shader or a pixel shader.
  • the selection of the nearby viewpoint and the calculation of the weight of the nearby viewpoint are performed by a central processing unit (hereinafter referred to as “CPU”).
  • CPU central processing unit
  • these textures are stored in both the texture memory and the main memory, and the index and weight of the near viewpoint are referred to by both the programmable coder and the CPU.
  • Non-Patent Document 1 2 When using BTFs to represent the texture of a material, it is of high practical value if a BTF of any size can be obtained from a BTF of finite size. To achieve this, the technique of "Image Quilting" (Non-Patent Document 1 2) is applied, and BTFs of finite size are joined together with small pieces of BTF to obtain a BTF enlarged to an arbitrary size. .
  • Rendering can be performed by the CPU, but by using a programmable shader, processing efficiency can be greatly improved.
  • the index and weight of the viewpoint (neighboring viewpoint) to be used for interpolation are determined with reference to the nearby viewpoint index function and the nearby viewpoint weighting function.
  • texture coordinates shape texture coordinates representing the correspondence between points on the surface of the shape data and the BTF are obtained from the shape data and the camera information at the nearby viewpoint as necessary.
  • illumination during rendering is spherical. 4 008770
  • the viewpoint-dependent illumination response is referenced by texture reading from the shape coordinates and the index of the nearby viewpoint.
  • the inner product of this and the coefficient representing the illumination is output as a pixel value.
  • Quilting Map When expressing BTFs by Image Quilting, a coordinate conversion table called Quilting Map is used to express BTFs enlarged by BTFs of finite size. This makes it possible to map the enlarged BTF to any surface by simple processing.
  • a pixel value of a texture for an arbitrary light source direction and a viewpoint direction can be generated at high speed. This allows efficient and real-time rendering while mapping the BTF to the shape data in any light source direction and viewpoint direction.
  • Data B If it is possible to reproduce the appearance of the object in any light source direction and viewpoint direction as an image from the force, the stored data B is called rBTFj and recorded first.
  • Data A is called “BTF sample image set”.
  • the effects of the present invention are as follows: When a set of BTF sample images is given, (1) compress or interpolate those data and save as BTF, (2) save the BTF as a texture image or a numerical table, It can be expressed in a computer in a form that can be supported by display hardware, (3) BTF can be pasted on an arbitrary shape model, CG rendering can be performed, and (4) Real-time rendering can be realized. Is a point.
  • Objects that can be represented include objects that have fine irregularities on the surface, and objects that have hair or fine fibers on the surface.
  • the present invention includes, as an elemental technology thereof, a method of efficiently interpolating a texture related to a viewpoint from a plurality of viewpoint-dependent texture samples using a programmable shader.
  • a set of BTF sample images in which the appearance of an object and the texture of the surface are recorded as a set of images (CG images or photographs) corresponding to a plurality of viewpoint directions and light source directions are input data. It shall be.
  • the input BTF sample image set consists of information of multiple images, camera (viewpoint) information and light source position information corresponding to each of those images.
  • object coordinate system For the target object and the position of the point represented by the object coordinates on the image to be projected is performed.
  • object coordinate system the fixed coordinate system
  • a BTF sampling device such as that described in Patent Document 1 is used to capture an image of a real object so as to satisfy this condition, and further record camera information and light source position information.
  • a set (viewpoint direction) of the camera position corresponding to each image expressed in the object coordinate system as a direction vector from the origin of the object coordinate system is obtained.
  • This set is called “viewpoint sampling point set”.
  • the viewpoint sampling point set is a discrete set and is denoted by V *.
  • V * a symbol representing a discrete value is distinguished by attaching an asterisk to the right shoulder, such as “ ⁇ *”.
  • the elements of V * are called “viewpoint sampling points”.
  • the elements of the finite set V * indexed by i v (ie, the viewpoint sampling points) are written as v * (i v ).
  • the index that indicates the viewpoint sampling point in V * is called the “viewpoint index”.
  • the fixed viewpoint A set of light source direction vectors paired with the direction v * (i v ) is obtained.
  • This set is called “light source sampling point set”.
  • Source sampling point set than relying on the viewpoint direction of the index i v, is denoted by L * (v * (i v )) or L * (i v).
  • the element of the finite set L * (v * (i v )) indexed with ⁇ is called the ⁇ light source direction sampling point '', and r (ii; i v ) ⁇ L * (v '(i v )) write.
  • gamma; notation ( ⁇ ⁇ ⁇ ) is the equation, regarded as a function of the variable ii, indicating that regarded as a constant i v. In this case, this function is written as l * (...; i v ) Sometimes.
  • function variables are separated by ";" the symbol on the left side of ";” is regarded as a variable of the function, and the symbol on the right side of ";” is regarded as a fixed variable.
  • target BTFJ the BTF to be approximated by sampling
  • BTF sample texture the texture image to which the parameters of the viewpoint direction and the light source direction are added.
  • BTF sample texture set The set of sample textures.
  • a BTF sample texture set is obtained.
  • the difference between the BTF sample image set and the BTF sample texture set is that the BTF sample image set remains the sampled image, whereas the BTF sample texture set is the target BTF at a certain viewpoint sampling point and light source direction sampling point. This is a sample that approximates BTF.
  • the sample texture set is a set of discrete textures, and interpolation must be performed to use it as a continuous BTF.
  • a continuous BTF that is actually interpolated, approximated and generated based on the BTF sample texture set is referred to as “approximate BTF”.
  • the first method is to apply coordinate transformation to the captured image and deform the image so that the pixels at the same coordinates almost correspond to the same physical point in all images of the BTF sample texture set. is there.
  • the measurement object is a flat object
  • such an image can be obtained by performing image conversion called homogeneous conversion using the internal parameters and external parameters of each camera attached to the BTF sampling device. Can be. Since the internal and external parameters of the camera depend on the viewpoint direction at the time of sampling, this process is performed using different parameters for each viewpoint direction. Hereinafter, this processing is referred to as “rectification”.
  • the viewpoint direction and light source direction given to the BTF sample texture are expressed in a tangent spatial coordinate system.
  • the pixels at the same coordinates always correspond to the same physical point.
  • Such an approximate BTF can be used for rendering by mapping it to an arbitrary surface with texture coordinates, just like a normal texture image.
  • the method of using rectification for texture sampling is called “texture sampling method A”.
  • the second method is to use the raw image or a part of the image as a BTF sample texture without performing coordinate transformation on the images in the set of BTF sample images.
  • This method is used when the measurement object is a three-dimensional object.
  • the pixels at the same coordinates correspond to different physical points depending on the viewpoint direction parameter.
  • the viewpoint direction and light source direction given to the BTF sample texture are expressed in the object coordinate system.
  • such an approximate BTF needs to change the mapping between the shape to be rendered and the texture depending on the viewpoint direction.
  • the polygon mesh to be rendered uses an approximation of the shape of the measurement object, and the texture coordinates corresponding to each vertex of the polygon mesh are calculated at the time of rendering. .
  • the camera coordinates and external parameters prepared for each viewpoint are used to calculate the texture coordinates.
  • a method that does not use rectification for texture sampling is called “texture sampling method B”.
  • the BTF is "an infinite set of radiance values, indexed by viewpoint direction v, light source direction 1, texture coordinates (s, t), color channel c".
  • texture sampling method A When texture sampling method A is used, v and l are expressed in the tangent coordinate system of the object surface.
  • texture sampling method B When texture sampling method B is used, v and l are expressed in the object coordinate system.
  • v and l are expressed by the following equation 1 using spherical coordinates.
  • the texture coordinate ⁇ is represented by the coordinates (s, t), and c is an index corresponding to RGB, and takes one of the values 0, 1, and 2.
  • Objective BTF is expressed by the following formula 2 as a function with v, l, s, t, and c as variables.
  • each BTF sample texture is a sample of the function T and will be called "BTF sample texel value”.
  • the texture coordinates (s, t) are sampled at rectangular grid points, and the coordinates of each grid point expressed as an integer are (ia, it).
  • the texture size is (W t , Ht), and is expressed by Equation 3 below.
  • Equation 4 the sample texel value is represented by the following Equation 4 as a discrete function.
  • Equation 6 Since T * is a sampling of T, Equation 6 below is obtained.
  • the approximate BTF that approximates the function ⁇ , which is the target BTF is represented by Ta, and is represented by the following equation (7).
  • the apparent radiance of an object is represented by the spherical integral of the response function of the radiance to a point light source (hereinafter the “radiance response function”) and the function representing the light source.
  • the radiance response function and the function representing the light source are transformed into the spherical harmonic
  • the change in the BTF or the BTF sample texel value when the light source direction, color channel, and texture coordinates are fixed and only the viewpoint direction is changed is referred to as “viewpoint-dependent change”.
  • the change in BTF or BTF sample texel value is referred to as “light source dependent change” or “radiation luminance response”.
  • the reason why the interpolation method for the light source dependent change and the interpolation method for the viewpoint dependent change are different is that the properties of the light source dependent change and the viewpoint dependent change of the BTF sample texel values are different.
  • T * representing the BTF sample texel values
  • the viewpoint direction i v Tech cell position (i s, it)
  • T * value Is highly accurate to represent the radiance value at almost the same physical point in the measured object.
  • the illuminant-dependent variation in radiance values is relatively gradual and can be approximated well using a small number of spherical harmonic function bases.
  • the light source-dependent change of the target BTF, T is also moderate, and approximation using spherical harmonics is considered to be effective.
  • the same texel positions (i s, it) and the color channel c, different viewpoints indenyl box i v BTF sample texel values T * values as you specify the same physical point measured body It does not always correspond to the radiance value.
  • texture sampling method B the same text .
  • the rectification may be affected by the mesoscopic shape change of the object surface and the effect of camera parameter errors. An error occurs in the processing of the calibration. So even in this case, the same texel position may correspond to different physical points.
  • the viewpoint-dependent change of the function T * representing the BTF sample texel value is caused by the change of the physical point position. It may include abrupt changes in the resulting radiance values. If these changes are approximated by a low-dimensional spherical harmonic, high-frequency components may be removed and important features of the texture may be lost.
  • the viewpoint dependent change of the BTF sample texel value is compressed and stored by vector quantization, and the viewpoint dependent change of the target BTF is approximated by the weighted sum of the BTF sample sum texel values.
  • weights to be applied directly to the sump-no-ray the one that uses the value of the barycentric coordinates as it is, and the one that uses a rational function of the barycentric coordinates to achieve a smoother weight change. High effect.
  • the light source-dependent changes in these components may change rapidly with movement in the light source direction.
  • approximating the light source-dependent change with a low-dimensional spherical harmonic function may remove high-frequency components and eliminate specular reflection and self-shadowing. Therefore, it is desirable to separate these components from the BTF sample texture set in advance.
  • This paper describes a method for separating specular reflection and self-shadowing from a set of BTF sample textures.
  • the specular reflection is calculated by applying the reflection model (including diffuse reflection and specular reflection) at each point on the object surface to the data of the BTF sample texture set.
  • the position of the self-shadow expected from the shape of the model and the light source position is calculated, and the change in the value at that position is calculated to determine the magnitude of the change in the value due to the self-shadow. be able to.
  • Another method for separating specular reflection and self-shadow from the BTF sample texture set is also described.
  • the light source-dependent change is approximated as is with a low-dimensional spherical harmonic function, and the difference between the pixel value of the approximated value and the original BTF sample texture set is calculated, and the location where the difference is large is calculated.
  • the value of the BTF sample texture is larger, and the place is applied to the specular reflection model. Fit to determine the intensity of specular reflection at points on each surface.
  • the value of the BTF sample texture is smaller, and the place is regarded as a self shadow.
  • Specular reflections and self-shadows can be rendered separately from BTF during rendering.
  • Rendering of specular reflection uses the existing reflection model method.
  • specular reflection can be rendered using a model of Transance's Sparrow (Torrance Sparrow) (Non-Patent Document 3).
  • Self-shadows can also be rendered using existing rendering techniques. Each render! Finally, the result is combined with the BTF render result. The specular reflection is added or multiplied by the value, and the self-shadow value is combined with the BTF rendering result by multiplication.
  • the BTF light source dependent change can be regarded as a response function of the radiance value when the direction of the point light source is changed in each pixel of the BTF.
  • the radiance value at each point is the sphere of the response function of the radiance value and the function representing the light source when the intensity of illumination in each direction from that point is expressed as a spherical function. Expressed in terms of area.
  • the response function of the radiance value and the function representing the light source are represented by the linear sum of the spherical summation function, which is an orthonormal basis
  • the spherical integral of the radiance transfer function and the function representing the light source is the inner product of the coefficient vector with respect to the basis. Therefore, it is possible to efficiently cope with global illumination (Non-Patent Document 4).
  • applying principal component analysis to the expansion coefficient based on the spherical harmonic function can calculate a more efficient orthonormal basis. Therefore, here, as an embodiment, one obtained by performing principal component analysis on the expansion coefficient obtained by the spherical harmonic function is used as an orthonormal basis of the response function of the radiance value and the function representing the light source.
  • the BTF sample texture set fixed viewpoint index i v, Tekusenore position (i 8, it), is a set of BTF samples Tech cell Le values in the color channel c, removed Equation 8 below, the spherical function Let it be a sample set.
  • Each element of the illuminant-dependent change sample set corresponds to a point on the unit sphere according to Equation 9 below, which represents the illuminant direction.
  • This unit sphere can be divided into polygon meshes with each point corresponding to the element of L * ( iv ) as a vertex.
  • the polygon mesh is referred to as “light source sampling mesh”.
  • the cube texture that approximates the illumination response is approximated by the spherical harmonic expansion.
  • the coefficients of the series expansion by the spherical harmonics are obtained by spherical integration.
  • the spherical integral is approximated by adding the product of the texel value of the cube texture, the value of the basis function of the spherical harmonic function in the corresponding light source direction, and the solid angle occupied by the texel, for each texel. You.
  • N S h is the maximum order of spherical harmonics. ⁇
  • N sh 2 coefficients are obtained.
  • PCA principal component analysis
  • the K basis vectors calculated by the PCA are the basis of the illumination response of the BTF, expressed as the coefficients of the spherical harmonics. This will be referred to as “illumination response base” in the present invention.
  • the index of the basis vector is k (0 ⁇ k ⁇ K-l), and the basis of the coefficient indicated by k is represented by C (c; l, m, k).
  • C is the index of the color channel and takes one of the values 0, 1, and 2.
  • the weight vector calculated by PCA is a K-order vector indexed by i v , is, and it.
  • element index k (where k is 0 or K-1 an integer) W * (i v, i s, it; k) represent.
  • Equation 1 3 the viewpoint direction v * (i v), texel positions (i s, it) Ru can approximate the BTF corresponding to.
  • Tia is called "BTF light source dependent change approximation function".
  • W * (i v, i s , it; k) represents the illumination response, so is also a discrete viewing direction, discrete function defined in texture coordinates at the same time, referred to as "view-dependent lighting response".
  • the light-source-dependent change approximation function of BTF described above is a continuous function for the change of the light source direction 1, and for the change of the viewpoint direction V, V is the viewpoint sampling point set. It is a discrete function that has a value only when it is an element of V *. Approximation of the viewpoint-dependent change of the BTF is performed by selecting a plurality of viewpoint directions V from V * and taking a weighted sum of the values in the viewpoint directions.
  • the elements of the viewpoint sampling point set V * ⁇ v * (i v )
  • 0 ⁇ iv ⁇ II V * II ⁇ can be mapped on the unit sphere as in the case of the light source sampling points.
  • the unit sphere is divided by a triangular polygon mesh whose vertices are the corresponding points on the sphere of the viewpoint sampling point set. This polygon mesh is called “viewpoint sampling mesh”.
  • an arbitrary viewpoint direction V corresponds to one triangular polygon included in the viewpoint sampling mesh.
  • the corresponding point of V is inside the triangular polygon If the corresponding point of V is on a side or vertex of the mesh, the triangle polygon should correspond to the triangular polygon connected to the side or vertex. This triangle is called the “neighboring viewpoint triangle” of V, and is expressed by the following equation (14).
  • the three vertices in each triangle of the viewpoint sampling mesh are indexed independently by the numbers ⁇ 0, 1, 2 ⁇ in each triangle. This index is called the “triangle local index”.
  • the three vertices of the neighboring viewpoint triangle ⁇ ⁇ ( ⁇ ) are elements of the viewpoint sampling point set. These are called “neighboring viewpoints” of V, and are expressed by the following equation 15 in the order of the triangle local index.
  • a function Ta representing an approximate BTF is given in the form of the following equation 18 as a function obtained by taking a weighted average in the following equation 17 which is a weight function.
  • G (...; k) is a function of the viewpoint position obtained by interpolating the viewpoint-dependent illumination response.
  • G (...; k) is called the “interpolated lighting response”.
  • H (v; n ) Is a function that represents the weights of the three neighboring viewpoints that approximate v. This is called the “neighboring viewpoint weight function”.
  • H (v; n) has the following constraints. Let I and j be the indices of the viewpoint sampling points. At this time,
  • H (v; 0) is generally not continuous because i v N (v; 0) is not continuous with V at the edges and vertices of the mesh.
  • Q (v, v * ( iv )) is an interpolation filter in a viewpoint sampling mesh having a non-zero value only inside a triangle having vertices at v * ( iv ) when considered as a function of V.
  • the barycentric coordinates are described in the order of the triangular local index.
  • Equation 25 can be used as H (v; n), using the barycentric coordinates as they are.
  • the function s is a third-order Hermite interpolation function used to smoothly connect the interval [0, 1], and bNs ( v ; n ) replaces s (bN ( v ; n )) with This is a function normalized so that the following equation 27 is obtained.
  • An object of the present invention is to make BTF sampled by a BTF sampling device efficient using a programmable shader. As a preparation for this, it is necessary to represent the rendering data prepared as described above as texture data.
  • Data encoding is view-dependent lighting response W * (i v, ia, it; k), near the viewpoint I Ndettasu function i v N (v; n) , near the viewpoint weighting function H (v; n), n ⁇ ⁇ 0,1,2 ⁇
  • the lighting environment that illuminates the target object at the time of rendering is represented in advance by a cube map, etc., and is converted into spherical harmonic function coefficients.
  • the same method as when the viewpoint-dependent illumination response is obtained can be used.
  • the lighting environment is expressed in terms of the coefficients of the spherical harmonics, it is usually expressed in world coordinates. This is the tangent space coordinate determined by each vertex of the mesh at the time of rendering, or the object coordinates common to the entire object. Convert to As the conversion method, the method described in Non-Patent Document 4 is used.
  • the converted coefficients expressed as weights for the illumination response bases are called “illumination expression by illumination response bases”, and are represented by L c, k). This expression can be calculated by taking the inner product of the transformed coefficients and the illumination response basis and applying scaling.
  • W * (iv, i s, it; k) is, i v can be regarded as fixed to the W t xH t size of the texture image of. This is referred to as a "view-dependent lighting response texture", i v can be regarded as an index of its texture.
  • a texture of (M t Wt) x (N t Ht) is prepared.
  • W * consumes the number of textures represented by Equation 28 below.
  • the near viewpoint index function iv N (v; n ) and the near viewpoint weight function H (v; n) are expressed as a cube texture for V. If n is the color channel, these functions can be represented by two cube textures. These cube textures are called “neighboring viewpoint index texture” and “neighboring viewpoint weight texture”, respectively.
  • the rendering algorithm by the programmable shader is as follows. Processing is divided into vertex shader processing and pixel shader processing. The processing by the vertex shader simply calculates the tangent space base at each vertex of the mesh, and calculates the viewpoint expressed in the tangent space and the light source directions v and l. The vertex shader is also passed the texture coordinates p. v, 1, p are interpolated between vertices and passed to the pixel shader. Lb (c, k) is calculated by expressing the illumination by the coefficient of the spherical harmonic expansion.
  • This process is performed by rotating and taking the inner product with the illumination response base. This process is preferably performed by the vertex shader. However, if this cannot be performed by the current hardware vertex shader, this may be performed by the CPU.
  • PIX is the variable that stores the pixel value
  • IV is the nearby viewpoint index
  • WV is the value of the nearby viewpoint weight function
  • WL is the value of the interpolated lighting response.
  • the value of each function is obtained by referencing the corresponding texture.
  • the lighting expression L c, k) based on the lighting response base is represented by LB (c, k), the viewpoint index i v , the texture coordinates (s, t) inside the texture, and the viewpoint-dependent lighting response table at the base number k.
  • Step 4.1 WL [k]-WV [0] LWTEX (IV [0], s, t; k)
  • the number of repetitions can be represented by the following Expression 28.
  • the largest consumption of texture memory is for viewpoint-dependent lighting response textures. By compressing this information, the consumption of texture memory can be reduced.
  • W * (i v, i s, it; k) is typically, IS is a texture coordinate, with respect to it, with a high autocorrelation around the origin. Further, with regard index i v representing the viewpoint direction, an index defined as the difference between the i v reflects the difference between the view direction (i.e., when the i v has a value close, if the viewing direction is also close ), also W * (iv, i s, i t; k) has a high value around the origin.
  • the number of blocks is number S v xS s xS t.
  • the code book for each block and Nc number provided, by preparing a texture that contains the code fin dead task, W * (iv, i s , i t; k) carry out the compression of.
  • each view direction index i v respectively how to apply individually Image Quiltin.
  • the other is all W * in each view direction (i v, i s, it ; k) regarded as collectively one image is collectively how to apply Image QuHting.
  • the viewpoint direction index i v is regarded as one of the indices specifying the channel of the texel.
  • the input image is a given image, and the output image can be any size.
  • the output image is divided by a rectangular grid.
  • An “overlap area” with a fixed width is provided between adjacent grids.
  • a partial image of the input image is assigned to each grid of the output image and an overlapping area adjacent to the grid.
  • partial images corresponding to both grids are divided using random numbers.
  • the difference between the plurality of partial images assigned to the partial images is set to be equal to or less than a certain value.
  • a grid dividing line is generated in the overlapping area, and each grid is divided.
  • the grid dividing line is generated such that the sum of the differences between the partial images corresponding to both grids for all the pixels on the line takes the minimum value.
  • Such a line is called the “least cost path”.
  • the minimum cost path can be determined by dynamic programming.
  • the output image is obtained by copying the partial image from the input image to the output image for each grid divided by the minimum cost path.
  • each texel value is a coefficient for the basis of a spherical function representing the response to illumination.
  • the evaluation value of the difference at this time the value obtained by multiplying the square of each coefficient by the weight based on the spherical function basis and taking the sum thereof is used.
  • the value evaluated by the same method is used for the generation of the minimum cost path.
  • each texel value is a coefficient for each base of the spherical function representing the response to illumination.
  • the difference evaluation value at this time is obtained by multiplying the square of each coefficient by a weight depending on the spherical function basis and the viewpoint index, and taking the sum of them. Same for generating the least cost path Use the value of the difference evaluated by the method.
  • a coordinate conversion table called Quilting Map is used to represent the output BTF.
  • a coordinate conversion table for converting the texture coordinates of the output BTF into the texture coordinates of the input BTF may be prepared. If this coordinate conversion table is expressed as a texture, the output BTF can be efficiently rendered by using the pixel shader.
  • Image Quilting is applied individually to each viewpoint direction, the output BTF can be expressed by creating a separate coordinate conversion table for each viewpoint index.
  • the rotation of the light source can be expressed with only two variables. This can be easily achieved by making the direction of the light source correspond to the spherical surface. Therefore, by calculating Lb (c, k) for each light source direction in advance and storing this in a cube map or the like, the rotation calculation by the CPU can be performed in the vertex seeder. This is called the "pre-computed lighting representation".
  • the nearby viewpoint weighting function H (v; n) (ne ⁇ 0,1,2 ⁇ ) is a weighting function for interpolating the viewpoint-dependent change of the BTF, and has three channels. Can be represented by a cube texture. It is desirable that this function changes smoothly with changes in the viewpoint direction V. For this reason, it is conceivable to apply bilinear interpolation when reading the H (v; n) cube texture, but this method has serious problems.
  • H (v; n) is generally the polygon edge of the viewpoint sampling mesh. With non-continuous parts. For this reason, bilinear interpolation introduces errors in the weight values near the sides of the polygon, producing undesirable artifacts.
  • this problem is solved by defining ⁇ ( ⁇ ; ⁇ ) such that discontinuity does not occur at the positions of the sides of the viewpoint sampling mesh.
  • N 3
  • the viewpoint sampling mesh is a graph on a sphere, which is equivalent to a plane graph.
  • H ( v; n) (n E ⁇ 0,1,2,3 ⁇ ) can be represented by a 4-channel cube texture.
  • the neighborhood viewpoint index function is expressed by a 4-channel cube texture, artifacts will not occur even if bilinear interpolation is used in the acquisition of H (v; n) texels.
  • the use of bilinear interpolation allows continuous interpolation of viewpoint-dependent changes in BTF, even when using low-resolution cube textures.
  • a texture that can obtain pixel values from a three-dimensional direction may be used instead of the cube texture.
  • a texture that can obtain pixel values from a three-dimensional direction.
  • Non-patent document 5 a map based on latitude and mildness
  • Non-patent document 6 a spherical map (sphere mapping)
  • Non-patent document 7 a parabolic map (paraboloid mapping)
  • near viewpoint weight function, and near viewpoint index function are represented by a two-dimensional texture using a spherical map, parabolic map, etc.
  • multiple functions can be contained in one texture image. .
  • the limitation on the number of textures can be eased.
  • the viewpoint direction is not completely constant at the time of rendering, if the rendering conditions are close to the above case, the neighboring viewpoint required for the entire rendering is only a small part of all viewpoint sampling point sets. Even in such a case, it is not necessary to hold the near-view weight function and the near-view index function as a cube texture, but it is sufficient to refer to the CPU and pass the result to the programmable shader.
  • the direction of the light source is constant throughout the object, it is not necessary to calculate the illumination expression by the illumination response base for each vertex, and it is sufficient to use the same value as a whole.
  • View-dependent lighting response W * (i v, i s , it; k) may be expressed as a three-dimensional texture, separated by two-dimensional texture in a grid pattern, it may be arranged.
  • view-dependent lighting response W * (i v, is, it; k) a case of representing a three-dimensional tex Chiya, Indekkusu iv viewpoint is better to define the following conditions by sea urchin.
  • the view-dependent lighting response texture can be cached by the view.
  • the CPU also uses the near-view index texture reference to cache the viewpoint-dependent lighting response texture in the texture memory in the video board according to the viewpoint. can do. This method is effective when the neighboring viewpoints required for the entire rendering are only a part of all viewpoint sampling point sets.
  • the texture of the viewpoint that may be used as a nearby viewpoint in the near future is loaded into the texture memory as a cache, and the texture is loaded into the texture memory. This can eliminate display delays that occur during the operation.
  • the viewpoint index of the texture to be read into the cache is determined in advance as a spherical function using the viewpoint direction as a variable, and is used as the texture. By expressing it, the viewpoint index of the texture to be read into the cache can be determined efficiently. In this case, by determining in advance the position in the texture memory where the texture to be cached is read, the memory management in the cache can be simplified and the cache can be operated efficiently.
  • the texture representing the viewpoint index of the texture to be read into the cache, the neighboring viewpoint weight texture, the neighboring viewpoint index texture, and the representation of the pre-calculated lighting are all expressed as two-dimensional textures. Combining multiple pieces can reduce the number of textures.
  • viewpoint weight texture can mean that the real 3.6 forces 3 and 4 are mixed at 0.4: 0.6.
  • viewpoint-dependent lighting response is a 3D texture, it can be directly converted to texture coordinates.
  • Non-Patent Document 8 information on the irregularities on the surface of an object can be obtained with finer accuracy than a polygon mesh. For example, a case where a bump map is given, or a case where bumps can be calculated by a method such as shape-from-shading (Non-Patent Document 8).
  • the points corresponding to the same physical point can be calculated in the BTF sample textures at a plurality of different nearby viewpoints, adding the effect of parallax due to unevenness. This makes it possible to obtain a more accurate BTF by morphing the texture so that points corresponding to the same physical point move smoothly.
  • the pixel values used for template matching were the RGB values of the original BTF sample texture, the coefficient sequence when the light source-dependent change sample set for each pixel was expanded into a spherical harmonic function, and the coefficients of the spherical harmonic function were approximated by PCA.
  • the weight vector at the time can be used.
  • Non-Patent Document 9 a spherical wavelet transform (Non-Patent Document 9) can be used instead of the spherical harmonic expansion.
  • the attenuation of light due to the distance between the light source and the surface can be expressed by increasing or decreasing the RGB value of the pixel to be rendered. For example, by multiplying the reciprocal of the square of the distance between the light source and the surface by the RGB value of the pixel to be rendered, light attenuation due to the distance from the point light source can be expressed.
  • each color channel of the pixel to be rendered By increasing or decreasing the value of each color channel of the pixel to be rendered, changes in the light source color can be expressed. For example, when sampling an image by adjusting the white balance so that the light source can be regarded as white, the value of each color channel of the pixel to be rendered is multiplied by a value proportional to the set light source color to the value of the light source color. It is possible to express the difference.
  • the target object is a transparent object or a translucent object
  • transmitted light which is observed when light passes through the object.
  • This case can also be handled by the method of the present invention.
  • the transmitted light is rapidly attenuated as the thickness of the object increases, so the thickness of the object must be measured at the same time as BTF sampling. At the time of rendering, this thickness is used to reduce the intensity of transmitted light according to the thickness of the target object to be rendered.
  • Non-Patent Document 10 a subsurface model such as BSSDRF (Non-Patent Document 10)
  • BSSDRF Non-Patent Document 10
  • the present invention can be applied as it is by using the method of Non-Patent Document 11 or the like.
  • the algorithm of the present invention may be directly executed by a CPU instead of being executed by a GPU (image processing device on a video board) by a programmable shader.
  • the execution efficiency is lower than that of the GPU, but there are no restrictions such as the width and height of the texture and the capacity of the texture memory. This makes it possible to map high-resolution, high-quality BTFs.
  • the texture coordinates corresponding to each vertex of the polygon mesh may be calculated in advance, and a mechanism for referring to this during rendering may be used.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

実在の物体の表面における反射特性をサンプリングし、それらのサンプルから双方向テクスチャ関数として表現された表面反射モデルを生成し、該表面反射モデルによって、任意の形状モデルのレンダリングを、プログラマブルシェーダを利用して効率的に実時間で行う。該表面反射モデルは、複数の視点方向でサンプリングされた、任意の照明方向に対する放射輝度の応答関数のパラメータの集合として表現される。また、放射輝度の応答関数のパラメータからなる画像に、Image Quiltingの手法を適用することで、テクスチャサイズの変換を行う。サイズを変更されたテクスチャの表現形式として、テクスチャ座標を変換する変換テーブルを利用すると、効率良く情報を格納できる。該変換テーブルによって表現されたテクスチャは、プログラマブルシェーダを利用して効率的にレンダリング可能である。

Description

明 細 書 物体表面の反射特性をサンプリングして行う実時間レンダリングの 方法及びテクスチャサイズを変換する方法 技術分野
本発明は、 実在の物体の表面における反射特性をサンプリングし、 そ れらのサンプルから双方向テクスチャ関数 (Bidirectional Texture Function, 以降 「BTF」 と表記する) として表現された表面反射モデ ルを生成し、生成された反射モデルによって、任意の形状モデルのレン ダリングを、プログラマブルシェーダを利用して効率的に行う方法に関 するものである。 BTF は、 任意の光源方向、 視点方向で再現可能なテ クスチヤを定式化したモデルであり、 光源方向、視点方向、 テクスチャ 座標をパラメータとした関数である。
本発明の方法を用いれば、 BTF に基づいた任意の形状モデルのレン ダリングを実時間で行うことができる。本発明は、その要素技術として、 視点に依存したテクスチャの複数個のサンプルから、プログラマブルシ エーダを利用して視点に関する補間を効率的に行う方法を含む。 背景技術
特定の物体 (以降 「測定物体」 と表記する) を、 3次元コンピュータグ ラフィックス (以降 「CG」 と表記する) により高い現実感で再現するた めには、 測定物体の形状と、 表面の材質感を、 データとして表 ^ fる必要 力 ^ある。
測定物体の表面の形状は、 レーザレンジスキャナなどの形状測定装置を 利用することで、 ある程度詳細に測定することができる。
一方、測定物体の表面の材質感をデータとして測定、表現する方法には、 様々な問題があり、 CGの分野における重要課題となっている。
測定物体の表面の材質感を表す情報のうち、 非常に重要な情報が、 様々 な方向から物体表面に光を当て、 様々な方向から観測したとき、 物体の見 え方が、 光源の方向、 観測する方向によってどのように変化する力、 とい う情報である。 以降、 この情報を、 その測定物体の 「表面反射特性」 と表 記する。
表面の見え方や質感の表面反射特性を一般的に表現するための形式と して、 双方向反射分布関数 (Bidirectional Reflectance Distribution Function, 以降 「BRDF」 と表記する) がある。 BRDFは、 通常のモデリ ングソフト等においても採用されるなど、 普及が進んできているが、 物体 表面がテクスチャを持ち、材質感が場所によって変化するときには、 BRDF は表面上の点の位置によって変化する。 このような場合に、 BRDFを表現 する手法は、 未だ研究段階である。 また、 物体の表面が、 例えば微細な凸 凹 (bump) や、 布における織り目など、 視認可能な大きさの微細な形状 (以降 「メゾスコピック形状」 と表記する) を持つ場合、 その見え方の変 化を表現するには、 BRDFのみでは不十分である。
前記のような場合に関して、 BRDFの代わりに BTF (非特許文献 2 ) を 利用することが提案されている。 BTFは、 視点方向、 光源方向を連続的に 変化させたときの、 物体表面の見え方の変化を、 視点方向、 光源方向をパ ラメータとした画像を表す関数として定式ィヒしたものである。
メゾスコピック形状を物体表面が持つ場合、 BTFは、 BRDFの単なる拡 張であるばかりでなく、 表面の微細な形状による見え方の変化をもモデリ ング、 レンダリングするのに役立つ。 応用例としては、 細かい凹凸を持つ 布などのテクスチャ、 芝目やアスファルトなどの表現などがある。 BTFに より、 従来の手法では表現しきれない、 多くの種類の物体を表現すること が可能である。
近年、 一般的なパーソナルコンピュータに搭载されるビデオボ一ドに、 プログラム可能な頂点シェーダ、 プログラム可能なピクセルシエーダ (以 降、 単に 「頂点シエーダ」 「ピクセルシエーダ」 と表記し、 また、 これら をまとめて 「プログラマブルシェーダ」 と表記する) の機能が搭載される ようになった。 これらの機能を使うことで、 ビデオボード上の画像処理装 置である GPUの内部で行われる処理、例えば、物体の形状データの頂点位 置の座標変換処理や、 ピクセル毎のテクスチャマッピングなどの処理を、 ユーザがプログラムによって制御することができるようになつている。
頂点シヱーダ、 ピクセルシエーダの機能を利用して、 BRDFや BTFで表 された質感を形状モデルに適用して、 実時間レンダリングを行うことが試 みられるようになってきている。 しかし、 完全な BTFを実時間でレンダリ ングすることは未だ研究途上である。 また、 対象が立体物である場合につ いては、 ほとんど手が付けられていない。
また、 BTFを素材の質感を表現するために利用する場合、 同じような特 徴を持つパターンで平面を敷き詰める手法が実用上重要である。 通常の画 像として表現されるテクスチャに対しては、 このための手法として、 有限 の大きさのテクスチャ標本から、 画像の小片を切り出して、 平面に敷き詰 める手法が提案されており、 ("Image Quiltingj と呼ばれる (非特許文献 1 2 )。 Image Quiltingは、 小さなテクスチャ標本から、 任意の大きさの テクスチャを得る手法であり、 一種の 「圧縮」 と考えることもできる。 特許文献 1 特開 2 0 0 3— 9 0 7 1 5号公報
非特許文献 N. Greene 著 「 "Environment Mapping and
Other Applications of World Projections" IEEE Computer Graphics and Applications, vol. 6, no. 11, pp. 21-29, Nov. 1986 J
非特許文献 2 K. Dana and B. Van Ginneken and S. Nayar and J. oenderink 著 「 "Reflectance and texture of real-world surfaces", "ACM Transactions on Graphics", "1999", vol. 18, no. "1", pp. 1-34」
非特許文献 3 K. E. Torrance and E. M. Sparrow著 「"Theory for off-specular reflection from roughened surfaces", J.Opt.Soc.Am., vol. 57, pp. 1105-1104, 1967」
非特許文献 4 Sloan and Peter-Pike and Jan Kautz and John
Snyder著 「,,Precomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low -Frequency Lighting Environments" ACM Transactions on Graphics (TOG), 2002, pp. 527-536」
非特許文献 5 J. F. Blinn and M. E. Newell著 「"Texture and reflection in computer generated images" Communications of the ACM, vol. 19, no. 10, pp. 542-547, Oct. 1976」
非特許文献 6 L. Williams 著 「 "Pyramidal Parametrics"
Computer Graphics, vol. 7, no. 3, pp. 1-11, Jul. 1983」
非特許文献 7 W. Heidrich and H. P. Seidel 著 「 "View-independent Environment Maps" ACM SIGGRAPH I Eurographics Workshop on Graphics Hardware, pp. 39-45, Aug. 1998 J 非特許文献 8 Y. G. Leclerc and A. F. Bobick著 「,,The direct computation of neight irom snaaing", Proc. of
IEEE Conference on Computer Vision and Pattern Recognition, pp. 552-558, 1991」 非特許文献 9 P. Schroder and W. Sweldens著 「,,Spherical
Wavelets: Efficiently Representing Functions on the Sphere", Computer Graphics Proceedings, (SIGGRAPH 95), pp. 161-172, 1995」
非特許文献 1 0 H. W. Jensen, S. R. Marschner, M. Levoy and P.
Hanrahan 著 「 "A Practical Model for Subsurface Light Transport", Computer Graphics Proceedings (SIGGRAPH2001 Conference Proceedings), pp. 511-518, Aug. 12-17, 2001」
非特許文献 1 Chuang, Zongker, Hindorff, Curless, Salesin, and Szeliski 著 「 "Environment Matting Extensions : Towards Higher Accuracy and Real-Time Capture", SIGGRAPH 2000, pp. 121-130, July 2000」
非特許文献 1 2 A. A. Efros and W. T. Freeman著 「,,Image
Quilting for Texture Synthesis and Transfer" SIGGRAPH 2001, pp. 341-346, Aug. 2001J 発明の開示
実在する平面状の物体のテクスチャを計測し、 任意の視点方向、 光源方 向で再生可能な BTFとして表現し、 これを任意の形状データにマッピング してレンダリングを行うことは、 立体感の高い、 リアルなテクスチャを実 現するために重要な課題である。 さらに、 BTFを、 素材の質感を表現する ために利用する場合、 有限の大きさをもつ BTFのデータから、 任意の大き さの BTFを生成すること力 実用上の大きな課題となる。
また、 立体形状を持った、 実在する物体を計測し、 任意の視点方向、 光 源方向に関してレンダリングを行うことは、 実在物体をリアルに表現する ために重要な課題である。
本発明は、 上記のようなレンダリングを、 実時間で行う方法である。 本発明では、 頂点シェーダ、 ピクセルシヱーダの機能を利用して、 BTF を形状データに適用してレンダリングする。 テクスチャを形状データに貼 り付けてレンダリングすることを、 一般に、 そのテクスチャの形状データ への 「マッピング」 と呼ぶことから、 BTFを形状データに適用してレンダ リングすることも、 以降 「マッピング」 と表記する。
本発明では、 BTFのデータを、 実在する測定物体を撮影するか、 データ で表された測定物体の画像を CGによつて合成することで得る。 このとき、 光源方向、 視点方向を変化させながら、 対象物体の実際の画像または合成 画像を、撮影または生成する。 この処理を、「BTFのサンプリング」 と呼ぶ。
実在する測定物体をサンプリングすることは、 測定物体の写真を、 膨大 な種類の条件下で撮影する必要がある。 本発明では、 実在する測定物体の サンプリングは、 特許文献 1で説明したようなサンプリング装置 (以降
「BTFサンプリング装置」 と表記する) などを利用して、 なされているも のとする。
サンプリングされた BTFのデータ (以降 「; BTFサンプル画像集合」 と表 記する) は、 離散的な光源方向、 視点方向でのみ取得されたものである。 BTFを、 任意の光源方向、 視点方向で形状データにマッピングするために は、 連続な光源方向、 視点方向で BTFを定義する必要がある。
また、 ピクセルシエーダが読み取ることのできるデータ領域のうち、 大 きなデータを格納できる場所は、 ビデオボード上のテクスチャメモリのみ である。 よって、 BTFを頂点シヱーダ、 ピクセルシエーダによって効率的 にレンダリングするには、 BTFのデータをテクスチャデータとして表現す ることが必要となる。 本発明では、 これらの条件を満たすために、 BTFサ ンプル画像集合を近似、 圧縮し、 テクスチャメモリに格納可能な複数のテ クスチヤデータとして表現する。
BTFの変化には、 光源方向の変化によるものと、 視点方向の変化による ものがある。 光源方向の変化による BTFの変化は、 各照明方向に位置する 点光源に対する放射輝度の応答関数であり、 これを 「BTFの照明応答」 或 いは 「BTFの光源依存変化」 と表記し、 視点方向の変化による BTFの変化 を 「BTFの視点依存変化」 と表記する。
本発明において、 BTFの照明応答は、 照明応答を表す球面関数のパラメ ータとして保存される。 球面関数を表すパラメータとしては、 非特許文献 4のように、 球面調和関数を基底としたときの係数べクトルなどを利用す ることができる。 本発明では、 このパラメータを、 画素値として 2次元の 画像データとして格納する。 これにより、 テクスチャメモリにもデータを 格納することができ、 テクスチャと同様に扱うことができる。 なお、 通常 のデータとしてメインメモリに格納しても良い。
また、 BTFの視点依存変化の近似は、 複数の視点のテクスチャデータを 加重平均することで、 それらの視点のデータを補間することで行われる。 つまり、 任意の視点に対し、 その視点に近い方向の視点 (以降 「近傍視点」 と表記する) に対応するサンプルの値に、 任意の視点の位置で決まる重み を掛け、 和をとつた値を利用する。 このとき、 近傍視点の選択と、 各近傍 視点の重みの計算を高速化するために、 各視点方向に対応する近傍視点の インデックスと、 各近傍視点の重みをキューブテクスチャ (「キューブマツ プ J とも呼ばれる。 非特許文献 1 ) として表現する。 これらのキューブテ タスチヤで表される球面関数を、 それぞれ 「近傍視点インデックス関数」 及び 「近傍視点重み関数」 と呼ぶ。
近傍視点ィンデックス関数及び近傍視点重み関数を表すキューブテクス チヤは、 テクスチャメモリに格納しても、 主メモリに格納しても良い。 テ タスチヤメモリに格納した場合、 近傍視点の選択と、 近傍視点の重みの計 算は、 頂点シエーダまたはピクセルシエーダによって行う。 主メモリに格 納した場合、 近傍視点の選択と、 近傍視点の重みの計算は、 中央演算処理 装置 (以降 「CPU」 と表記する) によって行う。 場合によっては、 これら のテクスチャを、 テクスチャメモリと主メモリの両方に格納し、 プロダラ マブルシヱーダと CPUの両方で、 近傍視点のインデックスと重みを参照す ることもある。
BTFを、素材の質感を表現するために利用する場合、有限の大きさの BTF から、 任意の大きさの BTFを得られれば、 実用上の価値が高い。 そのため に、 「Image Quilting」 (非特許文献 1 2 ) の手法を応用し、 有限の大きさ の BTF力ゝら、 BTFの小片を継ぎ合わせることで、 任意の大きさに拡大され た BTFを得る。
レンダリングを CPUで行うこともできるが、 プログラマブルシェーダを 用いて行うことで、 処理効率の大幅な向上が可能である。 近傍視点インデ ックス関数、 近傍視点重み関数を参照して、 補間に利用する視点 (近傍視 点) のインデックスと重みを決定する。 また、 形状データの表面上の点と BTFとの対応を表すテクスチャ座標 (形状テクスチャ座標) を、 形状デー タ及び近傍視点におけるカメラ情報などから必要に応じて求める。
レンダリング時の照明は、 非特許文献 4で述べられているように、 球面 4 008770
7
関数とみなし、 それを球面調和関数で展開した係数として表現する。
形状テタスチヤ座標と近傍視点のィンデックスから、 視点依存照明応答 をテクスチャ読み取りによって参照する。 これと、 照明を表す係数との内 積を画素の値として出力する。
また、 Image Quiltingにより BTFを表現する場合、 有限の大きさの BTF によって、 拡大された BTFを表現するために、 Quilting Mapと呼ばれる座 標変換テーブルを利用する。 これにより、 簡単な処理により、 拡大された BTFを任意の表面にマッビングすることができる。
本発明の方法により、 任意の光源方向、 視点方向に対するテクスチャの 画素値を高速に生成することができる。 これによつて、 任意の光源方向、 視点方向で、 形状データに BTFをマッピングしながら、 効率的に、 また実 時間でレンダリングを行うことができる。
立体形状を持つ物体、或いは平面的な物体に関して、その物体の見え方、 物体表面の模様、 凹凸、 材質感、 反射特性を、 複数の視点方向及び光源方 向に対応する画像(CG画像または写真) の集合(データ A) として記録し、 記録した画像に、 補間、 圧縮などの処理を加えて保存し、 保存したデータ
(データ B) 力 ら、任意の光源方向及び視点方向に関しての物体の見え方等 を、画像として再生することが可能である場合、保存したデ一タ Bを、 rBTFj と呼び、 最初に記録したデータ Aを、 「BTFサンプル画像集合」 と呼ぶ。 本発明の効果は、 BTFサンプノレ画像集合が与えられたとき、 (1 ) それら のデータを圧縮または補間し、 BTFとして保存し、 (2 ) 保存した BTFをテ クスチヤ画像または数表として、 3次元表示ハードウエアの支援を受けら れる形でコンピュータ内部に表現し、 (3 ) BTFを任意の形状モデルに貼り 付けて、 CGレンダリングを行うことができ、 (4 ) 実時間レンダリングを 実現できる、 という点である。
これにより、 物体の材質感を、 光源方向、 視点方向の移動による見え方 の変化を含めて表現し、 効率的に、 或いは実時間で再現することが可能と なる。
表現可能な物体は、 表面に細かい凹凸がある物体や、 毛や細かい繊維な どを表面に持つ物体を含む。
また、 本発明は、 その要素技術として、 視点に依存したテクスチャの複 数個のサンプルから、 プログラマブルシェーダを利用して視点に関するテ クスチヤの補間を効率的に行う方法を含む。 発明を実施するための最良の形態
(BTFのサンプリング)本発明では、物体の見え方や、表面のテクス チヤを、 複数の視点方向及び光源方向に対応する画像 (CG画像または 写真) の集合として記録した BTF サンプル画像集合を入力データとす る。 入力する BTF サンプル画像集合は、 複数の画像の情報、 それらの 画像の各々に対応する、 カメラ (視点) の情報と、 光源の位置情報から 成る。
このうち、 カメラの情報からは、 対象物体に関して固定された座標系 (以降 「物体座標系」 と表記する) と、 物体座標で表された点が射影さ れる画像上の点の位置との変換式を導出できる必要がある。
BTFサンプル画像集合は、視点方向、光源方向の両方を変化させなが ら生成或いは撮影することが望ましい。 実物体に関して、 この条件を満 たすように画像を撮影し、 さらにカメラの情報や光源の位置情報を記録 するためには、 特許文献 1で説明したような BTFサンプリング装置を 利用する。
BTFサンプル画像集合から、各画像に対応するカメラの位置を、物体 座標系で表された、 物体座標系原点からの方向べクトルとして表したも の (視点方向) の集合が得られる。 この集合を 「視点サンプリング点集 合」 と呼ぶ。 視点サンプリング点集合は離散的な集合であり、 V*と表記 する。 以降、 本発明において、 離散的な値を表す記号には、 "〇*"のよう に右肩に星印を付けて区別する。 V*の要素を 「視点サンプリング点」 と 呼ぶ。 ivでインデックスした有限集合 V*の要素 (すなわち、 視点サンプ リング点) を v*(iv)と書く。 V*において視点サンプリング点を指し示すィ ンデックスを 「視点インデックス」 と呼ぶ。
また、 BTFサンプル画像集合から、 各画像に対応する視点方向と、 光 源方向を、 物体座標系で表された、 物体座標系原点からの方向べクトル の対として表したとき、固定された視点方向 v*(iv)と対になる光源方向べ クトルの集合が得られる。 この集合を 「光源サンプリング点集合」 と呼 ぶ。 光源サンプリング点集合は視点方向のインデックス ivに依存するの で、 L*(v*(iv))或いは L*(iv)と表記する。有限集合 L*(v*(iv))の要素を ΰでィ ンデックスしたものを 「光源方向サンプリング点」 と呼び、 r(ii;iv) ≡ L*(v'(iv))と表記する。
ここで、 Γ(ΰ;ίν)の表記は、 この式を、 iiを変数とする関数とみなし、 iv を定数とみなすことを表す。 このとき、 この関数を、 l*(...;iv)と表記する こともある。 以降、 本発明において、 関数の変数を";"で区切った場合、 ";"の左側の記号を関数の変数、 ";"の右側の記号を固定された変数とみな す。
以降、 サンプリングによって近似しょうとする BTFを 「目的 BTFJ と呼ぶ。 目的 BTF のサンプルとして、 視点方向と光源方向のパラメ一 タを付与されたテクスチャ画像を 「BTF サンプルテクスチャ」 と呼ぶ。 サンプルテクスチャの集合を 「BTFサンプルテクスチャ集合」 と呼ぶ。
BTFサンプル画像集合を処理することで、 BTFサンプルテクスチャ 集合が得られる。 BTFサンプル画像集合と BTFサンプルテクスチャ集 合の違いは、 BTFサンプル画像集合が、 サンプリングされた画像のまま なのに対し、 BTFサンプルテクスチャ集合は、 目的 BTFの、 ある視点 サンプリング点、 光源方向サンプリング点において目的 BTF を近似す るサンプルになっていることである。
サンプルテクスチャ集合は、 離散的なテクスチャの集合であり、 これ を連続な BTFとして极うには補間を行う必要がある。 BTFサンプルテ クスチヤ集合を元にして、実際に補間、近似され、生成された連続な BTF を 「近似 BTF」 と表記する。
BTFサンプル画像集合から、 BTFサンプルテクスチャ集合を生成す る方法は、 大きく 2種類に分かれる。
1つ目は、撮影された画像に座標変換を施し、 BTFサンプルテクスチ ャ集合の全ての画像において、 同一の座標における画素が同一の物理的 な点にほぼ対応するように画像を変形させる方法である。 測定物体が平 面物体である場合、 BTFサンプリング装置に取り付けられた各カメラの 内部パラメータ及び外部パラメータを利用して、 斉次変換と呼ばれる画 像変換を行うことで、 このような画像を得ることができる。 カメラの内 部パラメータ及び外部パラメータは、 サンプリング時の視点方向に依存 するので、 この処理は視点方向毎に違ったパラメータを使って行う。 以 降、 この処理を 「レクティフィケーシヨン」 と呼ぶ。
レクティフィケ一ションによってテクスチャサンプリングを行う場 合、 BTFサンプルテクスチャに付与される視点方向、 光源方向は、 接空 間座標系で表現される。 このとき、 得られる近似 BTFでは、 同一の座 標における画素が常に同一の物理的な点に対応する。 このような近似 BTFは、 通常のテクスチャ画像と同様に、 テクスチャ座標を持った任意 の曲面に対してマッピングし、 レンダリングに利用することができる。 テクスチャサンプリングにレクティフィケーシヨンを使う方法を 「テク スチヤサンプリング法 A」 と呼ぶ。
2つ目の方法は、 BTFサンプル画像集合内の画像に座標変換を施さず に、 そのままの画像、 或いはその画像の一部を BTFサンプルテクスチ ャとして使用する方法である。 この方法は、 測定物体が立体物体である 場合に利用する。 このようにして作成された BTFサンプルテクスチャ 集合から得られる近似 BTF は、 同一の座標における画素が、 視点方向 パラメータによつて異なる物理的な点に対応する。 BTFサンプルテクス チヤに付与される視点方向、 光源方向は、 物体座標系で表現される。
このような近似 BTFは、 通常のテクスチャとは違い、 レンダリング する形状とテクスチャとのマッピングを、 視点方向によって変化させる 必要がある。 このような近似 BTF をレンダリングに使用する場合、 レ ンダリング対象であるポリゴンメッシュとしては、 測定物体の形状を近 似したものを使用し、 ポリゴンメッシュの各頂点に対応するテクスチャ 座標をレンダリング時に計算する。 テクスチャ座標の計算には、 視点毎 に用意されたカメラの内部パラメータ、 外部パラメータを使用する。 テ タスチヤサンプリングにレクティフィケーションを使わない方法を 「テ クスチヤサンプリング法 B」 と呼ぶ。
BTFは 「視点方向 v、 光源方向 1、 テクスチャ座標 (s,t)、 色チャネル c でインデックスされた、 放射輝度値の無限集合」 である。 テクスチャサ ンプリング法 Aを使う場合、 v,lは、物体表面の接空間座標系で表される。 テクスチャサンプリング法 Bを使う場合、 v,lは、物体座標系で表される。
v,lは、 球面座標 (spherical coordinates) を用いて、 下記の数式 1で 表現される。
(数 1 )
V = (θν, φν), 1 = (θι, φι), (0 < θυ, θι < π 0 < φν, φι < 2π) θν,θιは緯度、 φν,φιは経度である。 テクスチャ座標 ρは座標 (s,t)で表現 し、 cは RGBに対応するィンデックスで、 0,1,2のいずれかの値をとる。
目的 BTFほ、 v,l,s,t,cを変数とする関数として、 下記の数式 2で表さ れる。
(数 2 )
T(v, 1, p, c) ≡ Γ ( , ^, , i, C)
差替え ] ¾紙 mrnm 各 BTFサンプルテクスチャのテクセル値は、 関数 Tのサンプルであ り 「BTFサンプルテクセノレ値」 と呼ぶことにする。 テクスチャ座標 (s,t) は、 方形の格子点でサンプリングされており、 整数で表したそれぞれの 格子点の座標値を (ia,it)とする。 テクスチャサイズを (Wt,Ht)として、 下記 の数式 3で表される。
(数 3 )
Figure imgf000012_0001
これらの表記により、サンプルテクセル値は離散関数として、下記の 数式 4で表される。
(数 4 )
T* {iv, ih is、 i c)≡ T*(v* (iv), isAW, it H, c) ただし、 そのとき下記の数式 5である。
(数 5 )
Figure imgf000012_0002
T*は Tのサンプリングであるので、 下記の数式 6となる。
(数 6 ) -
T*(v*(¾), (ir, iv), i8 W, it H, c) « T(v*(iv), l*(ir, iv), iaAW7 itAH, c)
BTFサンプルテクスチヤ集合 T*から、目的 BTFである関数 Τを近似 した近似 BTFを Taで表し、 下記の数式 7とする。
(数 7 )
Γα(ν, 1, 5, ί, c) Γ(ν, 1, s, t, c)
(BTFの近似) 与えられたポリゴンメッシュに BTFを適用してレン ダリングするためには、 BTFサンプルテクスチャ集合から、連続な近似 BTFを得る必要がある。 本発明では、 視点方向の変化に関しては、 サン プルの重み付け和による補間によって BTFを近似する。
物体の見かけの放射輝 は、 放射輝度の点光源に対する応答関数 (以 後 「放射輝度応答関数」) と光源を表す関数との球面積分で表される。 放 射輝度応答関数と、 光源を表す関数を、 正規直交基底である球面調和関
差替え 用紙 (W ) 数の線形和で表すと、 放射輝度応答関数と光源を表す関数との球面積分 が、 基底に対する係数ベクトルの内積で計算されるため、 効率良くグロ 一バルイルミネーションに対応することが可能になる (非特許文献 4を 参照)。 本発明形態においても、放射輝度応答関数に関しては、球面調和 関数展開による近似を利用する。
以降、 本発明において、 光源方向、 色チャネル、 テクスチャ座標を固 定し、 視点方向のみを変化させたときの、 BTF或いは BTFサンプルテ クセル値の変化を 「視点依存変化」 と呼ぶ。 また、 視点方向、 色チヤネ ル、 テクスチャ座標を固定し、 光源方向のみを変化させたときの、 BTF 或いは BTF サンプルテクセル値の変化を 「光源依存変化」 或いは 「放 射輝度応答」 と呼ぶ。 光源依存変化に関する補間手法と、 視点依存変化 に関する補間手法とを違うものにしたのは、 BTFサンプルテクセル値の 光源依存変化と視点依存変化の性質が異なるからである。
BTFサンプルテクセル値を表す関数 T*において、 視点方向 iv、 テク セル位置 (is,it)、 色チャネル cのインデックスを固定し、 光源方向のイン デックス iiを変化させるとき、 T*の値は、 被測定対象においてほぼ同一 の物理的な点における放射輝度値を表すこと力 高い精度で保証される。
これは、 同じ視点方向 v*(iv)に対する BTFサンプルテクスチャが、 固 定されたカメラ位置、 ターンテーブル位置で撮影されるためである。 こ のため、 BTF サンプルテクセノレ値を表す関数 T*の光源依存変化は、 同 一の材質に対する光源方向を変化させたときの放射輝度値の変化にのみ 起因する。
既に多くの文献で言及されているように、 多くの種類の材質において、 放射輝度値の光源依存変化は、 比較的緩やかであり、 少数の球面調和関 数基底を利用することでよく近似できる。 目的 BTFである Tの光源依 存変化も同様に緩やかであり、 球面調和関数による近似が効果的である と考えられる。
一方、 同一のテクセル位置 (is, it)と色チャネル cで、 異なる視点インデ ックス ivを指定したときの BTFサンプルテクセル値 T*の値は、 測定物 体の同一の物理的な点の放射輝度値に対応するとは限らない。 テクスチ ヤサンプリング法 Bを利用した場合、 視点方向パラメータが異なると、 同一のテ
Figure imgf000013_0001
。 テクスチ ヤサンプリング法 Aを利用した場合であつても、 物体表面のメゾスコピ ックな形状変化や、 カメラパラメータの誤差などの影響により、 レクテ ィフィケーシヨンの処理に誤差が発生する。 そのため、 この場合でも、 同一のテクセル位置が異なった物理的な点に対応することがある。
このため、 材質の反射特性の変化が激しい物体や、 メゾスコピックな 形状を表面に持つ物体を扱う場合、 BTFサンプルテクセル値を表す関数 T*の視点依存変化は、 物理的な点の位置の変化に起因する放射輝度値の 急激な変化を含むことがある。 このような変化を低次元の球面調和関数 で近似すると、 高周波数成分が削除され、 テクスチャの重要な特徴が損 なわれてしまう恐れがある。
この考えから、本発明では、 BTFサンプルテクセル値の視点依存変化 をベク トル量子化によって圧縮、 保存し、 目的 BTF の視点依存変化の 近似を、 BTFサンプノレテクセル値の重み付け和によって行っている。 サ ンプノレィ直に掛ける重みは、 重 、座標 (barycentric coordinates) の値を そのまま重みとして利用するものと、 重心座標の有理関数をとり、 より 滑らかな重み変化を実現したものの 2種類が、 実装し易く効果が高い。
(鏡面反射成分及び自己影の分離)前述した手順に関し、 BTFの近似 をするときに問題になる点として、 物体表面の鏡面反射と、 物体の形状 により物体自身に落とされる影 (以降 「自己影」 と表記する) がある。
鏡面反射及び自己影が画像に含まれる場合、 これらの成分の光源依存 変化は、 光源方向の移動に対して急激に変化することがある。 このよう な場合、 光源依存変化を低次元の球面調和関数で近似すると、 高周波数 成分が削除され、 鏡面反射や自己影が消えてしまうことがある。 よって これらの成分は、 BTFサンプルテクスチャ集合から予め分離しておくこ とが望ましい。
BTF サンプルテクスチヤ集合から鏡面反射と自己影を分離する手法 を述べる。 物体表面の各点における反射モデル (拡散反射と鏡面反射を 含むもの) を、 BTFサンプルテクスチャ集合のデータに当てはめて鏡面 反射を求める。 また、 自己影の分離に関しては、 モデルの形状と光源位 置から予想される自己影の位置を求め、 その位置における値の変化をと ることで、 自己影による値の変化の大きさを求めることができる。
BTF サンプルテクスチヤ集合から鏡面反射と自己影を分離する別の 手法も述べる。 まず、 そのまま光源依存変化を低次元の球面調和関数で 近似し、 逆に近似した値と元の BTFサンプルテクスチャ集合との画素 値の差を求め、 差の大きい場所を求める。 差の大きい場所のうち、 BTF サンプルテクスチヤの値の方が大きレ、場所は、 鏡面反射のモデルに当て はめ、 各表面上の点における鏡面反射の強さを決める。 逆に BTFサン プルテクスチヤの値の方が小さレ、場所は、 自己影とみなす。
鏡面反射及び自己影は、 レンダリング時に BTF とは別にレンダリン グすることができる。 鏡面反射のレンダリングには、 既存の反射モデル による手法を使う。 例えば、 トランス 'スパロー (Torrance Sparrow) のモデル (非特許文献 3 ) を利用して、 鏡面反射をレンダリングするこ とができる。
自己影についても、既存のレンダリング手法を使ってレンダリングで きる。 それぞれのレンダリング! ¾果は、 最後に BTF のレンダリング結 果と合成する。 鏡面反射は、 値の足し算または掛け算によって、 自己影 の値は、 掛け算によって BTFのレンダリング結果と合成する。
(BTFの光源依存変化の近似) 目的 BTFの光源依存変化は、 BTFの 各画素において、 点光源の方向を変えたときの放射輝度値の応答関数と 見ることができる。 物体を任意の光源環境に置いた場合、 各点における 放射輝度値は、 その点から各方向への照明の強度を球面関数として表す とき、放射輝度値の応答関数と光源を表す関数との球面積分で表される。 放射輝度値の応答関数と光源を表す関数とを正規直交基底である球面調 和関数の線形和で表すと、 放射輝度伝達関数と光源を表す関数との球面 積分が、 基底に対する係数ベクトルの内積で計算されるため、 効率良く グローバルィルミネ一ションに対応することが可能になる (非特許文献 4 )。 また、 球面調和関数による展開係数に、 主成分分析を適用すると、 さらに効率的な正規直交基底を算出することができる。 そこで、 ここで は実施形態として、 球面調和関数によって求めた展開係数を主成分分析 したものを、 放射輝度値の応答関数と光源を表す関数との正規直交基底 として利用する。
まず、 BTFサンプルテクスチャ集合から、固定された視点インデック ス iv、 テクセノレ位置 (i8,it)、 色チャネル cにおける BTFサンプルテクセ ル値の集合である、 下記の数式 8を取り出し、 球面関数のサンプル集合 とする。
(数 8 )
{Γ* ( , i is,it, c)|0 ≤ ≤ II *( ) II 一 1} このように、 特定の視点方向、 テクスチャ座標、 色チャネルにおける 光源依存変化を表すサンプルの集合を 「光源依存変化サンプル集合」 と
差替え ] ¾紙 (ま f.則 2fi) 呼ぶ。
光源依存変化サンプル集合のそれぞれの要素は、 光源方向を表す、 下 記の数式 9により、 単位球面上の点に対応する。 この単位球面を、 L*(iv) の要素に対応する各点を頂点として、 ポリゴンメッシュに分割すること ができる。 以降、 ポリゴンメッシュを 「光源サンプリングメッシュ」 と 呼ぶ。
(数 9 )
Figure imgf000016_0001
光源サンプリングメッシュを、 光源依存変化サンプル集合のそれぞれ の輝度値を頂点色として、 キューブテクスチャにレンダリングすること で、 目的 BTF の光源依存変化を近似する球面関数を表現することがで きる。 レンダリング時にスムースシェーディングを指定することで、 光 源依存変化サンプル集合の間で補間処理が行われ、 単位球面上で密な値 を持った球面関数が得られる。 スムースシェーディングとしては、 グー ローシェーディング、 フォンシェーディングなどを利用する。 得られた 目的 BTFの光源依存変化は、 目的 BTFの点光源への応答関数でもある ので、 これを 「照明応答」 と呼ぶこともある。
照明応答を近似するキューブテクスチャを、 球面調和関数展開によつ て近似する。 球面調和関数による級数展開の係数は、 球面積分により得 られる。 球面積分は、 キューブテクスチャのテクセル値と、 対応 る光 源方向における球面調和関数の基底関数の値と、 テクセルが占める立体 角の大きさとの積を、各テクセルについて足し合わせた値で近似される。
得られる係数を、 下記の数式 1 0と表す。 ここで NShは球面調和関数 の最大次数とする。 Ν 次までの基底を利用する場合、 Nsh2個の係数が 得られる。
(数 1 0 )
C(iv, 、 it, c; q, r), (q, r)€ {(q, r)€ Z2|0 < q < Nsh - 1, -I < r < 1} 視点方向 v*(iv)における Tの光源依存変化を Tiで表すと、 下記の数式 1 1となる。 ただし、 Υ(θ,φ;1,ηι)は球面調和関数を、 1=(θι,φι) は連続な 光源方向を、 v*(iv)はインデックス ivで指定された、 離散的な値をとる視 点方向を、
Figure imgf000016_0002
2次元のインデックスで表されたテクスチャ座標を、
差替え用紙 (規則 2 cは色チャネルを表す。
(数 1 1 ) (v,( ),1 , c)ョ , r)
Figure imgf000017_0001
前述した手順を繰り返して、 全ての各視点インデックス iv、 テクセル 位置 p=(is,it)、 色チャネル cにおける BTFの照明応答を、 球面調和関数 で近似する。
結果として得られた係数を、 iv,is,itでインデックスされた、 3 Nsh2次 のベク トルとみなす。 ベクトルの数は、 || V* || Wt Htである。
得られたベタ トルの集合を、 主成分分析 (Principal Component Analysis, 以降 「PCA」 と表記する) の手法を用いて近似する。 この方 法は、 前計算放射輝度伝達 (PRT) の手法と同様である。 RGB 3チヤネ ルで 3 N 2個の係数を、 べクトルとして、 PCAによって近似し、 K個の 3 Nsh2次元主成分べクトルと、 主成分得点を表す II V* II Wt Ht個の K次 のベク トルに分解する。 以下、 3 Nsh2次元主成分ベクトルを 「基底べク トル」、 主成分得点を表す K次のベクトルを 「重みベク トル」 と表記す 底べクトノレの計昇には特異ィ直分角军 (singular value decomposition^ 以降 「SVD」 と表記する) などを用いるが、 全てのベク トルを基底べク トルの計算に利用するのは多くの計算量が必要となるので、 II V* II Wt Ht個のべクトルから一部をサンプリングし、得られた少数のサンプルに 対して SVDを実行し、 基底ベクトルを計算しても良い。
あとで重みべクトルをテクスチャとして表現する必要性から、 各基底 に対応する重みべクトルの成分は、 一定の値の範囲になるように正規化 しておくことが望ましレ、。したがって、重みべクトルの各成分について、 絶対値の最大値を求め、 その値で全重みべク トルの各成分の値を割り、 対応する基底ベクトルにその値を掛ける。 この正規化の方法は、 前計算 放射輝度伝達 (PRT) の手法と同様である。
PCAにより計算された K個の基底べク トルは、 球面調和関数の係数 として表された BTF の照明応答の基底である。 これを、 本発明におい ては 「照明応答基底」 と呼ぶことにする。 基底ベクトルのインデックス を k (0 ≤ k ≤ K-l)とし、 kで示された係数の基底を、 C(c;l,m,k)で表 す。 cは色チャネルのインデックスで、 0,1,2のいずれかの値をとる。 照
差替え 1紙 (規則 明応答基底ひ (…; k)を下記の数式 1 2で定義する。
(数 1 2 )
Figure imgf000018_0001
PCAにより計算された重みべクトルは iv,is,itでィンデッタスされた K 次べク トルである。 その要素をインデックス k (ただし kは 0以上 K-1 以下の整数)により W*(iv,is,it;k)と表す。 これにより、 下記の数式 1 3に よって、 視点方向 v*(iv)、 テクセル位置 (is,it)に対応する BTFを近似でき る。 Tiaを 「BTFの光源依存変化近似関数」 と呼ぶ。
(数 1 3 )
K-1
ria(v*(iv), s,it, C)≡ W^iv, is it k)Lb(l, c; k)
Y($ r)
Figure imgf000018_0002
W*(iv,is,it;k)は照明応答を表し、 同時に離散的な視点方向、テクスチャ 座標で定義された離散関数でもあるので、 「視点依存照明応答」 と呼ぶ。
(BTFの視点依存変化の近似) 既に述べた BTFの光源依存変化近似 関数 Ί¾は、 光源方向 1 の変化に対しては連続関数であり、 視点方向 V の変化に関しては、 Vが視点サンプリング点集合 V*の要素である場合に のみ値を持つ離散関数である。 BTFの視点依存変化の近似は、 V*から複 数の視点方向 Vを選択し、 それらの視点方向での の値を重み付けし た和をとることで行う。
視点サンプリング点集合 V* = {v*(iv) | 0 ≤ iv ≤ II V* II }の要素は、 光源サンプリング点の場合と同じように単位球面上に対応させることが できる。 視点サンプリング点集合の球面上での対応点を頂点とする三角 ポリゴンメッシュによって、 単位球面上を分割する。 このポリゴンメッ シュを 「視点サンプリングメッシュ」 と呼ぶ。
これにより、 任意の視点方向 Vは、 視点サンプリングメッシュに含ま れる 1つの三角ポリゴンに対応する。 V の対応点が三角ポリゴンの内部 にある場合には三角ポリゴンが、 V の対応点がメッシュの辺や頂点にあ る場合には、 辺または頂点に接続する三角ポリゴンに対応するようにす る。 この三角形を Vの 「近傍視点三角形」 と呼び、 下記の数式 14と表 記する。
. (数 14)
AN(v)
視点サンプリングメッシュの各三角形における 3個の頂点は、 それぞ れの三角形で独立に {0,1,2}の数字でィンデッタスされる。 このィンデッ タスを 「三角形局所インデックス」 と呼ぶ。
近傍視点三角形 ΔΝ(ν)の 3個の頂点は、 視点サンプリング点集合の要 素である。 これらを Vの 「近傍視点」 と呼び、 三角形局所インデックス の順に、 下記の数式 15で表す。
(数 15) ν^(ν;0),ν^(ν;1),ν^(ν;2) vN(v;0)、 vN(v;l)、 vN(v;2)の視点インデックスを、 下記の数式 16で表 す。
(数 16) (v;0), (v;l) (v;2) これらを Vから、 視点インデックスへの写像とみなし、 「近傍視点ィ ンデックス関数」 と呼ぶ。 近傍視点インデックス関数は、 一般に、 視点 サンプリングメッシュの一部の辺において、 不連続 1·生を持つ。
離散的なテクス
Figure imgf000019_0001
it H)において、 近似 BTFを表す関 数 Taは、重み関数である下記の数式 17で加重平均をとつた関数として、 下記の数式 18の形で与えられる。
(数 17)
Figure imgf000019_0002
差替え用紙 (規則 26 (数 18)
Figure imgf000020_0001
), is,i 9 φι, c)
n=0
2 K-l
= (v; )∑ W ( (v; ), , ; (1, c; k)
= Lb(l, c; k)
Figure imgf000020_0002
この定義は離散的なテクスチャ座標 (is W,it H)に関しての近似 BTF、 Τ&であるが、 あとで述べるように視点依存照明応答 W*はテクス チヤとして表現さ,れるので、 W*において適当なテクスチャ座標の補間を 行うことで、連続的なテクスチャ座標に関しての近似 BTF、 Taを得るこ とができる。
関数 G を下記の数式 19と定義すると、 下記の数式 20となる。 G (…; k)は視点依存照明応答を補間した視点位置の関数である。 G (…; k) を 「補間された照明応答」 と呼ぶ。
(数 19)
2
G(v,is,it;k)≡ ^H(v;n)W* (i (v; n, k), i8 , it) n=0
(数 20)
K-l
Γ°(ν, 1, isAW, itAHy c) = ^ G(v, is, it; k)Lb(l, c; k) fc=0 重み関数 H(v;n)は、 vを近似する 3個の近傍視点の重みを表す関数で ある。 これを 「近傍視点重み関数」 と呼ぶ。 H(v;n)には以下の制約条件 を設ける。 I,j を視点サンプリング点のインデックスとする。 このとき、
差替え用紙 (規則 26) vの視点サンプリング点 v*(i)に対する重み関数である下記の数式 2 1が V に対して連続であり、 下記の数式 2 2となり、 下記の数式 2 3でなけ ればならない。 ただし、 δ(χ)は x=0のときのみ 1であり、 そうでなけれ ば 0となる関数である。
(数 2 1 ) i i i
Figure imgf000021_0001
(数 2 3 )
Figure imgf000021_0002
前記の制約条件は、 vの変化に対して、 近傍視点重み関数 H(v;n)の、 任意の視点サンプリング点 v*(i)についての重みが Vの変化に対して連続 であること、 V が 1つの視点サンプリング点に一致するとき、 その視点 サンプリング点の重みが 1になり、 他の視点サンプリング点の重みが 0 になること、 各視点サンプリング点の重みの総和が 1になることを要請 する。
iv N(v;0)がメッシュの辺、 頂点において、 V に対して連続でないため、 H(v;0)は、 一般に連続でない。 Η(ν;1)、 Η(ν;2)も同様である。 Q(v,v*(iv)) は、 Vの関数とみなした場合、 v*(iv)を頂点とする三角形の内部でのみ 0 でない値を持つ視点サンプリングメッシュにおける補間フィルタである。
視点方向 V と、 その近傍視点三角形 ΔΝ(ν)との交点を、 ΔΝ(ν)に関す る重心座標、 下記の数式 2 4で表すとする。 ただし、 重心座標は、 三角 形局所インデックスの順に記述する。
差替え用紙 (規則 26) (数 2 4 )
0), ; ι) (ν; 2))
Figure imgf000022_0001
このとき、 H(v;n)として、 重心座標をそのまま値とした下記の数式 2 5を利用することができる。
(数 2 5 )
Hb(^ n) ≡ bN (v n) 近傍視点重み関数として重心座標をそのまま与えると、 近傍視点三角 形 ΔΝ(ν)内部での線形な補間が行われる。 これは、 補間フィルタとして は三角フィルタ (triangle filter) にあたるが、 本発明では、 より滑らか な補間を行うために、 下記の数式 2 6の重み関数を使用しても良い。
(数 2 6 )
丑 ; Π)ョ (V; )where 3(χ)ョ 十 2
Figure imgf000022_0002
関数 sは、 [0,1]の区間を滑らかにつなぐために用いられる 3次のエル ミート (Hermite) 補間関数であり、 bNs(v;n)は s(bN(v;n))を、 下記の数 式 2 7となるように正規化した関数である。
(数 2 7 ) l
Figure imgf000022_0003
n=0
(プログラマブルシェーダを用いた BTFの実時間レンダリング) 本 発明の目的は、 BTFサンプリング装置でサンプリングされた BTFを、 プログラマプルシェーダを用いて効率的にすることである。 そのための 準備として、 前述のように用意したレンダリング用のデータをテクスチ ャデータとして表現する必要がある。
コード化するデータは、 視点依存照明応答 W*(iv,ia,it;k)、 近傍視点ィ ンデッタス関数 ivN(v;n)、 近傍視点重み関数 H(v;n)、 n ≡ {0,1,2} であ
'S o
差替 え周紙 (規則 26) レンダリング時に対象となる物体を照らす照明環境は、 予めキューブ マップなどで表現し、 球面調和関数の係数に変換する。 この変換には、 視点依存照明応答を求めた場合と同様の手法を利用することができる。 照明環境を球面調和関数の係数で表現したものは、 通常世界座標で表さ れているので、 これをレンダリング時のメッシュの各頂点で決められた 接空間座標、 或いは物体全体で共通な物体座標に変換する。 変換の方法 は、 非特許文献 4に述べられているものを用いる。 変換された係数を、 照明応答基底に対する重みとして表したものを、「照明応答基底による照 明の表現」 と呼び、 L c,k)で表すことにする。 この表現は、 変換された 係数と照明応答基底との内積をとり、 スケーリングを施すことで計算で きる。
W*(iv,is,it;k)は、 ivを固定すると WtxHtのサイズのテクスチャ画像と みなすことができる。 これを 「視点依存照明応答テクスチャ」 と呼び、 ivはそのテクスチャのインデックスとみなせる。 Mt Nt ≥ || V* || として、 (Mt Wt)x(Nt Ht)のサイズのテクスチャを用意する。 このテクスチャに、 視点依存照明応答テタスチヤをインデックス ivの順でタイル状に並べる。 kを色チャネルとしてコード化する。 ARGB 4個のチャネルを用いると、 W*は下記の数式 2 8で表される枚数のテクスチヤを消費する。
(数 2 8 )
Figure imgf000023_0001
近傍視点インデックス関数 ivN(v;n)と近傍視点重み関数 H(v;n)は、 V に関するキューブテクスチャとして表現する。 nを色チャネルとすると、 これらの関数を 2個のキューブテクスチャで表現できる。 これらのキュ ーブテクスチャを、 それぞれ「近傍視点インデックステクスチャ」 「近傍 視点重みテクスチャ」 と呼ぶ。
プログラマブルシェーダによるレンダリングアルゴリズムは以下の ようになる。 頂点シエーダによる処理と、 ピクセルシエーダによる処理 とに分かれる。 頂点シエーダによる処理は、 単に、 メッシュの各頂点に おいて、 接空間基底を計算し、 接空間で表現された視点、 光源方向 v,l を計算するのみである。 頂点シエーダには、 他に、 テクスチャ座標 pも 渡される。 v、 1、 pは頂点間で補間され、 ピクセルシエーダに渡される。 また、 Lb(c,k)の計算は、 照明を球面調和関数展開の係数で表したものを
差替え用紙 (規則 26) 回転し、 照明応答基底との内積をとることで行われるが、 この処理は頂 点シエーダで行うのが望ましい。 ただし、 現在のハードウェアの頂点シ エーダでこれを行うことができない場合等には、 CPUでこれを行っても 良い。
' ピクセルシェ一ダにおける処理を以下に示す。 PIXはピクセル値を保 存する変数を、 IVは近傍視点インデックスを、 WVは近傍視点重み関数 の値を、 WLは補間された照明応答の値を表す。それぞれの関数の値は、 対応するテクスチャを参照することで得られる。 また、 照明応答基底に よる照明の表現 L c,k)を LB(c,k)で、 視点インデックス iv、 テクスチャ 内部でのテグスチヤ座標 (s,t)、 基底番号 kにおける視点依存照明応答テ タスチヤのテクセル値を LWTEX(iv,s,t;k)で、 視点方向 v、 三角形局所ィ ンデックス N における近傍視点インデックステクスチャ及び近傍視点 重みテク スチャのテクセル値を、 それぞれ IVTEX(v;N)及び WVTEX(v;N)で表す。
ステップ 1 PIX[c] 0, c = 0,l,2
ステップ 2 IV[n]― IVTEX(vln), n = 0, 1,2
ステップ 3 WV[n]― WVTEX (v;n), n = 0,1,2
ステップ 4 k=0,l,...,K-lに関してステップ 4.1、 4.2を繰り返す。 ステップ 4.1 WL[k]― WV[0] LWTEX(IV[0] ,s,t;k)
+ WV[1] xLWTEX(IV[l] , s,t;k)
+ WV[2] xLWTEX(IV[2] ,s,t;k)
ステップ 4.2 PIX[c]ト PIX[c] + WLlk〗xLB(c,k), c = 0, 1,2 ステップ 5 PIX[c]をピクセル値として出力
実際の実装でのステップ 4 の繰り返しは、 k=0,l,..., k における LWTEX (…; k)、 LB (c,k)のデータを、 kを ARGB 4要素の各色チャネル に割り当てることで、繰り返し数を下記の数式 2 8とすることができる。
(数 2 8 )
Figure imgf000024_0001
前記のアルゴリズムでは、 テクスチャの読み取りが多数行われる。 ま た、 IVTEX(v;n)のテクスチャ読み取りの結果により、 LWTEX(IVqふ, it;k) のテクスチャ読み取りに使われるテクスチャ座標を決定するため、 依存 テクスチャ読み取り (dependent texture read) の機能が必要である。 差替え用紙 (規則 26) 例えば、 Microsoft 社の DirectX で利用されている HLSL、 及び nVIDIA社の eg言語として規格化されているシヱーダ記述用言語では、 ps—2_x以上のピクセルシエーダがその機能を備えている。
テクスチャメモリの消費が大きいのは、視点依存照明応答テクスチャ である。 この情報を圧縮することで、 テクスチャメモリの消費を抑える ことができる。
(視点依存照明応答テクスチャの圧縮) 3次元離散関数 W*(iv,is,it;k) は通常、 テクスチャ座標である is, itに関して、 原点の周りで高い自己相 関を持つ。 また、 視点方向を表すインデックス ivに関しても、 ivの差が 視点方向の差を反映するようにインデックスを定義すれば (つまり、 iv が近い値を持つとき、 視点方向も近くなるならば)、 やはり W*(iv,is,it;k) は原点の周りで高い値を持つ。 このこと力 ら、 W*(iv,is,it;k)を 3次元画像 とみなして、 直方体のブロックに分割し、 ブロック毎にベクトル量子化 などの圧縮を適用することで、 W*(iv,is,it;k)を効果的に圧縮することがで さる。
本発明では、 W*(iv,is,it;k)を BvxBsxBtの大きさの、 直方体のブロック に分割する。
下記の数式 2 9とすると、 ブロックの数は SvxSsxSt個である。 この ブロック毎にコードブックを Nc個用意し、 コードィンデッタスを収め たテクスチャを用意することで、 W*(iv,is,it;k)の圧縮を行う。
(数 2 9 )
Sv ≡ \\\V*\\/BV] ,S3 三 「 t/B 三 「 / ,
(Image Quiltingによるテクスチャの拡大) BTFを、 類似した凹凸 や色などのパターンが繰り返し現れるような素材の質感を表現するため に利用する場合、 有限の大きさの BTFから、 パターンを構成する BTF の小片の標本を取り出し、 それらの継ぎ目が目立たなくなるように継ぎ 合わせることで、 任意の大きさの BTF を生成することができる。 これ は、 小さな BTF力 ら、 拡大された大きさの BTFを生成するので、 一種 の圧縮と考えられる。本発明では、 「Image QuiltingJ (非特許文献 1 2 ) の手法を応用することで、 テクスチャの拡大を行う。
視点方向を表すインデックス ivを固定した場合、 3次元離散関数 W*(ivふ, it;k)は、各テクセルが照明に関する応答を表すようなテクスチャ 画像を表す。このテクスチャ画像に対して、 Image Quiltingを適用する。
差替え用紙 〖規則 26) 適用する方法は 2種類ある。 一つは、 各視点方向インデックス ivに対し て、 それぞれ個別に Image Quiltin を適用する方法である。 もう一つ は、 全ての各視点方向での W*(iv,is,it;k)をまとめて一つの画像とみなし、 まとめて Image QuHtingを適用する方法である。 後者の方法では、 視 点方向インデックス ivを、 テクセルのチャネルを指定するインデックス の一つと見なす。
Image Quiltin の手法の概略を述べる。入力画像は与えられた画像で あり、 出力画像は任意の大きさを指定できる。 出力画像は、 方形の格子 で分割される。 隣り合った格子の間には、 一定の幅を持った 「重なり領 域」 を設ける。 次に、 出力画像の各格子と、 その格子に隣接した重なり 領域に対して、 入力画像の部分画像を割り当てる。 隣り合った格子の重 なり領域では、 双方の格子に対応した部分画像が、 乱数を利用して割り ¾てられる。 このとき、 部分画像に割り当てられた複数の部分画像に対 して、 それらの画像の差が一定以下になるようにする。 その上で、 重な り領域において格子の分割線を生成し、 それぞれの格子を分割する。 格 子の分割線は、 その線上の画素全体に対しての双方の格子に対応した部 分画像の差を加えた和が最小値をとるように生成される。 このような線 を、 「最小コストパス」 と呼ぶ。 最小コストパスは、 動的計画法により求 めることができる。 最小コストパスにより分割された各格子ごとに、 入 力画像から出力画像へ部分画像をコピーすることで、 出力画像を得る。
Image Quiltingを BTFに適用する場合、 入力画像を入力 BTFと呼 ぴ、 出力画像を 「出力 BTF」 と呼ぶことにする。 Image Quiltingを適 用するためには、重なり領域において、複数の格子に対応した入力 BTF の、 部分画像の差を評価する必要がある。 各視点方向に対して個別に Image Quiltingを適用する場合、各テクセル値は、 照明に対する応答を 表す球面関数の基底に対する係数である。このときの差の評価値として、 各係数の 2乗に、 球面関数基底による重みを掛け、 それらの和をとつた ものを利用する。 最小コストパスの生成にも、 同じ方法で差を評価した 値を利用する。
全ての視点方向での BTF をまとめて同一の画像とみなし、 Image Quiltingを適用する場合、 各テクセル値は、 照明に対する応答を表す球 面関数の各基底に対する係数である。 このときの差の評価値は、 各係数 の 2乗に、 球面関数基底及び視点インデックスに依存する重みを掛け、 それらの和をとつたものを利用する。 最小コストパスの生成にも、 同じ 方法で差を評価した値を利用する。
本発明では、 出力 BTFを表現するために、 Quilting Mapと呼ばれる 座標変換テーブルを利用する。 まず、 全ての視点方向での BTF をまと めて同一の画像とみなす場合を考える。 このとき、 出力 BTF を表現す るためには、 出力 BTFのテクスチャ座標を入力 BTFのテクスチャ座標 に変換する座標変換テーブルを用意すれば良い。 この座標変換テーブル をテクスチャとして表現すると、 ピクセルシエーダを利用することで出 力 BTF を効率的にレンダリングできる。 また、 各視点方向に対して個 別に Image Quiltingを適用する場合、 各視点インデックスに対して個 別の座標変換テーブルを作成することで、 出力 BTF を表現することが できる。
Image Quiltingによって作成された BTFをレンダリングする場合に は、物体の形状モデルの各頂点で与えられたテクスチャ座標を、 Quilting Mapによって変換するだけで良い。 Quilting Mapをテクスチャとして 表現した場合、 この変換をピクセルシエーダによって効率的に行うこと ができる。
(照明応答基底による照明の表現の前計算) 照明応答基底による照明 の表現 Lb(C,k)の計算は、照明を球面調和関数展開の係数で表したものを 回転し、 照明応答基底との内積をとることで行われる。 この処理を頂点 シエーダで行うことができるなら、 効率の点で望ましいが、 現在の頂点 シェ一ダの機能では、 それは困難である。
照明が、 点光源や、 円状の光源のように、 光源の中心を固定した回転 で不変な場合には、光源の回転は 2変数のみで表現できる。この対応は、 光源の方向を、 球面に対応させることで簡単に実現できる。 そこで、 各 光源方向に対する Lb(c,k)を予め計算し、 これをキューブマップなどに格 納しておくことで、 CPUによる回転の計算を頂点シヱーダ内で行うこと ができる。 これを、 「前計算された照明の表現」 と呼ぶ。
(近傍視点重み関数の連続関数化) 近傍視点重み関数 H(v;n) (n e {0,1,2})は、 BTFの視点依存変化の補間を行うための重み関数であり、 3チャネルのキューブテクスチャで表現することができる。この関数は、 視点方向 Vの変化に対して滑らかに変化することが望ましい。 このため に、 H(v;n)のキューブテクスチャの読み取りのとき、 双線形補間をかけ ることが考えられるが、 この方法には深刻な問題がある。
H(v;n)は一般には視点サンプリングメッシュのポリゴンの辺におい て連続でない部分を持つ。 このため、 双線形補間をかけると、 ポリゴン の辺の付近における重みの値に誤差が生じ、 望ましくないアーティファ クトを生じる。
この問題の解決法としては、 近傍視点ィンデッタス関数 及び近傍 視点重み関数 H(v;n)を表すキューブテクスチャの解像度を一致させ、 キ ユーブテクスチャのテクセルの読み取りに最近傍補間を行うことが考え られる。 この方法の欠点は、 多くのメモリを消費して高解像度のキュー ブテクスチャを利用しないと、 視点の変化に対して重みが滑らかに変化 せず、 グラデーション状のアーティファタトが生じる場合があることで める σ
本発明では、視点サンプリングメッシュの辺の位置における不連続性 が生じないように Η(ν;η)を定義することで、 この問題を解決する。 以下 の命題が成立する。
命題:視点サンプリングメッシュにおいて、 どこでも連続であるよう に Η(ν;η)、 η {0,1,2} を定義できない場合が存在する。
証明:視点サンプリングメッシュ全体で連続な Η(ν;η),η ≡ {0,1,2} があるとする。 このとき、 視点サンプリングメッシュの頂点 Viでは、 H(vi;0)=l、 H(vi;l)=l、 H(vi;2)=lのいずれかが成立する。
H(Vi;n)=lのとき、頂点 Viを数字 nに写像する関数を X(Vi)とする。 隣 り合った頂点 Vi,vjについて X(Vi)≠X(Vj)である。 なぜなら、 Χ(νί) = Χ(ν であるなら、 Vが近傍視点三角形 AN(Vi)を通って Vjに近づく場合、 下記 の数式 3 0となり矛盾するからである。
(数 3 0 )
0 = lim Ο ν, ν
V→Vj
= v¾¾j ¾(νι)(ν) = (Vj)(v) = ¾(Vj) (Vj) = 1 このとき、 X(vi)は、 視点サンプリングの頂点に対する、 N色問題の、 N=3の場合の解である。視点サンプリングメッシュは球面上のグラフで あるが、 これはある平面グラフと同値である。 平面グラフにおいて、 N 色問題は、 N=3の場合には常に解がある訳ではなレ、。 よって視点サンプ リングメッシュ全体で連続な H(v;n)、 n ≡ {0,1,2} が存在しない場合が ある。 (証明終了)
差替え ^紙 (規則 26) N=4の場合には、 視点サンプリングメッシュに対する N色問題には 常に解がある。 このとき、 視点サンプリングメッシュ全体で連続な H(v;n)、 n ≡ {0,1,2,3} を定義し、 隣り合った頂点 Vi, について、 下記 の数式 3 1が成り立つようにすることができる。
(数 3 1)
3
^ ί (ν; ) = 1?
η=0
¾(Vl) =5(n-m),m6 {0, 1,2,3} n(Vj) = 1 - δ(η -m),m G {0, 1, 2, 3} このような H(v;n)(n E {0,1,2,3} )は、 4チャネルのキューブテクス チヤで表現することができる。同様に、近傍視点インデックス関数 を 4チャネルのキューブテクスチャで表現すると、 H(v;n)のテクセルの取 得 §寺に、 双線形補間を利用してもアーティファクトが生じなくなる。 双 線形補間の利用により、 解像度の低いキューブテクスチャを使っても、 BTFの視点依存変化の補間が連続的に行われるようになる。
(実施例 1) , 前計算された照明の表現、 近傍視点重み関数、 近傍視点インデックス 関数を表すには、 キューブテクスチャでなくても、 3次元方向から画素 値を得られるテクスチャであれば良い。例えば、 Blinnらによる、緯度、 軽度によるマップ (非特許文献 5)、 球面マップ (sphere mapping) (非 特許文献 6)、 放物面マップ (paraboloid mapping) (非特許文献 7) な どを挙げることができる。
(実施例 2 )
前計算された照明の表現、 近傍視点重み関数、 近傍視点インデックス 関数を、 球面マップ、 放物面マップなどにより 2次元テクスチャで表現 する場合、 複数の関 を一枚のテクスチャ画像に収めることができる。 これにより、 テクスチャの枚数の制限を緩和することができる。
テクスチャサンプリング法 Aを用いてサンプリングを行い、 BTFを平
差替 え 用紙 (W ) 面に貼り付け、 視点が無限遠にあると仮定した場合、 或いは、 テクスチ ヤサンプリング法 Bを用いてサンプリングを行い、 物体を変形させずに BTFをマッピングして、視点が無限遠にあると仮定した場合など、接空 間、 或いは物体座標系で表した視点方向が、 レンダリング時に一定であ る場合がある。
このような場合、 近傍視点重み関数、 近傍視点ィンデックス関数を、 キュープテクスチャとしてテクスチャ保持する必要はなく、 CPUで参照 して、 結果をプログラマブルシヱーダに渡すだけで良い。 (実施例 3 )
視点方向がレンダリング時に完全に一定でなくても、 レンダリングの 条件が前記の場合に近い場合、 レンダリング全体で必要となる近傍視点 は、 全ての視点サンプリング点集合のうち、 ごく一部となる。 このよう な場合においても、 近傍視点重み関数、 近傍視点インデックス関数を、 キューブテクスチャとして保持する必要はなく、 CPUで参照して、結果 をプログラマブルシェーダに渡すだけで良い。
(実施例 4 )
光源方向がオブジェクト全体で一定であれば、 照明応答基底による照 明の表現を頂点ごとに計算する必要はなく、 全体で同じ値を利用するだ けで良い。
(実施例 5 )
視点依存照明応答 W*(iv,is,it;k)は、 3次元テクスチャとして表現して も良いし、 2次元テクスチャを格子状に区切って、 並べても良い。
(実施例 6 )
実施例 5のように、 視点依存照明応答 W*(iv,is,it;k)を、 3次元テクス チヤとして表現する場合、視点のィンデックス ivが次の条件を満たすよ うに定義すると良い。
条件:インデックスが 1つだけ違う 2つの視点サンプリング点 v*(iv) と v*(iv+l)は、 視点サンプリングメッシュにおいて、 常に辺で接続され ている。
この場合、 視点ィンデックスとして浮動小数点値を使うことで、 視点 依存照明応答 W*(iv,is,it;k)の視点による補間の一部を、テクスチャ参照フ ィルタで代用することができる。
(実施例 7 )
近傍視点ィンデックステクスチャの参照を CPUから行う場合、 視点 依存照明応答テクスチャは、視点によってキャッシュすることができる。 また、 近傍視点ィンデックステクスチャの参照をプログラマブルシェ一 ダで行う場合においても、 CPUによる近傍視点ィンデックステクスチャ の参照を併用し、 視点依存照明応答テクスチャを、 視点によってビデオ ボード内のテクスチャメモリにキャッシュすることができる。 この方法 は、 レンダリング全体で必要となる近傍視点が、 全ての視点サンプリン グ点集合のうち、 ごく一部となる場合に有効である。
(実施例 8 )
視点方向によって視点依存照明応答テクスチャをキャッシュする場 合、 近いうちに近傍視点として利用する可能性のある視点のテクスチャ を、 キャッシュとしてテクスチャメモリに読み込んでおくことで、 テク スチヤをテクスチャメモリに読み込むために生じる表示の遅れを無くす ことができる。
(実施例 9 )
また、視点方向によつて視点依存照明応答テクスチヤをキャッシュす る場合、キヤッシュに読み込んでおくテクスチヤの視点ィンデックスを、 視点方向を変数とした球面関数として予め決定しておき、 テクスチャと してそれを表現することで、 キャッシュに読み込むテクスチャの視点ィ ンデックスを効率的に決定することができる。 この場合、 さらに、 キヤ ッシュするテクスチャを読み込むテクスチャメモリ中での位置を予め決 定しておくことで、 キャッシュにおけるメモリ管理を簡素化でき、 効率 的にキヤッシュを働かせることができる。
(実施例 1 0 )
前述した、 キャッシュに読み込んでおくテクスチャの視点ィンデック スを表すテクスチャ、 近傍視点重みテクスチャ、 近傍視点インデックス テクスチャ、前計算された照明の表現を、全て 2次元テクスチャで表し、 複数をまとめることで、 テクスチャ数を減らすことができる。
(実施例 1 1 )
近傍視点重みテクスチヤ、近傍視点ィンデッタステクスチャの中の表 現には、 かなりの任意性がある。 例えば、 経度によって視点番号が並ん でいる場合、実数の 3.6力 3と 4を 0.4:0.6で混合する意味にもできる。 視点依存照明応答が 3次元テクスチヤの場合、 そのままテクスチャ座標 に変換することができる。
(実施例 1 2 )
目的 BTFの光源依存変化を近似するキューブテクスチャを、 球面調 和関数展開によって近似するとき、 モンテカルロ積分を利用して計算量 を節約することができる。
(実施例 1 3 )
物体表面の凹凸の情報が、 ポリゴンメッシュよりも微細な精度で得ら れる場合がある。例えば、凹凸マップ(bump map)が与えられる場合、 或いは、 shape-from-shading (非特許文献 8 ) などの手法により、 凹凸 が計算できる場合などである。
この場合、 異なる複数の近傍視点における BTFサンプルテクスチャ において、 同一の物理的点に対応する点を、 凹凸による視差の効果を加 えて計算することができる。 これにより、 同一の物理的点に対応する点 同士が滑らかに移り合うように、 テクスチャにモーフイングをかけるこ とで、 より精度の高い BTFを得ることができる。
(実施例 1 4 )
物体表面の凹凸の情報が直接得られない場合でも、 異なる複数の近傍 視点における BTFサンプルテクスチャにおいて、 同一の物理的点に対 応する点を推定できる場合がある。 例えば、 テンプレートマッチングに よってテクスチャの模様の一致を探索する方法である。
テンプレートマッチングに用いる画素値としては、 元の BTFサンプ ルテクスチャの RGB値や、 各画素の光源依存変化サンプル集合を球面 調和関数展開したときの係数列や、 球面調和関数の係数を PCAで近似 したときの重みべクトルなどを利用できる。 (実施例 1 5 )
BTFの光源依存変化を近似するために、球面調和関数展開の代わりに、 球面ウエーブレッ ト変換 (非特許文献 9 ) を利用することもできる。
(実施例 1 6 )
光源とレンダリングする物体の表面との距離によって、 レンダリング する画素の RGB値を増減することで、 光源と表面との距離による光の 減衰を表現可能である。 例えば、 光源と表面との距離の 2乗の逆数を、 レンダリングする画素の RGB値に掛けることで、 点光源からの距離に よる光の減衰を表現できる。
(実施例 1 7 )
レンダリングする画素のそれぞれの色チャネルの値を増減すること で、 光源色の変化を表現できる。 例えば、 ホワイトバランスを調整し、 光源を白色とみなせるようにして画像のサンプリングを行う場合、 設定 した光源色に比例した割合の値をレンダリングする画素の各色チャネル の値に掛けることで、 光源色の違いを表現することが可能である。
(実施例 1 8 )
対象物体が、 透明物体や半透明物体の場合は、 光が物体を透過して観 測される透過光の効果がある。 この場合も、 本発明の方法で取り扱うこ とができる。 透明度の低い物体は、 計測対象物体の厚みが増すと、 急速 に透過光が減衰するため、 BTFサンプリング時に、 対象物体の厚みを同 時に計測しておく必要がある。 レンダリング時には、 この厚みを利用し て、 レンダリングする対象物体の厚みに応じて、 透過光の強度を落とせ ば良い。
このとき、 BSSDRF (非特許文献 1 0 ) などのサブサーフェスモデル を考慮した透過光の強度を計算すれば、 より正確なレンダリングが可能 である。 また、 完全な透明物体に関しては、 背景にパターンを配置し、 その観測パターンを計測すれば、 非特許文献 1 1などの手法を用いるこ とで、 本発明をそのまま適用することができる。
(実施例 1 9 ) 本発明のアルゴリズムを、 プログラマブルシェーダにより GPU (ビ デォボード上の画像処理装置) で実行する代わりに、 CPUによって直接 実行しても良い。 CPUで実行した場合、 GPUと比較して実行効率は低 下するが、 テクスチャの横幅、 高さなどの制限や、 テクスチャメモリの 容量などの制限を受けなくなる。 これにより、 高解像度、 高画質の BTF をマッビングすることが可能になる。
(実施例 2 0 )
テクスチャサンプリング法 Bにおいて、 ポリゴンメッシュの各頂点に 対応するテクスチャ座標は、 予め計算しておき、 レンダリング時には、 これを参照する機構としても良い。

Claims

請求の範囲 複数の視点方向からのテクスチャのサンプルを視点に関するインデ ックス (以後 「視点インデックス」) により参照可能な形で格納する メモリ領域と、 視点の補間に用いるテクスチャを指す 1乃至複数の 前記視点ィンデックスを任意の視点方向に関して参照可能なメモリ 領域と、 視点の補間に用いる該テクスチャに対する重みを任意の視 点方向に関して参照可能なメモリ領域とを有し、 与えられた視点方 向に対応する前記視点ィンデックスと前記重みをメモリ参照によつ て決定する処理と、 得られた前記視点ィンデックスに対応する画素 値をメモリ参照によつて決定する処理と、 得られた前記画素値と前 記重みから実際に表示する画素値を視点に関して補間する処理とか らなり、 任意の視点方向から見た画像の生成を実現することを特徴 とし、 特に視点の補間に用いるテクスチャを指す視点インデックス と、 視点の補間に用いるテクスチャに対する重みをメモリに保持す ることで、ハードウェアによる支援を容易にすることを特徴とする、 実時間レンダリングの方法。
複数の視点方向でサンプリングされた、 任意の照明方向に対する放 射輝度の応答関数 (以後 「照明応答関数」) のパラメータの集合を、 視点に関するインデックス (以後 「視点インデックス」) によって参 照可能な形で格納するメモリ領域と、 視点の補間に用いるパラメ一 タ値を指す 1乃至複数の前記視点ィンデックスを任意の視点方向に 関して参照可能なメモリ領域と、 視点の補間に用いる該パラメータ 値に対する重みを任意の視点方向に関して参照可能なメモリ領域と を有し、 与えられた視点方向に対応する前記視点ィンデックスと前 記重みをメモリ参照によって決定する処理と、 得られた前記視点ィ ンデックスに対応するパラメータ値をメモリ参照によって決定する 処理と、 得られた前記パラメータ値と前記重みから実際の照明応答 関数のパラメータを得る処理と、 物体の座標系で各方向での照明の 強度を表す関数のパラメータを得る処理と、 得られた前記照明応答 関数と前記照明の強度を表す関数との積分をとつて実際に表示する 画素値とする処理とからなり、 任意の視点方向及び任意の照明方向 並びに照明強度における画像の生成を実現することを特徴とする、 実時間レンダリングの方法。 請求項 1に記載の実時間レンダリングの方法において、 視点の補間 に用いるテクスチャを指す視点ィンデックスを任意の視点方向に関 して参照可能なメモリ領域、 及び視点の補間に用いる該テクスチャ に対する重みを任意の視点方向に対して参照可能なメモリ領域につ いて、 それぞれ 4チャネル以上の値を利用することで、 3次元の全 方向についてそれらの値の変化を連続にし、 値の補間による誤差の 発生を抑制することを特徴とする、 実時間レンダリングの方法。 請求項 2に記載の実時間レンダリングの方法において、 視点の補間 に用いるテクスチャを指す視点ィンデックスを任意の視点方向に関 して参照可能なメモリ領域、 及び視点の補間に用いる該テクスチャ に対する重みを任意の視点方向に対して参照可能なメモリ領域につ いて、 それぞれ 4チャネル以上の値を利用することで、 3次元の全 方向についてそれらの値の変化を連続にし、 値の補間による誤差の 発生を抑制することを特徴とする、 実時間レンダリングの方法。 請求項 2に記載の実時間レンダリングの方法において、 照明環境が 照明の方向のみで決まる場合に、 各照明方向に関して、 その照明強 度を表す物体の座標系での関数のパラメ一タを予め計算しておき、 それらのパラメータをメモリ領域に保持することで、 実装の効率を 高めることを特徴とする、 実時間レンダリングの方法。
複数の視点方向でサンプリングされた、 任意の照明方向に対する放 射輝度の応答関数 (以後 「照明応答関数」) のパラメータの集合を、 視点に関するィンデッタスによつて参照可能な形でメモリ領域に格 納し、 前記メモリ領域を照明応答関数のパラメータを多チャネル画 素値とする画像と見なして、 Image Quilting (非特許文献 1 2 ) の 手法を適用することを特徴とする、 テクスチャサイズを変換する方 法。
請求項 6に記載のテクスチャサイズを変換する方法において、 サイ ズを変更されたテクスチャの表現形式としてテクスチャ座標を変換 する変換テーブルを有し、 前記変換テ一ブルの内容を決定する処理 を行うことを特徴とする、 テクスチャサイズを変換する方法。
請求項 2に記載の実時間レンダリングの方法において、 サイズの違 うテクスチャの間でテクスチャ座標を変換するためのテーブルを入 力として加え、 レンダリング時にテクスチャ座標の変換を行う処理 を有し、 任意の視点方向及び任意の照明方向並びに照明強度におい て、 テクスチャサイズを変換して画像の生成を行うことができるこ とを特徴とする、 実時間レンダリングの方法。
PCT/JP2004/008770 2004-06-16 2004-06-16 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法 WO2005124691A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2004/008770 WO2005124691A1 (ja) 2004-06-16 2004-06-16 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法
JP2006514640A JP4394122B2 (ja) 2004-06-16 2004-06-16 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2004/008770 WO2005124691A1 (ja) 2004-06-16 2004-06-16 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法

Publications (1)

Publication Number Publication Date
WO2005124691A1 true WO2005124691A1 (ja) 2005-12-29

Family

ID=35509930

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/008770 WO2005124691A1 (ja) 2004-06-16 2004-06-16 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法

Country Status (2)

Country Link
JP (1) JP4394122B2 (ja)
WO (1) WO2005124691A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013257664A (ja) * 2012-06-11 2013-12-26 Canon Inc 画像処理装置及びその制御方法、プログラム
JP2014502741A (ja) * 2010-12-09 2014-02-03 サムスン エレクトロニクス カンパニー リミテッド 映像処理装置、照明処理装置及びその方法
CN111240736A (zh) * 2020-01-17 2020-06-05 网易(杭州)网络有限公司 模型配置的方法、装置、设备及存储介质
JP2021068349A (ja) * 2019-10-28 2021-04-30 国際航業株式会社 強調画像モデル作成システム
JP2023533249A (ja) * 2020-06-29 2023-08-02 ビーエーエスエフ コーティングス ゲゼルシャフト ミット ベシュレンクテル ハフツング 双方向テクスチャ関数の使用

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236938A (ja) * 2000-10-26 2002-08-23 Square Co Ltd 双方向反射分布関数に基づいて記憶されたテクスチャマップを使用するサーフェスシェーディング方法

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236938A (ja) * 2000-10-26 2002-08-23 Square Co Ltd 双方向反射分布関数に基づいて記憶されたテクスチャマップを使用するサーフェスシェーディング方法

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014502741A (ja) * 2010-12-09 2014-02-03 サムスン エレクトロニクス カンパニー リミテッド 映像処理装置、照明処理装置及びその方法
JP2013257664A (ja) * 2012-06-11 2013-12-26 Canon Inc 画像処理装置及びその制御方法、プログラム
JP2021068349A (ja) * 2019-10-28 2021-04-30 国際航業株式会社 強調画像モデル作成システム
JP7404030B2 (ja) 2019-10-28 2023-12-25 国際航業株式会社 強調画像モデル作成システム
CN111240736A (zh) * 2020-01-17 2020-06-05 网易(杭州)网络有限公司 模型配置的方法、装置、设备及存储介质
JP2023533249A (ja) * 2020-06-29 2023-08-02 ビーエーエスエフ コーティングス ゲゼルシャフト ミット ベシュレンクテル ハフツング 双方向テクスチャ関数の使用
JP7412610B2 (ja) 2020-06-29 2024-01-12 ビーエーエスエフ コーティングス ゲゼルシャフト ミット ベシュレンクテル ハフツング 双方向テクスチャ関数の使用

Also Published As

Publication number Publication date
JPWO2005124691A1 (ja) 2008-04-17
JP4394122B2 (ja) 2010-01-06

Similar Documents

Publication Publication Date Title
Müller et al. Acquisition, synthesis, and rendering of bidirectional texture functions
McCool et al. Homomorphic factorization of BRDFs for high-performance rendering
Chen et al. Light field mapping: Efficient representation and hardware rendering of surface light fields
Wang et al. Generalized displacement maps
US6888544B2 (en) Apparatus for and method of rendering 3D objects with parametric texture maps
JP3972784B2 (ja) 画像処理装置およびその方法
JP2004252935A (ja) 3dオブジェクトをモデル化する方法
JP2004133888A (ja) 3dオブジェクトをモデル化する方法
Merlo et al. 3D model visualization enhancements in real-time game engines
JP4335589B2 (ja) 3dオブジェクトをモデル化する方法
Meseth et al. Reflectance field based real-time, high-quality rendering of bidirectional texture functions
JP4394122B2 (ja) 物体表面の反射特性をサンプリングして行う実時間レンダリングの方法及びテクスチャサイズを変換する方法
CN116091684B (zh) 基于WebGL的图像渲染方法、装置、设备及存储介质
JP4456070B2 (ja) 光反射強度計算回路
KR101286653B1 (ko) 복잡한 재질감 정보 처리 장치 및 방법
KR100951121B1 (ko) 간접 조명 효과를 위한 렌더링 방법
Mavridis et al. Global Illumination using Imperfect Volumes.
Muller et al. Fast environmental lighting for local-pca encoded btfs
Ho et al. Unicube for dynamic environment mapping
Vanhoey et al. Simplification of meshes with digitized radiance
Andersen et al. Height and tilt geometric texture
Schneider Real-time BTF rendering
Chan et al. Material advances in Call of Duty: WWII
Rushmeier 3D capture for computer graphics
Gray et al. Integration of multiple range and intensity image pairs using a volumetric method to create textured 3D models

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

WWE Wipo information: entry into national phase

Ref document number: 2006514640

Country of ref document: JP

121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Country of ref document: DE

122 Ep: pct application non-entry in european phase