Rendering processing method and device, computer equipment and storage medium

By obtaining the coefficient of anisotropic highlight and determining the highlight term, the problem of high rendering complexity in the existing technology is solved, flexible rendering of anisotropic highlight target objects is achieved, rendering efficiency and accuracy are improved, and it is suitable for mobile platform.

CN118570358APending Publication Date: 2024-08-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310223487.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively render target objects containing anisotropic highlights. It requires expanding the target object material in the material library of the rendering engine and performing a large number of operations, resulting in high rendering complexity.

Method used

By obtaining the anisotropic coefficient of the anisotropic highlight of the target object to be rendered, the highlight item is determined, and the rendering process is performed based on the coefficient to improve the flexibility and efficiency of rendering.

Benefits of technology

It achieves flexible and accurate rendering of anisotropic highlight target objects, reduces rendering complexity, supports deployment on mobile platforms, and optimizes rendering effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570358A
    Figure CN118570358A
Patent Text Reader

Abstract

The embodiment of the invention discloses a rendering processing method and device, computer equipment and a storage medium. The method comprises the steps that a to-be-rendered target object is acquired; the target object comprises anisotropic highlight to be rendered; obtaining an anisotropic coefficient of anisotropic highlight to be rendered, wherein the anisotropic coefficient is used for constraining a rendering effect of the anisotropic highlight to be rendered; determining a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used for indicating an area of the anisotropic highlight to be rendered in the target object at a current observation angle; and the target object is rendered by adopting the highlight item of the target object, and the rendered target object comprises the rendered anisotropic highlight, so that the rendering effectiveness and flexibility of the target object comprising the anisotropic highlight can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a rendering processing method, apparatus, computer equipment and storage medium. Background Art

[0002] With the continuous development of computer technology, current computer technology can be used to achieve rendering of different objects. When the target object is rendered using a physically based rendering method, since the target object has object highlights in the corresponding rendering scene, the current rendering of the target object assumes that the target object's corresponding highlight to be rendered is isotropic. However, with the continuous enrichment of current rendering scenes, there is a high demand for rendering anisotropic highlights. If you want to achieve the rendering of target objects with anisotropic highlights, you need to first expand the target object material in the material library of the rendering engine, and then use a large number of operations to achieve it. It can be seen that how to achieve flexible and effective rendering of target objects with anisotropic highlights has become a current research hotspot. Summary of the invention

[0003] The embodiments of the present invention provide a rendering processing method, apparatus, computer equipment and storage medium, which can improve the rendering effectiveness and flexibility of a target object containing anisotropic highlights.

[0004] In one aspect, an embodiment of the present invention provides a rendering processing method, comprising:

[0005] Acquire a target object to be rendered; the target object includes anisotropic highlights to be rendered;

[0006] Obtaining an anisotropy coefficient of an anisotropic highlight to be rendered, wherein the anisotropy coefficient is used to constrain a rendering effect of the anisotropic highlight to be rendered;

[0007] Determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate the area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle;

[0008] The target object is rendered using the highlight item of the target object, and the rendered target object includes rendered anisotropic highlights.

[0009] In another aspect, an embodiment of the present invention provides a rendering processing device, comprising:

[0010] An acquisition unit, used for acquiring a target object to be rendered; the target object includes anisotropic highlights to be rendered;

[0011] The acquisition unit is further used to acquire an anisotropy coefficient of the anisotropic highlight to be rendered, where the anisotropy coefficient is used to constrain the rendering effect of the anisotropic highlight to be rendered;

[0012] A processing unit, configured to determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate an area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle;

[0013] The processing unit is further used to use the highlight item of the target object to render the target object, and the target object after rendering includes rendered anisotropic highlights.

[0014] In another aspect, an embodiment of the present invention provides a computer device, including a processor, an input device, an output device, and a memory, wherein the processor, the input device, the output device, and the memory are interconnected, wherein the memory is used to store a computer program that supports the computer device to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the following steps:

[0015] Acquire a target object to be rendered; the target object includes anisotropic highlights to be rendered;

[0016] Obtaining an anisotropy coefficient of an anisotropic highlight to be rendered, wherein the anisotropy coefficient is used to constrain a rendering effect of the anisotropic highlight to be rendered;

[0017] Determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate the area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle;

[0018] The target object is rendered using the highlight item of the target object, and the rendered target object includes rendered anisotropic highlights.

[0019] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are executed by a processor, the program instructions are used to execute the rendering processing method described in the first aspect.

[0020] In the embodiment of the present application, after the computer device determines the target object to be rendered, it can obtain the anisotropic parameters of the various anisotropic highlights to be rendered in the target object from the operation panel, and then determine the highlight items when rendering the target object based on the rendering effect constrained by the anisotropic parameters. When the computer device determines the highlight items of the target object based on the anisotropic coefficient, it can combine the trigger operation of the bidirectional highlight in the operation panel to determine the calculation method of the highlight items of the target object by the computer device when determining the highlight items. In addition, since the operation panel also supports the input of parameters such as highlight color, the corresponding user can realize flexible control of the calculation of the highlight items based on the operation panel, thereby improving the flexible control of the computer device for the calculation results of the highlight items of the target object, and improving the flexible adjustment of the material performance effect of the target object. Based on the determination of the highlight item of the target object by the computer device, the computer device can use the calculated highlight item to render the target object, and obtain a rendered target object containing anisotropic highlights, so that the computer device can effectively render the anisotropic highlights based on the input anisotropic coefficients, thereby improving the rendering efficiency of the computer device in rendering the target object, and also enabling the computer device to achieve flexibility and accuracy in rendering the target object. In addition, based on the operation panel, the computer device can effectively set the parameters required for the target object when rendering, so that the rendering processing method can also be deployed on a mobile platform to achieve effective rendering of the target object based on the input instructions of the operation panel, and based on the deployment on the mobile platform, it can ensure that the mobile platform guarantees the rendering performance of the target object under the premise of a small number of instructions, thereby optimizing the rendering effect of the mobile platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0022] Figure 1a is a schematic diagram of an anisotropic feature provided by an embodiment of the present invention;

[0023] Figure 1b is a schematic diagram illustrating a highlight item provided by an embodiment of the present invention;

[0024] Figure 1c is a schematic diagram of a rendering processing system provided by an embodiment of the present invention;

[0025] Figure 2is a schematic flow chart of a rendering processing method provided by an embodiment of the present invention;

[0026] Figure 3a is a schematic diagram of highlight formation provided by an embodiment of the present invention;

[0027] Figure 3b is a schematic diagram of an operation panel provided by an embodiment of the present invention;

[0028] Figure 3c is a schematic diagram of rendering satin fabrics provided by an embodiment of the present invention;

[0029] Figure 3d is a schematic diagram of a satin fabric obtained by rendering provided by an embodiment of the present invention;

[0030] Figure 4 is a schematic block diagram of a rendering processing device provided by an embodiment of the present invention;

[0031] Figure 5 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The embodiment of the present application proposes a rendering processing method, so that when a computer device performs rendering processing on a target object containing anisotropic highlights to be rendered, the computer device can first obtain the anisotropy coefficient of the anisotropic highlights to be rendered, and then after determining the highlight items using the obtained anisotropy coefficient, the target object can be rendered using the determined highlight items, thereby obtaining the target object containing anisotropic highlights, so that the computer device can achieve rendering processing of the target object containing anisotropic highlights based on the anisotropic coefficient, thereby enabling the computer device to achieve rendering processing of the target object containing anisotropic highlights based on the anisotropic coefficient, so that the highlights corresponding to the rendered target object can show anisotropic characteristics, and further enabling the computer device to achieve rendering of the target object containing anisotropic highlights based on the setting of simple parameters (i.e., the anisotropy coefficient), thereby improving the rendering flexibility of the target object containing anisotropic highlights and reducing the rendering complexity of the target object containing anisotropic highlights. Among them, anisotropic highlights refer to highlights with anisotropic characteristics, and anisotropic characteristics are relative to isotropic characteristics. The isotropic characteristic means that at a rendering point of the target object, when observing the rendering point from different observation angles, the observation results corresponding to the rendering point are consistent. For example, when observing rendering point A of the target object with isotropic highlights, if the result of observing the rendering point A from the left angle of the rendering point A is that the rendering point A is a highlight point, then the result of observing the rendering point A from the right angle of the rendering point A is also that the rendering point A is a highlight point. The anisotropic feature means that when the same rendering point of the target object is observed at different observation angles, the observation results corresponding to the rendering point may be different. Therefore, for a rendering point B of the target object with anisotropic highlights, when the rendering point B is observed from the left and right sides respectively, the observation results obtained may be two observation results: rendering point B is a highlight point and rendering point B is not a highlight point.

[0033] In one embodiment, a target object with anisotropic highlights generally refers to an object whose corresponding object material is a material with elongated texture distribution on the surface. For a target object with elongated texture distribution on the surface, the highlights will be distributed along the arrangement direction of the elongated textures on the surface of such material, so that the presented highlights have anisotropy with different optical characteristics from ordinary highlights. Among them, the target object with anisotropic highlights can be, for example, satin fabrics, hair, CDs, or brushed metals. The anisotropic characteristics of the anisotropic highlights can be shown in 1a, and since the anisotropic highlights are distributed based on the texture arrangement in the target object, then when a certain texture of the target object is as shown in Figure 1a When the texture is indicated by the T direction, if the rendering point is as follows Figure 1a At point A shown in the figure, the direction of the light source is the direction indicated by L. Therefore, for the rendering point A, since the normal corresponding to its texture (that is, the direction indicated by N) is always in the plane formed by T and V, the normal changes with the change of the observation direction (or the line of sight, that is, the direction indicated by V), which makes the rendering highlight corresponding to this point show anisotropic characteristics.

[0034] When a computer device renders a target object containing anisotropic highlights to be rendered, the anisotropic coefficient that needs to be obtained is a coefficient used to constrain the rendering effect corresponding to the anisotropic highlights to be rendered. Based on the acquisition of the anisotropic coefficient by the computer device, the computer device can calculate the highlight item of the target object based on the acquired anisotropic coefficient, and then the obtained highlight item can be used for rendering. In one embodiment, when the observation direction is very close to the reflection direction of the light source, that is, when the angle between the observation direction and the reflection direction of the light source is less than the angle threshold, it is a highlight item. Specifically, Figure 1b As shown, the viewing direction can be Figure 1b The direction marked by v in the figure, and the reflection direction of the light source can be Figure 1b In the direction marked by R in the image, that is to say, based on the highlight item determined by the computer device, the computer device can determine, based on the highlight item, the area where the anisotropic highlight to be rendered is located in the target object at the current observation angle (i.e., the current observation direction). This ensures that when the computer device renders the target object based on the determined highlight item, the rendered target object contains anisotropic highlights, thereby improving the convenience and reliability of the computer device for the target object containing anisotropic highlights.

[0035] The rendering processing method proposed in the embodiment of the present application can be applied to Figure 1cIn the rendering processing system shown, the rendering processing system includes a computer device 10 and a terminal device 11, the terminal device 11 is used to send an anisotropy coefficient to the computer, and the computer device 10 can obtain the anisotropy coefficient from the terminal device 11, and further calculate the highlight item based on the anisotropy coefficient obtained from the terminal device 11, and perform rendering processing of the target object based on the determined highlight item, so that the rendered target object is an object containing anisotropic highlights. In one embodiment, the computer device 10 can be a terminal device or a server, wherein when the computer device 10 is a terminal device, the computer device 10 and the terminal device 11 can be integrated into one terminal, and in this case, the computer device 10 can be a processing device (or processing module) integrated into the terminal, and when the computer device 10 is a server, the server can be composed of one physical server or a server cluster composed of multiple physical servers. In the embodiment of the present application, the specific device form of the computer device is not limited.

[0036] See also Figure 2 , is a schematic flow chart of a rendering processing method proposed in an embodiment of the present application, such as Figure 2 As shown, the method may include:

[0037] S201, obtaining a target object to be rendered; the target object includes anisotropic highlights to be rendered.

[0038] S202, obtaining an anisotropy coefficient of anisotropic highlights to be rendered, where the anisotropy coefficient is used to constrain the rendering effect of the anisotropic highlights to be rendered.

[0039] In step S201 and step S202, the target object to be rendered obtained by the computer device when rendering the target object is a target object containing anisotropic highlights to be rendered, wherein the target object containing anisotropic highlights to be rendered refers to an object composed of a material with special optical properties, so that based on the surface distribution of the constituent material, the surface highlights of the target object present anisotropic characteristics. In one embodiment, highlights refer to the area with the highest brightness observed by the observed object after a light source is irradiated onto the surface of an object (such as the surface of a target object), wherein when the light source is irradiated onto the surface of an object, not only will it be reflected on the surface of the object, but part of the light source will also be reflected inside the object before penetrating and refracting out after passing through the interior of the object. Specifically, Figure 3a As shown, the incident light can be Figure 3a The light represented by L1 in the figure is then the incident light L1 is directly reflected by the surface of the object. Figure 3aL2 can be used to represent it, the part of the light source of the incident light L1 that enters the object is represented by L3, and the light that is refracted inside the object and then projected is represented by L4. Then, it can be understood that the closer the observation angle of the observed object is to the reflected light L2 or scattered light L4 corresponding to the light source, the easier it is to observe highlights on the observed object. Anisotropic highlights mean that when the light source remains unchanged, if different observation angles are used to observe the target object, the observed highlights change with the change of the observation angle. In other words, anisotropic highlights refer to highlights that change with the change of the observation angle.

[0040] In one embodiment, the light generated by the light source irradiating the surface of the object may be referred to as the incident light, the light directly reflected by the incident light source from the surface of the object may be referred to as the reflected light, and the light projected by the incident light after being refracted inside the object may be referred to as the scattered light. Among them, the highlight formed by the reflected light after the incident light is directly reflected from the surface of the object may be referred to as the primary highlight (or top highlight), and the scattered light projected after being refracted inside the object may be referred to as the secondary highlight (or secondary highlight). Generally speaking, the top highlight is the area with the highest brightness on the surface of the object, and the secondary highlight is the area with the highest brightness on the surface of the object except the top highlight.

[0041] When a computer device renders a target object, after obtaining a target object containing anisotropic highlights to be rendered, the anisotropic coefficient of the anisotropic highlights to be rendered can be further obtained, so as to use the obtained anisotropic coefficient to constrain the rendering effect of the anisotropic highlights to be rendered. Among them, the anisotropic coefficient is a numerical value input by the operation object, and the anisotropic coefficient is a parameter with special directionality, and can be used to specifically describe the physical objects that appear different physical phenomena when they change based on the direction. In the embodiment of the present application, the anisotropic coefficient of the anisotropic highlights can be used to describe the physical phenomenon that the highlights observed by the target object are different when they are based on different observation angles. Then it can be understood that the highlights obtained by the computer device when rendering the target object based on the anisotropic coefficient are anisotropic highlights.

[0042] When the computer device obtains the anisotropic coefficient, the anisotropic value input by the operating object can be used as the obtained anisotropic coefficient, and when the operating object inputs the anisotropic value, the anisotropic value can be input through the operating panel output by the computer device. The operating panel output by the computer device may include a numerical input slider for the anisotropic coefficient, and the operating object can move the input slider to input the anisotropic coefficient, or the operating panel output by the computer device may also include an input box for the anisotropic coefficient, so that the operating object can input the anisotropic value in the input box.

[0043] In one embodiment, the rendering process of the target object by the computer device is implemented based on the game engine (Unity), and is mainly implemented by the pipeline based on physical rendering (PBR) in Unity, wherein Unity is a real-time three-dimensional (3D) development platform, which can provide a physically based rendering pipeline PBR, and a high-definition rendering pipeline HDRP. Unity supports a variety of graphics application programming interfaces (Application, API), specifically including: DirectX (a multimedia API), Metal (a low-level rendering application API), OpenGL (open graphics library) and Vulkan (a cross-platform API). At the same time, Unity also supports multi-end development, including development such as personal computer (PC) end, Android end development, etc. In the embodiment of the present application, the rendering of the target object implemented by Unity is mainly implemented by the part related to the fragment shader programming part of Unity, wherein the fragment shader programming part of Unity is a shader using C++ (a programming language) as the programming language.

[0044] The target object is rendered by Unity, which is a real-time rendering of the target object. The real-time rendering method of the target object is a forward rendering method. The real-time rendering of the target object is processed by this rendering method, and the final rendering result can be obtained by rendering only once. Among them, the forward rendering process mainly includes the process of vertex data input, vertex shading, surface subdivision, geometric shading, fragment packaging, fragment culling, rasterization, fragment shading, testing and mixing. The fragment shader programming part mentioned in the embodiment of the present application realizes the rendering of the target object, which is the fragment shading process in the forward rendering process. That is to say, Unity can calculate the pixel color of each pixel in the target object in the fragment shading process of forward rendering, so as to obtain the rendering result corresponding to the target object. In one embodiment, based on the characteristic of Unity for rendering the target object, when the computer device uses Unity to render the target object, the target object may be satin fabric, hair or a CD, etc. That is to say, the computer device may implement the rendering of satin fabric, hair or a CD in the game based on Unity, and the satin fabric in the game may specifically be the clothes of different virtual game characters in the game scene, etc., and the hair may also be the hair of each virtual game character in the game scene, and the CD may be a CD prop in the game scene.

[0045] When Unity is used to render the target object, it not only involves the acquisition of anisotropy coefficients, but also involves the acquisition of noise and the acquisition of rendering textures, etc., and the rendering process performed by Unity, the acquisition of noise and rendering texture is usually achieved through mapping, that is, the corresponding operation object can send the noise map and texture map to the computer device through the corresponding operation panel, so that the computer device can achieve the acquisition of noise and rendering texture. Among them, the noise acquired by the computer device can be used to smooth the rendering color corresponding to the target object. Then, after the computer device uses the smoothed rendering color to render the target object, the anisotropic highlights contained in the target object can be made more natural, so as to improve the rendering effect of the target object. In addition, the rendering texture includes the texture of the object surface (i.e., the concave and convex feeling of the object surface), and also includes the corresponding color pattern of the object surface. Therefore, based on the acquisition of the rendering texture by the computer device, when the target object is subsequently rendered based on the rendering texture, the authenticity of the rendered target object can be improved, thereby improving the rendering effect of the target object.

[0046] The noise map sent to the computer device by the operating object through the corresponding operating panel is a kind of data that records the noise value, while the texture map is data used to record the surface detail texture of the object. The acquisition of relevant data based on the corresponding map can effectively save the calculation process of the required relevant data and improve the data acquisition efficiency of the computer device. The process of using the map to acquire relevant data can also be called mapping technology, that is, mapping the relevant data recorded in the map to achieve the acquisition of relevant data. Then, when the computer device renders the target object, it can achieve the acquisition of the required relevant data by acquiring the corresponding map, and based on the visual effect brought by the map to the corresponding object, the computer device can further improve the rendering effect and rendering quality of the target object based on the mapping technology. In one embodiment, the operating panel for the operating object to upload the noise map and texture map can be the same as the operating panel for the operating object to set the anisotropy coefficient. The operating panel can be specifically as follows Figure 3b As shown in the figure, in this operation panel, in addition to uploading noise maps and texture maps, and setting anisotropy coefficients, other parameters required for the target object rendering process can also be set, such as highlight intensity, highlight color, etc. Figure 3b The operation panel shown in the figure also includes the settings of two attribute parameters, tiling (a setting parameter for a texture attribute) and offset (another setting parameter for a texture attribute), and the two attribute parameters, tiling and offset, can be used to define the used texture area in the corresponding texture uploaded by the operation object, wherein offset is used to indicate the starting position of the corresponding texture used, and its corresponding value range is 0 to 1, and tiling is used to indicate that the size area indicated by the corresponding tiling is divided from the offset position, and the part of the area exceeding the size is proportionally generated into a new area for splicing, wherein the area range of the area is generally -1 to 1, that is, tiling indicates how many times the used texture is the input texture, and those exceeding 1 will be automatically spliced, and offset indicates the starting position of the used texture at the input texture, if the position exceeds 1, it will be modulo 1, then the operation object can achieve different rendering effects when rendering the target object based on the corresponding texture by setting the two attribute parameters, tiling and offset.

[0047] In one embodiment, the computer device acquires the anisotropic coefficient based on the operation panel, and the acquired anisotropic coefficient has a value range of -1 to 1. Generally speaking, in order to ensure the rendering effect of the anisotropic highlights to be rendered in the target object, the operation object generally sets the anisotropic coefficient to 0.839 to ensure the naturalness of the rendered anisotropic highlights. Among them, the value range of the anisotropic coefficient is a value range set based on rendering experience, and under the constraint of this range, the anisotropic coefficient can make the accuracy of the anisotropic highlights rendered by the computer device improve, thereby improving the rendering effect of the anisotropic highlights, and the positive and negative values ​​of the anisotropic coefficient within the value range are used to indicate the tendency of the anisotropic highlights in the horizontal and vertical directions. In one embodiment, when the value of the anisotropic coefficient is a positive number, it is more inclined to the horizontal anisotropic highlights, and when the value of the anisotropic coefficient is a positive number, it is more inclined to the horizontal anisotropic highlights, and when the value of the anisotropic coefficient is a positive number, it is more inclined to the horizontal anisotropic highlights. When the value of the number is negative, it is more inclined to the longitudinal anisotropic highlight. Therefore, the computer device can render the anisotropic highlight of the target object based on the positive or negative value of the anisotropic coefficient, and render it based on the tendency indicated by the positive or negative value of the anisotropic coefficient, thus achieving effective control of the rendering result of the anisotropic highlight in the target object based on the anisotropic coefficient, thereby improving the effectiveness and user satisfaction of the computer device in rendering the target object containing anisotropic highlights. After the computer device determines the anisotropic coefficient corresponding to the target object containing the anisotropic highlight to be rendered, the computer device can determine the highlight item of the target object according to the anisotropic coefficient, and thus can render the target object based on the determined highlight item.

[0048] S203, determining a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate a region of anisotropic highlights to be rendered in the target object at a current viewing angle.

[0049] When the computer device determines the highlight item of the target object based on the anisotropy coefficient, it can be determined in combination with the object material of the target object and the material distribution characteristics of the object material. In a specific implementation, when the computer device determines the highlight item in combination with the object material and the material distribution characteristics of the object material, it can first obtain the object material of the target object and the material distribution characteristics of the object material. In one embodiment, the object material of the target object obtained by the computer device is a material that makes the target object contain anisotropic highlights to be rendered. Then, based on the acquisition of the object material of the target object by the computer device, the computer device can determine that the highlights in the target object to be rendered are anisotropic highlights. After acquiring the object material of the target object, the computer device will also determine the material distribution characteristics of the object material, wherein the material distribution characteristics are used to reflect the distribution of the attribute parameters of the surface of the target object under the corresponding object material. The attribute parameters of the surface of the target object include: normal, tangent and sub-tangent, etc. In one embodiment, the normal line of the target object surface refers to: a three-dimensional vector perpendicular to the plane in the three-dimensional plane, and at a point on the surface, it is a vector perpendicular to the tangent plane at that point, which can be represented by N; the tangent line refers to a straight line intersecting a point in the curve, which can be represented by T; and the secondary tangent line can also be called a secondary normal line, which specifically refers to a vector that is perpendicular to both the normal line and the tangent line, which can be represented by B.

[0050] After the computer device obtains the object material and the corresponding material distribution characteristics of the target object, it can further determine the highlight items of the target object based on the obtained anisotropy coefficient and material distribution characteristics. When the computer device determines the highlight items of the target object based on the anisotropy coefficient and material distribution characteristics, it can first obtain the material roughness of the object material, wherein the material roughness can be represented by roughness. When the computer device obtains the material roughness of the object material corresponding to the target object, it can use the roughness value input by the operating object as the material roughness of the object material. After the computer device obtains the material roughness of the object material, the computer device can calculate the lateral anisotropy parameters (which can be expressed as r) of the anisotropic highlights to be rendered in the target object based on the material roughness and the anisotropy coefficient. x ) and the longitudinal anisotropy parameter (expressed as r y ), wherein the computer device calculates the transverse anisotropy parameter and the longitudinal anisotropy parameter based on the material roughness and the anisotropy coefficient as shown in Formula 1.

[0051] r x1 = roughness 2 *(1+anisotropic)

[0052] r y1 = roughness 2 *(1-anisotropic) Formula 1

[0053] Wherein, anistropic represents the input anisotropic coefficient, that is, the coefficient value of the input anisotropic coefficient. In one embodiment, when the computer device calculates the highlight item of the target object, since the anisotropic highlights to be rendered contained in the target object include: the top anisotropic highlights to be rendered and the secondary anisotropic highlights to be rendered, then, r x1 It can represent the lateral anisotropy parameter of the top anisotropic highlight, and r y1 The longitudinal anisotropy parameter of the top-layer anisotropic highlight can be represented. In one embodiment, the top-layer anisotropic highlight refers to the top-layer highlight with anisotropic characteristics, and the secondary anisotropic highlight refers to the secondary highlight with anisotropic characteristics, and the top-layer highlight is produced by the refraction of the light generated by the light source, and the secondary highlight refers to the scattered light of the light source after passing through the inside of the target object, so it can be understood that the top-layer anisotropic highlight refers to: the highlight with anisotropic characteristics produced by the refraction of the light of the light source, and the secondary anisotropic highlight refers to: the highlight with anisotropic characteristics produced by the light generated by the light source after being scattered inside the target object.

[0054] For a secondary anisotropic highlight in the anisotropic highlight to be rendered, a transverse anisotropy parameter and a longitudinal anisotropy parameter of the secondary anisotropic highlight may be as shown in Formula 2.

[0055] r x2 = roughness 2 *(1+anisotropic*g)

[0056] r y2 = roughness 2 *(1-anisotropic*g) Formula 2

[0057] Among them, r x2 It can represent the lateral anisotropy parameter of the secondary anisotropic highlight, and r y2 It can represent the longitudinal anisotropy parameter of the secondary anisotropic highlight, g represents the coefficient for calculating the secondary highlight anisotropy coefficient, and its corresponding value range is 0 to 1. In the embodiment of the present application, g can be taken as 0.9.

[0058] In one embodiment, since the computer device can first calculate the top-level highlight anisotropy coefficient and the secondary highlight anisotropy coefficient after obtaining the anisotropy coefficient, the computer device can further calculate the highlight item of the target object based on the calculated top-level highlight anisotropy coefficient and the secondary highlight anisotropy coefficient. Among them, after the computer device calculates the top-level highlight anisotropy coefficient based on the obtained anisotropy coefficient, the obtained top-level highlight anisotropy coefficient is two, and after the computer device calculates the secondary highlight anisotropy coefficient based on the obtained anisotropy coefficient, the obtained secondary highlight anisotropy coefficient is also two, and the specific calculation process can be shown in Formula 3.

[0059] a1=anisotropic

[0060] a2=-anisotropic

[0061] a3=anisotropic*g

[0062] a4=-anisotropic*g Formula 3

[0063] Among them, a1 represents the first top-level highlight anisotropy coefficient obtained after calculating the top-level highlight anisotropy coefficient based on the obtained anisotropy coefficient, a2 represents the second top-level highlight anisotropy coefficient obtained, and a3 represents the first secondary highlight anisotropy coefficient obtained after calculating the secondary highlight anisotropy coefficient based on the obtained anisotropy coefficient, and a2 represents the second secondary highlight anisotropy coefficient obtained.

[0064] Based on the top highlight anisotropy coefficient and the secondary highlight anisotropy coefficient determined by the computer device, the computer device can calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter based on the calculated top highlight anisotropy coefficient, including a1 and a2, and the calculated secondary highlight anisotropy coefficient, including a3 and a4. Specifically, the computer device can calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the top anisotropic highlight to be rendered in the target object according to the material roughness and at least two top highlight anisotropy coefficients; and calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the secondary anisotropic highlight to be rendered in the target object according to the material roughness and at least two secondary highlight anisotropy coefficients, respectively, and the calculation formula thereof can be shown as Formula 4.

[0065] r x1 = roughness 2 *(1+a1)

[0066] r y1 = roughness 2 *(1+a2)

[0067] r x2 = roughness 2 *(1+a3)

[0068] r y2 = roughness 2 *(1+a4) Formula 4

[0069] In the process of performing highlight items of the target object based on the anisotropy coefficient, the computer device needs to calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the anisotropic highlight to be rendered in the target object, and also needs to calculate the texture distribution parameter f of the target object according to the material distribution characteristics of the target object. In one embodiment, when the computer device calculates the texture distribution parameter of the target object according to the material distribution characteristics of the target object, it can first determine the half-angle vector according to the light source direction and the observation direction of the current rendering environment where the target object is located, wherein the determined half-angle vector is half of the angle between the light source direction and the observation direction, that is, the half-angle vector can be calculated based on the sum of the vector in the light source direction and the vector in the observation direction and taking half. In one embodiment, since the highlight item of the target object is generated when the angle between the observation direction and the reflection direction of the light source is less than the angle threshold, and the change in the angle between the observation direction and the reflection direction is the same as the change in the angle between the half-angle vector determined by the light source direction and the observation direction and the normal direction, in order to facilitate the computer device to calculate the highlight item, the computer device can determine the highlight item based on the half-angle vector. When determining the highlight item based on the half-angle vector, the corresponding texture distribution parameters can be first determined based on the half-angle vector, and then the determined texture distribution parameters can be used to determine the highlight item of the target object.

[0070] If the current rendering environment is a game scene, then the light source direction of the current rendering environment is the light source direction in the game scene, and the light source direction in the game scene is the light source direction generated by the light source included in the game scene, and the light source included in the game scene may be, for example, natural light in the game scene, or lights in the game scene, etc. The observation direction in the game scene may refer to the sight direction of the game object in the game scene when observing the target object, or the observation direction in the game scene may also refer to the direction in which the object operating the game object in the game scene observes the target object in the game screen.

[0071] In the process of calculating the texture distribution parameters of the target object by the computer device, the texture distribution function will also be obtained. Based on the acquisition of the texture distribution function, the computer device can determine the calculation rules for the texture distribution parameters. Further, the computer device can use the texture distribution function in combination with the half-angle vector and the material distribution characteristics to calculate the texture distribution parameters of the target object; wherein the material distribution characteristics of the target object include one or more of the following: normals, tangents and sub-tangents extracted from the normal map, wherein the normal map is a map used to calculate the details generated by the light in the model. In one embodiment, the calculation process of the computer device when using the texture distribution function to calculate the texture distribution parameters of the target object can be shown as Formula 5.

[0072]

[0073] Where T represents the tangent, H represents the half-angle vector, N represents the normal, B represents the bitangent, and dot represents the dot product operation. Then, TdotH represents the dot product of the tangent and the half-angle vector, BdotH represents the dot product of the bitangent and the half-angle vector, and NdotH represents the dot product of the normal and the half-angle vector. In one embodiment, r x The value can be r x1 or x2 , r y The value can also be r y1 or y2 , but in r x The value of r x1 When y The value of corresponds to r y1 , while in r x The value of r x2 When y The value of corresponds to r y2 As shown in Formula 5, the texture distribution parameter f of the target object determined by the computer device is related to the calculated transverse anisotropy parameter and the corresponding longitudinal anisotropy parameter. In one embodiment, since the transverse anisotropy parameters obtained by the computer device include the transverse anisotropy parameters of the top anisotropic highlight and the transverse anisotropy parameters of the secondary anisotropic highlight, and the longitudinal anisotropy parameters obtained also include the longitudinal anisotropy parameters of the top anisotropic highlight and the longitudinal anisotropy parameters of the secondary anisotropic highlight, respectively, then, when calculating the texture distribution parameter f of the target object, the computer device will respectively calculate the transverse anisotropy parameters of the top anisotropic highlight (that is, the above-mentioned r x1 ) and the longitudinal anisotropy parameter of the top anisotropic highlight (i.e., the r y1) determines a texture distribution parameter (denoted as f1), and similarly, the lateral anisotropy parameter of the secondary anisotropic highlight (that is, the above r x2 ) and the longitudinal anisotropy parameter of the secondary anisotropic highlight (i.e., the r y2 ), and another texture distribution parameter (denoted as f2) is determined. Among them, the transverse anisotropy parameter and the longitudinal anisotropy parameter refer to: the manifestation of the anisotropy parameter in the horizontal direction, and the manifestation of the anisotropy parameter in the vertical direction, respectively. Among them, the manifestation of the anisotropy parameter in the horizontal direction is used to describe the different physical phenomena that occur when the direction of the physical object changes in the horizontal direction, and the manifestation of the anisotropy parameter in the vertical direction is used to describe the different physical phenomena that occur when the direction of the physical object changes in the vertical direction.

[0074] In one embodiment, when rendering transverse anisotropic highlights and longitudinal anisotropic highlights, the computer device may also refer to the calculation process shown in Formula 6 to obtain another two groups of transverse anisotropic highlights and longitudinal anisotropic highlights.

[0075] r x3 = roughness 2 *(1-anisotropic)

[0076] r y3 = roughness 2 *(1+anisotropic)

[0077] r x4 = roughness 2 *(1-anisotropic*g)

[0078] r y4 = roughness 2 *(1+anisotropic*g) Formula 6

[0079] Among them, r x3 and r y3 is another transverse anisotropy parameter and another longitudinal anisotropy parameter of the top anisotropic highlight, and r x4 and r y4 is another transverse anisotropy parameter and another longitudinal anisotropy parameter of the secondary anisotropic highlight. x3 and r y3 , and for r x4 and r y4 The computer device may also determine two other texture distribution parameters, wherein the other two texture distribution parameters determined include x3 and ry3 The calculated texture distribution parameter f3 and the x4 and r y4 The calculated texture distribution parameter f4.

[0080] After the computer device calculates the transverse anisotropy coefficient, the longitudinal anisotropy coefficient and the texture distribution parameters, the transverse anisotropy parameters, the longitudinal anisotropy parameters and the texture distribution parameters of the target object can be used to determine the highlight item of the target object. In one embodiment, when the computer device uses the transverse anisotropy parameters, the longitudinal anisotropy parameters and the texture distribution parameters of the target object to determine the highlight item of the target object, the transverse anisotropy parameters, the longitudinal anisotropy parameters and the texture distribution parameters of the target object can be used to first determine the reference highlight item (which can be recorded as a specular term) corresponding to the target object. In one embodiment, when the computer device calculates the reference highlight item, it can first determine the reference highlight item (which can be recorded as a specular term) based on the determined texture distribution parameters f and transverse anisotropy parameters r. x and the longitudinal anisotropy parameter r y An intermediate parameter (G) is calculated, wherein the process of calculating the intermediate parameter G can be shown as Formula 7.

[0081] G=1 / (π*f 2 *r x *r y ) Formula 7

[0082] Among them, r involved in formula 7 x and r y The values ​​of can be the four groups of r mentioned above x and r y The calculated intermediate parameter G can also correspond to 4 values, including

[0083] After obtaining the four intermediate parameters, the computer device can use Formula 8 to calculate the reference highlight item corresponding to the target object.

[0084] specular term=G*SmithJointGGXVisibilityTerm(roughness,NdotL,NdotV)*π Equation 8

[0085] Among them, SmithJointGGXVisibilityTerm is a built-in occlusion relationship judgment function in Unity of the computer device, which is used to calculate whether a certain point is occluded by other points on the material, NdotL represents the dot product of the normal and the light source direction, and NdotV represents the dot product of the normal and the observation direction. In one embodiment, in the process of calculating the reference highlight items involved in the above-mentioned formulas 1 to 8, the normal N, tangent T, and sub-tangent B involved can all be extracted from the discovery map, thereby realizing the calculation of NdotL, NdotV, NdotH, TdotH, and BdotH. In addition, since the computer device involves four parameter values ​​in the process of determining the intermediate parameter G, the reference highlight items calculated by the computer device also include four, wherein the obtained reference highlight items include: two reference highlight items of the top-level anisotropic highlight, and two reference highlight items of the secondary anisotropic highlight. In one embodiment, the reference highlight items of the two top-level anisotropic highlights calculated by the computer device can be expressed as follows:

[0086] specular term1=G1*SmithJointGGXVisibilityTerm(roughness,NdotL,NdotV)*π

[0087] specular term3=G3*SmithJointGGXVisibilityTerm(roughness,NdotL,NdotV)*π;

[0088] In addition, the reference highlight items of the two secondary anisotropic highlights calculated by the computer device can be expressed as:

[0089] specular term2=G2*SmithJointGGXVisibilityTerm(roughness,NdotL,NdotV)*π

[0090] specular term4=G4*SmithJointGGXVisibilityTerm(roughness,NdotL,NdotV)*π.

[0091] After obtaining the reference highlight item of the top-level anisotropic highlight and the reference highlight item of the secondary anisotropic highlight, the computer device can perform weighted summation processing on the reference highlight item of the top-level anisotropic highlight and the reference highlight item of the secondary anisotropic highlight, and use the highlight item after the weighted summation as the highlight item of the target object. In a specific implementation, the computer device may first obtain a reference weight group for performing weighted summation processing on at least two reference highlight items of the top-level anisotropic highlight and at least two reference highlight items of at least two secondary anisotropic highlights, wherein the reference highlight items of the top-level anisotropic highlight obtained by the computer device may be respectively recorded as specular top1 and specular top2, and it can be understood that the specular top1 is the above-mentioned specular term1, and the specular top2 is the above-mentioned specular term3; in addition, the reference highlight items of the secondary anisotropic highlight obtained by the computer device may be respectively recorded as specular down3 and specular down4, and then, specular down3 is the above-mentioned specular term2, and specular down4 is the above-mentioned specular term4.

[0092] In one embodiment, after obtaining at least two reference highlight items of the top-level anisotropic highlight, at least two reference highlight item rows of at least two secondary anisotropic highlights and corresponding reference weight groups, the computer device can use the reference weight groups to perform weighted summation processing on at least two reference highlight items of the top-level anisotropic highlight, and to perform weighted summation processing on at least two reference highlight items of the secondary anisotropic highlights. Among them, when the computer device performs weighted summation processing on the reference highlight items of the top-level anisotropic highlights and the reference highlight items of the secondary anisotropic highlights, it uses the obtained reference weight groups to implement it respectively. Then, the reference weight groups obtained by the computer device can be one or two. When the reference weight groups obtained by the computer device are one, the computer device uses the reference weight values ​​in the same reference weight group to perform weighted summation processing on the reference highlight items of the top-level anisotropic highlights and the reference highlight items of the secondary anisotropic highlights; and if the computer device obtains two reference weight groups, the computer device will use the reference weight values ​​in one reference weight group to perform weighted summation processing on the reference highlight items of the top-level anisotropic highlights and the reference weight values ​​in another reference weight group to perform weighted summation processing on the reference highlight items of the secondary anisotropic highlights.

[0093] In the embodiment of the present application, the computer device mainly uses the reference weight values ​​in the same reference weight group to perform weighted summation processing. In one embodiment, since there are at least two reference highlight items of the top-level anisotropic highlight that undergoes weighted summation processing, the reference weight group obtained by the computer device also contains at least two reference weight values, and one reference weight value corresponds to one reference highlight item. If the number of reference highlight items of the corresponding anisotropic highlight is the two mentioned above, then the reference weight value in the reference weight group obtained by the computer device is also two. More specifically, the process of the computer device performing weighted summation processing based on the obtained reference weight group can be shown as Formula 9.

[0094] specular top=specular top1*a+specular top2*b

[0095] specular down=specular down3*a+specular down4*b Formula 9

[0096] Among them, specular top represents the highlight item of the top anisotropic highlight after weighted summation, specular down represents the highlight item of the secondary anisotropic highlight after weighted summation, and a and b represent the corresponding reference weight values ​​respectively.

[0097] When the computer device performs weighted summation processing based on the reference weight value in the reference weight group, the turn-on trigger operation for the bidirectional highlight can also be obtained, so that the value of the reference weight value in the reference weight group can be determined based on the turn-on trigger operation of the computer device on the bidirectional highlight. In one embodiment, the computer device can determine that at least two reference weight values ​​included in the reference weight group are non-zero values ​​when the turn-on trigger operation determines to turn on the bidirectional highlight; and when the turn-on trigger operation determines to turn off the bidirectional highlight, it is determined that among the at least two reference weights included in the reference weight group, only one reference weight value whose corresponding value is non-zero is included. In one embodiment, when the computer device determines that the bidirectional highlight is turned on, it indicates that the anisotropic highlights of the target object rendered by the computer device not only include anisotropic highlights in the horizontal direction, but also include anisotropic highlights in the vertical direction, and when the computer device determines to turn off the bidirectional highlight, the computer device only renders anisotropic highlights in the vertical direction (or horizontal direction) when rendering the anisotropic highlights of the target object. Therefore, based on the selection of whether the bidirectional highlight is turned on, the computer device can render anisotropic highlights based on the corresponding selection result.

[0098] In one embodiment, when the computer device acquires the bidirectional highlight opening trigger operation, Figure 3b The operation panel shown queries the two-way highlight option to determine. Specifically, the computer device may determine that the trigger operation is to determine to turn on the two-way highlight when determining that the two-way highlight option is turned on, and the reference weight values ​​contained in the determined reference weight group may all be 0.5, that is, a=0.5, b=0.5 as mentioned above; and when the computer device determines that the two-way highlight option is turned off, it is determined that the reference weight values ​​in the reference weight value have only one reference weight value of 1, and the other reference weight values ​​are all 0, that is, a=1, b=0 as mentioned above. In one embodiment, when the computer device determines that the two-way highlight option is turned on, the reference weight values ​​in the reference weight group determined by the computer device may also be other non-zero values, such as the above-mentioned a can be 0.7, b can be 0.3, and so on.

[0099] Based on the determination of the reference highlight item of the top-level anisotropic highlight after weighted summation and the determination of the reference highlight item of the secondary anisotropic highlight after weighted summation by the computer device, it can be understood that the highlight item of the target object determined by the computer device includes the reference highlight item of the top-level anisotropic highlight after weighted summation and the reference highlight item of the secondary anisotropic highlight after weighted summation. After determining the highlight item of the target object, the computer device can use the determined highlight item for rendering processing, and then execute step S204.

[0100] S204, rendering the target object using the highlight item of the target object, where the target object after rendering includes rendered anisotropic highlights.

[0101] When the computer device uses the highlight item of the target object to render the target object, it can first obtain the rendering indication parameter, the rendering color of the anisotropic highlight to be rendered in the target object, and the rendering function of the target object, and then the computer device can call the rendering function, and render the target object according to the rendering indication parameter, the rendering color and the determined highlight item. In one embodiment, when the computer device renders the target object based on the highlight item of the target object, when obtaining the rendering indication parameter, the computer device can first obtain the texture map and normal map required for reference when rendering the target object, and in addition to obtaining the texture map and normal map, the computer device will also obtain the metalness (denoted as m) required for reference when rendering the target object. In one embodiment, based on the acquisition of the metalness by the computer device, the computer device can determine the number of photons that are directly reflected and form the top-level highlight when the highlight of the target object is formed, and the number of photons that are diffusely reflected and form the secondary highlight by entering the interior of the target object. After the computer device acquires the texture map and the normal map, it can further determine the texture color (denoted as C) from the texture map. basecolor), and extract the normal value (denoted as N) from the normal map; then the texture color, normal value and metalness can be used as rendering indication parameters.

[0102] In one embodiment, when a computer device is rendering a target object, when acquiring the rendering color of anisotropic highlights to be rendered in the target object, the computer device may directly use the default highlight color as the rendering color. Generally speaking, the default highlight color is generally white, so the computer device may directly use white as the acquired rendering color. In another implementation, when acquiring the rendering color, the computer device may first acquire the light source color when rendering the target object in the current rendering environment, and the reference color that the target object is expected to present after the rendering is completed, wherein the light source color acquired by the computer device (which may be recorded as light color) refers to the light source color generated by the scene light source in the game scene, wherein the scene light source in the game scene may be a lamp in the scene or the sun in the scene, etc., and the reference color acquired by the computer device is the color input by the corresponding user. In one embodiment, the corresponding user may also obtain the reference color through the following methods: Figure 3b The input box corresponding to the highlight color in the operation panel shown is used to input a reference color (i.e., input color). Based on the acquisition of the light source color and the reference color by the computer device, the computer device renders the target object in combination with the scene light source and the user's expected color when rendering the target object, thereby improving the authenticity of the rendered target object.

[0103] In one embodiment, since the anisotropic highlights in the target object include top-level anisotropic highlights and secondary anisotropic highlights, the corresponding user can set different reference colors for the top-level anisotropic highlights and the secondary anisotropic highlights respectively when inputting the reference color through the operation panel.

[0104] In one embodiment, after obtaining the light source color and the reference color, the computer device may also determine the mixed noise from the input noise map, wherein the computer device may also determine the mixed noise from the input noise map. Figure 3b The input noise map is obtained from the operation panel shown, and after the computer device obtains the noise map, the noise map can be sampled to obtain the corresponding sampling noise (recorded as noise0), and after the computer device obtains the sampling noise, the sampling noise can be mapped to obtain the corresponding mixed noise. In one embodiment, the sampling noise obtained by the computer device from the acquired noise map has a value range of 0 to 1, and when the computer device maps the sampling noise, Formula 10 can be used to implement the mapping of the sampling noise.

[0105] noise=noise0*0.5+0.5 Formula 10

[0106] Wherein, noise is the mixed noise obtained after mapping processing based on the sampling noise. In one embodiment, while determining the mixed noise, the computer can also perform color mixing processing on the light source color and the reference color to obtain a mixed color, so that the mixed color can be color-smoothed based on the mixed noise to obtain the rendering color of the target object. When the computer device performs color mixing processing on the light source color and the reference color to obtain the mixed color, the color values ​​of each color channel of the light source color and the reference color under the standard color channel can be obtained respectively, wherein the standard color channel can be an RGB color channel, or it can also be an alpha channel, and based on the color values ​​of different color channels of the light source color and the reference color under the standard color channel, the color values ​​of the light source color and the reference color under the same color channel can be mixed to obtain a mixed color value in the corresponding color channel; and then the obtained mixed color value can be subjected to color mixing processing to obtain a mixed color.

[0107] In one embodiment, when the computer device mixes the color values ​​of the light source color and the reference color in the same color channel, if the standard color channel is an RGB color channel, the mixing process of the computer device reading the reference color and the light source color can be as shown in Formula 11.

[0108] speccolor.r=inputcolor.r*lightcolor.r

[0109] speccolor.g=inputcolor.g*lightcolor.g

[0110] speccolor.b=inputcolor.b*lightcolor.b Formula 11

[0111] Among them, inputcolor.r, inputcolor.g, inputcolor.b represent the color value of the reference color in the R color channel, the color value in the G color channel, and the color value in the B color channel, respectively, and lightcolor.r, lightcolor.g, lightcolor.b represent the color value of the light source color in the R color channel, the color value in the G color channel, and the color value in the B color channel, respectively, then, speccolor.r, speccolor.g, speccolor.b represent the mixed color value in the R color channel, the mixed color value in the G color channel, and the mixed color value in the B channel, respectively. After the computer device obtains the mixed color value in the R color channel, the mixed color value in the G color channel, and the mixed color value in the B channel, respectively, it can perform color mixing processing on speccolor.r, speccolor.g, and speccolor.b, thereby obtaining a mixed color (speccolor) obtained by mixing the light source color and the reference color.

[0112] After the computer device obtains the mixed color and the mixed noise, the mixed noise can be used to perform color smoothing on the mixed color. In a specific implementation, when performing color smoothing, the computer device can first obtain the highlight intensity (denoted as mag) corresponding to the anisotropic highlight to be rendered in the target object. Further, the computer device can use the mixed noise noise, the highlight intensity mag and the mixed color speccolor to perform a product operation to perform color smoothing on the mixed color. For details, refer to the calculation process of Formula 12.

[0113] specularcolor=speccolor*noise*mag Formula 12

[0114] Wherein, specularcolor represents the color after color smoothing. When the computer device obtains the highlight intensity, it can also obtain Figure 3b In one embodiment, based on the acquisition of mixed noise by a computer device and the process of color smoothing based on the acquired mixed noise, since the mixed noise acquired by the computer device will not change the visual effect of the corresponding color when performing color smoothing, the accuracy and authenticity of the rendering result can be guaranteed. In addition, based on the process of color smoothing using mixed noise by the computer device, the computer device can acquire a more realistic mixed color, thereby improving the vividness and naturalness of the anisotropic highlight rendering of the target object by the computer device.

[0115] After the computer device obtains the rendering indication parameters, the rendering color and the rendering function of the target object, since the rendering function of the target object includes: a first rendering function for rendering other areas of the target object except the anisotropic highlights to be rendered, and a second rendering function for rendering the anisotropic highlights to be rendered, then when the computer device calls the rendering function and renders the target object according to the rendering indication parameters, the rendering color and the determined highlight items, the first rendering function and the rendering indication parameters can be used to render other areas of the target object except the anisotropic highlights to be rendered to obtain other areas that have been rendered; then the second rendering function, the rendering color and the determined highlight items can be used to render the target object to obtain the rendered anisotropic highlights; further, the computer device can use the object composed of the other areas that have been rendered and the rendered anisotropic highlights as the target object that has been rendered.

[0116] The first rendering function obtained by the computer device for rendering other areas of the target object except the anisotropic highlights to be rendered can be recorded as f pbr () function, specifically a physically based rendering function, then the computer device uses the first rendering function to render other areas of the target object as shown in Formula 13.

[0117] C origin = f pbr (C basecolor , m, r, N) Formula 13

[0118] Among them, C origin Indicates the rendering result of other areas in the target object except anisotropic highlights, r represents the roughness, C basecolor is the texture color determined by the previous order, m is the metalness, r is the roughness, and N is the normal value.

[0119] The second rendering function used by the computer device is a product operation function, wherein the computer device uses the second rendering function to render the color and the determined highlight item to render the target object, and the calculation process of obtaining the rendered anisotropic highlight can be shown in Formula 14.

[0120] C 高光 =specularcolor*specularterm-final Equation 14

[0121] Among them, C 高光Indicates the rendering result of the anisotropic highlight in the target object, specularterm-final is the highlight term of the target object calculated in the previous order, and specularcolor is the rendering color. In one embodiment, since the computer device supports setting the reference color based on the reference color of the top-level anisotropic highlight and the reference color of the secondary anisotropic highlight respectively when setting the reference color, the rendering color specularcolor calculated by the computer device may also include the rendering color of the top-level anisotropic highlight (referred to as specularcolor 顶层 ), and the rendering color of the secondary anisotropic highlight (referred to as specularcolor 次级 ), in addition, since the highlight term specularterm-final of the target object includes the above-mentioned specular top and specular down, the above-mentioned formula 14 can be equivalent to formula 15.

[0122] C 高光 =specular color 顶层 *specular top+specular color 次级 *specular down 15

[0123] After obtaining the rendered highlights, the object composed of other rendered areas and the rendered anisotropic highlights can be used as the rendered target object, as shown in Formula 16.

[0124] C final =C origin + C 高光 Formula 16

[0125] Among them, C final Represents the final rendering result of the target object.

[0126] In one embodiment, if the target object is a satin fabric, and the current rendering environment is a game scene, that is, the satin fabric is the fabric in the game scene, wherein, since the weaving method of the satin fabric is to weave with a satin weave, therefore, there are relatively long floating lines distributed in parallel on the surface of the satin fabric, so, when the target object is a satin fabric, the highlights to be rendered contained in the satin fabric to be rendered are anisotropic highlights. Based on this, when the computer device renders the satin fabric, it can first obtain the anisotropic coefficient of the anisotropic highlights from the operation panel, so that after obtaining the anisotropic coefficient, the highlight items of the satin fabric can be determined based on the anisotropic coefficient to indicate the corresponding areas of the various anisotropic highlights to be rendered in the satin fabric at the current viewing angle of the current rendering environment. After the computer device determines the highlight items of the satin fabric, it can perform rendering processing on the satin fabric based on the obtained rendering color and highlight items after determining the rendering color, and obtain a satin fabric containing anisotropic highlights. Among them, the specific calculation process can be as follows Figure 3c As shown, specifically, after obtaining the anisotropy coefficient, the computer device can calculate the top highlight anisotropy coefficient a1, the top highlight anisotropy coefficient a2, the secondary highlight anisotropy coefficient a3 and the secondary highlight anisotropy coefficient a4 respectively.

[0127] After obtaining the top highlight anisotropy coefficient a1, the top highlight anisotropy coefficient a2, the secondary highlight anisotropy coefficient a3 and the secondary highlight anisotropy coefficient a4, the computer device can further calculate two top highlight terms, namely, the reference highlight terms of the top highlight, specular term1 and specular term3. In addition, two secondary highlight terms can also be calculated, namely, the reference highlight terms of the top highlight, specular term2 and specular term4. Furthermore, the computer device can calculate the final top highlight, speculartop, based on the two calculated top highlight terms, and calculate the final secondary highlight, speculardown, based on the two calculated secondary highlight terms. Then, after calculating the mixed highlight color, speccolor, the computer device can obtain the final highlight color for the final rendering process, specularcolor, based on the mixed highlight color and the mixed noise. Finally, the computer device can be combined with Unity's default diffuse rendering to obtain the final rendering result. Among them, the silk and satin fabric obtained by the rendering can be Figure 3dAs shown. Thus, the computer device realizes the real-time rendering of the satin fabric based on the anisotropic coefficients input by the user in the operation panel, and the real-time rendering result of the satin fabric based on the anisotropic coefficients can ensure the realism of the rendered satin fabric and the highlights contained in the satin fabric, so as to meet the observation requirements of the satin fabric in the game scene.

[0128] In another implementation, the target object may also be hair. Then, when the computer device renders and displays the hair, in order to improve the authenticity of the rendered hair, the computer device first obtains the anisotropy coefficient input by the user from the operation panel, and then calculates the top-level highlight anisotropy coefficients a1 and a2 based on the obtained anisotropy coefficients, and calculates the secondary highlight anisotropy coefficients a3 and a4. Further, the computer device may calculate the reference highlight items specular term1 and specular term3 of the top-level highlight and the reference highlight items specular term2 and specular term4 of the secondary highlight based on the obtained four highlight anisotropy coefficients a1 to a4, so that the computer device can further calculate the final top-level highlight speculartop and secondary highlight speculardown. Based on the top-level specular top and the secondary specular down finally calculated by the computer device, the computer device can combine the specular color when rendering the hair, and use Unity to perform diffuse rendering and specular rendering respectively to achieve the rendering of the hair, and make the rendered hair contain anisotropic highlights, thereby improving the authenticity and reliability of the rendered hair. In other implementations, the target object can also be a CD or brushed metal, and the computer device can also achieve the rendering of the CD or brushed metal by obtaining the anisotropic coefficient input by the user, and make the rendered CD or rendered brushed metal have anisotropic highlights, so as to improve the rendering reliability of the CD or brushed metal in the corresponding scene.

[0129] In the embodiment of the present application, after the computer device determines the target object to be rendered, it can obtain the anisotropic parameters of the various anisotropic highlights to be rendered in the target object from the operation panel, and then determine the highlight items when rendering the target object based on the rendering effect constrained by the anisotropic parameters. When the computer device determines the highlight items of the target object based on the anisotropic coefficient, it can combine the trigger operation of the bidirectional highlight in the operation panel to determine the calculation method of the highlight items of the target object by the computer device when determining the highlight items. In addition, since the operation panel also supports the input of parameters such as highlight color, the corresponding user can realize flexible control of the calculation of the highlight items based on the operation panel, thereby improving the flexible control of the computer device for the calculation results of the highlight items of the target object, and improving the flexible adjustment of the material performance effect of the target object. Based on the determination of the highlight item of the target object by the computer device, the computer device can use the calculated highlight item to render the target object, and obtain a rendered target object containing anisotropic highlights, so that the computer device can effectively render the anisotropic highlights based on the input anisotropic coefficients, thereby improving the rendering efficiency of the computer device in rendering the target object, and also enabling the computer device to achieve flexibility and accuracy in rendering the target object. In addition, based on the operation panel, the computer device can effectively set the parameters required for the target object when rendering, so that the rendering processing method can also be deployed on a mobile platform to achieve effective rendering of the target object based on the input instructions of the operation panel, and based on the deployment on the mobile platform, it can ensure that the mobile platform guarantees the rendering performance of the target object under the premise of a small number of instructions, thereby optimizing the rendering effect of the mobile platform.

[0130] Based on the description of the above rendering processing method embodiment, the present invention also proposes a rendering processing device, which can be a computer program (including program code) running in the above computer device. The rendering processing device can be used to perform the following steps: Figure 2 For the rendering method described, see Figure 4 The rendering processing device includes: an acquisition unit 401 and a processing unit 402.

[0131] An acquisition unit 401 is used to acquire a target object to be rendered; the target object includes anisotropic highlights to be rendered;

[0132] The acquisition unit 401 is further used to acquire an anisotropy coefficient of the anisotropic highlight to be rendered, where the anisotropy coefficient is used to constrain the rendering effect of the anisotropic highlight to be rendered;

[0133] A processing unit 402 is used to determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate an area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle;

[0134] The processing unit 402 is further configured to use the highlight item of the target object to perform rendering processing on the target object, and the target object after rendering processing includes rendered anisotropic highlights.

[0135] In one embodiment, the processing unit 402 is specifically configured to:

[0136] Acquire the object material of the target object and the material distribution characteristics of the object material;

[0137] A highlight item of the target object is determined according to the anisotropy coefficient and the material distribution characteristics.

[0138] In one embodiment, the processing unit 402 is specifically configured to:

[0139] Acquire the material roughness of the object material, and respectively calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the anisotropic highlight to be rendered in the target object according to the material roughness and the anisotropy coefficient;

[0140] Calculating texture distribution parameters of the target object according to the material distribution characteristics of the target object;

[0141] The highlight item of the target object is determined by using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object.

[0142] In one embodiment, the anisotropic highlights to be rendered in the target object include: top-level anisotropic highlights to be rendered and secondary anisotropic highlights to be rendered; the processing unit 402 is specifically configured to:

[0143] According to the anisotropy coefficient, a top highlight anisotropy coefficient and a secondary highlight anisotropy coefficient are determined respectively; wherein the top highlight anisotropy coefficient and the secondary highlight anisotropy coefficient are both at least two;

[0144] According to the material roughness and at least two top-level highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the top-level anisotropic highlight to be rendered in the target object are calculated; and according to the material roughness and at least two secondary highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the secondary anisotropic highlight to be rendered in the target object are respectively calculated.

[0145] In one embodiment, the processing unit 402 is specifically configured to:

[0146] Determining a half-angle vector according to a light source direction and an observation direction of a current rendering environment in which the target object is located;

[0147] Acquire a texture distribution function, and use the texture distribution function in combination with the half-angle vector and the material distribution feature to calculate the texture distribution parameters of the target object;

[0148] The material distribution characteristics of the target object include one or more of the following: normals, tangents and bitangents extracted from a normal map.

[0149] In one embodiment, the processing unit 402 is specifically configured to:

[0150] Using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object, a reference highlight item corresponding to the target object is determined; the reference highlight item includes: a reference highlight item of a top-level anisotropic highlight and a reference highlight item of a secondary anisotropic highlight;

[0151] A weighted sum process is performed on the reference highlight item of the top-level anisotropic highlight and the reference highlight item of the secondary anisotropic highlight, and the highlight item after the weighted sum is used as the highlight item of the target object.

[0152] In one embodiment, the number of reference highlight items of the top-level anisotropic highlight and the number of reference highlight items of the secondary anisotropic highlight are both at least two; the processing unit 402 is specifically configured to:

[0153] Respectively obtaining reference weight groups for weighted summing of at least two reference highlight items of the top-level anisotropic highlight and at least two reference highlight items of at least two secondary anisotropic highlights;

[0154] The reference weight group is used to perform weighted summation processing on at least two reference highlight items of the top-level anisotropic highlight, and to perform weighted summation processing on at least two reference highlight items of the secondary anisotropic highlight.

[0155] In one embodiment, the reference weight group includes at least two reference weight values, and one weight value corresponds to one reference highlight item, and the reference highlight item is a reference highlight item of a top-level anisotropic highlight or a reference highlight item of a secondary anisotropic highlight;

[0156] The acquisition unit 401 is further configured to acquire a trigger operation for turning on the bidirectional highlight, and when the trigger operation determines to turn on the bidirectional highlight, determine that at least two reference weight values ​​included in the reference weight group are both non-zero values;

[0157] The processing unit 402 is further configured to determine, when the on trigger operation determines to turn off the bidirectional highlight, that among the at least two reference weights included in the reference weight group, only one reference weight value corresponding to a non-zero value is included.

[0158] In one embodiment, the processing unit 402 is specifically configured to:

[0159] Obtaining rendering indication parameters, the rendering color of the anisotropic highlight to be rendered in the target object, and a rendering function for the target object;

[0160] The rendering function is called, and the target object is rendered according to the rendering indication parameter, the rendering color and the determined highlight item.

[0161] In one embodiment, the processing unit 402 is specifically configured to:

[0162] Obtaining a texture map and a normal map to be referenced when rendering the target object, and obtaining a metalness to be referenced when rendering the target object;

[0163] Determine a texture color from the texture map, and extract a normal value from the normal map;

[0164] The texture color, the normal value and the metalness are used as rendering indication parameters.

[0165] In one embodiment, the processing unit 402 is specifically configured to:

[0166] Acquire the light source color when rendering the target object in the current rendering environment, and the reference color that the target object is expected to present after rendering is completed;

[0167] Determine the mixed noise from the input noise map;

[0168] The light source color and the reference color are subjected to color mixing processing to obtain a mixed color, and the mixed color is subjected to color smoothing processing based on the mixed noise to obtain a rendering color of the target object.

[0169] In one embodiment, the processing unit 402 is specifically configured to:

[0170] Respectively obtain the color values ​​of each color channel of the light source color and the reference color under the standard color channel;

[0171] Mixing the color values ​​of the light source color and the reference color in the same color channel to obtain a mixed color value in the corresponding color channel;

[0172] The obtained mixed color value is subjected to color mixing processing to obtain a mixed color.

[0173] In one embodiment, the processing unit 402 is specifically configured to:

[0174] Obtaining highlight intensity corresponding to anisotropic highlights to be rendered in the target object;

[0175] A product operation is performed using the mixed noise, the highlight intensity and the mixed color to perform color smoothing processing on the mixed color.

[0176] In one embodiment, the rendering function for the target object includes: a first rendering function for rendering other areas of the target object except the anisotropic highlight to be rendered, and a second rendering function for rendering the anisotropic highlight to be rendered; the processing unit 402 is specifically used to:

[0177] Using the first rendering function and the rendering indication parameter, rendering is performed on other areas of the target object except the anisotropic highlights to be rendered, so as to obtain other areas after rendering is completed;

[0178] Using the second rendering function, the rendering color and the determined highlight item to render the target object to obtain rendered anisotropic highlights;

[0179] The object consisting of the other rendered areas and the rendered anisotropic highlights is used as the rendered target object.

[0180] In the embodiment of the present application, after the acquisition unit 401 determines the target object to be rendered, the processing unit 402 can obtain the anisotropic parameters of the various anisotropic highlights to be rendered in the target object from the operation panel, and then determine the highlight items when rendering the target object based on the rendering effect constrained by the anisotropic parameters. When the processing unit 402 determines the highlight items of the target object based on the anisotropic coefficient, it can combine the trigger operation of the bidirectional highlight in the operation panel to determine the calculation method of the highlight items of the target object when determining the highlight items. In addition, since the operation panel also supports the input of parameters such as highlight color, the corresponding user can realize flexible control of the calculation of the highlight items based on the operation panel, thereby improving the flexible control of the calculation results of the highlight items of the target object, and improving the flexible adjustment of the material performance effect of the target object. Based on the determination of the highlight item of the target object by the processing unit 402, the processing unit 402 can use the calculated highlight item to render the target object, and obtain a rendered target object containing anisotropic highlights, thereby achieving effective rendering of anisotropic highlights based on the input anisotropic coefficients, thereby improving the rendering efficiency of the target object rendering, and also achieving flexibility and accuracy in rendering the target object. In addition, based on the operation panel, the processing unit 402 can achieve effective setting of the parameters required for the target object when rendering, so that the rendering processing method can also be deployed on a mobile platform to achieve effective rendering of the target object based on the input instructions of the operation panel, and based on the deployment on the mobile platform, it can ensure that the mobile platform guarantees the rendering performance of the target object under the premise of a small number of instructions, thereby optimizing the rendering effect of the mobile platform.

[0181] See also Figure 5 , is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 5 The computer device in the embodiment shown may include: one or more processors 501; one or more input devices 502, one or more output devices 503 and a memory 504. The processor 501, the input device 502, the output device 503 and the memory 504 are connected via a bus 505. The memory 504 is used to store a computer program, the computer program includes program instructions, and the processor 501 is used to execute the program instructions stored in the memory 504.

[0182] The memory 504 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 504 may also include a non-volatile memory (non-volatile memory), such as a flash memory, a solid-state drive (SSD), etc.; the memory 504 may also include a combination of the above types of memory.

[0183] The processor 501 may be a central processing unit (CPU). The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), etc. The PLD may be a field-programmable gate array (FPGA), a generic array logic (GAL), etc. The processor 501 may also be a combination of the above structures.

[0184] In the embodiment of the present invention, the memory 504 is used to store a computer program, the computer program includes program instructions, and the processor 501 is used to execute the program instructions stored in the memory 504 to implement the above-mentioned Figure 2 The steps of the corresponding method in .

[0185] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0186] Acquire a target object to be rendered; the target object includes anisotropic highlights to be rendered;

[0187] Obtaining an anisotropy coefficient of an anisotropic highlight to be rendered, wherein the anisotropy coefficient is used to constrain a rendering effect of the anisotropic highlight to be rendered;

[0188] Determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate the area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle;

[0189] The target object is rendered using the highlight item of the target object, and the rendered target object includes rendered anisotropic highlights.

[0190] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0191] Acquire the object material of the target object and the material distribution characteristics of the object material;

[0192] A highlight item of the target object is determined according to the anisotropy coefficient and the material distribution characteristics.

[0193] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0194] Acquire the material roughness of the object material, and respectively calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the anisotropic highlight to be rendered in the target object according to the material roughness and the anisotropy coefficient;

[0195] Calculating texture distribution parameters of the target object according to material distribution characteristics of the target object;

[0196] The highlight item of the target object is determined by using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object.

[0197] In one embodiment, the anisotropic highlights to be rendered in the target object include: top-level anisotropic highlights to be rendered and secondary anisotropic highlights to be rendered; the processor 501 is configured to call the program instructions to execute:

[0198] According to the anisotropy coefficient, a top highlight anisotropy coefficient and a secondary highlight anisotropy coefficient are determined respectively; wherein the top highlight anisotropy coefficient and the secondary highlight anisotropy coefficient are both at least two;

[0199] According to the material roughness and at least two top-level highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the top-level anisotropic highlight to be rendered in the target object are calculated; and according to the material roughness and at least two secondary highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the secondary anisotropic highlight to be rendered in the target object are respectively calculated.

[0200] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0201] Determining a half-angle vector according to a light source direction and an observation direction of a current rendering environment in which the target object is located;

[0202] Acquire a texture distribution function, and use the texture distribution function in combination with the half-angle vector and the material distribution feature to calculate the texture distribution parameters of the target object;

[0203] The material distribution characteristics of the target object include one or more of the following: normals, tangents and bitangents extracted from a normal map.

[0204] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0205] Using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object, a reference highlight item corresponding to the target object is determined; the reference highlight item includes: a reference highlight item of a top-level anisotropic highlight and a reference highlight item of a secondary anisotropic highlight;

[0206] A weighted sum process is performed on the reference highlight item of the top-level anisotropic highlight and the reference highlight item of the secondary anisotropic highlight, and the highlight item after the weighted sum is used as the highlight item of the target object.

[0207] In one embodiment, the number of reference highlight items of the top anisotropic highlight and the number of reference highlight items of the secondary anisotropic highlight are both at least two; the processor 501 is configured to call the program instructions to execute:

[0208] Respectively obtaining reference weight groups for weighted summing of at least two reference highlight items of the top-level anisotropic highlight and at least two reference highlight items of at least two secondary anisotropic highlights;

[0209] The reference weight group is used to perform weighted summation processing on at least two reference highlight items of the top-level anisotropic highlight, and to perform weighted summation processing on at least two reference highlight items of the secondary anisotropic highlight.

[0210] In one embodiment, the reference weight group includes at least two reference weight values, and one weight value corresponds to one reference highlight item, and the reference highlight item is a reference highlight item of a top-level anisotropic highlight or a reference highlight item of a secondary anisotropic highlight; the processor 501 is configured to call the program instruction to execute:

[0211] Obtaining a trigger operation for turning on the bidirectional highlight, and when the trigger operation determines to turn on the bidirectional highlight, determining that at least two reference weight values ​​included in the reference weight group are both non-zero values;

[0212] When the on trigger operation determines to turn off the bidirectional highlight, it is determined that among the at least two reference weights included in the reference weight group, only one reference weight value whose corresponding value is not zero is included.

[0213] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0214] Obtaining rendering indication parameters, the rendering color of the anisotropic highlight to be rendered in the target object, and a rendering function for the target object;

[0215] The rendering function is called, and the target object is rendered according to the rendering indication parameter, the rendering color and the determined highlight item.

[0216] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0217] Obtaining a texture map and a normal map to be referenced when rendering the target object, and obtaining a metalness to be referenced when rendering the target object;

[0218] Determine a texture color from the texture map, and extract a normal value from the normal map;

[0219] The texture color, the normal value and the metalness are used as rendering indication parameters.

[0220] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0221] Acquire the light source color when rendering the target object in the current rendering environment, and the reference color that the target object is expected to present after rendering is completed;

[0222] Determine the mixed noise from the input noise map;

[0223] The light source color and the reference color are subjected to color mixing processing to obtain a mixed color, and the mixed color is subjected to color smoothing processing based on the mixed noise to obtain a rendering color of the target object.

[0224] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0225] Respectively obtain the color values ​​of each color channel of the light source color and the reference color under the standard color channel;

[0226] Mixing the color values ​​of the light source color and the reference color in the same color channel to obtain a mixed color value in the corresponding color channel;

[0227] The obtained mixed color value is subjected to color mixing processing to obtain a mixed color.

[0228] In one embodiment, the processor 501 is configured to call the program instructions to execute:

[0229] Obtaining highlight intensity corresponding to anisotropic highlights to be rendered in the target object;

[0230] A product operation is performed using the mixed noise, the highlight intensity and the mixed color to perform color smoothing processing on the mixed color.

[0231] In one embodiment, the rendering function for the target object includes: a first rendering function for rendering other areas of the target object except the anisotropic highlights to be rendered, and a second rendering function for rendering the anisotropic highlights to be rendered; the processor 501 is configured to call the program instructions to execute:

[0232] Using the first rendering function and the rendering indication parameter, rendering is performed on other areas of the target object except the anisotropic highlights to be rendered, so as to obtain other areas after rendering is completed;

[0233] Using the second rendering function, the rendering color and the determined highlight item to render the target object to obtain rendered anisotropic highlights;

[0234] The object consisting of the other rendered areas and the rendered anisotropic highlights is used as the rendered target object.

[0235] The embodiment of the present invention provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 The method embodiment shown in the figure. Wherein, the computer-readable storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0236] What is disclosed above is only a partial embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and making equivalent changes according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A rendering processing method, characterized in that: include: Get the target object to be rendered; The target object includes anisotropic highlights to be rendered; Obtaining an anisotropy coefficient of an anisotropic highlight to be rendered, wherein the anisotropy coefficient is used to constrain a rendering effect of the anisotropic highlight to be rendered; Determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate the area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle; The target object is rendered using the highlight item of the target object, and the rendered target object includes rendered anisotropic highlights.

2. The method according to claim 1, characterized in that The determining the highlight item of the target object according to the anisotropy coefficient comprises: Acquire the object material of the target object and the material distribution characteristics of the object material; A highlight item of the target object is determined according to the anisotropy coefficient and the material distribution characteristics.

3. The method according to claim 2, characterized in that The step of determining the highlight item of the target object according to the anisotropy coefficient and the material distribution characteristics includes: Acquire the material roughness of the object material, and respectively calculate the transverse anisotropy parameter and the longitudinal anisotropy parameter of the anisotropic highlight to be rendered in the target object according to the material roughness and the anisotropy coefficient; Calculating texture distribution parameters of the target object according to material distribution characteristics of the target object; The highlight item of the target object is determined by using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object.

4. The method according to claim 3, characterized in that The anisotropic highlights to be rendered in the target object include: top-level anisotropic highlights to be rendered and secondary anisotropic highlights to be rendered; the step of respectively calculating the transverse anisotropy parameter and the longitudinal anisotropy parameter of the anisotropic highlights to be rendered in the target object according to the material roughness and the anisotropy coefficient includes: According to the anisotropy coefficient, a top highlight anisotropy coefficient and a secondary highlight anisotropy coefficient are determined respectively; wherein the top highlight anisotropy coefficient and the secondary highlight anisotropy coefficient are both at least two; According to the material roughness and at least two top-level highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the top-level anisotropic highlight to be rendered in the target object are calculated; and according to the material roughness and at least two secondary highlight anisotropy coefficients, the transverse anisotropy parameter and the longitudinal anisotropy parameter of the secondary anisotropic highlight to be rendered in the target object are respectively calculated.

5. The method according to claim 3, characterized in that The step of calculating the texture distribution parameters of the target object according to the material distribution characteristics of the target object comprises: Determining a half-angle vector according to a light source direction and an observation direction of a current rendering environment in which the target object is located; Acquire a texture distribution function, and use the texture distribution function in combination with the half-angle vector and the material distribution feature to calculate the texture distribution parameters of the target object; The material distribution characteristics of the target object include one or more of the following: normals, tangents and bitangents extracted from a normal map.

6. The method according to claim 3, characterized in that The step of using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object to determine the highlight item of the target object comprises: Using the transverse anisotropy parameter, the longitudinal anisotropy parameter, and the texture distribution parameter of the target object, a reference highlight item corresponding to the target object is determined; the reference highlight item includes: a reference highlight item of a top-level anisotropic highlight and a reference highlight item of a secondary anisotropic highlight; A weighted sum process is performed on the reference highlight item of the top-level anisotropic highlight and the reference highlight item of the secondary anisotropic highlight, and the highlight item after the weighted sum is used as the highlight item of the target object.

7. The method according to claim 6, characterized in that The number of reference highlight items of the top anisotropic highlight and the number of reference highlight items of the secondary anisotropic highlight are both at least two; the weighted summing of the reference highlight items of the top anisotropic highlight and the reference highlight items of the secondary anisotropic highlight includes: Respectively obtaining reference weight groups for weighted summing of at least two reference highlight items of the top-level anisotropic highlight and at least two reference highlight items of at least two secondary anisotropic highlights; The reference weight group is used to perform weighted summation processing on at least two reference highlight items of the top-level anisotropic highlight, and to perform weighted summation processing on at least two reference highlight items of the secondary anisotropic highlight.

8. The method according to claim 7, characterized in that The reference weight group includes at least two reference weight values, and one weight value corresponds to one reference highlight item, and the reference highlight item is a reference highlight item of a top-level anisotropic highlight or a reference highlight item of a secondary anisotropic highlight; the method further includes: Obtaining a trigger operation for turning on the bidirectional highlight, and when the trigger operation determines to turn on the bidirectional highlight, determining that at least two reference weight values ​​included in the reference weight group are both non-zero values; When the on trigger operation determines to turn off the bidirectional highlight, it is determined that among the at least two reference weights included in the reference weight group, only one reference weight value whose corresponding value is not zero is included.

9. The method according to claim 1, characterized in that The step of rendering the target object using the highlight item of the target object includes: Obtaining rendering indication parameters, the rendering color of the anisotropic highlight to be rendered in the target object, and a rendering function for the target object; The rendering function is called, and the target object is rendered according to the rendering indication parameter, the rendering color and the determined highlight item.

10. The method according to claim 9, characterized in that The obtaining of rendering indication parameters includes: Obtaining a texture map and a normal map to be referenced when rendering the target object, and obtaining a metalness to be referenced when rendering the target object; Determine a texture color from the texture map, and extract a normal value from the normal map; The texture color, the normal value and the metalness are used as rendering indication parameters.

11. The method according to claim 9, characterized in that The method of obtaining the rendering color of the anisotropic highlight to be rendered in the target object includes: Acquire the light source color when rendering the target object in the current rendering environment, and the reference color that the target object is expected to present after rendering is completed; Determine the mixed noise from the input noise map; The light source color and the reference color are subjected to color mixing processing to obtain a mixed color, and the mixed color is subjected to color smoothing processing based on the mixed noise to obtain a rendering color of the target object.

12. The method according to claim 11, characterized in that The step of performing a color mixing process on the light source color and the reference color to obtain a mixed color includes: Respectively obtain the color values ​​of each color channel of the light source color and the reference color under the standard color channel; Mixing the color values ​​of the light source color and the reference color in the same color channel to obtain a mixed color value in the corresponding color channel; The obtained mixed color value is subjected to color mixing processing to obtain a mixed color.

13. The method according to claim 11, characterized in that The performing color smoothing on the mixed color based on the mixed noise comprises: Obtaining highlight intensity corresponding to anisotropic highlights to be rendered in the target object; A product operation is performed using the mixed noise, the highlight intensity and the mixed color to perform color smoothing processing on the mixed color.

14. The method according to claim 9, characterized in that The rendering function for the target object includes: a first rendering function for rendering other areas of the target object except the anisotropic highlight to be rendered, and a second rendering function for rendering the anisotropic highlight to be rendered; The calling of the rendering function and rendering the target object according to the rendering indication parameter, the rendering color and the determined highlight item includes: Using the first rendering function and the rendering indication parameter, rendering is performed on other areas of the target object except the anisotropic highlights to be rendered, so as to obtain other areas after rendering is completed; Using the second rendering function, the rendering color and the determined highlight item to render the target object to obtain rendered anisotropic highlights; The object consisting of the other rendered areas and the rendered anisotropic highlights is used as the rendered target object.

15. A rendering processing device, characterized in that: include: An acquisition unit, used for acquiring a target object to be rendered; the target object includes anisotropic highlights to be rendered; The acquisition unit is further used to acquire an anisotropy coefficient of the anisotropic highlight to be rendered, where the anisotropy coefficient is used to constrain the rendering effect of the anisotropic highlight to be rendered; A processing unit, configured to determine a highlight item of the target object according to the anisotropy coefficient; wherein the highlight item of the target object is used to indicate an area of ​​the anisotropic highlight to be rendered in the target object at a current viewing angle; The processing unit is further used to use the highlight item of the target object to render the target object, and the target object after rendering includes rendered anisotropic highlights.

16. A computer device, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 14.

Citation Information

Cited By

  • Method and system for dynamically rendering textures and materials of virtual clothes

    CN121527221A

  • A method and system for dynamic rendering of textures and materials of virtual clothing

    CN121527221B