Rendering method, electronic equipment, storage medium and computer program product
By merging digital human texture maps, the problem of low rendering efficiency was solved, achieving efficient rendering effects, reducing computational load, and improving rendering performance on mobile devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MIGU CO LTD
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-24
AI Technical Summary
When rendering a large number of digital humans, existing technologies require obtaining rendering data for each digital human separately, resulting in low rendering efficiency.
By determining the range of angles to which the body orientations of multiple digital humans belong, merging the texture maps within each range, generating a merged texture map, and rendering the merged texture map, the computational load of processing texture maps multiple times is reduced.
It improves rendering efficiency, reduces computational burden, and achieves high-efficiency rendering effects on mobile devices.
Smart Images

Figure CN121921402A_ABST
Abstract
Description
Technical Field
[0001] This application relates to rendering technology, and more particularly to a rendering method, electronic device, storage medium, and computer program product. Background Technology
[0002] With the development of artificial intelligence (AI) technology, digital humans have been widely applied in various technical fields. Digital humans refer to virtual or digitized characters created using computer and artificial intelligence technologies. They can simulate human-like behavior, thinking, and appearance; they are also called virtual digital humans. Digital human rendering refers to the real-time rendering and synchronous display of the corresponding image of a digital human on a mobile device. However, when rendering a large number of digital humans, it is necessary to obtain the rendering data for each digital human separately, resulting in low rendering efficiency. Summary of the Invention
[0003] This application provides a rendering method, electronic device, storage medium, and computer program product that can improve rendering efficiency.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a rendering method, the method comprising: The body orientation angles of multiple digital humans are determined to be within multiple angular ranges, and at least one texture map of a digital human within each angular range is determined based on the multiple angular ranges and the multiple texture maps corresponding to the multiple digital humans. The texture maps of at least one digital human within each angular range are merged to obtain a merged texture map. The merged texture map is then rendered.
[0005] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method provided in the embodiments of this application.
[0006] This application provides a storage medium storing a computer program or computer-executable instructions for implementing the rendering method provided in this application when executed by a processor.
[0007] This application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implement the rendering method provided in this application.
[0008] The embodiments of this application have the following beneficial effects: By determining multiple angular ranges corresponding to the body orientation angles of multiple digital humans, identifying at least one texture map of a digital human within each angular range, and merging these texture maps to obtain a merged texture map, the viewpoint continuity of the digital human texture maps under different perspectives can be ensured. Rendering the merged texture map allows for the acquisition of multiple texture maps corresponding to multiple digital humans at once, and rendering is performed only on the merged texture map. This effectively reduces the computational load of processing multiple texture maps multiple times, alleviates computational pressure, and thus improves rendering efficiency. Attached Figure Description
[0009] Figure 1 A flowchart illustrating a rendering method provided in an embodiment of this application; Figure 2 A schematic diagram of different parts of an exemplary digital human provided for an embodiment of this application; Figure 3 A schematic diagram illustrating an exemplary standing posture angle of a digital human as provided in this application embodiment; Figure 4 A schematic diagram illustrating an exemplary merging of 2D texture maps provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of a rendering device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0012] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] This application provides a rendering method. Figure 1 This is a flowchart illustrating a rendering method provided in an embodiment of this application; as shown below. Figure 1 As shown, the method includes: S101. Determine the multiple angle ranges to which the body orientation angles of the multiple digital humans belong, and determine at least one texture map of the digital human within each angle range based on the multiple angle ranges and the multiple texture maps corresponding to the multiple digital humans.
[0014] It should be noted that the rendering method can be understood as the rendering method for mobile devices. Multiple digital humans can be understood as a large-scale digital human program; the specific number of digital humans can be determined based on actual circumstances and is not limited here. The body orientation angle of a digital human can be understood as the orientation angle of the digital human's body when dividing angles from horizontal / vertical directions. Determining the multiple angular ranges to which the body orientation angles of multiple digital humans belong can be understood as dividing the full circle into multiple target angular ranges according to a preset interval, and determining the multiple angular ranges to which the body orientation angles of multiple digital humans belong based on these target angular ranges; where a full circle is 360 degrees, the specific degree of the preset interval can be determined based on actual circumstances and is not limited here. As an example, the preset interval can be 10 degrees; with 10-degree intervals, 360 degrees can be divided into 36 angular ranges, namely 0 degrees to 10 degrees, 11 degrees to 20 degrees, etc. Determining the texture map of at least one digital human within each angular range based on multiple angular ranges and the multiple texture maps corresponding to multiple digital humans can be understood as outputting the texture map of at least one digital human within each angular range. The number of digital figures within each angle range can be determined based on the actual situation and is not limited here.
[0015] S102. Merge the texture maps of at least one digital human within each angle range to obtain the merged texture map.
[0016] It should be noted that the merged texture map is a two-dimensional (2D) texture map; in the case of sequential frame animation (i.e., the digital human is a dynamic digital human), the merged texture map is a 2D texture array. Merging the texture maps of at least one digital human within each angular range can be understood as merging the texture maps of at least one digital human within each angular range along horizontal / vertical dimensions to obtain the merged 2D texture map. For example, if each small texture map is 64*64 pixels, merging 256 small texture maps can generate a large texture map with a size of 1024*1024 pixels.
[0017] S103. Render the merged texture map.
[0018] It should be noted that rendering the merged texture map can be understood as batching the merged texture map and the rectangular mesh into a single batch and then rendering it on the Graphics Processing Unit (GPU). Specifically, the batching of the merged texture map and the rectangular mesh uses the GPU instantiation batching method.
[0019] The solution in this application embodiment determines multiple angle ranges corresponding to the body orientation angles of multiple digital humans, generates at least one texture map of a digital human within each angle range, merges the texture maps of at least one digital human within each angle range, and renders the merged texture map. This method can merge the texture maps of multiple digital humans according to the angle range and use the merged texture map for rendering, effectively reducing the amount of computation for processing texture maps, alleviating computational pressure, and thus improving rendering efficiency.
[0020] In this embodiment of the application, the process of rendering the merged texture map specifically includes: determining the first angle information of the mesh to be rendered relative to the shooting component, and searching for the first texture map from the merged texture map according to the first angle information; rendering the first texture map onto the mesh to be rendered to obtain the first digital human model corresponding to the first texture map, and rendering the first digital human model.
[0021] It should be noted that the mesh to be rendered is a mesh, and the shape of the mesh can be determined according to the actual situation. It is not limited here; as an example, the mesh to be rendered is a rectangular mesh. The capturing component can be understood as a camera. The first angle information can be understood as the Euler angles of the mesh relative to the camera. The first texture map can be understood as the texture map to be rendered. Rendering the first texture map onto the mesh to be rendered can be understood as tiling the first texture map onto the mesh. The first digital human model can be understood as the 3D digital human model corresponding to the first texture map.
[0022] In this embodiment of the application, the process of determining the first angle information of the mesh to be rendered relative to the shooting component specifically includes: obtaining the first position information of the shooting component and the second position information of the mesh to be rendered respectively; determining the rotation angle of the mesh to be rendered based on the first position information; the rotation angle is used for the mesh to be rendered to face the shooting component; adjusting the second position information based on the rotation angle to obtain the third position information of the mesh to be rendered; and determining the first angle information based on the third position information and the first position information.
[0023] It should be noted that the first position information can be understood as the camera's position information or the position information of the camera matrix. The second position information of the mesh to be rendered can be understood as the raw position information of the mesh passed to the GPU. Obtaining the first position information of the shooting component and the second position information of the mesh to be rendered can be understood as obtaining the positions of the camera matrix and the mesh in the shader. The first and second position information can be obtained by the shader or passed from the CPU to the GPU.
[0024] It should be noted that determining the rotation angle of the mesh to be rendered based on the first position information can be understood as calculating the mesh's rotation angle based on the camera's position, ensuring the mesh plane always faces the camera. For example, determining the rotation angle of the mesh based on the first position information can be done by calculating the camera's orientation vector, ensuring the mesh plane is always perpendicular to the camera's orientation vector, thus obtaining the rotation angle. The third position information is the position information of the mesh after rotation. Determining the first angle information based on the third and first position information can be understood as calculating the position of the mesh's center point in the camera view, and then calculating the horizontal / vertical angle based on that position.
[0025] The solution in this application embodiment adjusts the position of the mesh so that it always faces the camera, ensuring that the user always sees a three-dimensional (3D) digital human, thus improving the user's viewing experience.
[0026] In this embodiment of the application, the process of finding the first texture image from the merged texture image based on the first angle information specifically includes: determining the distance information between the shooting component and the mesh to be rendered; determining the scaling ratio of the first texture image based on the distance information, and scaling the merged texture image according to the scaling ratio to obtain a scaled texture image; and finding the first texture image from the scaled texture image based on the first angle information.
[0027] It should be noted that determining the scaling ratio of the first texture image based on distance information can be understood as the camera projection matrix achieving a "nearer is larger, farther is smaller" perspective effect through mathematical transformation. The core principle is that when converting three-dimensional coordinates to two-dimensional coordinates, the scaling is automatically performed by "dividing by z" through homogeneous coordinates and normalization operations. Finding the first texture image from the scaled texture image based on the first angle information can be understood as retrieving the first texture image at the corresponding angle from the scaled texture image based on the first angle information.
[0028] The solution in this application embodiment uses a GPU to perform subsequent calculations and rendering. The GPU reads a suitable single-person texture image from a large texture map and renders it based on the camera angle, thus saving the performance and memory of the mobile central processing unit (CPU).
[0029] In this embodiment of the application, before determining the multiple angle ranges corresponding to the body orientation angles of multiple digital humans, the method further includes: detecting multiple pose information corresponding to multiple digital humans within a certain period of time; obtaining a texture map corresponding to the first digital human when the pose information corresponding to the first digital human among the multiple digital humans has not changed; and obtaining multiple texture maps corresponding to the first digital human when the pose information corresponding to the first digital human has changed.
[0030] It should be noted that the specific range of a time period can be determined based on the actual situation and is not limited here. As an example, a time period can be 1 minute. The first digital human can be any one of multiple digital humans. If the posture information of the first digital human does not change, it can be understood as the first digital human's posture remaining unchanged for a period of time; if the posture information of the first digital human changes, it can be understood as the first digital human's posture changing for a period of time. A static digital human can be understood as a digital human in a static state, while a dynamic digital human can be understood as a digital human in motion. As an example, digital humans clapping and cheering are dynamic digital humans. Obtaining multiple texture maps corresponding to the first digital human can be understood as obtaining each frame of the first (dynamic) digital human in motion and obtaining the texture map corresponding to each frame.
[0031] In this embodiment of the application, the process of rendering the first digital human model specifically includes: obtaining the pixels corresponding to the first texture map, searching for the body part information corresponding to the pixels from a preset range of body part pixels based on the pixels, and rendering the first digital human model based on the body part information.
[0032] It should be noted that the preset pixel range for body parts can be understood as the range after color partitioning of body parts based on preset similarity values; it can also be illustrated by defining the RGBA channel R as follows: 0-40 represents skin tone, 40-80 represents hair or hat, 120-160 represents upper garment, 160-200 represents lower garment, 200-240 represents shoes, and 240-255 represents pupils. The system retrieves the corresponding body part information from the preset pixel range based on the pixel. Rendering the first digital human model based on this body part information can be illustrated by reading the R channel of the pixel at the corresponding texture position in the fragment shader, determining the corresponding region of the digital human for that pixel, and replacing it with the built-in color of that region. For example, if the pixel corresponds to a skin tone region, different skin tones such as yellow, white, black, and brown can be randomly returned to achieve differentiation in the digital human.
[0033] In this embodiment of the application, the process of rendering the first digital human model specifically includes: obtaining the target normal information and / or target lighting information corresponding to the first digital human model from the first correspondence between the pixel points and normal information and / or the second correspondence between the pixel points and lighting information in the pre-stored first correspondence relationship between the pixel points and normal information and / or the second correspondence relationship between the pixel points and lighting information; and rendering the first digital human model based on the target normal information and / or target lighting information.
[0034] It should be noted that the first correspondence is saved to the B channel of RGBA; the second correspondence is saved to the G channel of RGBA. Based on the pixels corresponding to the first texture map, the target normal information and / or target lighting information corresponding to the first digital human model are obtained from the pre-stored first correspondence between pixels and normal information and / or the second correspondence between pixels and lighting information. The first digital human model is rendered based on the target normal information and / or target lighting information. This can be understood as reading the B channel and / or G channel values from the pixels, extracting the normal information or other important stored information, and adding it to the shader calculation to improve the rendering effect of the digital human.
[0035] The solution in this application classifies digital humans based on their behavior and color characteristics, divides them into angles from different directions such as horizontal / vertical, and merges digital humans at the same angle into a single texture image for subsequent calculation and rendering. This effectively reduces the computational load of fragmented texture images on mobile devices, alleviates computational pressure, and improves computational efficiency.
[0036] To facilitate understanding, an example is provided here to illustrate the above method, which can be used as an example of a mobile device rendering method for tens of thousands of people on screen simultaneously. By dividing and processing the digital humans according to different angles, the processed image data is synthesized into a large 2D texture map. At runtime, batch processing technology is used to send the large texture map and mesh data to the GPU. The GPU performs camera calculations and rendering information, and calculates the scaling ratio of the large texture map based on the distance between the camera and the target digital human. The appropriate texture map of a single digital human is then selected for rendering, thus achieving the effect of tens of thousands of people on screen simultaneously on a mobile device.
[0037] After classifying digital humans based on their behavior and color characteristics, angles are divided from different directions such as horizontal and vertical. Digital humans at the same angle are merged into a single texture image for subsequent computation and rendering. This effectively reduces the computational load of fragmented texture image processing on mobile devices, alleviating computational pressure and improving computational efficiency. Subsequent computation and rendering are performed using the GPU. The GPU reads a suitable single-human texture image from the large texture image based on the camera angle for rendering, saving CPU performance and memory on mobile devices.
[0038] The method for rendering 10,000 people on the same screen on mobile devices involves preprocessing data such as digital human behavior and pose classification, color partitioning, and angle classification. The preprocessed image data is then synthesized into 2D texture maps. At runtime, batch processing technology is used to send the data to the GPU, where camera calculations, pose selection, color rendering, and other data processing are performed, thus achieving the effect of 10,000 people on the same screen.
[0039] Step 1: Data preprocessing.
[0040] 1. Classify the different behaviors and postures of the digital human. Behaviors and postures include at least clapping, cheering, bowing, and holding up signs.
[0041] 2. Divide the digital human's skin, hair, clothing, and other parts into color zones and store information such as normals and lighting.
[0042] Figure 2 A schematic diagram of different parts of an exemplary digital human provided for embodiments of this application; such as Figure 2 As shown, a digital human includes at least a hat or hair area, a pupil area, a skin color area, an upper clothing area, and a pants area.
[0043] Color partitioning method: In the RGBA channel R, 0-40 represents skin tone, 40-80 represents hair or hat, 120-160 represents top, 160-200 represents bottom, 200-240 represents shoes, and 240-255 represents pupil.
[0044] Storing information such as normals and lighting: The B channel can store the normal map of the corresponding area. The G channel can be reserved to store lighting or other important information.
[0045] 3. Divide the digital human into angles in horizontal / vertical directions and output the corresponding digital human texture images. For example, dividing the digital human into angles in 10-degree intervals from 0 to 360 degrees can generate 36 texture images of 64*64 or 32*32 pixels. Figure 3 A schematic diagram illustrating an exemplary digital human standing posture angle provided in this application embodiment; as shown Figure 3 As shown, preprocessing is performed from the horizontal direction according to the digital human's standing posture angle.
[0046] Step 2: Data Synthesis.
[0047] The pre-processed texture images are merged into multiple 2D texture images according to horizontal / vertical dimensions.
[0048] It should be noted that the preprocessed texture images are merged into a single 2D texture image according to the horizontal and vertical dimensions. If there is a sequence of frame animations, they need to be merged into a 2D texture array. Figure 4 This application provides an exemplary schematic diagram of a merged 2D texture map as an embodiment of the present application; such as Figure 4 As shown, texture images are merged into a single 2D texture image. If each small texture image is 64*64 pixels, merging 256 small texture images can generate a large texture image with a size of 1024*1024 pixels.
[0049] Step 3: Data transmission.
[0050] During program runtime, GPU Instance batching technology is used to batch 2D texture map arrays and rectangular meshes into the GPU.
[0051] Step 4: Data Processing.
[0052] 1. In the GPU, the angle and scale of the rectangular mesh matrix are calculated in real time based on the camera angle, ensuring the mesh always faces the camera. Simultaneously, a suitable single-person texture image is read from the large texture map and rendered according to the camera angle. This ensures that the user always sees a 3D digital human.
[0053] The detailed steps are as follows: (1) Obtain the positions of the camera matrix and mesh in the shader, calculate the distance between them, and convert it into the scaling ratio of the texture.
[0054] It should be noted that the camera matrix and mesh position can be passed from the CPU to the GPU, and the shader can also obtain them. The camera projection matrix achieves the "nearer objects appear larger and farther objects smaller" perspective effect through mathematical transformations. The core principle is that when converting 3D coordinates to 2D coordinates, the scaling by "dividing by z" is automatically completed through homogeneous coordinates and normalization operations.
[0055] (2) Calculate the rotation angle of the mesh based on the position of the camera, so that the mesh plane always faces the camera.
[0056] It should be noted that the camera orientation vector is calculated so that the mesh plane is always perpendicular to the camera orientation vector, and then the rotation angle is calculated.
[0057] (3) Calculate the Euler angles of the mesh relative to the camera, and read the correct preprocessed texture image from the texture map based on the angle.
[0058] It should be noted that the position of the center point of the mesh in the camera view is calculated, the horizontal / vertical angle is calculated based on the position, and the digital human texture map with the corresponding angle is retrieved from the large texture map based on the angle and rendered onto the mesh.
[0059] 2. Render digital humans with different hair colors, skin tones, and clothing colors and patterns based on the color partitions of the texture in the GPU shader.
[0060] The detailed steps are as follows: (1) Read the R channel of the pixel at the corresponding position of the texture in the fragment shader. According to the above method, determine the corresponding region of the digital human that the pixel corresponds to and replace it with the built-in color of the corresponding region. For example, if the pixel corresponds to the skin color region, then different skin colors such as yellow, white, black, and brown can be randomly returned to realize the differentiation of the digital human.
[0061] (2) Read the B and G channel values from the pixels, extract the normal information or other important information stored and add it to the shader calculation to make the digital human rendering effect better.
[0062] 3. Similarly, to play digital human animation, save the animation frames and the textures at the camera angles, and render the corresponding textures frame by frame in the GPU to achieve the effect of playing the animation.
[0063] This application also provides a rendering apparatus. Figure 5 This is a schematic diagram of the structure of a rendering apparatus provided in an embodiment of this application; as shown below. Figure 5 As shown, the rendering device 500 includes: The determining unit 501 is used to determine the multiple angle ranges to which the body orientation angles of the multiple digital humans belong; and to determine at least one texture map of a digital human within each angle range based on the multiple angle ranges and the multiple texture maps corresponding to the multiple digital humans. The merging unit 502 is used to merge the texture maps of at least one digital human within each angle range to obtain a merged texture map. The rendering unit 503 is used to render the merged texture map.
[0064] In some embodiments, the merging unit 502 is further configured to determine a first angle information of the mesh to be rendered relative to the shooting component, and to find a first texture map from the merged texture map according to the first angle information; render the first texture map onto the mesh to be rendered to obtain a first digital human model corresponding to the first texture map, and render the first digital human model.
[0065] In some embodiments, the merging unit 502 is further configured to acquire first position information of the shooting component and second position information of the mesh to be rendered; determine the rotation angle of the mesh to be rendered based on the first position information; the rotation angle is used for the mesh to be rendered to face the shooting component; adjust the second position information based on the rotation angle to obtain third position information of the mesh to be rendered; and determine the first angle information based on the third position and the first position information.
[0066] In some embodiments, the merging unit 502 is further configured to determine distance information between the shooting component and the mesh to be rendered; determine the scaling ratio of the first texture map according to the distance information, and scale the merged texture map according to the scaling ratio to obtain a scaled texture map; and search for the first texture map in the scaled texture map based on the first angle information.
[0067] In some embodiments, before determining the multiple angle ranges corresponding to the body orientation angles of the multiple digital humans, the rendering device 500 further includes a detection unit for detecting multiple pose information corresponding to the multiple digital humans over a period of time; if the pose information corresponding to the first digital human among the multiple digital humans does not change, a texture map corresponding to the first digital human is obtained; if the pose information corresponding to the first digital human changes, multiple texture maps corresponding to the first digital human are obtained.
[0068] In some embodiments, the rendering unit 503 is further configured to obtain the pixel corresponding to the first texture map, search for the body part information corresponding to the pixel from a preset body part pixel range based on the pixel, and render the first digital human model based on the body part information.
[0069] In some embodiments, the rendering unit 503 is further configured to obtain target normal information and / or target lighting information corresponding to the first digital human model from a pre-stored first correspondence between pixel points and normal information and / or a second correspondence between pixel points and lighting information, based on the pixel points corresponding to the first texture map, and render the first digital human model based on the target normal information and / or the target lighting information.
[0070] This application also provides an electronic device. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 603. Optionally, the electronic device 600 may also include a communication bus 602.
[0071] In specific embodiments, the processor 601 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0072] In this embodiment, the communication bus 602 is used to establish a connection between the processor 601 and the memory 603; when the processor 601 executes the running program stored in the memory 603, it implements the following rendering method: Multiple angle ranges are determined for the body orientation angles of multiple digital humans. Based on the multiple angle ranges and the multiple texture maps corresponding to the multiple digital humans, at least one texture map of a digital human within each angle range is determined. The texture maps of at least one digital human within each angle range are merged to obtain a merged texture map. The merged texture map is then rendered.
[0073] Furthermore, the processor 601 is also used to determine the first angle information of the mesh to be rendered relative to the shooting component, and to find the first texture map from the merged texture map according to the first angle information; to render the first texture map onto the mesh to be rendered to obtain the first digital human model corresponding to the first texture map, and to render the first digital human model.
[0074] Furthermore, the processor 601 is also configured to acquire first position information of the shooting component and second position information of the mesh to be rendered; determine the rotation angle of the mesh to be rendered based on the first position information; the rotation angle is used for the mesh to be rendered to face the shooting component; adjust the second position information based on the rotation angle to obtain third position information of the mesh to be rendered; and determine the first angle information based on the third position and the first position information.
[0075] Furthermore, the processor 601 is also configured to determine the distance information between the shooting component and the mesh to be rendered; determine the scaling ratio of the first texture map according to the distance information, and scale the merged texture map according to the scaling ratio to obtain a scaled texture map; and search for the first texture map from the scaled texture map based on the first angle information.
[0076] Furthermore, the processor 601 is also used to detect multiple pose information corresponding to multiple digital humans within a certain period of time; when the pose information corresponding to the first digital human among the multiple digital humans does not change, it acquires a texture map corresponding to the first digital human; when the pose information corresponding to the first digital human changes, it acquires multiple texture maps corresponding to the first digital human.
[0077] Furthermore, the processor 601 is also used to obtain the pixel corresponding to the first texture map, search for the body part information corresponding to the pixel from a preset body part pixel range based on the pixel, and render the first digital human model based on the body part information.
[0078] Furthermore, the processor 601 is also configured to obtain target normal information and / or target lighting information corresponding to the first digital human model from a pre-stored first correspondence between pixel points and normal information and / or a second correspondence between pixel points and lighting information based on the pixel points corresponding to the first texture map, and render the first digital human model based on the target normal information and / or the target lighting information.
[0079] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the rendering method described above.
[0080] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the rendering method described above.
[0081] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0083] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A rendering method, characterized in that, The method includes: The body orientation angles of multiple digital humans are determined to be within multiple angular ranges, and at least one texture map of a digital human within each angular range is determined based on the multiple angular ranges and the multiple texture maps corresponding to the multiple digital humans. The texture maps of at least one digital human within each angular range are merged to obtain a merged texture map. The merged texture map is then rendered.
2. The method according to claim 1, characterized in that, The rendering of the merged texture map includes: Determine the first angle information of the mesh to be rendered relative to the shooting component, and find the first texture map from the merged texture map based on the first angle information; The first texture map is rendered onto the mesh to be rendered to obtain the first digital human model corresponding to the first texture map, and the first digital human model is rendered.
3. The method according to claim 2, characterized in that, The determination of the first angle information of the mesh to be rendered relative to the shooting component includes: The first position information of the shooting component and the second position information of the grid to be rendered are obtained respectively; The rotation angle of the mesh to be rendered is determined based on the first position information; the rotation angle is used for the mesh to be rendered to face the shooting component; The second position information is adjusted based on the rotation angle to obtain the third position information of the mesh to be rendered; The first angle information is determined based on the third position and the first position information.
4. The method according to claim 2, characterized in that, The step of searching for the first texture map from the merged texture map based on the first angle information includes: Determine the distance information between the shooting component and the grid to be rendered; The scaling ratio of the first texture image is determined based on the distance information, and the merged texture image is scaled according to the scaling ratio to obtain a scaled texture image. The first texture map is located from the scaled texture map based on the first angle information.
5. The method according to claim 1, characterized in that, Before determining the multiple angle ranges corresponding to the body orientation angles of the multiple digital humans, the method further includes: Detect multiple pose information corresponding to multiple digital humans within a certain period of time; If the pose information of the first digital human among the plurality of digital humans does not change, obtain a texture map corresponding to the first digital human; When the posture information corresponding to the first digital human changes, multiple texture maps corresponding to the first digital human are acquired.
6. The method according to claim 2, characterized in that, The rendering of the first digital human model includes: Obtain the pixel corresponding to the first texture map, and search for the body part information corresponding to the pixel from a preset body part pixel range based on the pixel; The first digital human model is rendered based on the body part information.
7. The method according to claim 2, characterized in that, The rendering of the first digital human model includes: Based on the pixels corresponding to the first texture map, the target normal information and / or target lighting information corresponding to the first digital human model are obtained from the pre-stored first correspondence between pixels and normal information and / or the second correspondence between pixels and lighting information. The first digital human model is rendered based on the target normal information and / or the target lighting information.
8. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 7.
9. A storage medium having a computer program or computer-executable instructions stored thereon, characterized in that, When the computer program or the computer-executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or the computer-executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.