Search

CN-114764840-B - Image rendering method, device, equipment and storage medium

CN114764840BCN 114764840 BCN114764840 BCN 114764840BCN-114764840-B

Abstract

The embodiment of the invention provides an image rendering method, an image rendering device, image rendering equipment and a storage medium, wherein the method comprises the following steps: obtaining object attributes of an object to be rendered, predicting smoothing parameters according to a three-dimensional image to be rendered corresponding to the object to be rendered with the object attributes, and coloring by using the smoothing parameters, namely, rendering of the object is completed. The predicted smoothing parameters can reflect the material of the object to be rendered. By adopting the scheme, the smoothing parameters used in the coloring process are predicted and are specially aimed at the material of the object to be rendered, so that the material can be more accurately introduced into the rendering process, and the rendering authenticity is improved.

Inventors

  • GAO DAIHENG
  • ZHANG BANG
  • PAN PAN
  • XU YINGHUI

Assignees

  • 阿里巴巴达摩院(杭州)科技有限公司
  • 阿里巴巴集团控股有限公司

Dates

Publication Date
20260421
Application Date
20201231
Priority Date
20201231

Claims (20)

  1. 1. An image rendering method, comprising: acquiring object attributes of an object to be rendered; Inputting direction information of a face element which encloses the object to be rendered in a three-dimensional image to be rendered into a second prediction model, and outputting smooth parameters reflecting the material of the object to be rendered by the second prediction model, wherein the three-dimensional image to be rendered is a three-dimensional image corresponding to the object to be rendered with the object attribute; and rendering the three-dimensional image to be colored according to the smoothing parameters.
  2. 2. The method of claim 1, wherein the obtaining object properties of the object to be rendered comprises: Acquiring a two-dimensional image containing the object to be rendered; The two-dimensional image is input into a first predictive model to output image features as the object attributes from the first predictive model.
  3. 3. The method according to claim 2, wherein the method further comprises: and generating a three-dimensional image to be colored corresponding to the object to be rendered according to the object attribute.
  4. 4. A method according to claim 3, wherein generating a three-dimensional image to be rendered corresponding to the object to be rendered according to the object attribute comprises: and generating a three-dimensional image to be colored corresponding to the object to be rendered according to the image characteristics and a template image, wherein the template image corresponds to the type of the object to be rendered.
  5. 5. A method according to claim 3, wherein said rendering the three-dimensional image to be rendered according to the smoothing parameters comprises: Determining a corresponding relation between a target three-dimensional point in the three-dimensional image to be colored and a target pixel point in a screen through coordinate conversion, wherein the target three-dimensional point is any three-dimensional point in the three-dimensional image to be colored; determining rendering parameters of the target three-dimensional points according to the smoothing parameters; determining a color value of the target three-dimensional point according to the rendering parameters; And according to the corresponding relation, rendering the target pixel point and the color value of the target three-dimensional point in a screen.
  6. 6. The method according to claim 5, wherein determining the correspondence between the target three-dimensional point in the three-dimensional image to be rendered and the target pixel point in the screen by coordinate transformation includes: determining target surface elements with preset number, wherein the depth values meet the requirements, according to the depth values of the vertexes of the surface elements in the three-dimensional image to be colored; determining the gravity center coordinate value of the target surface element according to the coordinate value of the vertex of the target surface element; According to the gravity center coordinate value, interpolating the coordinate value of the vertex to obtain the coordinate value of each three-dimensional point in the three-dimensional image to be colored; And determining the corresponding relation between each three-dimensional point in the three-dimensional image to be colored and the pixel point in the screen through coordinate conversion.
  7. 7. The method of claim 5, wherein determining rendering parameters for the target three-dimensional point based on the smoothing parameters comprises: determining texture parameters of the target three-dimensional points; And determining diffuse reflection parameters and specular reflection parameters of the target three-dimensional points according to the smoothing parameters, direction information of the surface elements where the target three-dimensional points are located, the positions of the light sources and the specular reflection parameters, wherein the light sources are located in shooting environments corresponding to the two-dimensional images.
  8. 8. The method according to claim 1, wherein the method further comprises: determining a rendering scene to which the object to be rendered belongs; acquiring a preset parameter range corresponding to the rendering scene; and if the predicted smoothing parameter exceeds the preset parameter range, displaying the smoothing parameter for modification by a user.
  9. 9. A method according to claim 3, characterized in that the method further comprises: acquiring a sample image containing a sample object, wherein the sample image is a two-dimensional image; Generating a three-dimensional image to be colored corresponding to the sample image according to the image characteristics of the sample image; generating a to-be-colored two-dimensional image corresponding to the sample image according to the to-be-colored three-dimensional image corresponding to the sample image; Inputting the direction information of the pixel points in the two-dimensional image to be colored into the second prediction model so as to output smoothing parameters by the second prediction model; rendering the two-dimensional image to be colored according to the smoothing parameters to obtain a colored two-dimensional image; And adjusting model parameters of the second prediction model according to the color difference between the sample image and the colored two-dimensional image.
  10. 10. An image rendering method, comprising: acquiring object attributes of objects to be rendered in a live page; Inputting direction information of a face element which encloses the object to be rendered in a three-dimensional image to be rendered into a second prediction model, and outputting smooth parameters reflecting the material of the object to be rendered by the second prediction model, wherein the three-dimensional image to be rendered is a three-dimensional image corresponding to the object to be rendered with the object attribute; rendering the three-dimensional image to be colored according to the smoothing parameters; And displaying the colored three-dimensional image corresponding to the object to be rendered in the live page.
  11. 11. The method of claim 10, wherein the object to be rendered comprises at least one of a trading object in a live page, a virtual live background, and a virtual anchor.
  12. 12. The method according to claim 10 or 11, characterized in that the method further comprises: and generating a three-dimensional image to be colored corresponding to the object to be rendered according to the object attribute.
  13. 13. The method of claim 12, wherein generating the three-dimensional image to be rendered corresponding to the object to be rendered according to the object attribute comprises: Acquiring a two-dimensional image containing the object to be rendered; Generating a three-dimensional image to be colored corresponding to the object to be rendered according to a template image and image characteristics of the two-dimensional image, wherein the template image corresponds to the type of the object to be rendered, and the image characteristics are used as the object attributes.
  14. 14. An image rendering method, comprising: acquiring object attributes of a target human body part of a user; Inputting direction information of a face element surrounding the target human body part in a three-dimensional image to be colored into a second prediction model, and outputting a smoothing parameter reflecting the material of the target human body part by the second prediction model, wherein the three-dimensional image to be colored is a three-dimensional image corresponding to the target human body part with the object attribute; rendering the three-dimensional image to be colored according to the smoothing parameters; And displaying the colored three-dimensional image corresponding to the target human body part.
  15. 15. The method of claim 14, wherein the obtaining object properties of the target body part of the user comprises: responding to shooting operation triggered by the user, and acquiring a two-dimensional image containing the target human body part; and extracting image characteristics of the two-dimensional image to serve as the object attribute.
  16. 16. The method of claim 15, wherein the method further comprises: And generating a three-dimensional image to be colored corresponding to the target human body part according to a template image and the image characteristics, wherein the template image comprises the target human body part.
  17. 17. An image rendering method, comprising: obtaining object attributes of objects to be rendered in the road image; Inputting direction information of a face element which encloses the object to be rendered in a three-dimensional image to be rendered into a second prediction model, and outputting smooth parameters reflecting the material of the object to be rendered by the second prediction model, wherein the three-dimensional image to be rendered is a three-dimensional image corresponding to the object to be rendered with the object attribute; rendering the three-dimensional image to be colored according to the smoothing parameters; And generating a three-dimensional map according to the colored three-dimensional image corresponding to the object to be rendered.
  18. 18. An image rendering apparatus, comprising: The acquisition module is used for acquiring object attributes of the object to be rendered; The prediction module is used for inputting direction information of a face element which encloses the object to be rendered in a three-dimensional image to be rendered into a second prediction model, so that the second prediction model outputs smooth parameters reflecting the material of the object to be rendered, and the three-dimensional image to be rendered is a three-dimensional image corresponding to the object to be rendered with the object attribute; and the rendering module is used for rendering the three-dimensional image to be colored according to the smoothing parameters.
  19. 19. An electronic device comprising a memory, a processor, wherein the memory has executable code stored thereon that, when executed by the processor, causes the processor to perform the image rendering method of any of claims 1-9.
  20. 20. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the image rendering method of any of claims 1 to 9.

Description

Image rendering method, device, equipment and storage medium Technical Field The present invention relates to the field of image processing technologies, and in particular, to an image rendering method, apparatus, device, and storage medium. Background With the development of computers, three-dimensional modeling has been applied to more and more fields. For example, in the field of animation or game production, each object contained in an animation scene or a game scene can be obtained through a three-dimensional modeling mode. In the field of live broadcasting, for example, a virtual anchor has recently appeared, and the anchor can build its own avatar by using Application software (APP) and live broadcast with the avatar. Taking the avatar of the avatar as an example, the avatar needs to be rendered before being displayed on the screen. Therefore, how to improve the authenticity of rendering is a urgent problem to be solved. Disclosure of Invention In view of this, embodiments of the present invention provide an image rendering method, apparatus, device, and storage medium for ensuring the authenticity of rendering. In a first aspect, an embodiment of the present invention provides an image rendering method, including: acquiring object attributes of an object to be rendered; Predicting smoothing parameters reflecting the material of the object to be rendered according to the three-dimensional image to be colored corresponding to the object to be rendered with the object attribute; and rendering the three-dimensional image to be colored according to the smoothing parameters. In a second aspect, an embodiment of the present invention provides an image rendering apparatus including: The acquisition module is used for acquiring object attributes of the object to be rendered; The prediction module is used for predicting smoothing parameters reflecting the materials of the object to be rendered according to the three-dimensional image to be rendered corresponding to the object to be rendered with the object attribute; and the rendering module is used for rendering the three-dimensional image to be colored according to the smoothing parameters. In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is configured to store one or more computer instructions, and the one or more computer instructions implement the image rendering method in the first aspect when executed by the processor. The electronic device may also include a communication interface for communicating with other devices or communication networks. In a fourth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to at least implement the image rendering method according to the first aspect. In a fifth aspect, an embodiment of the present invention provides an image rendering method, including: acquiring object attributes of objects to be rendered in a live page; predicting smoothing parameters reflecting the material of the object to be rendered according to the three-dimensional image to be colored corresponding to the object to be rendered with the object attribute; rendering the three-dimensional image to be colored according to the smoothing parameters; And displaying the colored three-dimensional image corresponding to the object to be rendered in the live page. In a sixth aspect, an embodiment of the present invention provides an image rendering apparatus, including: the acquisition module is used for acquiring object attributes of the objects to be rendered in the live page; The prediction module is used for predicting smoothing parameters reflecting the materials of the objects to be rendered according to the three-dimensional images to be colored corresponding to the objects to be rendered with the object attributes; The rendering module is used for rendering the three-dimensional image to be colored according to the smoothing parameters; And the display module is used for displaying the colored three-dimensional image corresponding to the object to be rendered in the live page. In a seventh aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is configured to store one or more computer instructions, and the one or more computer instructions implement the image rendering method in the fifth aspect, when executed by the processor. The electronic device may also include a communication interface for communicating with other devices or communication networks. In an eighth aspect, embodiments of the present invention provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to at least implement the