Image generation method and device, electronic equipment and storage medium

By synchronously rendering and sending the target perspective of virtual objects, the delay problem when users switch perspectives with multiple degrees of freedom in virtual live broadcasts is solved, and the fluency of live broadcasts and the data processing efficiency of the server are improved.

CN118828035APending Publication Date: 2024-10-22BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310430006.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In the existing technology, when large-scale users switch live broadcasts to watch virtual live broadcast perspectives through multiple degrees of freedom, there is a large delay problem between the live broadcast images viewed by the users and the live live broadcast images.

Method used

By obtaining the motion data used to control the movement of virtual objects and the viewing angle parameters of multiple virtual cameras, the image of the virtual object at each viewing angle at the same moment is synchronously rendered, and the virtual object image of the target viewing angle is sent to the terminal device, allowing the terminal device to generate The virtual object picture from the user’s perspective to be viewed reduces the data processing volume and delay of the server.

Benefits of technology

When large-scale users switch live broadcast perspectives with multiple degrees of freedom, the delay between the live broadcast images viewed by users and the live broadcast images is reduced, the efficiency of the server sending data to the terminal device is improved, and the continuous smoothness of the live broadcast images is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118828035A_ABST
    Figure CN118828035A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image generation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining motion data used for controlling the motion of a virtual object and a visual angle parameter of each visual angle in a plurality of visual angles of a plurality of virtual cameras, and enabling the plurality of virtual cameras to surround the virtual object at equal intervals; synchronously rendering a virtual object picture of the virtual object at each view angle at the same moment according to the motion data and the view angle parameter of each view angle; sending the virtual object picture of the target view angle to the terminal equipment based on the virtual object picture of the virtual object at each view angle obtained by rendering; the virtual object picture of the target view angle is used for generating a virtual object picture of a to-be-watched view angle of the user by the terminal equipment. According to the embodiment of the invention, under the condition that large-scale users switch the live broadcast viewing angles through multiple degrees of freedom to view the virtual live broadcast, the time delay between the live broadcast picture viewed by the users and the picture of the live broadcast site can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer vision technology, and in particular to an image generation method, device, electronic device and storage medium. Background Art

[0002] Virtual live broadcast is attracting more and more attention. Virtual live broadcast refers to creating virtual objects in advance through modeling, controlling the movement of virtual objects, and broadcasting the movement process of virtual objects to users. Users can watch virtual live broadcasts through VR (Virtual Reality) devices. However, in the case of a large number of users watching virtual live broadcasts by switching live viewing angles with multiple degrees of freedom, the existing technology has the defect of a large delay between the live broadcast screen viewed by users through VR devices and the live broadcast site. Summary of the invention

[0003] The embodiments of the present disclosure provide an image generation method, device, electronic device and storage medium to reduce the delay between the live broadcast picture viewed by users and the picture of the live broadcast site when a large number of users watch a virtual live broadcast by switching the live viewing angles with multiple degrees of freedom.

[0004] In a first aspect, an embodiment of the present disclosure provides an image generation method, comprising:

[0005] Acquire motion data for controlling the motion of the virtual object and a perspective parameter of each of a plurality of perspectives of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object;

[0006] Synchronously rendering a virtual object picture of the virtual object at each perspective at the same time according to the motion data and the perspective parameters of each perspective;

[0007] Based on the virtual object picture of the virtual object at each viewing angle obtained by rendering, the virtual object picture of the target viewing angle is sent to the terminal device; the virtual object picture of the target viewing angle is used by the terminal device to generate the virtual object picture of the user's viewing angle.

[0008] In a second aspect, an embodiment of the present disclosure provides an image generating device, including:

[0009] a data acquisition unit, configured to acquire motion data for controlling the motion of a virtual object and a viewing angle parameter of each of a plurality of viewing angles of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object;

[0010] A picture rendering unit, used for synchronously rendering a virtual object picture of the virtual object at each viewing angle at the same time according to the motion data and the viewing angle parameters of each viewing angle;

[0011] A picture sending unit is used to send a virtual object picture of a target perspective to a terminal device based on the virtual object picture of the virtual object at each perspective obtained by rendering; the virtual object picture of the target perspective is used by the terminal device to generate a virtual object picture of a user's perspective to be viewed.

[0012] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.

[0013] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the steps of the method described in the first aspect when executed by a processor.

[0014] In one or more embodiments of the present disclosure, motion data for controlling the motion of a virtual object and a perspective parameter of each perspective of a plurality of perspectives of a plurality of virtual cameras are obtained, and a plurality of virtual cameras are arranged at equal intervals around the virtual object. According to the motion data and the perspective parameter of each perspective, a virtual object screen of the virtual object at each perspective at the same time is synchronously rendered, and based on the virtual object screen of the virtual object at each perspective obtained by rendering, a virtual object screen of a target perspective is sent to a terminal device, and the virtual object screen of the target perspective is used by the terminal device to generate a virtual object screen of a user's perspective to be viewed. It can be seen that through this embodiment, since only the virtual object screen of the target perspective needs to be sent to the terminal device, and there is no need to render a complete live screen, the terminal device can generate a virtual object screen of the user's perspective to be viewed based on the virtual object screen of the target perspective. Therefore, in the case where a large number of users watch virtual live broadcasts by switching the live viewing perspectives with multiple degrees of freedom, there is no need to completely rely on the cloud server to render the live screen, which reduces the data processing amount of the server, improves the efficiency of the server sending data to the terminal device, and reduces the delay between the live screen viewed by the user and the screen of the live broadcast site. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0016] Figure 1 A schematic diagram of an application scenario of an image generation method provided by an embodiment of the present disclosure;

[0017] Figure 2 A schematic diagram of a flow chart of an image generation method provided by an embodiment of the present disclosure;

[0018] Figure 3 A schematic diagram of setting a virtual camera provided by an embodiment of the present disclosure;

[0019] Figure 4 A schematic diagram of setting a fence signal provided by an embodiment of the present disclosure;

[0020] Figure 5 A schematic diagram of the front-end and back-end interaction of an image generation method provided by an embodiment of the present disclosure;

[0021] Figure 6a A schematic diagram of a virtual object screen provided by an embodiment of the present disclosure;

[0022] Figure 6b A schematic diagram of a virtual scene screen provided by an embodiment of the present disclosure;

[0023] Figure 6c A schematic diagram of a live broadcast screen provided by an embodiment of the present disclosure;

[0024] Figure 7 A schematic diagram of the structure of an image generating device provided by an embodiment of the present disclosure;

[0025] Figure 8 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present disclosure.

[0027] To facilitate understanding of the various embodiments of the present disclosure, a brief description of virtual live broadcast is first given here. The virtual live broadcast process can be implemented in three steps: 1. Modeling virtual objects; 2. Controlling the movement of virtual objects; 3. Broadcasting the motion picture of virtual objects. In step 1, a virtual object is created by modeling. The virtual object can be an imaginary object or an object designed based on a real person or animal. The virtual object is a 3D model with high precision in the computer system. In step 2, after the virtual object is generated, in one way, motion control instructions can be written in a computer coding language, and motion control instructions can be sent to the virtual object to control the movement of the virtual object. In another way, a real person can be made to move, and the movement process of the person can be captured. According to the movement process, corresponding motion control instructions are sent to the virtual object to control the movement of the virtual object. The virtual object can move in the established virtual scene. In step 3, the motion picture of the virtual object is broadcast live to the user in real time in combination with the virtual scene where the virtual object is located, thereby realizing virtual live broadcast.

[0028] Based on this background, an embodiment of the present disclosure provides an image generation method that can reduce the delay between the live broadcast screen viewed by users and the screen of the live broadcast site when a large number of users watch virtual live broadcasts by switching the live viewing angle through multiple degrees of freedom. Among them, multiple degrees of freedom means that when users watch virtual live broadcasts through mobile phones or VR devices, they can achieve perspective switching in 6 or even more degrees of freedom. Taking 6 degrees of freedom as an example, the 6 degrees of freedom include translation and rotation around the X, Y, and Z axes. Users can perform translation and rotation operations around the X, Y, and Z axes to switch perspectives to watch virtual live broadcasts. When users watch virtual live broadcasts through mobile phones, they can achieve translation and rotation around the X, Y, and Z axes by sliding the screen on the mobile phone. When users watch virtual live broadcasts through VR devices, they can achieve translation and rotation around the X, Y, and Z axes through their own body movements.

[0029] Figure 1 A schematic diagram of an application scenario of an image generation method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the scene includes a server and a terminal device. The server can be a single server or an entire server cluster, and the terminal device includes but is not limited to a VR head display device and a mobile phone. When the virtual object is broadcast live, the server is used to generate the virtual object picture required by the terminal device and send it to the terminal device. The terminal device generates and displays the live picture of the virtual object at the user's viewing angle based on the virtual object picture sent by the server, thereby realizing the live broadcast process of the virtual object. In addition, the user can switch the viewing angle of the virtual object at will based on multiple degrees of freedom. For example, the user can switch the viewing angle to view the live picture of the virtual object at will based on 3 rotational degrees of freedom and 3 translational degrees of freedom.

[0030] The image generation method in the embodiment of the present disclosure can be applied to a server and executed by the server. Figure 2 A flowchart of an image generation method provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the process includes:

[0031] Step S202, acquiring motion data for controlling the motion of the virtual object and a viewing angle parameter of each of multiple viewing angles of multiple virtual cameras, wherein the multiple virtual cameras are arranged at equal intervals around the virtual object;

[0032] Step S204, synchronously rendering a virtual object picture of the virtual object at each perspective at the same moment according to the motion data and the perspective parameters of each perspective;

[0033] Step S206, based on the virtual object pictures of the rendered virtual object at each viewing angle, the virtual object pictures of the target viewing angle are sent to the terminal device; the virtual object pictures of the target viewing angle are used by the terminal device to generate the virtual object pictures of the user's viewing angle.

[0034] It can be seen that through this embodiment, since only the virtual object picture of the target perspective needs to be sent to the terminal device, there is no need to render the complete live broadcast picture. The terminal device can generate the virtual object picture of the user's to-be-watched perspective based on the virtual object picture of the target perspective. Therefore, in the case where a large number of users watch the virtual live broadcast by switching the live viewing perspectives with multiple degrees of freedom, there is no need to rely entirely on the cloud server to render the live broadcast picture, which reduces the data processing volume of the server, improves the efficiency of the server in sending data to the terminal device, and reduces the delay between the live broadcast picture viewed by the user and the picture of the live broadcast site.

[0035] In the above step S202, motion data for controlling the motion of the virtual object is obtained, and the motion data may include the aforementioned motion control instructions. Motion data is data that changes continuously over time. Assuming that one second includes N frames of live screen, one second may include N pieces of motion data, that is, one frame of live screen corresponds to one piece of motion data, and each piece of motion data corresponding to each frame of live screen is connected in series from front to back in time to form a complete total motion data. The virtual object can be controlled to move according to the motion data, thereby generating a live screen for each frame. The motion data includes at least the position before and after the movement of each part of the virtual object. For example, the motion data includes the position before and after the movement of the virtual character's hands, feet, and head.

[0036] In the above step S202, the perspective parameters of each perspective of the multiple perspectives of the multiple virtual cameras are also obtained, wherein the multiple virtual cameras are arranged at equal intervals around the virtual object, and the virtual cameras correspond to the perspectives one by one, so that each perspective constitutes a distributed perspective array around the virtual object. In one example, the multiple virtual cameras are arranged horizontally around the virtual object, such as horizontally surrounding the virtual object with equal spacing for a week of 360 degrees. In another example, the multiple virtual cameras are arranged vertically around the virtual object, such as vertically surrounding the virtual object with equal spacing for a week of 360 degrees. In yet another example, the multiple virtual cameras are arranged horizontally around the virtual object and vertically around the virtual object, such as horizontally surrounding the virtual object with equal spacing for a week and vertically surrounding the virtual object with equal spacing for a week.

[0037] Figure 3 A schematic diagram of setting a virtual camera provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, each gray rectangular box represents a virtual camera, and multiple virtual cameras are arranged around the established virtual object. These virtual cameras are arranged to surround the virtual object twice horizontally and twice vertically.

[0038] It should be noted that the virtual object is a three-dimensional model built in a computer system. Setting multiple virtual cameras around the virtual object can be understood as setting multiple virtual cameras around the virtual object at a certain distance from the virtual object by computer programming. Each virtual camera represents a perspective, and each virtual camera constitutes a distributed virtual camera array around the virtual object. Through each virtual camera, a virtual object image at different perspectives can be rendered. Based on this, the perspective parameters of the perspective may include the width and height of the rendered image and the internal and external parameters of the virtual camera. The virtual camera internal parameters include the optical center and focal length of the virtual camera, and the virtual camera external parameters include the rotation matrix and translation matrix of the virtual camera.

[0039] In this embodiment, by setting each virtual camera to surround the virtual object horizontally and / or vertically, it is possible to obtain the live broadcast picture of the virtual object from various perspectives by surrounding the virtual camera around the virtual object, thereby meeting the user's need to watch the live broadcast based on 6 degrees of freedom by switching perspectives.

[0040] In the above step S204, the virtual object screen at each viewing angle is rendered according to the acquired motion data that changes with time and the viewing angle parameters of each viewing angle. Since one frame of live broadcast screen corresponds to one piece of motion data, multiple frames of virtual object screens at each viewing angle can be rendered according to the motion data and the viewing angle parameters of each viewing angle. One frame of virtual object screen corresponds to one piece of motion data and also corresponds to one frame of live broadcast screen. According to the continuous multiple frames of virtual object screens at the same viewing angle of the virtual object combined with the virtual scene screen at the viewing angle, the continuous multiple frames of live broadcast screens of the virtual object at the viewing angle can be generated. The continuous multiple frames of live broadcast screens of the virtual object at the same viewing angle constitute the live video stream of the virtual object at the viewing angle. In this embodiment, the virtual object screen refers to a screen that only includes virtual objects, and the live broadcast screen refers to a screen that includes virtual objects and the virtual scene where the virtual objects are located. What the user finally sees is the live broadcast screen rather than the virtual object screen.

[0041] It can be seen that the virtual object can be rendered to obtain multiple frames of virtual object images at each viewing angle. In the present embodiment, the virtual object images of the virtual object at the same time at each viewing angle are synchronously rendered. For example, the virtual object has 10,000 frames of virtual object images at each viewing angle. Then, the first frame of the virtual object image at each viewing angle is synchronously rendered, the second frame of the virtual object image at each viewing angle is synchronously rendered, and so on.

[0042] Since the virtual object images at the same moment in each viewing angle are rendered synchronously, it can be ensured that the live broadcast images of the virtual object at the same moment in each viewing angle are also generated synchronously, thereby ensuring that when the user switches viewing angles to watch the virtual live broadcast, the live broadcast images seen are continuous and smooth, avoiding the problem of frame skipping and image freeze when the user switches viewing angles to watch the virtual live broadcast due to the live broadcast images of the virtual object at the same moment in each viewing angle being out of sync.

[0043] In one embodiment, according to the motion data and the perspective parameters of each perspective, synchronously rendering the virtual object picture of the virtual object at each perspective at the same time includes:

[0044] Determine whether the virtual object picture at the previous moment of the current moment at each viewing angle has been rendered;

[0045] If yes, then generate model data of the virtual object after the movement at the current moment according to the movement data at the current moment;

[0046] According to the model data of the virtual object after the movement at the current moment and the viewing angle parameters of each viewing angle, the virtual object picture at the current moment at each viewing angle is synchronously rendered.

[0047] Specifically, the current moment refers to the moment in the live video stream when the live video corresponding to the current frame of the virtual object screen to be rendered is rendered. For example, if the timestamp of the live video corresponding to the current frame of the virtual object screen to be rendered is 5 minutes and 32 seconds in the live video stream, the current moment is 5 minutes and 32 seconds. The moment before the current moment refers to the moment in the live video stream when the previous frame of the live video corresponding to the current frame of the virtual object screen to be rendered is rendered. For example, if the timestamp of the previous frame of the live video corresponding to the current frame of the virtual object screen to be rendered is 5 minutes and 31 seconds in the live video stream, the previous moment is 5 minutes and 31 seconds.

[0048] First, it is determined whether the virtual object screen of the previous moment of the current moment at each viewing angle is rendered, that is, it is determined whether the virtual object screen of the previous moment at each viewing angle is rendered. If so, it is determined that the rendering of the virtual object screen at the current moment can be started. As mentioned above, motion data is data that changes over time, and motion data corresponds to each frame of live broadcast screen one by one. Then, according to the motion data at the current moment, the movement of the virtual object is controlled, and the virtual object after the movement is the virtual object after the movement at the current moment, that is, at the current moment, the virtual object presents the state after the movement. Since the virtual object is a three-dimensional model in the computer system, the model data of the virtual object after the movement at the current moment can be generated according to the motion data at the current moment. Finally, according to the model data of the virtual object after the movement at the current moment and the viewing parameters of each viewing angle, the virtual object screen of the virtual object at the current moment at each viewing angle is synchronously rendered.

[0049] It can be seen that through this embodiment, it is possible to determine whether the rendering of the virtual object screen at the previous moment of the current moment at each viewing angle is completed. If so, the rendering of the virtual object screen at the current moment is started, and the model data of the virtual object after the movement at the current moment is generated according to the motion data at the current moment. According to the model data of the virtual object after the movement at the current moment and the viewing parameters of each viewing angle, the virtual object screen at the current moment at each viewing angle is synchronously rendered, thereby ensuring that the virtual object screens of the virtual object at different viewing angles at each moment are synchronously rendered, so that the live broadcast screen of the virtual object at the same moment at each viewing angle is also synchronously generated, and then when the user switches the viewing angle to watch the virtual live broadcast, the live broadcast screen seen by the user is a continuous and smooth screen, avoiding the problem of frame skipping and screen freeze when the user switches the viewing angle to watch the virtual live broadcast due to the asynchronous live broadcast screen of the virtual object at the same moment at each viewing angle.

[0050] In one embodiment, determining whether the rendering of the virtual object screen at the previous moment of the current moment of the virtual object at each viewing angle is completed includes:

[0051] Determine whether the value of the preset variable shared by each perspective is equal to the total number of each perspective; wherein the value of the preset variable is modified after rendering the virtual object screen of the virtual object at any perspective at the previous moment until the virtual object screen of the virtual object at each perspective at the previous moment is rendered;

[0052] If so, it is determined that the virtual object screen at the previous moment of the virtual object at each viewing angle is rendered.

[0053] In this embodiment, preset variables are set, and the preset variables are variables shared by each perspective. When the virtual object screen of each perspective is rendered by a separate host, each host corresponding to each perspective can access, modify and monitor the preset variables. Whenever the virtual object screen of a perspective at a certain moment is rendered, the host corresponding to the perspective modifies the value of the preset variable, such as adding 1. Therefore, when the virtual object screens of each perspective at the same moment are rendered, the value of the preset variable is equal to the total number of each perspective.

[0054] Therefore, after rendering the virtual object picture of the virtual object at the previous moment at any perspective, the value of the preset variable is increased by 1 by the corresponding host, so it is judged whether the value of the preset variable shared by each perspective is equal to the total number of each perspective. If equal, it means that the virtual object picture of the previous moment at each perspective has been rendered, thereby determining that the virtual object picture of the previous moment at each perspective has been rendered.

[0055] It can be seen that in this embodiment, by setting the values ​​of preset variables shared by various perspectives, it is possible to determine whether the virtual object images at the same time have been rendered at various perspectives by modifying and monitoring the values ​​of the preset variables. The judgment method is simple, consumes less computer resources, and the judgment result is efficient and accurate.

[0056] In order to facilitate monitoring of the value of the preset variable, in one embodiment, the initial value of the preset variable is set to 0, and after determining that the virtual object picture of the previous moment at each viewing angle is rendered, the preset variable is restored to the initial value.

[0057] Specifically, the initial value of the preset variable is 0. After the virtual object screen of the first frame at each viewing angle is rendered, the value of the preset variable becomes the total number of each viewing angle. When it is determined based on the value of the preset variable that the virtual object screen of the second frame at each viewing angle can be rendered, the value of the preset variable is restored to the initial value, so as to re-judge whether the virtual object screen of the second frame at each viewing angle has been rendered. Therefore, in this embodiment, after it is determined that the virtual object screen of the virtual object at the previous moment at each viewing angle has been rendered, the preset variable is restored to the initial value, so as to re-judge whether the virtual object screen of the virtual object at the current moment at each viewing angle has been rendered.

[0058] It can be seen that through this embodiment, the initial value of the preset variable is set to 0, and after determining that the virtual object screen of the virtual object at the previous moment at each viewing angle is rendered, the preset variable is restored to the initial value, which can help to re-judge whether the virtual object screen of the virtual object at the current moment at each viewing angle is rendered. By resetting the value of the preset variable, it is possible to realize a cyclic judgment of whether the virtual object screen of the virtual object at each moment at each viewing angle is rendered.

[0059] For the current moment, in one embodiment, according to the model data of the virtual object after the movement at the current moment and the perspective parameters of each perspective, synchronously rendering the virtual object screen of the virtual object at the current moment at each perspective includes:

[0060] According to the fence signal in the task queue, the model data of the virtual object after the current movement is read from the task queue;

[0061] The task queue is used to store the model data and fence signals of the virtual objects after movement at each moment; the fence signal is used to segment the model data of the virtual objects after movement at adjacent moments in the task queue, for example, segmenting the model data of the virtual objects after movement at the current moment and the model data of the virtual objects after movement at the moment after the current moment;

[0062] According to the read model data of the virtual object and the viewing angle parameters of each viewing angle, the virtual object screen at the current moment at each viewing angle is synchronously rendered.

[0063] Specifically, each perspective corresponds to a task queue, and the task queue is used to store the model data of the virtual object after movement at each moment required for rendering the virtual object screen by the perspective. The task queue also stores a fence signal. After the model data of the virtual object after movement at each moment, a fence signal is set. The fence signal is used to divide the model data of the virtual object after movement at each moment in the task queue, that is, to divide the model data of the virtual object after movement at the current moment and the model data of the virtual object after movement at the moment after the current moment. The moment after the current moment refers to the moment in the live video stream of the next frame of the live picture corresponding to the current frame of the virtual object screen to be rendered. For example, if the timestamp of the next frame of the live picture corresponding to the current frame of the virtual object screen to be rendered in the live video stream is 5 minutes and 33 seconds, then the next moment is 5 minutes and 33 seconds.

[0064] For each viewing angle, the virtual object image of the virtual object at the current moment at the viewing angle is rendered based on the model data of the virtual object read and the viewing angle parameters of the viewing angle. When each viewing angle renders the virtual object image of the viewing angle through a host, for each viewing angle, when the host of each viewing angle renders the virtual object image of its own viewing angle, the model data of the virtual object after movement read are the same, that is, the three-dimensional model after movement. The difference is that the viewing angle parameters of each viewing angle are different. Therefore, based on the different viewing angle parameters of each viewing angle and the same three-dimensional model after movement, different virtual object images of each viewing angle can be rendered.

[0065] In other embodiments, considering that for each perspective, when the host of each perspective renders the virtual object screen of its own perspective, the model data of the virtual object after movement read are the same, that is, the three-dimensional model after movement. Therefore, each perspective may correspond to the same task queue, and the task queue stores the model data of the virtual object after movement at each moment and the above-mentioned fence signal.

[0066] When each perspective renders the virtual object screen of that perspective through a host, the host only reads the model data of the virtual object at one moment each time based on the fence signal, and does not read the model data of redundant virtual objects. For example, the model data of the virtual object after movement at the current moment can be read from the task queue corresponding to the perspective, and the model data of the virtual object at the moment after the current moment will not be read, thereby ensuring that each rendered virtual object screen corresponds to the virtual object at one moment, and does not cause screen abnormalities or even frame skipping due to reading too much data.

[0067] For each viewing angle, the host of each viewing angle may include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit) and a task queue. The CPU may write the model data of the virtual object after movement at each moment into the task queue, and the GPU may read the model data of the virtual object after movement at each moment and render the virtual object screen based on the viewing angle parameters. Due to the existence of the fence signal, the CPU may continuously write the model data of the virtual object after movement into the task queue without waiting, thereby improving the CPU's operating efficiency. For each viewing angle, the task queue does not occupy the GPU's image memory, but occupies the CPU's memory, thereby avoiding the GPU crash caused by the GPU rendering speed being lower than the CPU's task writing speed.

[0068] It can be seen that through this embodiment, a task queue is set and the model data of the virtual object after movement at each moment and the fence signal for dividing the model data of the virtual object after movement at adjacent moments are set in the task queue. On the one hand, it can make it possible to read the model data of the virtual object at only one moment each time, and not read the model data of redundant virtual objects, thereby ensuring that the virtual object picture rendered each time is the picture corresponding to the virtual object at one moment, and will not cause picture abnormalities or even frame skipping due to reading too much data. On the other hand, when the CPU and GPU work together to render the virtual object picture, the CPU can continuously write the model data of the virtual object after movement to the task queue without waiting, thereby improving the CPU's operating efficiency.

[0069] In one embodiment, the model data and barrier signal of the virtual object after movement at each moment are written into the task queue through the following steps:

[0070] Generate model data of the virtual object after movement at each moment according to the movement data at each moment;

[0071] Write the model data of the virtual object after movement at each moment into the task queue in order from the beginning to the end of time;

[0072] In the task queue, a fence signal is set after the model data of the virtual object after the movement at each moment.

[0073] First, the movement of the virtual object is controlled according to the motion data at each moment, and the model data of the virtual object after the movement at each moment is generated. Here, each moment is a timestamp during the live broadcast, and the movement of the virtual object is driven continuously by the motion data during the live broadcast. Then, the model data of the virtual object after the movement at each moment is written into the task queue corresponding to each perspective in the order from front to back in time, and, in the task queue, a fence signal is set after the model data of the virtual object after the movement at each moment.

[0074] It can be seen that through this embodiment, the movement of virtual objects can be driven according to motion data. During the movement of the virtual objects, the model data of the virtual objects after the movement are continuously written into the task queue in chronological order and the fence signal is set, which has the advantages of high efficiency in writing data and setting fence signals.

[0075] In a specific embodiment, each perspective uses a host to render the virtual object screen of the perspective, and the host of each perspective can include a CPU, a GPU, and a task queue. Of course, in a more preferred solution, through pre-optimization of frame rate and performance, a host with a single graphics card such as Nvidia A10 can render virtual object screens of 2 to 3 perspectives in parallel and merge the rendering results through a network transmission server and send them to the VR device end.

[0076] Figure 4 A schematic diagram of setting a fence signal according to an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the horizontal axes of the CPU and GPU are both time. In any host, the CPU can write the model data of the virtual object at the n+1th moment into the task queue and set the fence signal at a certain moment, while the GPU may have just read the model data of the virtual object at the nth moment from the task queue and rendered the virtual object screen at the nth moment. It can be seen that the CPU can continuously write the model data of the virtual object after the movement into the task queue without referring to the rendering progress of the GPU and without waiting, thereby improving the operating efficiency of the CPU, and the task queue does not occupy the image memory of the GPU, but occupies the memory of the CPU, thereby avoiding the situation where the GPU crashes due to the GPU rendering speed being lower than the CPU writing task speed.

[0077] Furthermore, when each perspective renders the virtual object screen of that perspective through a host, each host can share and access the above-mentioned preset variables, so that each host can synchronously render the virtual object screen at the same time, so that the live broadcast screen of each host at the same time is also generated synchronously. Therefore, when the user switches perspectives to watch the virtual live broadcast, the live broadcast screen he sees is a continuous and smooth screen, avoiding the problem of frame skipping and screen freeze when the user switches perspectives to watch the virtual live broadcast due to the asynchronous live broadcast screen of the virtual object at each perspective at the same time.

[0078] Furthermore, in this embodiment, all the work related to virtual object image rendering can be arranged to be completed within the GPU, thereby ensuring that the model data of the virtual object after movement at the same moment and the virtual object image at the same moment are only read and written by the GPU, reducing the possibility of accidental overwriting by control information from other ends.

[0079] After the virtual object images of the virtual object at each moment in each viewing angle are obtained by rendering through the above process, in the above step S206, the virtual object image of the target viewing angle is also sent to the terminal device based on the virtual object images of the virtual object at each viewing angle obtained by rendering. In one case, the target viewing angle is located in each viewing angle, which is one of the above multiple viewing angles. In another case, the target viewing angle is not located in each of the above viewing angles, is not one of the above multiple viewing angles, and is a viewing angle generated based on the above each viewing angle. According to the above description, each viewing angle is horizontally surrounded and / or vertically surrounded around the virtual object, and there must be a blank viewing angle between each viewing angle. For example, a viewing angle is set every 2 degrees, then starting from 0 degrees, there is a missing 1 degree viewing angle between the first viewing angle 0 degree viewing angle and the second viewing angle 2 degree viewing angle, and the missing 1 degree viewing angle is the adjacent viewing angle of the 0 degree viewing angle and the 2 degree viewing angle. In this embodiment, the target viewing angle can be located in each of the above viewing angles, or it can be an adjacent viewing angle of each viewing angle.

[0080] After receiving the virtual object picture of the target perspective, the terminal device, such as a VR device, can generate the virtual object picture of the user's perspective to be viewed based on the virtual object picture of the target perspective. The user's perspective to be viewed may be the target perspective or may not be the target perspective. Then, the terminal device can also combine the virtual object picture of the user's perspective to be viewed with the pre-rendered virtual scene picture of the user's perspective to be viewed to obtain the live picture of the user's perspective to be viewed.

[0081] It can be seen that through this embodiment, since only the virtual object picture of the target perspective needs to be sent to the terminal device, there is no need to render the complete live picture. The terminal device can generate a virtual object picture of the user's to-be-watched perspective based on the virtual object picture of the target perspective, and combine the pre-rendered virtual scene picture of the user's to-be-watched perspective to obtain the live picture of the user's to-be-watched perspective. Therefore, in the case where a large number of users switch the live viewing perspective through multiple degrees of freedom, there is no need to rely entirely on the cloud server to render the live picture, which greatly alleviates the computing pressure of the cloud server.

[0082] The process of sending a virtual object picture of a target perspective to a terminal device is described below. In one embodiment, based on the virtual object picture of each perspective obtained by rendering, sending a virtual object picture of a target perspective to a terminal device includes:

[0083] Obtain the user's viewing angle;

[0084] If the user's viewing angle to be viewed is one of the multiple viewing angles, then the user's viewing angle to be viewed is selected from each viewing angle as the target viewing angle;

[0085] Send the virtual object image of the target perspective to the terminal device.

[0086] Specifically, first, the user's viewing angle to be viewed is obtained. The posture information of the terminal device, such as a VR device, can be obtained, and the user's viewing angle to be viewed is determined according to the posture information of the terminal device, or the terminal device sends the information of the user's viewing angle to be viewed to the server, so that the server obtains the user's viewing angle to be viewed. Next, it is determined whether the user's viewing angle to be viewed is one of the multiple viewing angles mentioned above. If so, the user's viewing angle to be viewed is selected as the target viewing angle from each viewing angle, and a virtual object picture of the target viewing angle is sent to the terminal device. The sent virtual object picture can be multiple frames, that is, multiple frames of virtual object pictures form a picture stream and are sent to the terminal device. In this embodiment, the user's viewing angle to be viewed is the target viewing angle, and the user's viewing angle to be viewed is one of the above-mentioned viewing angles.

[0087] It can be seen that through this embodiment, when the user's perspective to be viewed is one of the above-mentioned multiple perspectives, the user's perspective to be viewed can be selected as the target perspective among various perspectives, and the virtual object picture of the target perspective is sent to the terminal device, thereby facilitating the terminal device to generate a live picture of the user's perspective to be viewed.

[0088] In one embodiment, the above method flow further includes:

[0089] If the viewing angle to be viewed by the user is not any of the multiple viewing angles, then a viewing angle closest to the viewing angle to be viewed by the user is selected from the multiple viewing angles as the target viewing angle;

[0090] The virtual object picture of the target viewing angle is sent to the terminal device, and the virtual object picture of the target viewing angle is used by the terminal device to generate the virtual object picture of the user's viewing angle based on a preset viewing angle generation algorithm.

[0091] Specifically, if it is determined that the user's to-be-watched viewing angle is not located in any of the above-mentioned multiple viewing angles, for example, each viewing angle includes a 110-degree viewing angle and a 120-degree viewing angle, and the user's to-be-watched viewing angle is a 115-degree viewing angle, in this case, the viewing angle closest to the user's to-be-watched viewing angle is selected from each viewing angle as the target viewing angle. In the previous example, the 110-degree viewing angle and the 120-degree viewing angle can be selected as the viewing angle closest to the user's to-be-watched viewing angle, that is, the target viewing angle.

[0092] Next, the virtual object picture of the target perspective is sent to the terminal device. It can be seen that the virtual object picture of the target perspective is not the virtual object picture of the user's perspective to be watched. Therefore, the terminal device also needs to generate the virtual object picture of the user's perspective to be watched based on the virtual object picture of the target perspective based on the preset perspective generation algorithm, and then obtain the live picture of the user's perspective to be watched. The preset perspective generation algorithm will be introduced in detail later. In this embodiment, the target perspective is located among the above-mentioned perspectives and is one of the multiple perspectives. The target perspective is not the user's perspective to be watched.

[0093] It can be seen that through this embodiment, when the user's perspective to be viewed is not located in each perspective and is not any of the above-mentioned multiple perspectives, the perspective closest to the user's perspective to be viewed is selected from each perspective as the target perspective, and the virtual object picture of the target perspective is sent to the terminal device, so that the terminal device generates the virtual object picture of the user's perspective to be viewed according to the virtual object picture of the target perspective based on a preset perspective generation algorithm, and then obtains the live picture of the user's perspective to be viewed, thereby meeting the user's needs to switch perspectives at will to watch live broadcasts, and ensuring that the user can watch the live picture when switching to any perspective.

[0094] Furthermore, in this embodiment, the preset viewing angle generation algorithm can be implemented not only by the terminal device, but also by the server. In one embodiment, the above method further includes:

[0095] If the viewing angle to be viewed by the user is not any of the above-mentioned multiple viewing angles, then a viewing angle closest to the viewing angle to be viewed by the user is selected from among the viewing angles as a candidate viewing angle;

[0096] Acquire a virtual object picture of a candidate viewing angle, and generate a virtual object picture of a viewing angle to be viewed by a user according to the virtual object picture of the candidate viewing angle based on a preset viewing angle generation algorithm;

[0097] The virtual object picture of the user's to-be-watched viewing angle is sent to the terminal device as the virtual object picture of the target viewing angle.

[0098] Specifically, if it is determined that the user's viewing angle is not located in each viewing angle and is not any of the above-mentioned multiple viewing angles, for example, each viewing angle includes a 110-degree viewing angle and a 120-degree viewing angle, and the user's viewing angle is a 115-degree viewing angle, in this case, the viewing angle closest to the user's viewing angle is selected from each viewing angle as a candidate viewing angle. In the previous example, the 110-degree viewing angle and the 120-degree viewing angle can be selected as the viewing angles closest to the user's viewing angle, that is, the candidate viewing angles.

[0099] Next, the virtual object screen of the candidate perspective is obtained, and based on the preset perspective generation algorithm, the virtual object screen of the user's perspective to be viewed is generated according to the virtual object screen of the candidate perspective. Finally, the virtual object screen of the user's perspective to be viewed is sent to the terminal device as the virtual object screen of the target perspective, so that the terminal device generates the live screen of the user's perspective to be viewed according to the virtual object screen of the target perspective. In this embodiment, the target perspective is not any of the multiple perspectives mentioned above, and the target perspective is the user's perspective to be viewed.

[0100] It can be seen that through this embodiment, when the user's to-be-watched perspective is not located in each perspective and is not any of the above-mentioned multiple perspectives, the perspective closest to the user's to-be-watched perspective is selected from each perspective as a candidate perspective, and based on the preset perspective generation algorithm, a virtual object picture of the user's to-be-watched perspective is generated according to the virtual object picture of the candidate perspective, and the virtual object picture of the user's to-be-watched perspective is sent to the terminal device as the virtual object picture of the target perspective, so that the terminal device generates a live broadcast picture of the user's to-be-watched perspective according to the virtual object picture of the user's to-be-watched perspective, thereby meeting the user's need to switch perspectives at will to watch live broadcasts, and ensuring that the user can watch the live broadcast picture when switching to any perspective. In addition, the preset perspective generation algorithm is implemented by the server rather than the terminal device, which can reduce the computing pressure of the terminal device.

[0101] From the above process, it can be seen that the preset perspective generation algorithm is an algorithm for generating a virtual object picture of the first perspective based on the virtual object pictures of the two nearest perspectives (referred to as the second perspective and the third perspective) adjacent to the perspective to be generated (referred to as the first perspective). Usually, the two adjacent perspectives on the left and right that are closest to the first perspective are taken as the second perspective and the third perspective, such as the 110-degree and 120-degree perspectives in the above example. The preset perspective generation algorithm can be implemented based on a deep learning neural network, and the RGB images and depth maps of the second perspective and the third perspective are input into the learned neural network. The neural network is used to learn and obtain images of each degree of perspective between the second perspective and the third perspective, thereby obtaining the virtual object picture of the first perspective.

[0102] By introducing a perspective generation algorithm to generate reasonable virtual object images of adjacent perspectives, the number of virtual cameras and perspectives that need to be deployed is reduced, thereby reducing the number of cloud hosts used for rendering and saving server costs. Taking the above-mentioned server with a single graphics card of Nvidia A10 as an example, rendering one perspective can effectively synthesize at least four surrounding perspectives, thereby reducing the number of server deployments and reducing computing costs.

[0103] In this embodiment, after the virtual object screen of the target perspective is sent to the terminal device, if the virtual object screen of the target perspective is the virtual object screen of the user's perspective to be viewed, the terminal device combines the virtual object screen of the user's perspective to be viewed with the pre-rendered virtual scene screen of the user's perspective to be viewed, and obtains the live broadcast screen of the user's perspective to be viewed. If the virtual object screen of the target perspective is not the virtual object screen of the user's perspective to be viewed, the terminal device generates a virtual object screen of the virtual object at the user's perspective to be viewed based on the virtual object screen of the target perspective based on a preset perspective generation algorithm, and then combines the virtual object screen of the user's perspective to be viewed with the pre-rendered virtual scene screen of the user's perspective to be viewed, and obtains the live broadcast screen of the user's perspective to be viewed.

[0104] It can be seen that the terminal device also needs to pre-render the virtual scene screen of the user's viewing angle. Based on this, in one embodiment, before sending the virtual object screen of the target viewing angle to the terminal device based on the virtual object screen at each viewing angle obtained by rendering, the method further includes:

[0105] A virtual scene model and special effect instructions associated with the virtual scene are sent to a terminal device; the virtual scene model and the special effect instructions are used by the terminal device to render a virtual scene image from the user's viewing angle; the virtual scene image includes special effects corresponding to the special effect instructions.

[0106] Specifically, the server sends a virtual scene model to the terminal device, which is a 3D model, and also sends a special effect instruction associated with the virtual scene to the terminal device. The terminal device parses the special effect instruction, generates special effects in the virtual scene according to the parsing result, and generates a virtual scene screen of the user's viewing angle according to the virtual scene model with special effects and the user's viewing angle. Therefore, the generated virtual scene screen includes the special effects corresponding to the special effect instruction. Therefore, after the terminal device obtains the virtual object screen of the user's viewing angle, it combines the virtual object screen with the virtual scene screen of the user's viewing angle by cutting out and overlaying, etc., to obtain the live screen of the user's viewing angle and display it to the user. In this embodiment, the special effect can be a static special effect whose display effect remains unchanged during the live broadcast process.

[0107] It can be seen that through this embodiment, the virtual scene model and the special effect instructions associated with the virtual scene can be sent to the terminal device in advance, so that the terminal device can render according to the virtual scene model and the special effect instructions to obtain the virtual scene picture with special effects from the user's viewing perspective. By rendering complex virtual object pictures on the cloud and simple virtual scenes on the terminal side, the rendering pressure of the server can be alleviated and the computing cost of the server can be reduced.

[0108] Figure 5 A schematic diagram of the front-end and back-end interaction of an image generation method provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the front end involved in the image generation method includes a VR device, and the back end includes a rendering server and a network transmission server.

[0109] The rendering server has a distributed rendering module, an audio acquisition module and a data sending module. The distributed rendering module can implement the above-mentioned method flow and render virtual object images from various perspectives. The audio acquisition module can obtain audio data in the live broadcast. The data sending module can send the virtual object images and audio data to the network transmission server.

[0110] The network transmission server includes an encoding module and a data distribution module. The encoding module is used to encode the data sent from the rendering server, and the data distribution module is used to send the encoded audio data and the virtual object picture of the target perspective to the VR device.

[0111] The VR device includes a live screen generation module and a user interaction module. The live screen generation module is used to generate a live screen based on the virtual object screen of the target perspective combined with the virtual scene screen. The user interaction module is used to display the live screen to the user, play audio data and receive user interaction instructions.

[0112] Figure 6a A schematic diagram of a virtual object screen provided by an embodiment of the present disclosure is shown in FIG. Figure 6b A schematic diagram of a virtual scene screen provided by an embodiment of the present disclosure, Figure 6c A schematic diagram of a live broadcast screen provided by an embodiment of the present disclosure is shown in FIG. Figure 6a-6c As shown, in one embodiment, the server is used to generate a virtual object image, the terminal device user generates a virtual scene image, and the terminal device is further used to combine the virtual object image and the virtual scene image to obtain a live broadcast image, thereby rendering complex virtual object images on the cloud and simple virtual scenes on the terminal side, which can alleviate the rendering pressure of the server and reduce the computing cost of the server.

[0113] The above introduces an image generation method. Figure 7 A schematic diagram of the structure of an image generating device provided by an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the device comprises:

[0114] A data acquisition unit 71, configured to acquire motion data for controlling the motion of a virtual object and a perspective parameter of each of a plurality of perspectives of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object;

[0115] A picture rendering unit 72, configured to synchronously render a virtual object picture of the virtual object at each viewing angle at the same time according to the motion data and the viewing angle parameters of each viewing angle;

[0116] The picture sending unit 73 is used to send the virtual object picture of the target perspective to the terminal device based on the virtual object picture of the virtual object at each perspective obtained by rendering; the virtual object picture of the target perspective is used by the terminal device to generate the virtual object picture of the user's perspective to be viewed.

[0117] Optionally, the picture rendering unit 72 is specifically configured to:

[0118] Determine whether rendering of the virtual object screen at a previous moment of the current moment of the virtual object at each viewing angle has been completed;

[0119] If yes, then generating model data of the virtual object after the movement at the current moment according to the movement data at the current moment;

[0120] According to the model data of the virtual object after the movement at the current moment and the viewing angle parameters of each viewing angle, the virtual object picture of the virtual object at the current moment at each viewing angle is synchronously rendered.

[0121] Optionally, the picture rendering unit 72 is further specifically configured to:

[0122] Determine whether the value of the preset variable shared by each perspective is equal to the total number of each perspective; wherein the value of the preset variable is modified after rendering the virtual object screen of the virtual object at any perspective at the previous moment until the virtual object screen of the virtual object at each perspective at the previous moment is rendered;

[0123] If so, it is determined that the rendering of the virtual object screen of the previous moment at each viewing angle of the virtual object is completed.

[0124] Optionally, the picture rendering unit 72 is further specifically used to: after determining that the rendering of the virtual object picture of the virtual object at the previous moment at each viewing angle is completed, restore the preset variable to the initial value.

[0125] Optionally, the picture rendering unit 72 is further specifically configured to:

[0126] According to the fence signal in the task queue, read the model data of the virtual object after the movement at the current moment from the task queue;

[0127] The task queue is used to store the model data of the virtual object after movement at each moment and the barrier signal; the barrier signal is used to divide the model data of the virtual object after movement at adjacent moments in the task queue;

[0128] According to the read model data of the virtual object and the viewing angle parameters of each viewing angle, the virtual object picture of the virtual object at the current moment at each viewing angle is synchronously rendered.

[0129] Optionally, it further includes a writing unit, which is used to write the model data of the virtual object and the fence signal after the movement at each moment into the task queue through the following steps:

[0130] Generate model data of the virtual object after movement at each moment according to the movement data at each moment;

[0131] Writing the model data of the virtual object after movement at each moment into the task queue in order from the beginning to the end of time;

[0132] In the task queue, the fence signal is set after the model data of the virtual object after movement at each moment.

[0133] Optionally, the picture sending unit 73 is specifically configured to:

[0134] Obtain the user's viewing angle;

[0135] If the viewing angle to be viewed by the user is one of the multiple viewing angles, selecting the viewing angle to be viewed by the user from among the viewing angles as the target viewing angle;

[0136] The virtual object picture of the target perspective is sent to the terminal device.

[0137] Optionally, the picture sending unit 73 is further specifically configured to:

[0138] If the viewing angle to be viewed by the user is not any of the multiple viewing angles, selecting a viewing angle closest to the viewing angle to be viewed by the user from the multiple viewing angles as a target viewing angle;

[0139] The virtual object picture of the target perspective is sent to the terminal device.

[0140] Optionally, the picture sending unit 73 is further specifically configured to:

[0141] If the viewing angle to be viewed by the user is not any of the multiple viewing angles, selecting a viewing angle closest to the viewing angle to be viewed by the user from the multiple viewing angles as a candidate viewing angle;

[0142] Acquire the virtual object picture of the candidate viewing angle, and generate the virtual object picture of the viewing angle to be viewed by the user according to the virtual object picture of the candidate viewing angle based on a preset viewing angle generation algorithm;

[0143] The virtual object picture of the user's to-be-watched perspective is sent to the terminal device as the virtual object picture of the target perspective.

[0144] Optionally, it also includes a scene sending unit, which is used to send a virtual scene model and special effect instructions associated with the virtual scene to the terminal device before sending the virtual object picture of the target perspective to the terminal device based on the virtual object picture of each perspective obtained by rendering; the virtual scene model and the special effect instructions are used for rendering by the terminal device to obtain the virtual scene picture of the user's perspective to be viewed; the virtual scene picture includes special effects corresponding to the special effect instructions.

[0145] Optionally, the multiple virtual cameras are arranged horizontally around the virtual object and / or vertically around the virtual object.

[0146] The image generating device in the embodiment of the present disclosure can implement each process of the above-mentioned image generating method embodiment and achieve the same effects and functions, which will not be repeated here.

[0147] An embodiment of the present disclosure further provides an electronic device, Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 8 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and memory 802, and one or more applications or data may be stored in the memory 802. Among them, the memory 802 may be a temporary storage or a permanent storage. The application stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 801 can be configured to communicate with the memory 802 to execute a series of computer executable instructions in the memory 802 on the electronic device. The electronic device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input or output interfaces 805, one or more keyboards 806, etc.

[0148] In a specific embodiment, the electronic device is a background server, including a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor implements the following process:

[0149] Acquire motion data for controlling the motion of the virtual object and a perspective parameter of each of a plurality of perspectives of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object;

[0150] Synchronously rendering a virtual object picture of the virtual object at each perspective at the same time according to the motion data and the perspective parameter of each perspective;

[0151] Based on the virtual object picture of the virtual object at each viewing angle obtained by rendering, the virtual object picture of the target viewing angle is sent to the terminal device; the virtual object picture of the target viewing angle is used by the terminal device to generate the virtual object picture of the user's viewing angle.

[0152] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned image generation method embodiment and achieve the same effects and functions, which will not be repeated here.

[0153] Another embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:

[0154] Acquire motion data for controlling the motion of the virtual object and a perspective parameter of each of a plurality of perspectives of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object;

[0155] Synchronously rendering a virtual object picture of the virtual object at each perspective at the same time according to the motion data and the perspective parameter of each perspective;

[0156] Based on the virtual object picture of the virtual object at each viewing angle obtained by rendering, the virtual object picture of the target viewing angle is sent to the terminal device; the virtual object picture of the target viewing angle is used by the terminal device to generate the virtual object picture of the user's viewing angle.

[0157] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned image generation method embodiment and achieve the same effect and function, which will not be repeated here.

[0158] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0159] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0160] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0161] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0162] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0163] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0167] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0168] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0169] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0170] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.

Claims

1. An image generation method, characterized in that: include: Acquire motion data for controlling the motion of the virtual object and a perspective parameter of each of a plurality of perspectives of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object; Synchronously rendering a virtual object picture of the virtual object at each perspective at the same time according to the motion data and the perspective parameters of each perspective; Based on the virtual object picture of the virtual object at each viewing angle obtained by rendering, sending the virtual object picture of the target viewing angle to the terminal device; The virtual object picture of the target viewing angle is used by the terminal device to generate a virtual object picture of the viewing angle to be viewed by the user.

2. The method according to claim 1, characterized in that The step of synchronously rendering a virtual object picture of the virtual object at each perspective at the same time according to the motion data and the perspective parameter of each perspective includes: Determine whether rendering of the virtual object screen at a previous moment of the current moment of the virtual object at each viewing angle has been completed; If yes, then generating model data of the virtual object after the movement at the current moment according to the movement data at the current moment; According to the model data of the virtual object after the movement at the current moment and the viewing angle parameters of each viewing angle, the virtual object picture of the virtual object at the current moment at each viewing angle is synchronously rendered.

3. The method according to claim 2, characterized in that The determining whether the rendering of the virtual object screen at the previous moment of the current moment of the virtual object at each viewing angle is completed includes: Determine whether the value of the preset variable shared by each perspective is equal to the total number of each perspective; wherein the value of the preset variable is modified after rendering the virtual object screen of the virtual object at any perspective at the previous moment until the virtual object screen of the virtual object at each perspective at the previous moment is rendered; If so, it is determined that the rendering of the virtual object screen of the previous moment at each viewing angle of the virtual object is completed.

4. The method according to claim 3, characterized in that After determining that the rendering of the virtual object screen of the virtual object at the previous moment at each viewing angle is completed, the method further includes: Restore the preset variables to their initial values.

5. The method according to claim 2, characterized in that: The step of synchronously rendering the virtual object picture of the virtual object at the current moment at each viewing angle according to the model data of the virtual object after the movement at the current moment and the viewing angle parameters of each viewing angle comprises: According to the fence signal in the task queue, read the model data of the virtual object after the movement at the current moment from the task queue; The task queue is used to store the model data of the virtual object after movement at each moment and the barrier signal; the barrier signal is used to divide the model data of the virtual object after movement at adjacent moments in the task queue; According to the read model data of the virtual object and the viewing angle parameters of each viewing angle, the virtual object picture of the virtual object at the current moment at each viewing angle is synchronously rendered.

6. The method according to claim 5, characterized in that The model data of the virtual object after movement at each moment and the fence signal are written into the task queue by the following steps: Generate model data of the virtual object after movement at each moment according to the movement data at each moment; Writing the model data of the virtual object after movement at each moment into the task queue in order from the beginning to the end of time; In the task queue, the fence signal is set after the model data of the virtual object after movement at each moment.

7. The method according to claim 1, characterized in that The step of sending the virtual object picture of the target perspective to the terminal device based on the virtual object picture of the virtual object at each perspective obtained by rendering includes: Obtain the user's viewing angle; If the viewing angle to be viewed by the user is one of the multiple viewing angles, selecting the viewing angle to be viewed by the user from among the viewing angles as the target viewing angle; The virtual object picture of the target perspective is sent to the terminal device.

8. The method according to claim 7, characterized in that The method further comprises: If the viewing angle to be viewed by the user is not any of the multiple viewing angles, selecting a viewing angle closest to the viewing angle to be viewed by the user from the multiple viewing angles as a target viewing angle; The virtual object picture of the target perspective is sent to the terminal device.

9. The method according to claim 7, characterized in that: The method further comprises: If the viewing angle to be viewed by the user is not any of the multiple viewing angles, selecting a viewing angle closest to the viewing angle to be viewed by the user from the multiple viewing angles as a candidate viewing angle; Acquire the virtual object picture of the candidate viewing angle, and generate the virtual object picture of the viewing angle to be viewed by the user according to the virtual object picture of the candidate viewing angle based on a preset viewing angle generation algorithm; The virtual object picture of the user's to-be-watched perspective is sent to the terminal device as the virtual object picture of the target perspective.

10. The method according to claim 1, characterized in that Before sending the virtual object picture of the virtual object at each viewing angle obtained based on the rendering to the terminal device, the method further includes: A virtual scene model and special effect instructions associated with the virtual scene are sent to the terminal device; the virtual scene model and the special effect instructions are used by the terminal device to render a virtual scene picture from the user's viewing angle; the virtual scene picture includes special effects corresponding to the special effect instructions.

11. The method according to claim 1, characterized in that: The multiple virtual cameras are arranged horizontally around the virtual object and / or vertically around the virtual object.

12. An image generating device, characterized in that: include: a data acquisition unit, configured to acquire motion data for controlling the motion of a virtual object and a viewing angle parameter of each of a plurality of viewing angles of a plurality of virtual cameras, the plurality of virtual cameras being arranged at equal intervals around the virtual object; A picture rendering unit, used for synchronously rendering a virtual object picture of the virtual object at each viewing angle at the same time according to the motion data and the viewing angle parameters of each viewing angle; A picture sending unit, configured to send a virtual object picture of a target perspective to a terminal device based on the virtual object picture of the virtual object at each perspective obtained by rendering; The virtual object picture of the target viewing angle is used by the terminal device to generate a virtual object picture of the viewing angle to be viewed by the user.

13. An electronic device, characterized in that: include: processor; as well as, A memory configured to store computer executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in any one of claims 1 to 11.

Citation Information

Cited By

  • Image rendering method and device

    CN120912750A