Realistic drawing method of flannelette fabric material

By calculating the reflection function and normal distribution function of the velvet material, the problem of lack of realism in the velvet material drawing effect is solved, and a more realistic velvet material image drawing effect is achieved.

CN119494909APending Publication Date: 2025-02-21LINGDI (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311025462.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing velvet material drawing effect lacks realism and cannot effectively describe its forward and backscattered optical reflection characteristics.

Method used

By calculating the reflection function of the object surface, combining the light source direction, observation direction, reflectivity and roughness, the reflection intensity and normal distribution functions of the velvet material are calculated, and then a realistic velvet material image is drawn.

Benefits of technology

A more realistic velvet material drawing effect is achieved, enhancing the realism and detailed expression of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494909A_ABST
    Figure CN119494909A_ABST
Patent Text Reader

Abstract

The invention discloses a realistic drawing method for a flannelette fabric material, relates to the technical field of rendering drawing, and aims to solve the problem that the drawing effect of the existing flannelette material is lack of realism, and the method comprises the following steps: according to a light source direction and an observation direction of an object surface, calculating to obtain a half-angle vector; according to the reflectivity and the half-angle vector of the object surface, reflection intensity is obtained through calculation; according to the roughness of the object surface and the intermediate quantity, a normal distribution function is obtained through calculation; defining relevant parameters, respectively obtaining a first function and a second function, and calculating according to the first function and the second function to obtain a geometric shielding factor; according to the reflection model of the object, calculating to obtain an object reflection function; the drawing simulation is to observe the brightness of the object illuminated by the light source from the direction of the virtual camera; traversing each pixel of the virtual camera; and calculating the brightness of each pixel so as to draw an image. According to the method disclosed by the invention, the lint material with a more realistic sense can be drawn.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rendering and drawing, and in particular to a method for realistic drawing of flannel fabric material. Background Art

[0002] Realistic rendering technology based on ray tracing is widely used in the fields of film, television and games. Rendering technology simulates the propagation of light in the real world through computers to produce realistic picture effects. The optical reflection characteristics of the surface material of an object are the essential properties of the object. The same light source will produce different reflection intensities and colors on different object surfaces; therefore, the method of describing the reflective optical characteristics of the object material is the key to affecting the realism of the rendering results.

[0003] Common materials in daily life include metal, plastic, wood and glass. The characteristic of these materials is that their surfaces are hard materials. Flannel is also a common cloth material in daily life. Its microstructure is different from other hard surfaces. This makes the reflection characteristics of lannel material to light different from those of hard surfaces. When light is incident on a certain point on a hard surface material, the reflected light will be concentrated in the forward scattering area. However, due to the difference in the microscopic physical structure of lannel material, there will be both forward scattering and backward scattering, which makes the lannel material have a significantly different appearance from the hard surface, resulting in the lack of realism in the lannel drawing effect.

[0004] The "real-time rendering method of glitter fabrics in realistic clothing rendering" disclosed in Chinese patent documents has a publication number of CN113096229A, which discloses a real-time rendering method of glitter fabrics in realistic clothing rendering, including: mapping the texture coordinate value of the rendering pixel to between 0 and 1 according to the scaling ratio input by the user; gridding in the two-dimensional space of the unit range according to the number of glitters input by the user; calculating the opacity of the glitter according to the mapped coordinate value of the rendering pixel and the glitter radius; calculating a random number between 0 and 1 according to the texture coordinate value of the rendering pixel, and then calculating the random intensity correction coefficient; calculating the rendering result of the glitter part; calculating the final rendering result according to the calculated opacity of the glitter and the original rendering result of the base fabric; however, the Chinese patent with the publication number of CN113096229A cannot solve the problem of the lack of realism of the above-mentioned flannel drawing effect. Summary of the invention

[0005] The present invention solves the problem that the existing flannel material drawing effect lacks realism, and proposes a realistic drawing method for flannel fabric material. According to the characteristics that the flannel material has both forward and backward scattering, its object reflection function is calculated; the method of the present invention can draw a flannel material with a more realistic feeling.

[0006] In order to achieve the above object, the present invention adopts the following technical scheme: a method for realistic rendering of flannel fabric material, comprising the following steps: S1, according to the light source direction and observation direction of the object surface, the half-angle vector is calculated; according to the reflectivity of the object surface and the half-angle vector, the reflection intensity is calculated; S2, according to the roughness of the surface of the object and the intermediate quantity, the normal distribution function is calculated; S3, defining relevant parameters, and obtaining a first function and a second function respectively, and calculating a geometric occlusion factor according to the first function and the second function; S4, calculating the object reflection function according to the object reflection model; S5, drawing simulation is to observe the brightness of the object illuminated by the light source from the direction of the virtual camera; traverse each pixel of the virtual camera; calculate the brightness of each pixel, so as to draw a complete image.

[0007] In the present invention, the half-angle vector is first calculated according to the light source direction and the observation direction of the object surface; the reflection intensity is calculated according to the half-angle vector and the angle between the half-angle vector and the light source direction; then the normal distribution function is calculated according to the intermediate quantity; in order to calculate the geometric occlusion factor, the first function and the second function are defined and obtained; after the reflection function of the object is calculated, a complete image is drawn; the method of the present invention can draw a more realistic velvet material.

[0008] Preferably, the step S1 comprises the following steps: S11, the reflectivity of the object surface is F0, the roughness is r, the normal direction is n, the light source direction is l, and the observation direction is v. According to the light source direction l and the observation direction v, the half-angle vector calculated is: h=(l+v) / 2; S12, the calculated reflection intensity is: F=F0+(1-F0)*dot(h,l)5 Among them, dot(h,l) is the angle between the half-angle vector h and the light source direction l.

[0009] In the present invention, the half-angle vector h is first obtained, and then the reflection intensity is calculated according to the reflectivity, the angle between the half-angle vector and the light source direction l.

[0010] Preferably, step S2 comprises the following steps: S21, calculate the intermediate quantity y from the angle between the half-angle vector h and the surface normal n of the object, specifically: y = max(1-dot(h,n)2, 0.0078); S22, calculate the normal distribution function D based on the light source direction l, observation direction v and intermediate quantity y of the object surface, specifically: D = y(1 / 2r)*(2+1 / r) / (2*π).

[0011] In the present invention, the purpose of step S2 is to calculate the normal distribution function D. In this process, the intermediate quantity y is first calculated, and finally the normal distribution function D is calculated based on the intermediate quantity.

[0012] Preferably, step S3 comprises the following steps: S31, define a first function l(x,r) according to relevant parameters, specifically: l(x,r)=a / (b*x c +1)+d*x+e; Among them, a, b, c, d and e are related definition parameters; S32, define the second function T(x,r), if x<0.5, T(x,r)=e l(x,r) ; If x>=0.5, T(x,r)=e (2*l(0.5,r)-l(1-x,r)) ; S33, calculate the geometric occlusion factor, specifically: V=1 / (1+T(dot(v,n),r)+T(dot(l,n),r) 1+2*(1-dot(l,n)^8 ); Among them, dot(v,n) and dot(l,n) are the angles between the observation direction v, the light source direction l and the surface normal n of the object.

[0013] In the present invention, during step S3, a first function and a second function are defined respectively, and dot(v,n) and dot(l,n) are substituted into the first function and the second function to finally obtain a geometric occlusion factor.

[0014] Preferably, the object reflection function is specifically:

[0015] In the present invention, the parameters calculated from step S1 to step S3 are substituted into the object reflection function to obtain the final result.

[0016] Preferably, in step S5: if the light intensity of the light source emitted by the light source in the light source direction l is e, then the observation direction v obtained from the i-th pixel of the virtual camera is i The brightness of the object seen is: R i =f(l,v i )*e*dot(n,l).

[0017] Preferably, the relevant definition parameters in step S31 are specifically: a=25.32*r2+21.54*(1-r2), b=3.32*r2+3.82*(1-r2), c=0.16*r2+0.19*(1-r2), d = -1.27*r2-1.97*(1-r2), e=-4.85*r2-4.32*(1-r2), r2=(1-r) 2 .

[0018] In the present invention, the relevant parameters a, b, c, d, and e are all related to r2, and r2 is determined by the roughness.

[0019] The present invention has the following beneficial effects: The present invention relates to a realistic rendering method for flannel fabric material, and according to the characteristics of the flannel material having both forward and backward scattering, the object reflection function thereof is calculated; the method of the present invention can render a flannel material with a more realistic sense. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a schematic diagram of the difference in optical reflection between flannel material and hard surface material; Figure 2 It is a schematic diagram of the reflection on the surface of an object material; Figure 3 This is a comparison diagram of flannel drawn by a realistic drawing method for flannel fabric material of the present invention and a drawing by the prior art. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0022] refer to Figure 1 When light is incident on a point on a hard surface material, the reflected light will be concentrated in the forward scattering area, while the velvet material will have both forward scattering and backward scattering due to the different microscopic physical structure; therefore, the velvet material has a significantly different appearance from the hard surface.

[0023] The existing material optical reflection model is modeled by the statistical characteristics of the microscopic surface to describe its forward scattering characteristics; refer to Figure 2 , the reflectivity of the object surface is F0, the roughness is r, the normal direction is n, the light source direction is l, and the reflection direction is v. The reflection model of the object is expressed as: f=F*D*V / (4*dot(n,l)*dot(n,l)), F represents the Fresnel reflection property of the object, V represents the attenuation of reflected light caused by occlusion between microscopic surface structures, and D describes the distribution of reflected light.

[0024] Continue to refer Figure 1 ,Since the current material optical reflection model is only applicable to hard surfaces, its optical reflection property is that the reflected light is mostly concentrated in the forward scattering area; therefore, the velvet material needs to improve D and V so that it can simultaneously describe the forward and backward scattering optical reflection characteristics caused by the microstructure of the velvet material, thereby obtaining a more realistic drawing effect.

[0025] Embodiment 1: This embodiment provides a method for realistically rendering flannel fabric material, which specifically includes the following steps.

[0026] Step S1, calculate the half-angle vector according to the light source direction and the observation direction of the object surface; calculate the reflection intensity according to the reflectivity of the object surface and the half-angle vector; specifically, this step includes the following sub-steps.

[0027] Step S11, the reflectivity of the object surface is F0, the roughness is r, the normal direction is n, the light source direction is l, and the observation direction is v. According to the light source direction l and the observation direction v, the half-angle vector calculated is: h=(l+v) / 2.

[0028] Step S12, the calculated reflection intensity is: F=F0+(1-F0)*dot(h,l) 5 Among them, dot(h,l) is the angle between the half-angle vector h and the light source direction l.

[0029] In this embodiment, the reflection intensity F is calculated according to the half-angle vector and the corresponding angle, which facilitates subsequent calculations.

[0030] Step S2, calculating the normal distribution function according to the roughness and intermediate quantity of the surface of the object; specifically, this step includes the following sub-steps.

[0031] Step S21, calculate the intermediate value y from the angle between the half-angle vector h and the surface normal n of the object, specifically: y = max(1-dot(h,n) 2,0.0078); In this step, an intermediate quantity y is introduced to facilitate calculation.

[0032] Step S22, the normal distribution function D is calculated from the light source direction l, the observation direction v and the intermediate quantity y of the object surface, specifically: D = y (1 / 2r) *(2+1 / r) / (2*π); In this step, the normal distribution function D is calculated to facilitate subsequent calculations.

[0033] Step S3, defining relevant parameters, and obtaining a first function and a second function respectively, and calculating a geometric occlusion factor according to the first function and the second function; specifically, this step includes the following sub-steps.

[0034] Step S31, calculate and obtain the first function l(x,r) according to relevant parameters, specifically: l(x,r)=a / (b*x c +1)+d*x+e; Among them, a, b, c, d and e are related definition parameters; more specifically, a=25.32*r2+21.54*(1-r2), b=3.32*r2+3.82*(1-r2), c=0.16*r2+0.19*(1-r2), d = -1.27*r2-1.97*(1-r2), e=-4.85*r2-4.32*(1-r2), r2=(1-r) 2 .

[0035] In this embodiment, the relevant parameters a, b, c, d, and e are all related to r2, and r2 is determined by the roughness.

[0036] Step S32, calculate and obtain the second function T(x, r), if x<0.5, T(x, r)=e l(x,r) ; If x>=0.5, T(x,r)=e (2*l(0.5,r)-l(1-x,r)) .

[0037] Step S33, calculate and obtain the geometric occlusion factor, which is specifically: V=1 / (1+T(dot(v,n),r)+T(dot(l,n),r) 1+2*(1-dot(l,n)^8 ); Among them, dot(v,n) and dot(l,n) are the angles between the observation direction v, the light source direction l and the surface normal n of the object respectively. In this embodiment, the geometric occlusion factor V is calculated to facilitate subsequent calculations.

[0038] Step S4, according to the reflection model of the object, calculate the object reflection function; the object reflection function is specifically: When calculating, just substitute the relevant parameters in the above steps.

[0039] Step S5, drawing simulation is to observe the brightness of the object illuminated by the light source from the direction of the virtual camera; traverse each pixel of the virtual camera; calculate the brightness of each pixel, so as to draw a complete image; specifically, if the light intensity of the light source emitted by the light source in the direction l is e, then the observation direction v obtained from the i-th pixel of the virtual camera i The brightness of the object seen is: R i =f(l,v i )*e*dot(n, l); traverse each pixel of the virtual camera and calculate the R of each pixel i , you can get the complete drawn image.

[0040] refer to Figure 3 , which is a comparison diagram of flannel drawn by a realistic rendering method of flannel fabric material of the present invention and a rendering in the prior art, wherein the left side is a rendering of flannel material in the prior art, and the right side is a rendering of a realistic rendering method of flannel fabric material of the present invention; it can be clearly seen that the flannel material rendered by the present invention is more realistic.

[0041] In this embodiment, the half-angle vector is first calculated according to the light source direction and the observation direction of the object surface; the reflection intensity is calculated according to the half-angle vector and the angle between the half-angle vector and the light source direction; then the normal distribution function is calculated according to the intermediate quantity; in order to calculate the geometric occlusion factor, the first function and the second function are defined and obtained; after the reflection function of the object is calculated, a complete image is drawn; the present invention designs a velvet material drawing model with the characteristics of forward and backward optical reflection, so that the drawing result of the velvet material is more realistic.

[0042] In step S1 of this embodiment, the half-angle vector h is first obtained, and then the reflection intensity is calculated according to the reflectivity, the angle between the half-angle vector and the light source direction l.

[0043] In this embodiment, the purpose of step S2 is to calculate the normal distribution function D. In this process, the intermediate quantity y is first calculated, and finally the normal distribution function D is calculated based on the intermediate quantity.

[0044] In step S3 of this embodiment, a first function and a second function are defined respectively, and dot(v,n) and dot(l,n) are substituted into the first function and the second function to finally obtain a geometric occlusion factor.

Claims

1. A method for realistic rendering of flannel fabric material, characterized in that: The following steps are involved: S1, according to the light source direction and observation direction of the object surface, the half-angle vector is calculated; according to the reflectivity of the object surface and the half-angle vector, the reflection intensity is calculated; S2, according to the roughness of the surface of the object and the intermediate quantity, the normal distribution function is calculated; S3, defining relevant parameters, and obtaining a first function and a second function respectively, and calculating a geometric occlusion factor according to the first function and the second function; S4, calculating the object reflection function according to the object reflection model; S5, the drawing simulation is the brightness of the object illuminated by the light source observed from the direction of the virtual camera; Traverse every pixel of the virtual camera; Calculate the brightness of each pixel to draw the complete image.

2. The method for realistically rendering flannel fabric material according to claim 1, characterized in that: The step S1 includes the following steps: S11, the reflectivity of the object surface is F0, the roughness is r, the normal direction is n, the light source direction is l, and the observation direction is v. According to the light source direction l and the observation direction v, the half-angle vector calculated is: h=(l+v) / 2; S12, the calculated reflection intensity is: F=F0+(1-F0)*dot(h,l) 5 Among them, dot(h,l) is the angle between the half-angle vector h and the light source direction l.

3. A method for realistic rendering of flannel fabric material according to claim 1 or 2, characterized in that: The step S2 comprises the following steps: S21, the intermediate quantity y is calculated from the angle between the half-angle vector h and the surface normal n of the object, specifically: y=max(1-dot(h,n) 2 ,0.0078); S22, calculate the normal distribution function D from the light source direction l, the observation direction v and the intermediate quantity y on the surface of the object, specifically: D = y (1 / 2r) *(2+1 / r) / (2*π).

4. The method for realistically rendering flannel fabric material according to claim 3, characterized in that: The step S3 comprises the following steps: S31, calculate and obtain the first function l(x,r) according to relevant parameters, specifically: l(x,r)=a / (b*x c +1)+d*x+e; Among them, a, b, c, d and e are related definition parameters; S32, calculate and obtain the second function T(x, r), if x<0.5, T(x, r)=e l(x,r) ; If x>=0.5, T(x,r)=e (2*l(0.5,r)-l(1-x,r)) ; S33, calculate the geometric occlusion factor, specifically: V=1 / (1+T(dot(v,n),r)+T(dot(l,n),r) 1+2*(1-dot(l,n)^8 ); Among them, dot(v,n) and dot(l,n) are the angles between the observation direction v, the light source direction l and the surface normal n of the object.

5. A method for realistic rendering of flannel fabric material according to claim 1, 2 or 4, characterized in that: The object reflection function is specifically:

6. The method for realistically rendering flannel fabric material according to claim 5, characterized in that: In step S5: if the light intensity of the light source in the light source direction l is e, then the observation direction v obtained from the i-th pixel of the virtual camera is i The brightness of the object seen is: R i =f(l,v i )*e*dot(n,l)。 7. The method for realistically rendering flannel fabric material according to claim 4, characterized in that: The relevant definition parameters in step S31 are specifically: a=25.32*r2+21.54*(1-r2), b=3.32*r2+3.82*(1-r2), c=0.16*r2+0.19*(1-r2), d=-1.27*r2-1.97*(1-r2), e=-4.85*r2-4.32*(1-r2), r2=(1-r) 2 。

Citation Information

Patent Citations

  • Glitter powder fabric real-time rendering method in realistic garment rendering

    CN113096229A