Model rendering method and device, electronic equipment and readable storage medium

The dual-layer rendering approach with physical and non-physical channels addresses inconsistent rendering standards, enabling efficient and flexible control over virtual model styles, reducing the effort and cost of achieving consistent artistic effects.

CN120318389APending Publication Date: 2025-07-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510238173.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In game model production, there are problems such as inconsistent rendering specifications and inconsistent synthesis specifications of different teams, which leads to large differences in the model's artistic effects and difficulty in unification, and the production cycle and cost of stylized effects have increased significantly.

Method used

Using a layered rendering method, by configuring the first rendering layer and the second rendering layer, physical and non-physical materials are assigned to the physical and non-physical materials, physical rendering and non-physical rendering are performed, and respective rendering results are generated, and parameter adjustments and merging are performed to achieve free conversion of the model between physical reality and flat effects.

Benefits of technology

It realizes the unified and flexible regulation of the model stylized effects, reduces the production cycle and cost, and can freely convert between 2D and 3D effects, providing unified specifications and flexible controllable space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318389A_ABST
    Figure CN120318389A_ABST
Patent Text Reader

Abstract

The invention discloses a model rendering method and device, electronic equipment and a readable storage medium, and the method comprises the steps: generating a first rendering layer based on a virtual model, and endowing a part of the virtual model in the first rendering layer with a corresponding material; generating a second rendering layer based on the virtual model, and endowing the virtual model in the second rendering layer with a first non-physical material; performing physical rendering on the virtual model in the first rendering layer, generating a rendering result corresponding to the first rendering channel, and obtaining a rendering file of the first rendering layer; performing non-physical rendering on the virtual model in the second rendering layer, generating a rendering result corresponding to the second rendering channel, and obtaining a rendering file of the second rendering layer; extracting a rendering result corresponding to each rendering channel from the rendering file of each rendering layer; and performing parameter adjustment on the rendering results corresponding to the rendering channels of the rendering layers, and performing merging based on the adjusted rendering results to obtain a rendered image of the virtual model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer graphics technology, and particularly to a method, apparatus, electronic device, and readable storage medium for model rendering. Background Art

[0002] When making virtual models for games, the models made using the production method of two-dimensional (2D) pictures have a flattened effect and the images are not three-dimensional enough. The models made by 3D rendering algorithms mainly focus on simulating the physical effects of the real world, such as ray tracing, shadows, reflections, etc., and the images are relatively realistic, but lack stylized expressions. Therefore, there is a need to customize a stylized effect that combines physical realism and flat effects.

[0003] However, in the model stylization production process, there are problems such as inconsistent rendering specifications and inconsistent composition specifications among different teams, resulting in significant differences in the art effects of different virtual models in the game, making it difficult to unify. With the entire game's model volume, the amount of modification to the model effects is huge. If the stylized effect of the model needs to be adjusted, a large number of modifications need to be made again, or even re-rendered, significantly increasing the production cycle and production cost of the model stylized effect. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and readable storage medium for model rendering to solve or at least partially solve the above problems, specifically as follows.

[0005] In a first aspect, an embodiment of this application provides a method for model rendering, the method including:

[0006] Generating a first rendering layer configured with at least one first rendering channel based on a virtual model, and respectively assigning a corresponding material to each part of the virtual model in the first rendering layer;

[0007] Generating a second rendering layer configured with at least one second rendering channel based on the virtual model, and assigning a preset first non-physical material to the virtual model in the second rendering layer;

[0008] Performing physical rendering on the virtual model in the first rendering layer to generate a rendering result corresponding to each of the at least one first rendering channel, and obtaining a rendering file of the first rendering layer;

[0009] Performing non-physical rendering on the virtual model in the second rendering layer to generate a rendering result corresponding to each of the at least one second rendering channel, and obtaining a rendering file of the second rendering layer;

[0010] Extract the rendering result corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering result corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0011] Adjust the parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendered image of the virtual model.

[0012] In a second aspect, an embodiment of the present application further provides a model rendering device, and the device includes:

[0013] A first channel configuration and material assignment module, configured to generate a first rendering layer configured with at least one first rendering channel based on a virtual model, and respectively assign the material corresponding to each part of the virtual model in the first rendering layer to the part;

[0014] A second channel configuration and material assignment module, configured to generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0015] A first rendering module, configured to perform physical rendering on the virtual model in the first rendering layer to generate the rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer;

[0016] A second rendering module, configured to perform non-physical rendering on the virtual model in the second rendering layer to generate the rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer;

[0017] A rendering result extraction module, configured to extract the rendering result corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering result corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0018] A parameter adjustment and rendering result merging module, configured to adjust the parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendered image of the virtual model.

[0019] In a third aspect, an embodiment of the present application further provides an electronic device, including:

[0020] A processor; and

[0021] A memory, configured to store a data processing program. After the electronic device is powered on and runs the program through the processor, the following steps are performed:

[0022] Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign the corresponding material to each part of the virtual model in the first rendering layer;

[0023] Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0024] Perform physical rendering on the virtual model in the first rendering layer to generate the rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer;

[0025] Perform non-physical rendering on the virtual model in the second rendering layer to generate the rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer;

[0026] Extract the rendering results corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0027] Adjust the parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendering image of the virtual model.

[0028] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, storing a data processing program, which is run by a processor and executes the following steps:

[0029] Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign the corresponding material to each part of the virtual model in the first rendering layer;

[0030] Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0031] Perform physical rendering on the virtual model in the first rendering layer to generate the rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer;

[0032] Perform non-physical rendering on the virtual model in the second rendering layer to generate the rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer;

[0033] Extract the rendering result corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering result corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0034] Adjust the parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendered image of the virtual model.

[0035] The exemplary embodiments of the present application have the following beneficial effects:

[0036] An embodiment of the present application provides a method for model rendering. A first rendering layer configured with at least one first rendering channel is generated based on a virtual model, and corresponding materials are assigned to each part of the virtual model in the first rendering layer; a second rendering layer configured with at least one second rendering channel is generated based on the virtual model, and a preset first non-physical material is assigned to the virtual model in the second rendering layer; physically render the virtual model in the first rendering layer to generate the rendering result corresponding to each of the at least one first rendering channel, and obtain the rendering file of the first rendering layer; non-physically render the virtual model in the second rendering layer to generate the rendering result corresponding to each of the at least one second rendering channel, and obtain the rendering file of the second rendering layer; extract the rendering result corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering result corresponding to the second rendering channel from the rendering file of the second rendering layer; adjust the parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendered image of the virtual model. Through hierarchical rendering and precise separation and control of rendering channels, the embodiment of the present application can not only independently and meticulously adjust and control the materials, lighting effects, etc. of the virtual model, but also flexibly handle various complex scene requirements during the overall synthesis process of the virtual model rendering effect, realizing the free conversion of any stylized effect between physical realism and flat effect of the virtual model, providing a unified specification and flexible adjustable space for the production of model stylized effects, being able to efficiently achieve the unity and control of model stylized effects, and reducing the production cycle and production cost of model stylized effects. Description of the Drawings

[0037] Figure 1 is a schematic flowchart of a method for model rendering provided by an embodiment of the present application;

[0038] Figure 2 is a schematic diagram of the rendering effect of physically rendering the virtual model in the first rendering layer provided by an embodiment of the present application;

[0039] Figure 3It is a schematic diagram of the rendering effect of non-physically rendering a virtual model in a second rendering layer provided by an embodiment of the present application;

[0040] Figure 4 It is a schematic diagram of the synthesis process of the rendering effect of a virtual model provided by an embodiment of the present application;

[0041] Figure 5 It is a structural block diagram of a model rendering device provided by an embodiment of the present application;

[0042] Figure 6 It is a structural block diagram of an electronic device provided by an embodiment of the present application. Specific embodiments

[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0044] It should be noted that the terms "first", "second", "third", etc. in the claims, the description and the drawings of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. Such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than that shown or described herein. In addition, the terms "comprising", "having" and their variants are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0045] To solve the above problems in the related art, an embodiment of the present application provides a method for model rendering. The execution subject of the solution provided by the present application can be an electronic device, and the electronic device can be a desktop computer, a laptop computer, a mobile device, a smart watch, a smart TV, a tablet computer, a server, etc., or other devices with data processing and display functions.

[0046] As Figure 1 shown, it is a schematic flowchart of a method for model rendering provided by an embodiment of the present application, and the method includes steps S101 to S106.

[0047] Step S101: Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign materials corresponding to the parts to each part of the virtual model in the first rendering layer.

[0048] In the embodiments of the present application, the virtual model can be a virtual character model, a virtual object model, a virtual building model, a virtual animal or plant model, etc.

[0049] In this step, first, a first rendering layer can be created, then the virtual model is added to the first rendering layer, and then at least one first rendering channel is created for the first rendering layer, that is, one or more first rendering channels are created for the first rendering layer as the output channels of the rendering result. In this way, after rendering, the first rendering layer can output the corresponding rendering results through each first rendering channel configured for the first rendering layer. The rendering pass (RenderPass) can output the rendering results of the rendering layer (Render Layer) by elements (such as color, main light, edge light, specular highlight). For example, the color information in the rendering result can be output through the color rendering channel, the main light information in the rendering result can be output through the main light rendering channel, and the specular highlight information in the rendering result can be output through the specular highlight rendering channel. Next, materials corresponding to the parts can be assigned to each part of the virtual model in the first rendering layer. Materials can be assigned to each part of the virtual model according to requirements. Exemplarily, if the virtual model is a virtual character model, skin materials can be assigned to the face, hands, etc. of the virtual character model, cloth, leather, etc. materials can be assigned to the clothing parts of the virtual character model, and metal, non-metal, etc. materials can be assigned to the accessories of the virtual character model. The present application is not intended to limit this.

[0050] Optionally, the at least one first rendering channel includes one or more of the following: ID channel, color rendering channel, transparency rendering channel, main light rendering channel, left edge light rendering channel, right edge light rendering channel, and specular highlight rendering channel.

[0051] Among them, the rendering result output by the ID channel can be used to distinguish different parts or regions of the virtual model, so as to achieve fine control of the virtual model by part or region.

[0052] The color rendering channel outputs the color information of the rendering result of the rendering layer, which can reflect the basic colors of the virtual model and the surrounding environment.

[0053] The transparency rendering channel outputs the transparency information of the rendering result of the rendering layer, which can reflect the transparency of the virtual model and the surrounding environment.

[0054] The main light rendering channel outputs the main light information of the rendering result of the rendering layer. The main light (i.e., the key light) refers to the light source that illuminates the core object of the scene (the virtual model in the embodiments of the present application) and its surrounding environment. It gives the scene and the core object distinct light and dark contrasts and determines the direction of projection, and can reflect the light and dark relationship between the virtual model and the surrounding environment.

[0055] Both the left edge light rendering channel and the right edge light rendering channel are one of the edge light rendering channels. The rim light is a light effect generated at the edge of an object, which can highlight the outline of the object. The left edge light rendering channel and the right edge light rendering channel output the edge light information of the rendering result of the rendering layer. Specifically, the former is the edge light effect reflected by the light rays shining from the left side of the virtual model on the virtual model and the surrounding environment, and the latter is the edge light effect reflected by the light rays shining from the right side of the virtual model on the virtual model and the surrounding environment.

[0056] The specular highlight rendering channel outputs the specular highlight information of the rendering result of the rendering layer, which can reflect the bright area formed by the reflection of light on the surfaces of the virtual model and the surrounding environment.

[0057] Step S102: Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer.

[0058] In this step, first, the second rendering layer can be created, and then the virtual model is added to the second rendering layer. The virtual model is added to both the first rendering layer and the second rendering layer. By rendering the first rendering layer and the second rendering layer separately, the hierarchical rendering of the virtual model can be achieved. Then, at least one second rendering channel is created for the second rendering layer, that is, one or more second rendering channels are created for the second rendering layer as the output channels of the rendering result. In this way, after the second rendering layer is rendered, the corresponding rendering results can be output through each second rendering channel configured for the second rendering layer. Next, a preset first non-physical material can be assigned to the virtual model in the second rendering layer.

[0059] Optionally, the at least one second rendering channel includes one or more of the following: color rendering channel, transparency rendering channel, and main light rendering channel.

[0060] Optionally, the first non-physical material can be selected as a material with a diffuse reflection effect and no specular reflection effect, so that the virtual model shows non-physical planar characteristics.

[0061] Optionally, the first non-physical material can specifically be Lambert material.

[0062] Step S103: Physically render the virtual model in the first rendering layer to generate the rendering results corresponding to each of at least one first rendering channel, and obtain the rendering file of the first rendering layer.

[0063] Step S104: Non-physically render the virtual model in the second rendering layer to generate the rendering results corresponding to each of at least one second rendering channel, and obtain the rendering file of the second rendering layer.

[0064] In the above step S103, the virtual model in the first rendering layer can be physically rendered. The rendering results of the first rendering layer can be output element by element through each first rendering channel. Each first rendering channel can output the corresponding rendering result, and the rendering result corresponding to each first rendering channel can be saved as a file, such as an EXR format file, that is, the rendering file of the first rendering layer is obtained. Among them, the EXR file format supports multi-channel output and can include the rendering results of multiple rendering channels in one file, such as the specular rendering result, reflection rendering result, shadow rendering result, etc., so that the rendering results of each rendering channel can be adjusted separately in post-processing without affecting the rendering results of other rendering channels.

[0065] In the above step S104, the virtual model in the second rendering layer can be non-physically rendered. The rendering results of the second rendering layer can be output element by element through each second rendering channel. Each second rendering channel can output the corresponding rendering result, and the rendering result corresponding to each second rendering channel can be saved as a file, such as an EXR format file, that is, the rendering file of the second rendering layer is obtained.

[0066] Physical rendering is a rendering technology based on physical principles. It uses mathematical models to describe the propagation law of light in the real world, so as to ensure that the rendering results have high physical accuracy. The core of physical rendering lies in simulating physical phenomena such as reflection, refraction, and scattering of light on the surface of objects to generate more realistic image effects. Non-physical rendering does not rely on physical principles, but uses experience and parameters for rendering. This method usually simulates lighting and material effects by adjusting parameters, and there are differences between the rendering results and the real world.

[0067] In the embodiments of the present application, the rendering of the first rendering layer is mainly for the physical rendering of the virtual model. A multi-level material development with real lighting and material reactions is applied to the virtual model, and there are distinctions in different material textures, so as to ensure high-fidelity and high-detail performance of the output. Through physical rendering, the three-dimensional characteristics (i.e., physical realism) of the virtual model can be shown. The rendering of the second rendering layer is mainly for the non-physical rendering of the virtual model, simplifying the light and shadow effects and emphasizing the body structure. Through non-physical rendering, the non-physical characteristics (i.e., planar effect) of the virtual model can be shown. In the post-processing, the multi-channel rendering results of the first rendering layer and the multi-channel rendering results of the second rendering layer can be merged, and the influence degree of the rendering results of different rendering channels can be controlled by adjusting the parameters of each channel, so that the rendering effect of the virtual model can be freely adjusted between the planar effect and the physical real effect. In this way, the virtual model can achieve any effect between the 2D effect and the 3D effect, such as 2D effect, 2.4D effect, 2.5D effect, 2.8D effect, 3D effect.

[0068] Among them, the 2D effect refers to the planar effect; the effect between 2D and 2.5D means that there are both planar effects and physical real effects, but the planar effect is more obvious than the physical real effect; the 2.5D effect means that there are both planar effects and physical real effects, and the planar effect and the physical real effect are equivalent; the effect between 2.5D and 3D means that there are both planar effects and physical real effects, but the physical real effect is more obvious than the planar effect; the 3D effect refers to the physical real effect.

[0069] In the embodiments of the present application, through hierarchical rendering and precise separation and regulation of rendering channels, not only can the materials, light and shadow effects, etc. of the virtual model be independently and carefully adjusted and controlled, but also various complex scene requirements can be flexibly met in the overall synthesis process of the virtual model rendering effect, realizing the free conversion of any stylized effect of the virtual model between the 2D effect and the 3D effect, providing a unified specification and flexible adjustable space for the production of the model stylized effect.

[0070] In an optional implementation manner, the step of respectively assigning materials corresponding to parts to each part of the virtual model in the first rendering layer may include: assigning physical materials to the clothing parts of the virtual model in the first rendering layer. Correspondingly, the step of performing physical rendering on the virtual model in the first rendering layer may include: performing physical rendering on the physical materials assigned to the clothing parts of the virtual model in the first rendering layer.

[0071] In this implementation manner, physical materials can be assigned to the clothing parts of the virtual model in the first rendering layer and physical rendering can be performed, so that the clothing parts of the virtual model have real depth and texture.

[0072] In another alternative embodiment, the step of assigning materials corresponding to each part to the virtual model in the first rendering layer may include: assigning a physical material and a second non-physical material to the clothing part of the virtual model in the first rendering layer. Correspondingly, the method for rendering the model may further include the following steps: performing non-physical rendering on the second non-physical material assigned to the clothing part of the virtual model in the first rendering layer; merging the rendering result of the physical material and the rendering result of the second non-physical material.

[0073] In this embodiment, a physical material may be assigned to the clothing part of the virtual model in the first rendering layer, and physical rendering may be performed on the physical material to ensure the realistic material performance of the clothing part under different lighting conditions. In addition, a second non-physical material may be assigned to the clothing part of the virtual model in the first rendering layer, and non-physical rendering may be performed on the second non-physical material, so that the clothing part of the virtual model has both realistic depth and texture, and at the same time does not lose artistic expressiveness and visual impact.

[0074] In this embodiment, optionally, the physical material is an Arnold material, and / or the second non-physical material is a cartoon material.

[0075] In an alternative embodiment, the above steps S101 to S104 may be implemented in a 3D graphics software / platform (such as Maya, Blender, 3ds Max, etc.), and the following steps S105 to S106 may be implemented in a rendering and compositing software / platform (such as Nuke, After Effects, etc.).

[0076] Step S105, extracting the rendering result corresponding to the first rendering channel from the rendering file of the first rendering layer, and extracting the rendering result corresponding to the second rendering channel from the rendering file of the second rendering layer.

[0077] In this step, the rendering result corresponding to each first rendering channel may be separately extracted from the rendering file of the first rendering layer, and the rendering result corresponding to each second rendering channel may be separately extracted from the rendering file of the second rendering layer.

[0078] Optionally, in Nuke, the rendering result corresponding to each rendering channel may be extracted from the rendering file of the rendering layer through a shuffle node.

[0079] Step S106, adjusting the parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel, and merging based on the adjusted rendering result to obtain the rendering image of the virtual model.

[0080] In this step, independent parameter regulation can be performed on the rendering results corresponding to each rendering channel of each rendering layer with a virtual model added, so as to achieve fine control of the virtual model rendering effect. After the parameters are adjusted, the adjusted rendering results corresponding to each rendering channel of each rendering layer can be merged to obtain the final rendered image of the virtual model.

[0081] In an alternative embodiment, step S106 can be implemented through the following steps S1061 to S1065.

[0082] Step S1061, adjust the brightness of the rendering result corresponding to the color rendering channel of the first rendering layer;

[0083] In an alternative embodiment, in the above step S1061, adjusting the brightness of the rendering result corresponding to the color rendering channel of the first rendering layer can be achieved through the following methods, including:

[0084] According to the rendering result corresponding to the ID channel of the first rendering layer, determine the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer;

[0085] Adjust the brightness of the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer.

[0086] In this embodiment, the rendering result output by the ID channel can be used to distinguish different parts or regions of the virtual model. Different parts or regions of the virtual model can be distinguished by different IDs. Therefore, the ID channel of the target part of the virtual model can be extracted from the rendering result corresponding to the ID channel of the first rendering layer as a mask, and the target part of the virtual model can be determined from the rendering result corresponding to the color rendering channel of the first rendering layer using this mask, and then the brightness of the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer can be adjusted separately.

[0087] Optionally, the target part of the virtual model can be the head of the virtual model.

[0088] Optionally, the target part of the virtual model can be the skin part of the virtual model, such as the face, hands, legs, etc.

[0089] Optionally, the brightness adjustment in this step can be achieved through the crytomatte node in Nuke.

[0090] Step S1062, adjust the main light parameters in the rendering result corresponding to the main light rendering channel of the first rendering layer;

[0091] In this step, attributes such as the intensity and color of the main light can be adjusted to obtain the desired main light effect. By adjusting the main light parameters, the light and dark relationship of the convex and concave parts of the virtual model can be adjusted, thereby changing the three-dimensional sense of the virtual model.

[0092] Optionally, adjusting the main light parameters in this step can be achieved through the colorcorrect node in Nuke.

[0093] Step S1063: Merge the rendering result corresponding to the color rendering channel of the first rendering layer after adjusting the lightness and the rendering result corresponding to the transparency rendering channel of the first rendering layer to obtain the first merged result.

[0094] In this step, the Alpha channel information of the first rendering layer (i.e., the rendering result corresponding to the transparency rendering channel of the first rendering layer) can be copied to the rendering result corresponding to the color rendering channel of the first rendering layer after adjusting the lightness, making the former the Alpha channel information of the latter.

[0095] Optionally, the merging of the rendering result corresponding to the color rendering channel of the first rendering layer after adjusting the lightness and the rendering result corresponding to the transparency rendering channel of the first rendering layer can be achieved through the copy node in Nuke.

[0096] Step S1064: Merge the first merged result and the rendering result corresponding to the main light rendering channel of the first rendering layer after adjusting the main light parameters to obtain the second merged result.

[0097] In this step, the first merged result obtained in step S1063 and the rendering result corresponding to the main light rendering channel of the first rendering layer after adjusting the main light parameters obtained in step S1062 can be merged to obtain the second merged result.

[0098] Optionally, the merging of the first merged result and the rendering result corresponding to the main light rendering channel of the first rendering layer after adjusting the main light parameters can be achieved through the merge node in Nuke. Optionally, when merging the first merged result and the rendering result corresponding to the main light rendering channel of the first rendering layer after adjusting the main light parameters through the merge node in Nuke, the screen mode can be adopted, that is, the pixel values of the two images are multiplied and then inverted to obtain the merged result.

[0099] Step S1065: Generate the rendering image of the virtual model based on the second merged result.

[0100] In an optional implementation manner, step S1065 can be implemented through the following steps S10651 to S10656.

[0101] Step S10651: Extract the first transparency information from the rendering result corresponding to the main light rendering channel of the second rendering layer;

[0102] In this step, the first transparency information can be extracted from the rendering result corresponding to the main light rendering channel of the second rendering layer and used as a mask later.

[0103] Optionally, extracting the first transparency information from the rendering result corresponding to the main light rendering channel of the second rendering layer can be achieved through the keyer node in Nuke.

[0104] Step S10652: Adjust the main light parameters of the second merge result according to the first transparency information;

[0105] In this step, the first transparency information can be used as a mask to determine the main light part in the second merge result, and the main light parameters of the main light part in the second merge result can be adjusted.

[0106] Optionally, adjusting the main light parameters in this step can be achieved through the colorcorrect node in Nuke.

[0107] Step S10653: Adjust the color of the rendering result corresponding to the left edge light rendering channel of the first rendering layer;

[0108] In this step, the color of the rendering result corresponding to the left edge light rendering channel of the first rendering layer can be adjusted to obtain the desired left edge light effect.

[0109] Optionally, adjusting the color of the rendering result corresponding to the left edge light rendering channel of the first rendering layer can be achieved through the colorcorrect node in Nuke.

[0110] Step S10654: Add a glow effect to the rendering result corresponding to the left edge light rendering channel of the first rendering layer after color adjustment;

[0111] The glow effect simulates the hazy and blurred light-emitting effect around an object. By simulating the diffusion and blur effects of the light source, the object in the highlighted area looks like it is emitting light visually.

[0112] Optionally, adding the glow effect in this step can be achieved through the glow node in Nuke.

[0113] Step S10655: Merge the rendering result corresponding to the left edge light rendering channel of the first rendering layer after adding the glow effect and the second merge result after adjusting the main light parameters to obtain the third merge result;

[0114] In this step, the rendering result corresponding to the left edge light rendering channel of the first rendering layer after adding the glow effect can be merged with the second merged result after adjusting the main lighting parameters obtained in step S10652.

[0115] Optionally, the merging of the rendering result corresponding to the left edge light rendering channel of the first rendering layer after adding the glow effect and the second merged result after adjusting the main lighting parameters can be achieved through the merge node in Nuke. Optionally, when merging the rendering result corresponding to the left edge light rendering channel of the first rendering layer after adding the glow effect and the second merged result after adjusting the main lighting parameters through the merge node in Nuke, the screen mode can be adopted, that is, the pixel values of the two images are multiplied and then inverted to obtain the merged result.

[0116] Step S10656: Generate a rendered image of the virtual model based on the third merged result.

[0117] In an alternative embodiment, step S10656 can be implemented through the following steps S10656-1 to step S10656-8.

[0118] Step S10656-1: Extract the right dark part rendering result from the rendering result corresponding to the main lighting rendering channel of the second rendering layer;

[0119] In this step, the right dark part rendering result of the concerned dark part area can be extracted from the rendering result corresponding to the main lighting rendering channel of the second rendering layer.

[0120] Optionally, the right dark part rendering result can be extracted from the rendering result corresponding to the main lighting rendering channel of the second rendering layer through the shuffle node in Nuke.

[0121] Step S10656-2: Blur the right dark part rendering result;

[0122] Optionally, the right dark part rendering result can be blurred through the blur node in Nuke.

[0123] Step S10656-3: Adjust the channel intensity of the blurred right dark part rendering result;

[0124] In this step, by adjusting the channel intensity of the blurred right dark part rendering result, the light and dark contrast of the virtual model can be adjusted to obtain the desired dark part effect.

[0125] Optionally, the channel intensity of the blurred right dark part rendering result can be adjusted through the grade node in Nuke.

[0126] Step S10656-4: Extract the second transparency information from the rendered result of the right dark part after adjusting the channel intensity;

[0127] In this step, the second transparency information can be extracted from the rendered result of the right dark part after adjusting the channel intensity, and will be used as a mask later.

[0128] Optionally, extracting the second transparency information from the rendered result of the right dark part after adjusting the channel intensity can be achieved through the keyer node in Nuke.

[0129] Step S10656-5: Adjust the color intensity of the dark part of the third merged result according to the second transparency information;

[0130] In this step, the second transparency information can be used as a mask to determine the dark part area in the third merged result, and adjust the color intensity of the dark part area in the second merged result.

[0131] Optionally, the color intensity of the dark part of the third merged result can be adjusted through the grade node in Nuke.

[0132] Step S10656-6: Adjust the brightness of the rendered result corresponding to the right edge light rendering channel of the first rendering layer;

[0133] In this step, the brightness of the rendered result corresponding to the right edge light rendering channel of the first rendering layer can be adjusted to obtain the desired right edge light effect.

[0134] Optionally, adjusting the brightness of the rendered result corresponding to the right edge light rendering channel of the first rendering layer can be achieved through the grade node in Nuke.

[0135] Step S10656-7: Merge the rendered result corresponding to the right edge light rendering channel of the first rendering layer after adjusting the brightness and the third merged result after adjusting the dark part color intensity to obtain the fourth merged result;

[0136] In this step, the rendered result corresponding to the left edge light rendering channel of the first rendering layer after adding the glow effect and the third merged result after adjusting the dark part color intensity obtained in Step S10656-5 can be merged.

[0137] Optionally, the merging of the rendering result corresponding to the right edge light rendering channel of the first rendering layer after brightness adjustment and the third merging result after the adjustment of the dark color intensity can be achieved through the merge node in Nuke. Optionally, when merging the rendering result corresponding to the right edge light rendering channel of the first rendering layer after brightness adjustment and the third merging result after the adjustment of the dark color intensity through the merge node in Nuke, the screen mode can be adopted, that is, the pixel values of the two images are multiplied and then inverted to obtain the merging result.

[0138] Step S10656-8: Generate a rendered image of the virtual model based on the fourth merging result.

[0139] In an optional implementation manner, step S10656-8 can be implemented through the following steps S10656-8a to step S10656-8d.

[0140] Step S10656-8a: Extract the third transparency information from the rendering result corresponding to the specular highlight rendering channel of the first rendering layer;

[0141] Step S10656-8b: Adjust the third transparency information;

[0142] In this step, first, the third transparency information can be extracted from the rendering result corresponding to the specular highlight rendering channel of the first rendering layer, and then the third transparency information can be adjusted, so as to adjust the specular highlight part of the virtual model and change the three-dimensional sense of the virtual model.

[0143] Optionally, extracting the third transparency information from the rendering result corresponding to the specular highlight rendering channel of the first rendering layer can be achieved through the keyer node in Nuke, and adjusting the third transparency information can be achieved through the colorcorrect node in Nuke.

[0144] Step S10656-8c: Merge the adjusted third transparency information and the fourth merging result to obtain a fifth merging result;

[0145] In this step, the adjusted third transparency information can be merged with the fourth merging result obtained in step S10656-7.

[0146] Optionally, the merging of the adjusted third transparency information and the fourth merging result can be achieved through the merge node in Nuke. Optionally, when merging the adjusted third transparency information and the fourth merging result through the merge node in Nuke, the screen mode can be adopted, that is, the pixel values of the two images are multiplied and then inverted to obtain the merging result.

[0147] Step S10656-8d: Generate a rendered image of the virtual model based on the fifth merging result.

[0148] In an alternative embodiment, step S10656-8d may include: merging the rendering file of the second rendering layer and the fifth merging result to obtain a rendered image of the virtual model.

[0149] Optionally, the merging of the rendering file of the second rendering layer and the fifth merging result can be achieved through the merge node in Nuke. Optionally, when merging the rendering file of the second rendering layer and the fifth merging result through the merge node in Nuke, the multiply mode can be adopted, that is, the pixel values of the two images are multiplied to obtain the merging result.

[0150] In an alternative embodiment, the method for model rendering may further include the following steps:

[0151] Provide adjustment controls for adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel in the graphical user interface;

[0152] In response to an operation on the adjustment control, adjust the adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel.

[0153] In this embodiment, for each adjustable parameter (such as the lightness, channel intensity, color intensity, brightness, color, etc. mentioned above) of the rendering result corresponding to each first rendering channel and the rendering result corresponding to each second rendering channel, a corresponding adjustment control can be configured. The user can freely adjust the corresponding parameters of the corresponding channel by operating on the specific adjustment control, thereby controlling the rendering performance of the virtual model. Among them, the operation on the specific adjustment control can be determined according to the type of the adjustment control. For example, if the adjustment control is a slider control, the operation on the specific adjustment control can be a drag operation, a sliding operation, etc. For example, if the adjustment control is an input box control, the operation on the specific adjustment control can be an operation of inputting parameters. The present application does not make specific limitations on this.

[0154] In this embodiment, by exposing adjustable key parameters in the graphical user interface, the user can finely control the stereoscopic performance of the virtual model according to needs without paying attention to the underlying logic of model rendering, so as to obtain a virtual model with the desired effect, enabling the user (such as a compositor) to focus more on creation rather than technical details, which promotes the efficient operation and quality improvement of the entire production process.

[0155] Optionally, the implementation process of step S106 above can be modularly encapsulated to form a general plugin. The user only needs to use the rendering files of the first rendering layer and the second rendering layer as inputs and call the plugin to achieve a stylized effect between physical realism and flat effect for the virtual model. Moreover, by adjusting key parameters, the stylized effect can be controlled to transition between physical realism and flat effect.

[0156] In an embodiment of the present application, a method for model rendering is provided. A first rendering layer configured with at least one first rendering channel is generated based on a virtual model, and corresponding materials are assigned to each part of the virtual model in the first rendering layer; a second rendering layer configured with at least one second rendering channel is generated based on the virtual model, and a preset first non-physical material is assigned to the virtual model in the second rendering layer; physical rendering is performed on the virtual model in the first rendering layer to generate rendering results corresponding to each of the at least one first rendering channel, and a rendering file of the first rendering layer is obtained; non-physical rendering is performed on the virtual model in the second rendering layer to generate rendering results corresponding to each of the at least one second rendering channel, and a rendering file of the second rendering layer is obtained; the rendering results corresponding to the first rendering channel are extracted from the rendering file of the first rendering layer, and the rendering results corresponding to the second rendering channel are extracted from the rendering file of the second rendering layer; parameter adjustment is performed on the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and based on the adjusted rendering results, merging is performed to obtain a rendering image of the virtual model. Through hierarchical rendering and precise separation and control of rendering channels in the embodiments of the present application, not only can the materials, light and shadow effects, etc. of the virtual model be independently and carefully adjusted and controlled, but also various complex scene requirements can be flexibly responded to during the overall synthesis process of the virtual model rendering effect, realizing the free conversion of any stylized effect between physical realism and flat effect for the virtual model, providing a unified specification and flexible adjustable space for the production of model stylized effects, being able to efficiently achieve the unity and control of model stylized effects, and reducing the production cycle and production cost of model stylized effects.

[0157] Corresponding to the method for model rendering provided by the embodiment of the present application, the embodiment of the present application also provides a device for model rendering, as Figure 5 shown. The device 800 includes:

[0158] A first channel configuration and material assignment module 801, configured to generate a first rendering layer configured with at least one first rendering channel based on a virtual model, and assign corresponding materials to each part of the virtual model in the first rendering layer;

[0159] The second channel configuration and material assignment module 802 is used to generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0160] The first rendering module 803 is used to perform physical rendering on the virtual model in the first rendering layer, generate rendering results corresponding to the at least one first rendering channel respectively, and obtain a rendering file of the first rendering layer;

[0161] The second rendering module 804 is used to perform non-physical rendering on the virtual model in the second rendering layer, generate rendering results corresponding to the at least one second rendering channel respectively, and obtain a rendering file of the second rendering layer;

[0162] The rendering result extraction module 805 is used to extract the rendering results corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0163] The parameter adjustment and rendering result merging module 806 is used to adjust the parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain a rendering image of the virtual model.

[0164] In an optional embodiment, the adjusting the parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and performing merging based on the adjusted rendering results to obtain a rendering image of the virtual model includes:

[0165] Adjusting the brightness of the rendering result corresponding to the color rendering channel of the first rendering layer;

[0166] Adjusting the main light parameters in the rendering result corresponding to the main light rendering channel of the first rendering layer;

[0167] Merging the rendering result corresponding to the color rendering channel of the first rendering layer with adjusted brightness and the rendering result corresponding to the transparency rendering channel of the first rendering layer to obtain a first merging result;

[0168] Merging the first merging result and the rendering result corresponding to the main light rendering channel of the first rendering layer with adjusted main light parameters to obtain a second merging result;

[0169] Generating a rendering image of the virtual model based on the second merging result.

[0170] In an alternative embodiment, generating a rendered image of the virtual model based on the second merging result includes:

[0171] Extracting first transparency information from the rendering result corresponding to the main light rendering channel of the second rendering layer;

[0172] Adjusting the main light parameters of the second merging result according to the first transparency information;

[0173] Adjusting the color of the rendering result corresponding to the left edge light rendering channel of the first rendering layer;

[0174] Adding a glow effect to the rendering result corresponding to the left edge light rendering channel of the first rendering layer after color adjustment;

[0175] Merging the rendering result corresponding to the left edge light rendering channel of the first rendering layer with the glow effect added and the second merging result with the main light parameters adjusted to obtain a third merging result;

[0176] Generating a rendered image of the virtual model based on the third merging result.

[0177] In an alternative embodiment, adjusting the lightness of the rendering result corresponding to the color rendering channel of the first rendering layer includes:

[0178] Determining the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer according to the rendering result corresponding to the ID channel of the first rendering layer;

[0179] Adjusting the lightness of the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer.

[0180] In an alternative embodiment, generating a rendered image of the virtual model based on the third merging result includes:

[0181] Extracting a right dark part rendering result from the rendering result corresponding to the main light rendering channel of the second rendering layer;

[0182] Blurring the right dark part rendering result;

[0183] Adjusting the channel intensity of the blurred right dark part rendering result;

[0184] Extracting second transparency information from the right dark part rendering result with the channel intensity adjusted;

[0185] Adjusting the color intensity of the dark part of the third merging result according to the second transparency information;

[0186] Adjust the brightness of the rendering result corresponding to the right edge light rendering channel of the first rendering layer;

[0187] Merge the rendering result corresponding to the right edge light rendering channel of the first rendering layer with the brightness adjusted and the third merged result with the dark part color intensity adjusted to obtain a fourth merged result;

[0188] Generate a rendering image of the virtual model based on the fourth merged result.

[0189] In an alternative embodiment, the generating a rendering image of the virtual model based on the fourth merged result includes:

[0190] Extract third transparency information from the rendering result corresponding to the specular highlight rendering channel of the first rendering layer;

[0191] Adjust the third transparency information;

[0192] Merge the adjusted third transparency information with the fourth merged result to obtain a fifth merged result;

[0193] Generate a rendering image of the virtual model based on the fifth merged result.

[0194] In an alternative embodiment, the generating a rendering image of the virtual model based on the fifth merged result includes:

[0195] Merge the rendering file of the second rendering layer with the fifth merged result to obtain a rendering image of the virtual model.

[0196] In an alternative embodiment, the apparatus is further configured to:

[0197] Provide adjustment controls for adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel in a graphical user interface;

[0198] In response to an operation on the adjustment control, adjust the adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel.

[0199] In an alternative embodiment, the assigning, to each part of the virtual model in the first rendering layer, a material corresponding to the part includes:

[0200] Assign a physical material to the clothing part of the virtual model in the first rendering layer.

[0201] The physically rendering the virtual model in the first rendering layer includes:

[0202] Perform physical rendering on the physical material assigned to the clothing part of the virtual model in the first rendering layer.

[0203] In an alternative embodiment, assigning a physical material to the clothing part of the virtual model in the first rendering layer includes:

[0204] Assign a physical material and a second non-physical material to the clothing part of the virtual model in the first rendering layer;

[0205] The device is further configured to:

[0206] Perform non-physical rendering on the second non-physical material assigned to the clothing part of the virtual model in the first rendering layer;

[0207] Merge the rendering result of the physical material and the rendering result of the second non-physical material.

[0208] In an alternative embodiment, the physical material is an Arnold material, and / or the second non-physical material is a cartoon material.

[0209] In an alternative embodiment, generating a first rendering layer having at least one first rendering channel based on the virtual model and respectively assigning a corresponding material to each part of the virtual model in the first rendering layer includes:

[0210] Create a first rendering layer;

[0211] Add the virtual model to the first rendering layer;

[0212] Create at least one first rendering channel for the first rendering layer;

[0213] Respectively assign a corresponding material to each part of the virtual model in the first rendering layer.

[0214] In an alternative embodiment, generating a second rendering layer having at least one second rendering channel based on the virtual model and assigning a preset first non-physical material to the virtual model in the second rendering layer includes:

[0215] Create a second rendering layer;

[0216] Add the virtual model to the second rendering layer;

[0217] Create at least one second rendering channel for the second rendering layer;

[0218] Assign a preset first non-physical material to the virtual model in the second rendering layer.

[0219] In an alternative embodiment, the first non-physical material is a material with a diffuse reflection effect and no specular reflection effect.

[0220] In an alternative embodiment, the first non-physical material is a Lambert material.

[0221] In an alternative embodiment, the at least one first rendering channel includes one or more of the following: ID channel, color rendering channel, transparency rendering channel, main light rendering channel, left edge light rendering channel, right edge light rendering channel, and specular highlight rendering channel.

[0222] In an alternative embodiment, the at least one second rendering channel includes one or more of the following: color rendering channel, transparency rendering channel, and main light rendering channel.

[0223] Corresponding to the method for model rendering provided in the embodiments of the present application, the embodiments of the present application also provide an electronic device. As Figure 6 shown, the electronic device 900 includes: a processor 901; and a memory 902 for storing a program of the method for model rendering. After the electronic device is powered on and runs the program of the method for model rendering stored by the processor, the following steps are performed:

[0224] Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign the corresponding material to each part of the virtual model in the first rendering layer;

[0225] Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0226] Perform physical rendering on the virtual model in the first rendering layer to generate the rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer;

[0227] Perform non-physical rendering on the virtual model in the second rendering layer to generate the rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer;

[0228] Extract the rendering results corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0229] Adjust the parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and merge based on the adjusted rendering results to obtain the rendering image of the virtual model.

[0230] Corresponding to the method for model rendering provided by the embodiments of the present application, the embodiments of the present application further provide a computer-readable storage medium storing a program for the method for model rendering. When the program is run by a processor, the following steps are executed:

[0231] Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign corresponding materials to each part of the virtual model in the first rendering layer;

[0232] Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0233] Perform physical rendering on the virtual model in the first rendering layer to generate rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer;

[0234] Perform non-physical rendering on the virtual model in the second rendering layer to generate rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer;

[0235] Extract the rendering results corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channel from the rendering file of the second rendering layer;

[0236] Adjust parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendering image of the virtual model.

[0237] Corresponding to the method for model rendering provided by the embodiments of the present application, the embodiments of the present application further provide a computer program product, which includes: a computer program. The computer program is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to execute the following steps:

[0238] Generate a first rendering layer configured with at least one first rendering channel based on the virtual model, and assign corresponding materials to each part of the virtual model in the first rendering layer;

[0239] Generate a second rendering layer configured with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer;

[0240] Physically render the virtual model in the first rendering layer to generate rendering results corresponding to each of the at least one first rendering channels, and obtain a rendering file of the first rendering layer;

[0241] Non - physically render the virtual model in the second rendering layer to generate rendering results corresponding to each of the at least one second rendering channels, and obtain a rendering file of the second rendering layer;

[0242] Extract the rendering results corresponding to the first rendering channels from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channels from the rendering file of the second rendering layer;

[0243] Adjust parameters of the rendering results corresponding to the first rendering channels and / or the rendering results corresponding to the second rendering channels, and perform merging based on the adjusted rendering results to obtain a rendered image of the virtual model.

[0244] It should be noted that for the detailed descriptions of the apparatus, electronic device, computer - readable storage medium, and computer program product provided in the embodiments of the present application, reference can be made to the relevant descriptions of the methods in the embodiments of the present application, which will not be elaborated here.

[0245] Although the present application is disclosed above with preferred embodiments, it is not used to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be defined by the scope of the claims of the present application.

[0246] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or modules can be in electrical, mechanical or other forms.

[0247] The above - mentioned integrated modules implemented in the form of software function modules can be stored in a computer - readable storage medium. The above - mentioned software function modules stored in a storage medium include several instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in the embodiments of the present application.

[0248] It should be understood that the above-mentioned processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being completed by a hardware processor, or can be completed by a combination of hardware and software modules in the processor.

[0249] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc.

[0250] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0251] The above-mentioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0252] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disc and other media that can store program codes.

[0253] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for model rendering, characterized in that, The method includes: Generating a first rendering layer configured with at least one first rendering channel based on a virtual model, and respectively assigning corresponding materials to each part of the virtual model in the first rendering layer; Generating a second rendering layer configured with at least one second rendering channel based on the virtual model, and assigning a preset first non-physical material to the virtual model in the second rendering layer; Performing physical rendering on the virtual model in the first rendering layer to generate rendering results corresponding to each of the at least one first rendering channels, and obtaining a rendering file of the first rendering layer; Performing non-physical rendering on the virtual model in the second rendering layer to generate rendering results corresponding to each of the at least one second rendering channels, and obtaining a rendering file of the second rendering layer; Extracting the rendering results corresponding to the first rendering channels from the rendering file of the first rendering layer, and extracting the rendering results corresponding to the second rendering channels from the rendering file of the second rendering layer; Adjusting parameters of the rendering results corresponding to the first rendering channels and / or the rendering results corresponding to the second rendering channels, and merging based on the adjusted rendering results to obtain a rendering image of the virtual model.

2. The method according to claim 1, characterized in that, The adjusting parameters of the rendering results corresponding to the first rendering channels and / or the rendering results corresponding to the second rendering channels, and merging based on the adjusted rendering results to obtain a rendering image of the virtual model includes: Adjusting the brightness of the rendering result corresponding to the color rendering channel of the first rendering layer; Adjusting the main light parameters in the rendering result corresponding to the main light rendering channel of the first rendering layer; Merging the rendering result corresponding to the color rendering channel of the first rendering layer with adjusted brightness and the rendering result corresponding to the transparency rendering channel of the first rendering layer to obtain a first merging result; Merging the first merging result and the rendering result corresponding to the main light rendering channel of the first rendering layer with adjusted main light parameters to obtain a second merging result; Generating a rendering image of the virtual model based on the second merging result.

3. The method according to claim 2, characterized in that, The generating a rendering image of the virtual model based on the second merging result includes: Extracting first transparency information from the rendering result corresponding to the main light rendering channel of the second rendering layer; Adjusting the main light parameters of the second merging result according to the first transparency information; Adjusting the color of the rendering result corresponding to the left edge light rendering channel of the first rendering layer; Adding a glow effect to the rendering result corresponding to the left edge light rendering channel of the first rendering layer with adjusted color; Merging the rendering result corresponding to the left edge light rendering channel of the first rendering layer with the added glow effect and the second merging result with adjusted main light parameters to obtain a third merging result; Generating a rendering image of the virtual model based on the third merging result.

4. The method according to claim 2, characterized in that The adjusting the brightness of the rendering result corresponding to the color rendering channel of the first rendering layer includes: Determine the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer according to the rendering result corresponding to the ID channel of the first rendering layer; Adjust the brightness of the target part of the virtual model in the rendering result corresponding to the color rendering channel of the first rendering layer.

5. The method according to claim 3, wherein The generating the rendering image of the virtual model based on the third merging result includes: Extract the right dark part rendering result from the rendering result corresponding to the main light rendering channel of the second rendering layer; Blur the right dark part rendering result; Adjust the channel intensity of the blurred right dark part rendering result; Extract the second transparency information from the right dark part rendering result after adjusting the channel intensity; Adjust the color intensity of the dark part of the third merging result according to the second transparency information; Adjust the brightness of the rendering result corresponding to the right edge light rendering channel of the first rendering layer; Merge the rendering result corresponding to the right edge light rendering channel of the first rendering layer after adjusting the brightness and the third merging result after adjusting the dark part color intensity to obtain a fourth merging result; Generate the rendering image of the virtual model based on the fourth merging result.

6. The method according to claim 5, characterized in that, The generating the rendering image of the virtual model based on the fourth merging result includes: Extract the third transparency information from the rendering result corresponding to the specular highlight rendering channel of the first rendering layer; Adjust the third transparency information; Merge the adjusted third transparency information and the fourth merging result to obtain a fifth merging result; Generate the rendering image of the virtual model based on the fifth merging result.

7. The method according to claim 6, wherein The generating the rendering image of the virtual model based on the fifth merging result includes: Merge the rendering file of the second rendering layer and the fifth merging result to obtain the rendering image of the virtual model.

8. The method according to claim 1, wherein The method further includes: Provide an adjustment control for the adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel in the graphical user interface; In response to an operation on the adjustment control, adjust the adjustable parameters of the rendering result corresponding to the first rendering channel and / or the rendering result corresponding to the second rendering channel.

9. The method according to claim 1, characterized in that The endowing each part of the virtual model in the first rendering layer with the material corresponding to the part includes: Endow the clothing part of the virtual model in the first rendering layer with a physical material. The physically rendering the virtual model in the first rendering layer includes: Physically render the physical material endowed to the clothing part of the virtual model in the first rendering layer.

10. The method according to claim 9, wherein The endowing the clothing part of the virtual model in the first rendering layer with a physical material includes: Endow the clothing part of the virtual model in the first rendering layer with a physical material and a second non-physical material; The method further includes: Non-physically render the second non-physical material endowed to the clothing part of the virtual model in the first rendering layer; The rendering result of the physical material is merged with the rendering result of the second non-physical material.

11. The method according to claim 10, characterized in that, The physical material is an Arnold material, and / or the second non-physical material is a cartoon material.

12. The method according to claim 1, characterized in that Generating a first rendering layer with at least one first rendering channel based on the virtual model, and respectively assigning the corresponding material to each part of the virtual model in the first rendering layer, includes: Creating a first rendering layer; Adding the virtual model to the first rendering layer; Creating at least one first rendering channel for the first rendering layer; Respectively assigning the corresponding material to each part of the virtual model in the first rendering layer.

13. The method according to claim 1, characterized in that, Generating a second rendering layer with at least one second rendering channel based on the virtual model, and assigning a preset first non-physical material to the virtual model in the second rendering layer, includes: Creating a second rendering layer; Adding the virtual model to the second rendering layer; Creating at least one second rendering channel for the second rendering layer; Assigning a preset first non-physical material to the virtual model in the second rendering layer.

14. The method according to claim 1, wherein The first non-physical material is a material with a diffuse reflection effect and no specular reflection effect.

15. The method according to claim 14, wherein The first non-physical material is a Lambert material.

16. The method according to claim 1, wherein The at least one first rendering channel includes one or more of the following: ID channel, color rendering channel, transparency rendering channel, main light rendering channel, left edge light rendering channel, right edge light rendering channel, and specular highlight rendering channel.

17. The method according to claim 1, wherein The at least one second rendering channel includes one or more of the following: color rendering channel, transparency rendering channel, and main light rendering channel.

18. An apparatus for model rendering, characterized in that, The device includes: A first channel configuration and material assignment module, configured to generate a first rendering layer with at least one first rendering channel based on the virtual model, and respectively assign the corresponding material to each part of the virtual model in the first rendering layer; A second channel configuration and material assignment module, configured to generate a second rendering layer with at least one second rendering channel based on the virtual model, and assign a preset first non-physical material to the virtual model in the second rendering layer; A first rendering module, configured to perform physical rendering on the virtual model in the first rendering layer, generate the rendering results corresponding to the at least one first rendering channel respectively, and obtain the rendering file of the first rendering layer; A second rendering module, configured to perform non-physical rendering on the virtual model in the second rendering layer, generate the rendering results corresponding to the at least one second rendering channel respectively, and obtain the rendering file of the second rendering layer; A rendering result extraction module, configured to extract the rendering results corresponding to the first rendering channel from the rendering file of the first rendering layer, and extract the rendering results corresponding to the second rendering channel from the rendering file of the second rendering layer; A parameter adjustment and rendering result merging module, configured to adjust the parameters of the rendering results corresponding to the first rendering channel and / or the rendering results corresponding to the second rendering channel, and perform merging based on the adjusted rendering results to obtain the rendering image of the virtual model.

19. An electronic device, characterized in that, Includes: A processor; And A memory for storing a data processing program, which, after the electronic device is powered on and the program is run by the processor, executes the method according to any one of claims 1-17.

20. A computer-readable storage medium, characterized in that, There is stored a data processing program, which is run by a processor and executes the method according to any one of claims 1-17.