Calculation device, calculation method and program
The computing device and method efficiently simulate the glittering effect of painted surfaces using CG by calculating subsurface normals and specular reflection, addressing the computational challenges of existing methods and providing accurate brilliance and flip-flop effects.
Patent Information
- Application Number
- JP2021016520
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-04
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2041-02-04
AI Technical Summary
Existing methods struggle to efficiently express the glittering effect of flakes in computer graphics (CG) from both macro and micro viewpoints, requiring excessive computational resources and failing to accurately depict the brilliance and flip-flop effects of painted surfaces containing glitter materials.
A computing device and method that calculates the display color of an object with glitter materials using CG, incorporating subsurface normal distribution, reflectance, and specular reflection to efficiently simulate the glittering effect from various viewpoints with reduced computational effort.
The method allows for efficient expression of the glittering effect with minimal calculation, accurately depicting the brilliance and flip-flop effects of painted surfaces from both macro and micro perspectives.
Smart Images

Figure 0007567528000005 
Figure 0007567528000006 
Figure 0007567528000007
Abstract
Description
[Technical field]
[0001] The present invention relates to a calculation device, a calculation method, and a program, and more particularly to a technique for expressing the display color of an object containing a metallic pigment by computer graphics. [Background technology]
[0002] In the automotive industry, visual expression using computer graphics (hereafter referred to as CG) is often used in advertising, promotions, and at the design stage. Painted panels, which make up the majority of the exterior of an automobile, have a complex structure, and attempts are being made to accurately express them using CG. Many painted panels are made up of multiple layers, and by containing flake pigments within these layers, they have reflective properties consisting of a glittering appearance due to the flakes (particulateness: the grainy appearance of the flakes) and a flip-flop effect, where the color changes depending on the viewing angle. If these reflective properties could be accurately expressed using CG, there would be no need to actually apply paint to an object and check the finish at the design stage, etc.
[0003] Patent Document 1 discloses a technology that measures goniospectral reflectance and reproduces the paint color of an object using CG. This technology generates CG using actually measured goniospectral reflectance, making it possible to express the flip-flop nature of a painted surface, whose color changes depending on the viewing angle.
[0004] Several reflection models have been proposed to express the brilliance of flakes. For example, in Non-Patent Document 1, the appearance of a painted board is expressed by a uniform bidirectional reflectance distribution function (BRDF: Bidirectional Reflectance Distribution Function) by pigments and a bidirectional texture function (BTF) that changes depending on the coordinate position. BTF is a method of expressing appearance by an image, and is a method of saving and reproducing the change in appearance due to differences in light source and viewing direction as an image. The appearance of flakes when viewed from a certain direction is also expressed by saving it as an image.
[0005] In addition, the Car Paint shader (reflection model) provided by a 3DCG software development company as shown in Non-Patent Document 2 calculates a clear coat layer, a flake layer, and a pigment layer that expresses diffuse reflection. In the flake layer, a rough glittering feeling is expressed by scaling a normal map texture generated by random numbers.
[0006] In addition, in Non-Patent Document 3, the number of flakes contained in a coated plate is formulated as a normal distribution under the surface of the coated plate. By calculating the gloss from multiple normals expressed by the normal distribution, it is possible to express the brilliance of multiple flakes existing within one pixel of the texture. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] Japanese Patent Application Publication No. 10-115555 [Non-patent literature]
[0008] [Non-Patent Document 1] M. Rump, G. Muller, R. Sarlette, D. Koch and R. Klein, “Photo-realistic Rendering of Metallic Car Paint from Image-Based Measurements”, Computer Graphics Forum, Vol. 27-2, pp.527-536 (2008). [Non-Patent Document 2] [online], “Car Paint Material / Shader”, [searched on January 29, 2021], Internet〈URL:https: / / knowledge.autodesk.com / support / 3ds-max / learn-explore / ca as / CloudHelp / cloudhelp / 2015 / ENU / 3DSMax / files / GUID-1CD21856-588A-4A05-AC0A-88489F5F9C84-htm.html〉. [Non-Patent Document 3] Ikemoto, Y., Mukaigawa, Y., Matsushita, Y., Kubo, H., and Yagi, Y., “Subsurface normal distribution analysis of metallic coating considering observation scale”, Information Processing Society of Japan SIGES Technical Report, CG-161-15, (2015). Summary of the Invention [Problem to be solved by the invention]
[0009] However, the expression of flip-flop properties as described in Patent Document 1 alone is insufficient to express a painted board, and it is important to express the sense of brilliance by flakes. In Non-Patent Document 1, a huge number of images are required to smoothly express the change in the sense of brilliance due to the change in the viewpoint position. In Non-Patent Document 2, one flake exists for each pixel of the texture. For this reason, it is difficult to express the change in the sense of brilliance due to the change in the viewpoint position. In Non-Patent Document 3, the focus is on the quantification of the sense of brilliance, and there is no mention of a CG generation method using this.
[0010] When trying to express the brilliance of flakes, it is necessary to express the change in appearance according to the viewing distance. Since the method of Non-Patent Document 1 is an image-based method, from a macro viewpoint away from the painted board, the effect of the flakes is crushed, making it difficult to express the brilliance. On the other hand, from a micro viewpoint close to the painted board, the texture resolution is low, making it difficult to express the flakes, which are about 20 μm in size, in detail.
[0011] In the shader of Non-Patent Document 2, the flake attenuation distance can be set to eliminate the sense of incongruity caused by the expression of flakes from a macro viewpoint. This is a process that gradually fades out the influence of the flakes up to the set viewpoint distance. However, since the influence of the flakes exists even from a macro viewpoint, it is difficult to say that this is an accurate expression.
[0012] Therefore, as described in Non-Patent Document 3, it is conceivable to express the brilliance of flakes from both micro and macro viewpoints by defining the number of subsurface normals per area and calculating the reflected light from there. However, in the macro viewpoint, since the rendering resolution is low, the area corresponding to one pixel in the painted plate region becomes large, and the number of subsurface normals contained within one pixel becomes enormous. If it is attempted to express all of this enormous number of subsurface normals, an enormous amount of calculation time is required.
[0013] The present invention has been made in view of the above circumstances, and aims to provide a calculation device, a calculation method, and a program that can efficiently express a sense of brilliance with a small amount of calculation even from a macro viewpoint when reproducing in CG the state in which an object containing a lustrous material is painted. [Means for solving the problem]
[0014] In order to solve the above problems, a calculation device according to an embodiment of the invention is a calculation device that calculates a display color of an image that expresses the brilliance of an object that includes a lustrous material by computer graphics, and includes an acquisition unit that acquires object shape information that indicates the shape of the object, light source information that indicates a light source that illuminates the object, camera information related to a camera that virtually captures an image of the object, coating information that indicates the number of the lustrous materials included in a specified area and the distribution degree of the subsurface normal of each of the lustrous materials, and lustrous material information that indicates the reflection characteristics of the lustrous material, a subsurface normal calculation unit that calculates the subsurface normals of the lustrous materials included in the specified area using the distribution degree of the subsurface normals and the object shape information, and a calculation unit that calculates the subsurface normals of the lustrous materials included in the specified area using the lustrous material information and the subsurface normals calculated by the subsurface normal calculation unit. the reflectance calculation unit calculating the reflectance of the luminous material, with a light source and a line of sight direction as variables, according to the viewpoint distance from the viewpoint position of the camera to the object, using the light source information; an incident light calculation unit calculating the incident light for the drawing pixel to be drawn, using the light source information; a specular reflection light calculation unit calculating the reflected light component of the luminous material to be drawn at the drawing pixel, using the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the camera information; a brilliance addition unit calculating a display color of the drawing pixel by adding up the reflected light components calculated by the specular reflection light calculation unit for the number of the luminous materials to be included in the drawing pixel; and an output unit outputting the display color for each pixel calculated by the brilliance addition unit.
[0015] In order to solve the above problems, a calculation method according to an embodiment of the invention is a calculation method performed by a computer device that calculates the display color of an image that expresses the brilliance of an object that includes a lustrous material by computer graphics, in which an acquisition unit acquires object shape information that indicates the shape of the object, light source information that indicates a light source that illuminates the object, camera information related to a camera that virtually captures an image of the object, coating information that indicates the number of the lustrous materials included in a specified area and the distribution degree of the subsurface normal of each of the lustrous materials, and lustrous material information that indicates the reflection characteristics of the lustrous material, and a subsurface normal calculation unit calculates the subsurface normal of the lustrous materials included in the specified area using the distribution degree of the subsurface normal and the object shape information, and a reflectance calculation unit calculates the subsurface normal of the lustrous materials included in the specified area using the distribution degree of the subsurface normal and the object shape information, and using the subsurface normal calculated by the calculation unit, the reflectance of the luminous 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; an incident light calculation unit uses the light source information to calculate the incident light for the 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 reflected light component of the luminous material to be drawn at the drawing pixel; a luminous intensity addition unit adds up the reflected light components calculated by the specular reflected light calculation unit by the number of the luminous materials to be included in the drawing pixel to calculate the display color of the drawing pixel; and an output unit outputs the display color for each pixel calculated by the luminous intensity addition unit.
[0016] In order to solve the above problems, a program according to an embodiment of the invention provides a computer device that calculates display colors of an image that expresses the brilliance of an object that includes a lustrous material using computer graphics, the program including: an acquisition step of acquiring object shape information that indicates the shape of the object, light source information that indicates a light source that illuminates the object, camera information related to a camera that virtually images the object, coating information that indicates the number of the lustrous materials included in a specified area and the distribution degree of the subsurface normals of each of the lustrous materials, and lustrous material information that indicates the reflection characteristics of the lustrous material; a subsurface normal calculation step of calculating the subsurface normals of the lustrous materials included in the specified area using the distribution degree of the subsurface normals and the object shape information; and a subsurface normal calculation step of calculating the subsurface normals of the lustrous materials included in the specified area using the lustrous material information and the subsurface normals calculated by the subsurface normal calculation step. The program executes the following steps: a reflectance calculation step for calculating the reflectance of the luminous material, with the light source and line of sight direction as variables, depending on the viewpoint distance from the viewpoint position of the camera to the object; an incident light calculation step for calculating the incident light for the drawing pixel to be drawn using the light source information; a specular reflected light calculation step for calculating the reflected light component of the luminous material to be drawn at the drawing pixel, using the reflectance calculated by the reflectance calculation step, the incident light calculated by the incident light calculation step, and the camera information; a brilliance addition step for calculating the display color of the drawing pixel by adding up the reflected light components calculated by the specular reflected light calculation step for the number of the luminous materials to be included in the drawing pixel; and an output step for outputting the display color for each pixel calculated by the brilliance addition step. Effect of the Invention
[0017] According to an embodiment of the present invention, when reproducing in CG the state in which an object containing a lustrous material is painted, the sense of lustre can be efficiently expressed with a small amount of calculation, even from a macro perspective. [Brief description of the drawings]
[0018] [Figure 1] 1 is a block diagram showing an example of the configuration of a display device 1 according to an embodiment. [Diagram 2] FIG. 2 is a schematic diagram showing a coating including a lustrous material according to an embodiment. [Diagram 3] FIG. 2 is a diagram showing an example of the configuration of painting information 121 according to the embodiment. [Figure 4] FIG. 2 is a diagram showing an example of the configuration of glittering material information 122 according to the embodiment. [Diagram 5] 10 is a diagram showing an example of the configuration of light source information camera information 123 according to the embodiment. FIG. [Figure 6] 11 is a diagram used to explain the processing performed by a reflectance calculation unit 132 according to the embodiment. [Figure 7] 1A and 1B are diagrams illustrating examples of reflection lobes due to the glittering material of an embodiment. [Figure 8] 4 is a flowchart showing the flow of processing performed by the display device 1 of the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0020] The display device 1 is a computer device such as a PC (Personal Computer) or a server device. The display device 1 generates an image that depicts the display color of an object containing a lustrous material using computer graphics technology, and displays the generated image. The display device 1 is an example of a "computing device."
[0021] In the following, an example of drawing an object painted with a paint agent containing a luminous material will be described. However, the present invention is not limited to painting. Any object containing at least a luminous material will do, and the present invention can also be applied to drawing an object manufactured by forming a substance in which a luminous material is kneaded.
[0022] 1 is a block diagram showing an example of the configuration of a display device 1 according to an embodiment. The display device 1 includes, for example, a communication unit 11, a storage unit 12, a control unit 13, and a CG display unit 14. The communication unit 11 is realized by, for example, a general-purpose communication IC (Integrated Circuit). The communication unit 11 communicates with an external device via, for example, an Internet communication network, receives information transmitted from the external device, and stores the received information in the storage unit 12.
[0023] The storage unit 12 is realized by, for example, a storage device (a storage device having a non-transitory storage medium) such as a hard disk drive (HDD) or a flash memory, or a combination of these. The storage unit 12 stores programs for implementing each component of the display device 1, variables used when executing the programs, and various information.
[0024] The storage unit 12 stores, for example, object shape information 120, paint information 121, lustrous material information 122, and light source information camera information 123. The object shape information 120 is information indicating the three-dimensional shape of an object. The object shape information 120 is, for example, data indicating the polygon shape of a virtual object created by CAD (Computer-Aided Design) or the like, and includes surface normal information of each polygon. The paint information 121 is information indicating the state of paint. For example, the paint information 121 includes information indicating the distribution state of lustrous material contained in the paint for each type of paint for the paint to be drawn. The light source information camera information 123 is information on a virtual light source used when drawing and a virtual camera that captures an object.
[0025] Here, the relationship between the coating 20 and the luster material 21 contained in the coating 20 will be described with reference to Fig. 2. Fig. 2 is a schematic diagram showing a coating including a luster material according to an embodiment.
[0026] Generally, an object has only one normal at a certain point and one reflection peak. However, as shown in Fig. 2, in an object such as a coating 20 containing a lustrous material 21, the surface normal n0 of the coating 20 is determined to be one, but there are multiple reflection peaks due to the influence of the lustrous material 21 present under the surface. Therefore, in this embodiment, the normal n si is defined as the subsurface normal, where i is a number according to the number of glittering materials.
[0027] FIG. 2 shows an example in which four glittering materials 21-1 to 21-4 are included in a coating 20 having a predetermined area defined by side lengths (Δx, Δy). The normal to the surface of the coating 20 is normal n0. The subsurface normal of the glittering material 21-1 included in the coating 20 is subsurface normal n s1 The subsurface normal of the glittering material 21-2 is the subsurface normal n s2 The subsurface normal in the glittering material 21-3 is the subsurface normal n s3 The subsurface normal in the glittering material 21-4 is the subsurface normal n s4 It is.
[0028] FIG. 3 is a diagram showing an example of the configuration of coating information 121 in an embodiment. The coating information 121 includes items such as "coating No.", "side length x", "side length y", "number of luminous materials", and "normal variance". "Coating No." is identification information that uniquely identifies a coating. "Side length x" and "side length y" are information indicating one side length and the other side length when defining the area of the coating 20. "Number of luminous materials" is information indicating the number of luminous materials 21 included in a specified area defined by "side length x" and "side length y". Normal variance is information (variance information) that indicates the state of variation of subsurface normals due to each luminous material 21, and may be, for example, variance s 2 Here, s is the standard deviation of the subsurface normal line for each of the metallic particles 21.
[0029] In the example shown in this figure, the coating 20 identified as coating No. 1 is shown to include N1 glittering materials 21 within a predetermined area of side length (Δx1, Δy1). In addition, the dispersion of the subsurface normal due to each of the N1 glittering materials 21 is S1 2 It has been shown that.
[0030] FIG. 4 is a diagram showing an example of the configuration of the luminous material information 122 according to an embodiment. The luminous material information 122 includes items such as "luminous material No.", "specular reflection coefficient", and "surface roughness". "Luminous material No." is identification information that uniquely identifies a luminous material. "Specular reflection coefficient" and "surface roughness" are parameters when the luminous material is treated as a specular reflection model that indicates specular reflection. In the example shown in this figure, the luminous material 21 identified by luminous material No. 1 has a specular reflection coefficient of k s1 and the surface roughness is σ1 2 It has been shown that.
[0031] FIG. 5 is a diagram showing an example of the configuration of light source information camera information 123 in an embodiment. The light source information camera information 123 is, for example, information set by a user or information stored in advance. The light source information camera information 123 includes items such as "No.", "Light source information", and "Camera information". "No." is identification information that uniquely identifies a combination of light source information and camera information. The light source information is information on a virtual light source used for drawing, and is, for example, information indicating the position of the light source in a world coordinate system and the intensity of the light source. The camera information is information on a virtual camera used for drawing, and is, for example, information indicating the position of the camera in a world coordinate system, the angle of view of the camera, and the number of pixels at the time of rendering. In the example of this figure, the light source information identified by No. 1 is a light source whose position coordinates of the light source are P L1 (x L1 , y L1 , z L1 ), the light source intensity is I L1 In addition, the camera information identified by No. 1 is that the camera position coordinates are P c1 (x c1 , y c1 , z c1 ), the camera angle of view is (θ x1, θ y1 ), and the number of pixels is (U1, V1).
[0032] Returning to the explanation of Figure 1, the control unit 13 realizes its functions by having Processing Units such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit) as hardware provided in the display device 1 execute programs stored in the memory unit 12.
[0033] The control unit 13 includes, for example, an acquisition unit 130, a subsurface normal calculation unit 131, a reflectance calculation unit 132, an incident light calculation unit 133, a specular reflected light calculation unit 134, and a brilliance addition unit 135.
[0034] The acquisition unit 130 acquires various information necessary for drawing. Specifically, the acquisition unit 130 acquires object shape information 120, coating information 121, glittering material information 122, and light source information camera information 123. The acquisition unit 130 outputs the acquired information to the subsurface normal calculation unit 131. Generally, the acquisition unit 130 outputs the object shape information 120 to the subsurface normal calculation unit 131.
[0035] Here, the process performed by the subsurface normal calculation unit 131 will be described with reference to Fig. 6. Fig. 6 is a diagram used to explain the process performed by the subsurface normal calculation unit 131. Fig. 6 shows a schematic diagram of the distribution of the luminous material from a micro viewpoint and a macro viewpoint.
[0036] The subsurface normal calculation unit 131 calculates the subsurface normal. The subsurface normal calculation unit 131 acquires the object shape information 120 from the acquisition unit 130, and acquires the normal n0 of the polygon corresponding to the pixel to be rendered based on the acquired information. The subsurface normal calculation unit 131 also acquires the painting information 121 from the acquisition unit 130, and acquires variance information indicating the variation of the subsurface normal of the painting to be rendered based on the acquired information.
[0037] The coating information 121 includes, as variance information, for example, the degree of variation centered on the normal n0 direction of the surface of the coating 20, which is variance s 2 In this case, the subsurface normal calculation unit 131 calculates the zenith angle of each subsurface normal as a function of the mean of 0 (zero) and the variance of s 2 Let Nd(0, s 2 ) The subsurface normal calculation unit 131 also obtains the azimuth angle of the subsurface normal, for example, by uniform random numbers. In this way, the subsurface normal calculation unit 131 calculates the zenith angle and the azimuth angle to obtain the subsurface normal vector n s Determine.
[0038] The reflectance calculation unit 132 calculates the reflectance of one piece of luminous material 21. The reflectance calculation unit 132 reads and obtains the position coordinates of the pixel to be drawn (hereinafter referred to as the drawing pixel) from the object shape information 120. The reflectance calculation unit 132 obtains the position coordinates of the light source and camera used for drawing from the light source information camera information 123. The reflectance calculation unit 132 uses the position coordinates of the drawing pixel, the light source, and the camera to derive a light source direction vector l and a line of sight direction vector v for the drawing pixel. The reflectance calculation unit 132 also calculates the subsurface normal vector n calculated by the subsurface normal calculation unit 131. s , the specular reflection coefficient ks of the coating read from the glittering material information 122, and the surface roughness σ 2 The reflectance calculation unit 132 calculates the reflectance of the metallic pigment 21 using the obtained information.
[0039] In this embodiment, the viewpoint distance is taken into consideration when calculating the reflectance of the luminous material 21. The viewpoint distance is the distance from the viewpoint position of the camera to the object to be drawn. The reflectance calculation unit 132 controls the resolution at the time of drawing so that it is an appropriate resolution according to the viewpoint distance. A method in which the reflectance calculation unit 132 calculates the reflectance of the luminous material 21 while taking the viewpoint distance into consideration will be described with reference to FIG. 6.
[0040] Fig. 6 is a diagram used to explain the process performed by the reflectance calculation unit 132 of the embodiment. Fig. 6 shows a schematic overview of the luminous material distribution from micro and macro viewpoints. When considering perspective projection during rendering (drawing), the positional relationship between the camera 30, window 31, and view volume 32 is as shown in Fig. 6.
[0041] When focusing on one pixel in the window 31, the rendering range 33 is very small from a micro viewpoint, i.e., when the object is close to the camera 30. In this case, the number of images 330 of the luminous material to be rendered contained in the small rendering range 33 is small. In contrast, the rendering range 34 is large from a macro viewpoint, i.e., when the object is far from the camera. In this case, the number of images 340 of the luminous material to be rendered contained in the large rendering range 34 is large.
[0042] The drawing area S of one pixel in the window 31 can be calculated from the camera's angle of view, the number of pixels, and the distance d. The distance d is the distance (viewpoint distance) from the camera 30 to the drawing range 34. The coating information 121 also stores a predetermined area ΔS consisting of side lengths (Δx, Δy), and the number N of luminous materials contained within the predetermined area. From this, the number of luminous materials contained in the drawing range can be calculated by N×S / ΔS. Here, N is the number of luminous materials contained within the predetermined area ΔS. S is the drawing area. ΔS is the predetermined area.
[0043] Here, the particle diameter of a typical luminous material is very small, about 20 μm. Therefore, from a macroscopic viewpoint, the number of luminous materials 21 present in a drawing range corresponding to one pixel becomes huge. Therefore, it takes a very long time to calculate the reflectance of each of all the luminous materials 21.
[0044] Incidentally, when a painted panel containing the lustrous material 21 is observed from a macro viewpoint, the reflected light from each of the multiple lustrous materials 21 tends to mix together and appear as one large spread of reflected light. Therefore, by utilizing this tendency, in this embodiment, the sum of the reflected light from the multiple lustrous materials is approximately calculated based on the reflection characteristics from one lustrous material 21. Specifically, the characteristics of the spread reflection lobe shown by the reflection characteristics of one lustrous material 21 are approximately expressed as the reflection characteristics of multiple lustrous materials.
[0045] Here, a method for approximately expressing the sum of reflected light from a plurality of lustrous materials will be described with reference to Fig. 7. Fig. 7 is a diagram showing a reflection lobe (radiance characteristic of reflected light) from a lustrous material according to an embodiment. The horizontal axis of Fig. 7 indicates the line of sight angle, and the vertical axis indicates the radiance.
[0046] 7, the illumination is incident perpendicularly to the surface of the lustrous material 21, that is, from the normal direction of the surface. Therefore, depending on the line of sight angle, the reflectance of the lustrous material 21 changes, and accordingly, the radiance of the reflected light also changes.
[0047] The reflection lobe due to a single (one) luminous material 21 has a sharp peak as shown by the solid line in Fig. 7. When observing from a viewpoint distance (distance d1) where only one image of the luminous material to be drawn is included in the drawing range indicated by one pixel present in the window 31, the sense of luminosity due to the luminous material is expressed as a characteristic having a sharp peak as shown by the solid line in Fig. 7.
[0048] On the other hand, consider a case where an object containing luminous materials 21 with the same reflective properties is observed from a viewpoint distance (distance d2) that is twice distance d1. When observed from distance d2, the drawing range indicated by one pixel in window 31 contains four images of the luminous materials to be drawn. Here, when the drawing range is considered to be one-dimensional, the sense of luminosity is expressed as a characteristic obtained by combining the respective reflective properties of the two luminous materials.
[0049] In this embodiment, instead of calculating the reflectance of each of the two lustrous materials 21, the reflection characteristics of the two lustrous materials 21 are approximated as being twice as wide as the reflection lobe of a single lustrous material 21. Specifically, the reflection characteristics of the two lustrous materials 21 are approximated as being a reflection lobe with a gentle peak as shown by the dashed line in FIG.
[0050] Here, the Ward model is considered as an example of a specular reflection model. s can be calculated by the following formula (1) using the light source and line of sight vector (l, v) as variables. In formula (1), σ is the surface roughness coefficient, ks is the specular reflection coefficient, and α is the subsurface normal vector n s and the half vector. The half vector is a unit vector that represents the midpoint between the light source and line of sight vector (l, v), and is a normalized vector obtained by adding a vector in the opposite direction to the line of sight direction and a vector in the opposite direction to the light ray direction.
[0051]
number
[0052] Based on formula (1), in the Ward model, the width of the reflection lobe is determined to be proportional to the surface roughness σ. Therefore, when the reflectance calculation unit 132 wants to double the width of the reflection lobe, it is sufficient to set the surface roughness σ' when the width of the reflection lobe is doubled to twice the surface roughness σ of the original glittering material 21.
[0053] Specifically, when the above-mentioned approximation is used, the reflectance calculation unit 132 calculates the surface roughness σ' by the following formula (2). In formula (2), S is the area of the drawing range corresponding to one pixel. ΔS is a predetermined area defined by the side length (x, y) stored in the coating information 121. σ is the surface roughness of the luminous material 21 stored in the luminous material information 122.
[0054]
number
[0055] In addition, the reflectance calculation unit 132 calculates the specular reflection coefficient ks' by the following formula (3). In formula (3), S is the area of the drawing range corresponding to one pixel. ΔS is a predetermined area defined by the side length (x, y) stored in the coating information 121. ks is the specular reflection coefficient of the luminous material 21 stored in the luminous material information 122.
[0056]
number
[0057] FIG. 7 shows an example of a reflection lobe by one luster material. When drawing, the reflectance of each luster material 21 included in the predetermined area ΔS shown in the painting information 121 is calculated according to the number of luster materials 21. For example, when the predetermined area ΔS includes four luster materials 21 and the drawing area S corresponds to the predetermined area ΔS, the reflectance of each of the four luster materials 21 is calculated as in the past. In this case, when the drawing area S corresponds to 10 times the predetermined area ΔS, the reflectance of each of the 40 luster materials 21 needs to be calculated as in the past. In contrast, in this embodiment, one luster material (hereinafter referred to as an integrated luster material) equivalent to (S / ΔS=) 10 luster materials 21 is considered, and the reflectance of the integrated luster material is approximately calculated. Then, the drawing area S is considered to include four integrated luster materials, and the reflectance of each integrated luster material is (approximately) calculated.
[0058] Specifically, the reflectance calculation unit 132 calculates an approximate reflectance using the approximate surface roughness σ' calculated by formula (2) and the approximate specular reflection coefficient ks' calculated by formula (3). This allows the reflectance calculation unit 132 to approximately calculate the reflectance of a plurality of luminous materials from a macro viewpoint in the same manner as in the case of a micro viewpoint, without repeatedly performing calculations to combine the reflection characteristics of a huge number of luminous materials 21 from a macro viewpoint. Therefore, even from a macro viewpoint, it is possible to approximately express the luminous feeling without increasing the calculation time.
[0059] Returning to the description of FIG. 1, the incident light calculation unit 133 calculates the incident light. The incident light calculation unit 133 calculates the position coordinates of the rendering pixel (coordinate data P O The incident light calculation unit 133 obtains the position coordinates of the light source used for drawing from the light source information camera information 123 (light source coordinate position P L ), and the light source intensity (light source intensity I L ) is obtained. The incident light calculation unit 133 also obtains the subsurface normal vector n s The incident light calculation unit 133 uses the acquired information to calculate the irradiance Ei of the light incident from the light source to the luminous material 21 under the object surface. For example, when the light source is a point light source, the incident light calculation unit 133 calculates the irradiance Ei of the light using the following formula (4). In formula (4), Ei is the irradiance of the light, and I L is the light source intensity. Also, d L is the distance between the light source and the pixel, and θi is the normal vector n s and the angle formed by the incident light.
[0060]
number
[0061] The specular reflection light calculation unit 134 calculates the specular reflection light component caused by the glittering material 21 included in the drawing pixel. The specular reflection light calculation unit 134 calculates the reflectance ρ sThe radiance I of the luminous material 21 is obtained by multiplying the radiance Ei by the luminous material 21. s The specular reflection calculation unit 134 calculates the reflectance ρ s The specular reflection light calculation unit 134 uses the value calculated by the incident light calculation unit 133 as the irradiance Ei.
[0062] The glittering sensation adding unit 135 synthesizes glittering sensations due to the glittering materials 21 included in the drawing pixels. Specifically, the glittering sensation adding unit 135 synthesizes reflected light components (radiance I s The sum of these two values is used as the display color for the pixel that represents the paint.
[0063] As a result, in all pixels expressing the paint, regardless of the size of the drawing area S, the reflected light components (radiance I s In addition, since the approximation is made so that the width of the reflection lobe of the glittering material 21 becomes wider as the drawing area S becomes larger, it is possible to express a glittering feeling closer to the actual appearance while suppressing an increase in calculation time, even when drawing an object from a macro viewpoint.
[0064] The CG display unit 14 displays, as CG, the paint color (display color) calculated for all pixels in the image to be drawn. The CG display unit 14 is an example of an "output unit."
[0065] Here, an example of the operation of the process in which the display device 1 expresses a sense of brilliance will be described with reference to Fig. 8. Fig. 8 is a flowchart showing the flow of the process performed by the display device 1 of this embodiment. Below, the flow of the process for calculating the sense of brilliance of the paint at a certain pixel as the display color of that pixel will be described.
[0066] Step S1: The display device 1 acquires, from the object shape information 120, the position coordinates of the polygon and the normal n0 of the polygon as polygon information of the object corresponding to the rendering pixel.
[0067] Step S2: The display device 1 acquires information on the light source that illuminates the object and information on the position of the camera from the light source information / camera information 123.
[0068] Step S3: The display device 1 obtains, from the coating information 121, information on the coating 20 corresponding to the drawing pixel, such as a predetermined area ΔS, the number N of the glittering materials 21 contained in the predetermined area ΔS, and the variance s of the subsurface normals of each of the glittering materials 21. 2 Get the.
[0069] Step S4: The display device 1 obtains, from the glittering material information 122, a specular reflection coefficient k s , and surface roughness σ 2 The display device 1 initializes the variable m to 0 (zero).
[0070] Step S5: The display device 1 judges whether the variable m is larger than the number N. The number N is the number of the glittering materials 21 included in the predetermined area ΔS, and is information stored in the coating information 121. If the variable m is smaller than the number N, the display device 1 proceeds to step S6. That is, the display device 1 repeats the following steps S6 to S9 the number of times equal to the number N.
[0071] Step S6: The display device 1 uses the variance information of the subsurface normals of the glittering materials 21 acquired as the coating information 121 to calculate the subsurface normals of each of the glittering materials 21, which are determined by a Gaussian distribution function.
[0072] Step S7: The display device 1 calculates the reflectance (specular reflection coefficient) of one luminous material to be drawn in the drawing pixel from the subsurface normals of each luminous material 21 calculated in step S6, the direction of the light source and camera obtained from the light source information camera information 123, the luminous material information 122, and the drawing area S in the drawing pixel.
[0073] In this case, the display device 1 uses the ratio between the drawing area S and a predetermined specified area ΔS to approximately calculate the reflection characteristics of the luminous material when the number of luminous materials 21 contained in the drawing area S is regarded as being the same as the number of luminous materials contained in the specified area ΔS, and calculates the reflectance of the luminous material using the approximately calculated reflection characteristics.
[0074] Step S8: The display device 1 calculates the intensity of the light incident on the metallic pigment in the rendering pixel.
[0075] Step S9: The display device 1 calculates the radiance I emitted from one glittering material in the drawing pixel from the specular reflection coefficient acquired in step S7 and the incident light intensity calculated in step S8. s is calculated as the reflected light component on the specular surface of the glittering material.
[0076] Step S10: The display device 1 increments the variable m and returns to the process shown in step S5. If the variable m is greater than the number N in step S5, the display device 1 proceeds to step S11.
[0077] Step S11: The display device 1 calculates the reflected light component (radiance I s The sum of these two values is used as the display color of the drawing pixel.
[0078] In the above flowchart, N radiances I s After calculating the radiance I sThe above description is given by taking the case where the radiance I is added together, but the present invention is not limited to this. s Each time the calculation is performed, the calculated radiance I s The display color may be calculated by performing the process of adding the above N times.
[0079] As described above, the display device 1 of the embodiment includes the acquisition unit 130, the subsurface normal calculation unit 131, the reflectance calculation unit 132, the incident light calculation unit 133, the specular reflected light calculation unit 134, the glittering sensation addition unit 135, and the CG display unit 14. The acquisition unit 130 acquires the object shape information 120, the coating information 121, the glittering material information 122, and the light source information camera information 123. The subsurface normal calculation unit 131 calculates the subsurface normal of the glittering material 21 included in the predetermined area ΔS using the distribution degree of the subsurface normal of the coating information 121 and the object shape information 120. The reflectance calculation unit 132 calculates the reflectance of the glittering material 21 using the glittering material information 122 and the subsurface normal calculated by the subsurface normal calculation unit 131. The reflectance is determined by the light source and the line of sight direction as variables. The reflectance calculation unit 132 calculates the reflectance of the glittering material 21 according to the distance d. The distance d is the viewpoint distance from the viewpoint position of the camera to the object. The incident light calculation unit 133 calculates the incident light for the drawing pixel using the light source information. The specular reflection light calculation unit 134 calculates the reflected light component of the glittering material 21 to be drawn in the drawing pixel using the reflectance calculated by the reflectance calculation unit 132, the incident light calculated by the incident light calculation unit 133, and the camera information. The glittering sensation addition unit 135 adds the reflected light components calculated by the specular reflection light calculation unit 134 to the number of glittering materials included in the drawing pixel to calculate the display color of the drawing pixel. The CG display unit 14 outputs (displays) the display color for each pixel calculated by the glittering sensation addition unit 135. As a result, in the display device 1 of the embodiment, the reflectance of the glittering material 21 can be calculated according to the viewpoint distance, and it is possible to calculate a reflectance that expresses an object with an appropriate resolution according to the viewpoint distance. Therefore, even in a macro viewpoint, the glittering sensation can be efficiently expressed with a small amount of calculation.
[0080] In addition, in the display device 1 of the embodiment, the reflectance calculation unit 132 includes an integrated luster material obtained by integrating a plurality of luster materials 21 in the drawing area in the macro viewpoint so that the number of luster materials 21 included in the drawing area in the macro viewpoint is the same as the number of luster materials 21 included in the drawing area in the micro viewpoint. The reflectance calculation unit 132 calculates the reflected light component in the integrated luster material based on the reflection characteristics of the luster materials 21 and the ratio of the drawing area in the macro viewpoint to the drawing area in the micro viewpoint. As a result, in the display device 1 of the embodiment, even in the macro viewpoint, the display color can be calculated by the same calculation as in the micro viewpoint. Moreover, since the reflected light component in the integrated luster material can be calculated based on the reflection characteristics and area ratio (S / ΔS) of the individual luster materials 21 before integration, it is possible to calculate the reflection characteristics in the macro viewpoint to be characteristics according to the viewpoint distance. Therefore, even in the macro viewpoint, the sense of brilliance can be efficiently expressed with a small amount of calculation.
[0081] Furthermore, in the display device 1 of the embodiment, the reflectance calculation unit 132 controls the spread of radiance according to the line of sight angle in the reflected light of the lustrous material 21 according to the drawing area S. This allows the display device 1 of the embodiment to calculate the reflectance according to the drawing area S. Therefore, the same effect as that described above is achieved.
[0082] In the display device 1 of the embodiment, the reflectance calculation unit 132 calculates the surface roughness σ of the glittering material 21 in the glittering material information 122 according to the drawing area S. 2 By changing the value of , the spread of the radiance according to the line of sight angle in the reflected light of the glittering material 21 is controlled. As a result, in the display device 1 of the embodiment, the surface roughness σ according to the drawing area S is 2 Therefore, the reflectance can be calculated, and the same effect as that described above can be obtained.
[0083] In addition, in the display device 1 of the embodiment, the reflectance calculation unit 132 sets the number of the luminous materials 21 included in the drawing area S to be equal to the number of the luminous materials 21 included in the predetermined area ΔS. As a result, in the display device 1 of the embodiment, regardless of the drawing area S, the display color can be calculated with the same amount of calculation as when drawing an object of a predetermined area ΔS.
[0084] In the display device 1 of the embodiment, the reflectance calculation unit 132 assumes that the drawing area S includes an integrated luminous material obtained by integrating a plurality of luminous materials 21 so that the number of luminous materials 21 included in the drawing area S is the same as the number of luminous materials 21 included in a predetermined area ΔS. The reflectance calculation unit 132 calculates the surface roughness σ of the luminous material 21. 2 Surface roughness σ' of the integrated glittering material 2 The surface roughness σ' of the integrated glittering material is set so that the ratio of the surface roughness σ' is the same as the ratio of the drawing area S to the specified area ΔS. 2 In this way, in the display device 1 of the embodiment, an appropriate surface roughness σ' of the integrated glittering material is determined according to the drawing area S. 2 can be determined.
[0085] In the above-described embodiment, when expressing the brilliance of one pixel expressing a coating, the reflected light is calculated using the ratio of the pixel's drawing area S to a preset area ΔS. This makes it possible to express the brilliance according to the viewpoint distance. In particular, in this embodiment, there is no need to calculate the reflected light from a huge number of brilliance materials in a macro viewpoint, and it is possible to express the brilliance at high speed, equivalent to a micro viewpoint.
[0086] In the above embodiment, the expression of brilliance has been described as the main focus. However, of course, in painting, specular reflection also occurs on the surface of the top clear coat layer, and diffuse reflection occurs in the pigment layer at the bottom. It is also possible to express a more complex paint color by calculating the reflected light from each of these layers separately and adding them up in the CG display unit 14.
[0087] In the above-described embodiment, the surface roughness σ′ 2, and the specular reflection coefficient ks' are calculated using the ratio of the given area ΔS to the drawing area S. In addition, the above parameters (surface roughness σ' 2 , and the specular reflection coefficient ks') may also be modified or corrected.
[0088] In the above-described embodiment, the specular reflection coefficients ks, ks', the surface roughness σ 2 , σ' 2 The above parameters may be set for each of the RGB colors. In this way, the color of the glittering material 21 can be expressed.
[0089] In the above embodiment, the specular reflection light calculation unit 134 calculates the radiance I s After calculating the specular reflection radiance, the radiance I s However, the reflectances of the respective glittering materials 21 calculated by the reflectance calculation unit 132 may be added together in advance, and then the specular reflected light calculation unit 134 may calculate the specular reflected light in the camera direction.
[0090] In the above embodiment, the reflection model used to estimate the reflection characteristics is the Ward model. However, the present invention is not limited to this. The reflection characteristics may be estimated using any model, not limited to the Ward model. For example, a model suitable for metal reflection such as Cook-Torrance may be adopted to express the brilliance of aluminum flakes.
[0091] The display device 1 in the above-described embodiment may be realized in whole or in part by a computer. In that case, a program for realizing this function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into a computer system and executed to realize the function. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. The term "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into a computer system. The term "computer-readable recording medium" may also include a medium that dynamically holds a program for a short period of time, such as a communication line when a program is transmitted via a network such as the Internet or a communication line such as a telephone line, and a medium that holds a program for a certain period of time, such as a volatile memory inside a computer system that is a server or client in that case. The above-described program may be a program for realizing a part of the above-described function, or may be a program that can realize the above-described function in combination with a program already recorded in the computer system, or may be a program that is realized using a programmable logic device such as an FPGA.
[0092] Although an embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to this embodiment, and designs that do not deviate from the gist of the present invention are also included. [Explanation of symbols]
[0093] 1...display device (computing device), 11...communication unit, 12...storage unit, 13...control unit, 120...object shape information, 121...painting information, 122...glossy material information, 130...acquisition unit, 131...subsurface normal calculation unit, 132...reflectance calculation unit, 133...incident light calculation unit, 134...specular reflected light calculation unit, 135...glossiness addition unit, 14...CG display unit
Claims
1. A calculation device for calculating a display color of an image that expresses the glittering of an object that includes a glittering material by computer graphics, an acquisition unit that acquires 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 an image of the object, coating information indicating the number of the luminous materials included in a specified area and the distribution degree of the subsurface normal of each of the luminous materials, and luminous material information indicating the reflection characteristics of the luminous materials; A subsurface normal calculation unit that calculates a subsurface normal of the glittering material included in the specified area using the distribution degree of the subsurface normal and the object shape information; A reflectance calculation unit that uses the luminous material information and the subsurface normal calculated by the subsurface normal calculation unit to calculate the reflectance of the luminous material with a light source and a line of sight direction as variables according to a viewpoint distance from the viewpoint position of the camera to the object; an incident light calculation unit that calculates incident light for a drawing pixel to be drawn using the light source information; A specular reflection light calculation unit that calculates a reflected light component of the glittering material to be drawn on the drawing pixel using the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the camera information; a brilliance adding unit that adds up the reflected light components calculated by the specular reflected light calculating unit by the number of the brilliance materials included in the drawing pixel to calculate a display color of the drawing pixel; an output unit that outputs the display color for each pixel calculated by the brilliance adding unit; A computing device comprising:
2. the reflectance calculation unit determines that an integrated luminous material obtained by integrating a plurality of the luminous materials is included in the drawing area in the macro viewpoint so that the number of the luminous materials included in the drawing area of the object drawn in the drawing pixel in the macro viewpoint, where the viewpoint distance is large, is equal to the number of the luminous materials included in the drawing area in the micro viewpoint, where the viewpoint distance is small, and calculates the reflectance of the integrated luminous material based on the reflection characteristics of the luminous materials and the ratio of the drawing area in the macro viewpoint to the drawing area in the micro viewpoint. The computing device of claim 1 .
3. The glittering material information is information indicating the specular reflection coefficient of the glittering material in a specular reflection model and the surface roughness of the glittering material.
3. A computing device according to claim 1 or claim 2.
4. The subsurface normal calculation unit acquires, as coating information, information indicating a variance according to a normal distribution as a degree of variation of the subsurface normal of the luminous material, and calculates a normal of the luminous material using the variance; The normal distribution has a variation represented by the variance centered on a surface normal of an object to be rendered at the rendering pixel, and is a distribution in which the zenith angle with respect to the surface normal has an average of 0. A computing device according to any one of claims 1 to 3.
5. The reflectance calculation unit controls the spread of radiance according to a line of sight angle in the reflected light of the metallic pigment according to a drawing area of the object to be drawn in the drawing pixel.
5. A computing device according to any one of claims 1 to 4.
6. the reflectance calculation unit controls the spread of radiance according to the line of sight angle in the reflected light of the luminous material by changing the surface roughness of the luminous material in the luminous material information according to the drawing area of the object to be drawn in the drawing pixel; A computing device according to any one of claims 1 to 5.
7. the reflectance calculation unit determines that an integrated luminous material obtained by integrating a plurality of the luminous materials is included in the drawing area of the object drawn in the drawing pixel so that the number of the luminous materials included in the drawing area of the object drawn in the drawing pixel is the same as the number of the luminous materials included in a predetermined area, and determines the surface roughness of the integrated luminous material so that the ratio of the surface roughness of the integrated luminous material to the surface roughness of the luminous materials is the same as the ratio of the drawing area to the predetermined area.
7. A computing device according to any one of claims 1 to 6.
8. A calculation method performed by a computer device for calculating a display color of an image expressing the glittering feel of an object containing a glittering material by computer graphics, an acquisition unit acquires object shape information indicating a shape of the object, light source information indicating a light source that illuminates the object, camera information regarding a camera that virtually captures an image of the object, coating information indicating the number of the glittering materials included in a predetermined area and the distribution degree of the subsurface normal of each of the glittering materials, and glittering material information indicating the reflection characteristics of the glittering materials; A subsurface normal calculation unit calculates a subsurface normal of the glittering material included in the specified area using the distribution degree of the subsurface normal and the object shape information, A reflectance calculation unit calculates the reflectance of the luminous material with the light source and the line of sight direction as variables, according to the viewpoint distance from the viewpoint position of the camera to the object, using the luminous material information and the subsurface normal calculated by the subsurface normal calculation unit; an incident light calculation unit calculates incident light for a drawing pixel to be drawn using the light source information; A specular reflection light calculation unit calculates a reflected light component of the glittering material to be drawn on the drawing pixel using the reflectance calculated by the reflectance calculation unit, the incident light calculated by the incident light calculation unit, and the camera information, a glitter addition unit adds up the reflected light components calculated by the specular reflected light calculation unit by the number of glitter materials included in the drawing pixel to calculate a display color of the drawing pixel; An output unit outputs the display color for each pixel calculated by the brilliance adding unit. Calculation method.
9. A computer device for calculating a display color of an image expressing a glittering feeling of an object including a glittering material by computer graphics, an acquisition step of acquiring object shape information indicating the shape of the object, light source information indicating a light source illuminating the object, camera information regarding a camera that virtually captures an image of the object, coating information indicating the number of the glittering materials included in a predetermined area and the distribution degree of the subsurface normal of each of the glittering materials, and glittering material information indicating the reflection characteristics of the glittering materials; a subsurface normal calculation step of calculating a subsurface normal of the glittering material included in the predetermined area using the distribution degree of the subsurface normal and the object shape information; A reflectance calculation step of calculating the reflectance of the luminous material, with a light source and a line of sight direction as variables, according to a viewpoint distance from the viewpoint position of the camera to the object, using the luminous material information and the subsurface normal calculated by the subsurface normal calculation step; an incident light calculation step of calculating incident light for a drawing pixel to be drawn using the light source information; a specular reflection light calculation step of calculating a reflected light component of the glittering material to be drawn on the drawing pixel by using the reflectance calculated by the reflectance calculation step, the incident light calculated by the incident light calculation step, and the camera information; a brilliance addition step of adding up the reflected light components calculated by the specular reflected light calculation step by the number of the brilliance materials included in the drawing pixel to calculate a display color of the drawing pixel; an output step of outputting the display color for each pixel calculated by the brilliance adding step; A program that executes the following.
Citation Information
Patent Citations
Colorimetric method for light-material painted-color
JP1998115555A
Image processing device, image processing method and program
JP2019102058A
Texture adjustment supporting system and texture adjustment supporting method
JP2020095484A
