Image rendering method and device, storage medium, and electronic device

By submitting the object information of the target object to the graphics processor in VR technology and rendering images from multiple perspectives, the problem of high image rendering resource consumption in VR technology is solved and efficient utilization of hardware resources is achieved.

CN110163943BActive Publication Date: 2024-09-10SHENZHEN TENCENT INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811394276.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-11-21
Publication Date
2024-09-10
Estimated Expiration
2039-09-06

AI Technical Summary

Technical Problem

When playing 3D videos in existing VR technology, image rendering requires a large amount of hardware resources, resulting in high hardware resource consumption and a lack of effective solutions.

Method used

By obtaining the rendering request, the object information of the target object is submitted to the graphics processor, and the graphics processor is used to render the image of the target object in each of multiple perspectives to avoid the CPU submitting the object information once in each perspective. Reuse graphics processor object information.

Benefits of technology

It reduces the consumption of hardware resources caused by image rendering, improves the utilization efficiency of hardware resources, and reduces the consumption of data transmission and GPU computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110163943B
    Figure CN110163943B
Patent Text Reader

Abstract

The present invention discloses a method and device for rendering an image, a storage medium, and an electronic device. The method comprises: obtaining a rendering request, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple viewing angles; in response to the rendering request, submitting object information of the target object to a graphics processor, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model is a model of the target object, and the surface texture is a texture used to represent the surface of the target object; the three-dimensional model is rendered by the graphics processor according to the surface texture indicated by the object information to obtain the first image of the target object at each of multiple viewing angles. The present invention solves the technical problem in the related art that image rendering consumes a large amount of hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an image rendering method and device, a storage medium, and an electronic device. Background Art

[0002] Virtual reality (VR) technology is a computer simulation system that can create and experience a virtual world. It uses computers to generate simulated environments. It is a system simulation of interactive three-dimensional dynamic scenes and entity behaviors that integrates multi-source information, allowing users to immerse themselves in the environment.

[0003] In recent years, VR technology has achieved unprecedented development, and VR video playback, especially 3D video playback technology, has attracted more and more attention. The reason why people are keen on VR technology is its immersion, and 3D video can increase the user's sense of reality, so 3D video playback technology has attracted more and more attention. The 3D video playback technology in VR technology is different from traditional 3D video playback, which is determined by the unique left and right binocular mode of VR technology.

[0004] VR applications (such as VR applications based on mobile terminals) generally render left and right eye images with differences on the screen first, and then wear a pair of VR glasses to experience it. Since the rendering during 3D video playback requires a large amount of data transmission and a large amount of data calculation, it has high requirements on hardware resources and consumes a lot of hardware resources.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide a method and device for rendering an image, a storage medium, and an electronic device, so as to at least solve the technical problem in the related art that image rendering needs to consume a large amount of hardware resources.

[0007] According to one aspect of an embodiment of the present invention, a method for rendering an image is provided, comprising: obtaining a rendering request, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple perspectives; in response to the rendering request, submitting object information of the target object to a graphics processor, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model being a model of the target object, and the surface texture being a texture used to represent a surface of the target object; and rendering the three-dimensional model by the graphics processor according to the surface texture indicated by the object information to obtain a first image of the target object at each of the multiple perspectives.

[0008] According to another aspect of an embodiment of the present invention, there is also provided an image rendering device, comprising: an acquisition unit, configured to acquire a rendering request, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of a plurality of perspectives; a submission unit, configured to submit object information of the target object to a graphics processor in response to the rendering request, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, wherein the three-dimensional model is a model of the target object, and the surface texture is a texture used to represent a surface of the target object; and a rendering unit, configured to render the three-dimensional model through a graphics processor according to the surface texture indicated by the object information to obtain a first image of the target object at each of a plurality of perspectives.

[0009] According to another aspect of an embodiment of the present invention, a storage medium is provided. The storage medium includes a stored program. When the program is run, the above method is executed.

[0010] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above method through the computer program.

[0011] In an embodiment of the present invention, when a rendering request is obtained, the object information of the target object is submitted to the graphics processor, the object information is used to indicate the three-dimensional model and surface texture of the target object, and the graphics processor uses the saved object information to render the first image of the target object at each of multiple perspectives. The graphics processor can render the first image of the target object at multiple perspectives through the three-dimensional model and map in the object information, without the need for the CPU to submit the object information once when rendering the first image at each perspective. This can solve the technical problem in the related technology that image rendering requires a large amount of hardware resources, thereby achieving the technical effect of reducing the consumption of hardware resources caused by image rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0013] Figure 1 is a schematic diagram of a hardware environment of an image rendering method according to an embodiment of the present invention;

[0014] Figure 2 is a flowchart of an optional image rendering method according to an embodiment of the present invention;

[0015] Figure 3 is a schematic diagram of an optional image rendering according to an embodiment of the present invention;

[0016] Figure 4 is a schematic diagram of an optional image rendering according to an embodiment of the present invention;

[0017] Figure 5 is a schematic diagram of an optional live program image according to an embodiment of the present invention;

[0018] Figure 6 is a schematic diagram of an optional VR image according to an embodiment of the present invention;

[0019] Figure 7 is a schematic diagram of an optional VR image according to an embodiment of the present invention;

[0020] Figure 8 is a schematic diagram of an optional VR image according to an embodiment of the present invention;

[0021] Fig. 9 is a schematic diagram of an optional VR image according to an embodiment of the present invention;

[0022] Fig.10 is a schematic diagram of an optional image rendering device according to an embodiment of the present invention;

[0023] as well as

[0024] Fig.11 is a structural block diagram of a terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, some nouns or terms that appear in the process of describing the embodiments of the present invention are subject to the following explanations:

[0028] Virtual Reality VR: The full English name is Virtual Reality, which refers to building real-world scenes and experiences through virtualization technology.

[0029] VR application: an application that enables VR experience, generally referring to VR App applications.

[0030] VR glasses: a type of VR headset (virtual reality head-mounted display device), is a type of hardware that can be used in conjunction with VR applications to complete the VR experience. VR headsets can use head-mounted display devices to block people's vision and hearing to the outside world, and guide users to have a feeling of being in a virtual environment. The display principle is that the left and right eye screens display the images of the left and right eyes respectively. After the human eye obtains this different information, a sense of three-dimensionality is generated in the mind, thereby achieving an immersive VR experience.

[0031] Image geometric distortion, known in English as image geometric distortion, is the deformation of the geometric position of the image pixels produced during the imaging process relative to the reference system (such as the actual position on the ground or the topographic map), such as squeezing, stretching, offset and twisting, which changes the geometric position, size, shape, orientation, etc. of the image. For example, the images on the screens of mobile phones, tablets, computers and other devices will appear distorted when viewed through the lenses of VR glasses.

[0032] Image anti-distortion: also known as image de-distortion or image distortion correction, which is the inverse process of image geometric distortion. Images that have been deformed by squeezing, stretching, offsetting and twisting can be restored to normal display images through anti-distortion. For example, in order to see normal images through VR glasses, the images displayed on the screens of mobile phones, tablets, computers and other devices can be subjected to an inverse distortion operation in advance to correct the distortion caused by the lenses of the VR glasses.

[0033] OpenGL (ES): The full English name is Open Graphics Library, which can be translated as open graphics library or "open graphics library". It is a cross-language, cross-platform application programming interface (API) used to render 2D, 3D and other vector graphics. This interface can also be used in VR technology.

[0034] DirectX: A 3D graphics interface that can be used on Windows and other system platforms, used for rendering 3D images.

[0035] According to one aspect of an embodiment of the present invention, a method embodiment of a method for rendering an image is provided.

[0036] Optionally, in this embodiment, the above-mentioned image rendering method can be applied to Figure 1 In the hardware environment shown by the terminal 101 (the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, etc.), the terminal 101 provides a multi-perspective image, such as a VR image under the perspective of the left and right eyes, by executing the image rendering method of the present application. The user can watch the VR image rendered by the terminal 101 through a VR headset 103 adapted to the terminal 101.

[0037] Optionally, the hardware environment may also include a server 105 for providing business services (such as VR game services, VR social services, content services, etc.) to the terminal 101 or a client installed on the terminal 101, such as Figure 1 As shown, the terminal 101 is connected to the server 105 through a network (such as a wide area network, a metropolitan area network or a local area network), and a database 107 can be set on the server or independently of the server to provide a storage service for business data for the server 105. The terminal 101 can obtain business service data that needs to be provided or synchronized by the server 105 from the server 105 during the process of executing the image rendering method of the present application. For example, during the process of the server 105 providing VR social services to the terminal 101, the terminal 101 can obtain social synchronization data provided by the server 105 in real time, such as synchronization data when the player starts the VR social application (which can be used to synchronize the scene, object, etc. in the player's field of view), synchronization data when the user's perspective changes (which can be used to synchronize the scene, object, etc. that appears under the new perspective), and synchronization data under the current perspective in the virtual reality scene (which can be used to indicate the appearance change of an object, the position change of an object, the newly appeared friend object in the user's field of view, etc.). At this time, the terminal 101 can provide VR images under the perspectives of the left and right eyes by executing the image rendering method of the present application, and the user watches the VR image rendered by the terminal 101 through the VR head display 103, such as seeing the newly appeared friend.

[0038] Figure 2is a flowchart of an optional image rendering method according to an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:

[0039] In step S202, the terminal obtains a rendering request, where the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple viewing angles, where the target object is an object to be rendered.

[0040] The above virtual reality scene can be a medical virtual reality scene, and the target object can be a virtual human model established in a virtual environment. With the help of a tracking ball, a head-mounted display HMD, a sensory glove, etc., it is easy to understand the internal organ structure of the human body;

[0041] The virtual reality scene may also be a virtual reality scene in the military or aerospace fields, and the target object may be a military weapon (such as an airplane, a tank, etc.) established in the virtual environment, which may be used to provide training for military personnel;

[0042] Virtual reality scenes can also be virtual reality scenes for interior design. The target object can be the structure and appearance of the house established in the virtual reality scene. Virtual reality can turn this concept into visible virtual objects and environments, so that the traditional design mode can be upgraded to a digital "what you see is what you get" state, which greatly improves the quality and efficiency of design and planning.

[0043] The virtual reality scene can also be a virtual reality scene for real estate development. The target objects can be the surrounding supporting facilities, buildings and master plan, internal business distribution, etc. created in the virtual reality scene, showing the overall style of the project from the outside to the inside, and can show the project one by one through bird's eye view, internal roaming, automatic animation playback, etc., which enhances the integrity and interest of the explanation process;

[0044] Virtual reality scenes can also be game scenes of 3D games (such as virtual reality VR games, augmented reality AR games, etc.), and the target objects can be game characters, game props, game pets, etc. created in the virtual reality scenes. The sense of presence and interactive capabilities of VR can enhance the user experience.

[0045] The virtual reality scenes and target objects exemplified above are only for illustrative purposes. Actual virtual reality scenes and target objects are not limited to the above examples and may include more.

[0046] Step S204, in response to the rendering request, the terminal submits the object information (i.e., model data) of the target object to the graphics processor GPU (such as the terminal's central processing unit CPU submits the object information to the GPU), the object information is used to indicate the three-dimensional model and the surface texture of the three-dimensional model, the three-dimensional model is the model of the target object, and the surface texture is used to represent the texture of the target object surface.

[0047] The above-mentioned object information may include two parts: a three-dimensional model and a surface texture. The three-dimensional model is created in a three-dimensional 3D modeling software to describe the target object model, which can be represented by vertex data, while the surface texture is represented by a map. In actual use, the map is pasted to the surface of the three-dimensional model according to the corresponding UV coordinates to obtain the target object.

[0048] The above-mentioned multiple perspectives are at least two perspectives, and the specific situation of the perspective can be determined according to needs. For example, in a game scene, when playing a single-player game, there are two perspectives of the player's left and right eyes; when playing a two-player game, there are four perspectives of the four eyes of the two players, and so on; for other scenes, it is similar and will not be repeated here.

[0049] In step S206, the terminal renders the three-dimensional model according to the surface texture indicated by the object information through the graphics processor to obtain the first image of the target object at each of the multiple viewing angles. The graphics processor renders the first image (such as an AR image) of the target object at each of the multiple viewing angles using the object information submitted by the CPU this time, without the need for the CPU to submit the object information once each time the first image at a viewing angle is rendered.

[0050] When the image is collected for the aforementioned virtual reality scene (including the target object in the virtual reality scene), a 3D media file can be obtained. When the 3D media file is played in a mainstream player, ghosting or repeated images will occur, that is, one image will be displayed in two copies, left and right. The reason is that the scheme for rendering the left and right eye images is to render the left and right eye images separately, such as rendering the left eye image first and then rendering the right eye image. The rendering of the left and right eye images is performed as two independent processes. Compared with traditional non-VR applications (such as games), VR applications render the same scene twice, once for the left eye image and once for the right eye image. The applicant recognizes that this scheme of rendering the left and right eyes twice is inefficient and consumes twice the resources of ordinary applications. The reason is that when rendering the left eye image, it is necessary to submit the model and other information to the GPU, and when rendering the right eye image, it is also necessary to submit the same model and other information to the GPU.

[0051] In the above rendering process, the consumption of hardware resources is mainly reflected in the bus resource consumption and GPU computing resource consumption caused by data transmission. In the solution of the present application (in step S204), the central processing unit CPU can submit object information to the graphics processing unit GPU only once. For the GPU, the object information submitted by the CPU can be reused. In other words, the GPU can render the first image of the target object under multiple perspectives through the three-dimensional model and texture in the object information, without the need for the CPU to submit object information once when rendering the first image under each perspective, thereby reducing the hardware resource consumption caused by data transmission. This can solve the technical problem that image rendering in related technologies requires a large amount of hardware resources, thereby achieving the technical effect of reducing the hardware resource consumption caused by image rendering.

[0052] The above embodiment is described by taking the terminal 101 executing the image rendering method as an example. The terminal 101 executing the image rendering method of the embodiment of the present invention may also be executed by a client installed thereon. Optionally, the image rendering method of the embodiment of the present invention may also be executed by the server 105, that is, the server directly executes the above steps S202 to S206 under the triggering of the rendering request; or it may be executed by the server 105 and the terminal 101 together, such as the client sending a rendering request to the server, the server performing rendering after receiving it, and returning the rendering result to the terminal. Figure 2 The steps shown further detail the technical solution of the present application.

[0053] In the technical solution provided in step S204, the CPU submits the object information of the target object to the graphics processor GPU, the object information is used to indicate the three-dimensional model and the surface texture of the three-dimensional model, the three-dimensional model is the model of the target object, and the surface texture is used to represent the texture of the surface of the target object.

[0054] Optionally, the object information of the target object can be obtained from a server or an engine. For example, after a user selects a corresponding character in a social application, the terminal sends the character identification ID of the character to the server, and the server sends the model and texture information corresponding to the character identification ID to the terminal. Alternatively, after a player selects a character in a game application, the CPU uses the application program interface API provided by the game engine to send a request carrying the character identification ID of the selected character to the game engine. After receiving the request, the game engine responds and provides the model and texture information corresponding to the character identification ID. The above-mentioned multiple viewing angles can be determined according to user operations. For example, for a user wearing a head display, the angle change of the user's head can be sensed by a multi-axis sensor in the head display. After the user wears the head display, each of the multiple viewing angles will have an initial value. After the user rotates an angle R in a certain direction, the angle value of each of the multiple viewing angles is the angle value obtained by rotating the angle R in the same direction from the initial value. If the user rotates again, the method for determining the angle value of each viewing angle is similar to the above.

[0055] In the above embodiment, the target object may be one or more objects. When the target object is multiple objects, submitting the object information of the target object to the graphics processor includes: the CPU may submit the object information and perspective information of the multiple objects one by one to the graphics processor GPU. For the first object, multiple first images corresponding to multiple perspectives are directly rendered (that is, each perspective corresponds to a first image). For subsequent objects to be rendered, the subsequent objects are rendered in the first images under the corresponding perspectives. When the GPU receives the object information and perspective information of an object, it renders the object in each first image.

[0056] Optionally, in the above embodiment, the CPU submitting the object information of the target object to the graphics processor includes: submitting the object information and configuration information of the target object to the graphics processor, the configuration information being used to instruct the graphics processor to read the object information from the cache when rendering the first images of multiple perspectives.

[0057] As the demand for game quality increases, more and more objects need to be drawn in the scene. This mainly involves two aspects of performance bottlenecks. One is the number of times the CPU submits data to the GPU (including setting data cache, rendering status, and calling the drawing of rendering primitives, namely drawcall), and the other is the drawing on the GPU (including vertex processing and pixel drawing). As the number of scene objects increases, the pressure on the CPU and GPU will increase. In order to solve the above performance bottlenecks, an optional "submitting the object information of the target object to the graphics processor" is that the CPU submits the object information and configuration information of the target object to the graphics processor through the target interface. The target interface is used to transmit object information to the cache. The object information stored in the cache does not change when the graphics processor renders the first image of multiple perspectives. The target interface is used to transmit reusable object information, thereby reducing the number of times the CPU submits data to the GPU.

[0058] The above-mentioned target interface can be the DrawMeshInstance interface, through which a model's vertex buffer object VBO (i.e., object information) can be submitted once to the graphics card GPU. As for different viewing positions, states, colors, etc., these can be integrated into a buffer for the GPU (which can also be regarded as part of the object information), and drawn differently on the graphics card, which greatly reduces the number of submissions. This method is the most efficient and flexible for drawing a large number of objects of the same model because it has hardware implementation, and avoids memory waste.

[0059] The above-mentioned vertex buffer object VBO (Vertex Buffer Objects) can be a memory buffer area opened up in the graphics card storage space, which is used to store various attribute information of vertices, such as vertex coordinates, vertex normal vectors, vertex color data, etc. During rendering, various attribute data of vertices can be directly taken out from VBO. Since VBO is in the video memory instead of in the main memory, it is not necessary to transfer data from the CPU, and the processing efficiency is higher. VBO is equivalent to a cache storage area in the video memory, which can hold a large amount of vertex attribute information, and can open up many VBOs (corresponding to multiple objects). Each VBO has its unique identification ID, which corresponds to the specific video memory address of the VBO. Through this ID, the data in a specific VBO can be accessed. Specifically, the ID of the VBO corresponding to the target object can be configured in the configuration information, so that the corresponding VBO can be read directly according to the ID when needed, without the need for the CPU to submit the object information again.

[0060] In the technical solution provided in step S206, the surface texture of the three-dimensional model indicated by the object information is rendered by a graphics processor to obtain a first image of the target object at each of the multiple perspectives. The first images obtained from the multiple perspectives are also multiple, each first object corresponds to a perspective, and the multiple first images are images of the target object (such as a game character) at the same position and at the same time in the virtual reality scene. The only difference is that the shooting angles (i.e., perspectives) are different, rather than capturing images of multiple different objects (such as multiple game characters) at their respective positions.

[0061] Optionally, after submitting information using the above-mentioned target interface, when the graphics processor uses the saved object information to render the first image of the target object at each of multiple perspectives, when rendering the first image of the target object at each of multiple perspectives, the graphics processor reads the object information from the cache indicated by the configuration information, such as reading the corresponding VBO through the aforementioned ID, and then can use the read object information to render the first image at each perspective, the cache is used to save the object information received by the graphics processor; and use the surface texture indicated by the read object information to render the three-dimensional model to obtain the first image at each perspective, and the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images of multiple perspectives.

[0062] When a graphics processor renders a first image of a target object at each of multiple viewing angles using the stored object information, an optional rendering scheme is as follows:

[0063] Step 1: The GPU creates a target camera in the image processing engine.

[0064] The target camera can be a camera simulated in the virtual reality scene, rather than a physical camera. Different from the camera simulating the user's perspective in the virtual reality scene (this camera uses its own parameters to render images), the target camera can use the parameters of the camera simulating the user's perspective to render images, instead of using its own camera parameters to render images.

[0065] The parameters of the cameras simulating the user's left and right eye perspectives are equivalent to two virtual cameras. Compared with the target camera, the two virtual cameras do not participate in rendering, but provide parameters required for rendering, such as providing the camera position simulating the user's eye coordinates, the perspective parameters simulating the user's eye perspective, etc. During the rendering process, the target camera may not use the parameters of the target camera, but the parameters of the two virtual cameras. When rendering the left eye VR image, the parameters of the virtual camera simulating the left eye are used to render according to the position and perspective of the left eye. When rendering the right eye VR image, the parameters of the virtual camera simulating the right eye are used to render according to the position and perspective of the right eye. This is equivalent to completing the rendering of multiple VR images with only one camera.

[0066] Step 2, controlling the target camera in the GPU to render and capture images of the three-dimensional model representing the target object according to the camera parameters corresponding to each of the multiple perspectives according to the surface texture indicated by the object information, so as to obtain the first image of the target object at each perspective. In other words, there are as many first images as there are perspectives.

[0067] Optionally, controlling the target camera to render and capture images of the surface texture of the three-dimensional model indicated by the object information according to each of the multiple perspectives to obtain the first image at each perspective may include: rendering the target object in the virtual reality scene according to the three-dimensional model indicated by the object information and the surface texture of the three-dimensional model. Specifically, the texture map used to represent the surface texture may be pasted on the surface of the three-dimensional model according to UV coordinates to obtain the target object; controlling the target camera to capture images of the rendered target object according to each of the multiple perspectives to obtain the first image at each perspective.

[0068] In the GPU, the target camera is controlled to perform image capture on the rendered target object according to each of the multiple perspectives. When the first image at each perspective is obtained, the target object can be cropped according to each of the multiple perspectives, and the image of the cropped target object is captured to obtain the first image at each perspective. Each first image is obtained by capturing the target object cropped according to one of the multiple perspectives. Cropping the target object according to the perspective includes cropping the portion of the target object that cannot be seen at the perspective. The specific cropping method can be projecting the target object onto a plane tangent to the perspective.

[0069] In an optional implementation, the above-mentioned multiple viewing angles may be two viewing angles, and correspondingly, the first images are two. After the first image of the target object in each of the multiple viewing angles is obtained by rendering the three-dimensional model according to the surface texture indicated by the object information through the graphics processor, the two obtained first images are saved as follows:

[0070] 1) Cache the image data of the two first images into two image cache arrays, each image cache array being used to cache the image data of a corresponding first image;

[0071] 2) Cache the image data of the two first images into the same image cache array.

[0072] In the technical solution of this application, a more efficient method is provided, which occupies less terminal resources (such as the hardware resources of the mobile phone), has higher performance and saves more power. For a simple scene test, the optimized solution of this application has only about half the overhead (such as CPU overhead) of the above solution, and is more friendly to GPU cache access.

[0073] As an optional embodiment, the implementation method of the present application is described in detail below by taking the implementation of VR live broadcast on a mobile terminal as an example.

[0074] Mobile VR manufacturers in related technologies or game engines that support VR (such as Unity) all use similar technical solutions, rendering the left eye first and then the right eye. The left and right eye renderings are completely independent. Although this implementation solution is universal, simple, and easy to understand, it is not efficient and consumes a lot of resources on the mobile terminal.

[0075] like Figure 3 As shown, the image rendering for the left eye needs to go through the processes of clipping Cull processing, rendering Shadows, rendering Opaque, rendering Skybox, intermediate processing Post-Opaque Image FX, rendering Transparent, and optimizing Post-Transparent Image FX to obtain the left eye image. The rendering of the right eye image is similar.

[0076] The above-mentioned VR left-eye and right-eye rendering technology is to render the left and right eyes independently. The left eye is rendered first, rendered to the left eye's image cache or the left half of the screen, and then the right eye is rendered to the right eye's image cache or the right half of the screen. If it is rendered to the image cache, the image caches of the left and right eyes are processed (such as anti-distortion) and displayed on the mobile phone screen.

[0077] This application uses a more efficient method, and the left and right eye images can be rendered simultaneously. The left and right eye images are rendered to an image cache array (array size is 2) or the left and right halves of a large image cache, corresponding to the left and right halves of the mobile phone screen. If it is rendered to an image cache array or a large image cache, it is also processed (such as anti-distortion) before being displayed on the mobile phone screen.

[0078] like Figure 4As shown, the rendering of the left and right eye images shares a data model (object information), and there is no need to obtain the data model separately. The specific execution process is the same as Figure 3 Similar. Figure 3 Although the rendering of left and right eye images is more common, the technical solution in needs to transmit the data model twice, which consumes twice the CPU resources, and the GPU needs to cache two identical data models, which is not friendly to the GPU cache and wastes the GPU cache resources. Figure 4 In the scheme shown, the whole process has high performance. For model rendering under different perspectives, the data model of the object only needs to be transmitted once, which consumes less CPU resources. At the same time, the GPU only needs to cache the data model once, which is GPU cache-friendly.

[0079] This solution can be applied in live broadcast applications, such as Figure 5 As shown, a more efficient VR experience is achieved for users.

[0080] The rendering process of an object (or object) in a 3D engine: In order to simulate an object (i.e., the target object), 3D graphics abstracts some attributes of the object. The important ones are network (describing the shape of the object through points and lines) and material (determining the appearance of the object, such as red or blue, etc.). In order to render an object, after determining the position and attributes of the object and the camera, you first need to set the attributes of the object to be rendered, and then submit the mesh to the GPU for rendering. The GPU calculates the position, mesh, and attributes of the object and camera, and finally generates an image. The image is the result of the object rendering. From the image, you can see the object's nearness, distance, size, shape, appearance and other characteristics, which are the same as the objects in the real world seen by the human eye.

[0081] In order to describe the real world, general applications (such as games) will build a virtual scene with various objects and a camera (simulating human eyes). In order to render a scene, all objects in the scene are submitted to the GPU for rendering one by one in a certain order.

[0082] For VR applications, in order to create a sense of virtual reality, it is necessary to render two images with a difference between the left and right eyes. Therefore, there are two cameras, one simulating the left eye and the other simulating the right eye. The left eye camera submits all objects to the GPU for rendering in a certain order; the right eye camera submits all the same objects to the GPU for rendering again in a certain order. The left and right eyes render the same batch of identical objects (all parameters and properties of the objects are the same), except for the different cameras (position and other properties, that is, viewing angle). The two images rendered in the end are basically the same, but with a difference. When you wear VR glasses to watch, you will have a real 3D feeling (three-dimensional sense).

[0083] VR's method of rendering the left and right eyes separately also brings twice the performance overhead. Each object in the scene will be submitted to the GPU for rendering twice, once for the left eye and once for the right eye.

[0084] like Figure 6 As shown, the left eye image and the right eye image are rendered separately. Figure 6 The state shown is that the left eye image has been rendered, that is, multiple objects 601 to 605 have been rendered, and the right eye image begins to be rendered, and only the object 601 is rendered; the image after the right eye is rendered is as shown in FIG. Figure 7 shown.

[0085] In order to optimize the performance overhead of submitting VR left and right eyes twice, this application proposes a more optimized method. For the rendering of the left and right eyes, each object only needs to be submitted once. The technical implementation principle is: in OpenGL and DirectX, through the interface DrawMeshInstance, multiple copies of an object are rendered in the scene, and only one submission is required. The properties of the Mesh, material and other properties of the multiple copies are the same, but there may be differences in size and appearance.

[0086] Using this technical feature, the rendering results of an object for the left and right eyes can be regarded as two copies. Each object is submitted by this interface, but the difference is that this interface renders multiple copies of an object, usually rendered by one camera, and the multiple copies differ in position and other properties. However, in the technical solution of the present application, it is just the opposite. The "two copies" of each object of the left and right eyes have the same object position and attributes, but the cameras used for rendering are different. In order to deal with this difference, two virtual cameras are used. These two cameras are not for real rendering, but only provide parameters for the rendering of the "two copies" (such as camera position, viewing angle parameters, etc.). For example, in three-dimensional space, the left and right eyes are symmetrical with respect to the X-axis, and the coordinate values ​​of the two virtual cameras on the Y-axis are opposite. Then the camera positions of the virtual cameras representing the left and right eyes can be expressed by three-dimensional coordinates (a, b, c) and (a, -b, c), where a, b and c are constants. The field of view of each eye (corresponding to the camera) is equivalent to a cone, and the viewing angle can be considered as the angle between the center line of the cone and a certain axis (such as the X-axis). Then another real camera (i.e., the target camera) is used to submit the object for double copy rendering. However, in the process of copy rendering, the parameters of the real camera are not used, but the parameters of two virtual cameras are used. One copy uses the parameters of the left eye virtual camera, and the other copy uses the parameters of the right eye virtual camera.

[0087] like Figure 8As shown, after the model of the object 601 is submitted, the object 601 can be rendered in the left eye image and the right eye image simultaneously or successively, which is different from Figure 6 and Figure 7 After the model of object 602 is submitted, object 602 is rendered in the left eye image and the right eye image, and so on, until all objects are rendered. Figure 7 shown.

[0088] Through the method described above, "two copies" of each object can be rendered to an image cache array (array size is 2) or the left and right halves of a large image cache, or the left and right halves of the mobile phone screen through one submission, thereby saving one submission operation to the GPU for each object.

[0089] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0091] According to another aspect of an embodiment of the present invention, a device for rendering an image for implementing the above-mentioned method for rendering an image is also provided. Fig.10 is a schematic diagram of an optional image rendering device according to an embodiment of the present invention, the device can be used as a part of a terminal or a server, such as Fig.10 As shown, the device may include: an acquisition unit 1001 , a submission unit 1003 and a rendering unit 1005 .

[0092] The acquisition unit 1001 is used to acquire a rendering request, where the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple perspectives.

[0093] The above virtual reality scene can be a medical virtual reality scene, and the target object can be a virtual human model established in a virtual environment. With the help of a tracking ball, a head-mounted display HMD, a sensory glove, etc., it is easy to understand the internal organ structure of the human body;

[0094] The virtual reality scene may also be a virtual reality scene in the military or aerospace fields, and the target object may be a military weapon (such as an airplane, a tank, etc.) established in the virtual environment, which may be used to provide training for military personnel;

[0095] Virtual reality scenes can also be virtual reality scenes for interior design. The target object can be the structure and appearance of the house established in the virtual reality scene. Virtual reality can turn this concept into visible virtual objects and environments, so that the traditional design mode can be upgraded to a digital "what you see is what you get" state, which greatly improves the quality and efficiency of design and planning.

[0096] The virtual reality scene can also be a virtual reality scene for real estate development. The target objects can be the surrounding supporting facilities, buildings and master plan, internal business distribution, etc. created in the virtual reality scene, showing the overall style of the project from the outside to the inside, and can show the project one by one through bird's eye view, internal roaming, automatic animation playback, etc., which enhances the integrity and interest of the explanation process;

[0097] Virtual reality scenes can also be game scenes of 3D games (such as virtual reality VR games, augmented reality AR games, etc.), and the target objects can be game characters, game props, game pets, etc. created in the virtual reality scenes. The sense of presence and interactive capabilities of VR can enhance the user experience.

[0098] The virtual reality scenes and target objects exemplified above are only for illustrative purposes. Actual virtual reality scenes and target objects are not limited to the above examples and may include more.

[0099] The submitting unit 1003 is used to submit the object information of the target object to the graphics processor in response to the rendering request, wherein the object information is used to indicate the three-dimensional model and the surface texture of the three-dimensional model, the three-dimensional model is the model of the target object, and the surface texture is the texture used to represent the surface of the target object.

[0100] The above-mentioned object information may include two parts: a three-dimensional model and a surface texture. The three-dimensional model is created in a three-dimensional 3D modeling software to describe the target object model, which can be represented by vertex data, while the surface texture is represented by a map. In actual use, the map is pasted to the surface of the three-dimensional model according to the corresponding UV coordinates to obtain the target object.

[0101] The above-mentioned multiple perspectives are at least two perspectives, and the specific situation of the perspective can be determined according to needs. For example, in a game scene, when playing a single-player game, there are two perspectives of the player's left and right eyes; when playing a two-player game, there are four perspectives of the four eyes of the two players, and so on; for other scenes, it is similar and will not be repeated here.

[0102] The rendering unit 1005 is configured to render the three-dimensional model according to the surface texture indicated by the object information through a graphics processor to obtain a first image of the target object at each of the multiple viewing angles.

[0103] When the image is collected for the aforementioned virtual reality scene (including the target object in the virtual reality scene), a 3D media file can be obtained. When the 3D media file is played in a mainstream player, ghosting or repeated images will occur, that is, one image will be displayed in two copies, left and right. The reason is that the scheme for rendering the left and right eye images is to render the left and right eye images separately, such as rendering the left eye image first and then rendering the right eye image. The rendering of the left and right eye images is performed as two independent processes. Compared with traditional non-VR applications (such as games), VR applications render the same scene twice, once for the left eye image and once for the right eye image. The applicant recognizes that this scheme of rendering the left and right eyes twice is inefficient and consumes twice the resources of ordinary applications. The reason is that when rendering the left eye image, it is necessary to submit the model and other information to the GPU, and when rendering the right eye image, it is also necessary to submit the same model and other information to the GPU.

[0104] In the above rendering process, the consumption of hardware resources is mainly reflected in the bus resource consumption and GPU computing resource consumption caused by data transmission. In the solution of the present application (in step S204), the central processing unit CPU can submit object information to the graphics processing unit GPU only once. For the GPU, the object information submitted by the CPU can be reused. In other words, the GPU can render the first image of the target object under multiple perspectives through the three-dimensional model and texture in the object information, without the need for the CPU to submit object information once when rendering the first image under each perspective, thereby reducing the hardware resource consumption caused by data transmission. This can solve the technical problem that image rendering in related technologies requires a large amount of hardware resources, thereby achieving the technical effect of reducing the hardware resource consumption caused by image rendering.

[0105] It should be noted that the acquisition unit 1001 in this embodiment can be used to execute step S202 in the embodiment of the present application, the submission unit 1003 in this embodiment can be used to execute step S204 in the embodiment of the present application, and the rendering unit 1005 in this embodiment can be used to execute step S206 in the embodiment of the present application.

[0106] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.

[0107] The above-mentioned rendering unit can also be used for: when rendering the first image of the target object at each of multiple perspectives, the graphics processor reads the object information from the cache indicated by the configuration information, and uses the surface texture indicated by the read object information to render the three-dimensional model to obtain the first image at each perspective, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images of multiple perspectives.

[0108] The submitting unit may also be used to submit the object information and configuration information of the target object to the graphics processor, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images of multiple perspectives.

[0109] Optionally, the submission unit can also be used to submit object information and configuration information of the target object to the graphics processor through a target interface, wherein the target interface is used to transmit the object information to a cache, and the object information stored in the cache does not change when the graphics processor renders a first image of multiple perspectives.

[0110] Optionally, the rendering unit may include: a creation module, used to create a target camera in an image processing engine through a graphics processor; a control module, used to control the target camera to render and capture images of the surface texture of the three-dimensional model according to the object information at each of multiple perspectives, so as to obtain a first image at each perspective.

[0111] The above-mentioned control module may include: a rendering submodule, which is used to render the target object in the virtual reality scene according to the three-dimensional model indicated by the object information and the surface texture of the three-dimensional model; a control submodule, which is used to control the target camera to collect images of the rendered target object according to each of the multiple perspectives, and obtain a first image at each perspective.

[0112] The above-mentioned control submodule can also be used to: crop the target object according to each of the multiple perspectives, and capture the image of the cropped target object to obtain the first image at each perspective, wherein each first image is obtained by capturing the image of the target object cropped according to one of the multiple perspectives, and cropping the target object according to one of the multiple perspectives includes cropping the part of the target object that cannot be seen at one perspective.

[0113] Optionally, the target object may include multiple objects, wherein the submitting unit may be further configured to submit object information of each of the multiple objects to the graphics processor.

[0114] Optionally, the multiple perspectives include two perspectives, the first images are two, and the rendering unit may further include: a first cache module, used to cache the image data of the two first images into two image cache arrays after the first image of the target object in each of the multiple perspectives is obtained by rendering the three-dimensional model according to the surface texture indicated by the object information through the graphics processor, wherein each image cache array is used to cache the image data of a corresponding first image; a second cache module, used to cache the image data of the two first images into the same image cache array after the first image of the target object in each of the multiple perspectives is obtained by rendering the three-dimensional model according to the surface texture indicated by the object information through the graphics processor.

[0115] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.

[0116] According to another aspect of the embodiments of the present invention, a server or a terminal for implementing the above-mentioned image rendering method is also provided.

[0117] Fig.11 is a structural block diagram of a terminal according to an embodiment of the present invention, such as Fig.11 As shown, the terminal may include: one or more (only one is shown in the figure) processors 1101, a memory 1103, and a transmission device 1105 (such as the sending device in the above embodiment), such as Fig.11 As shown, the terminal may also include an input and output device 1107 .

[0118] Among them, the memory 1103 can be used to store software programs and modules, such as program instructions / modules corresponding to the image rendering method and device in the embodiment of the present invention. The processor 1101 executes various functional applications and data processing by running the software programs and modules stored in the memory 1103, that is, realizing the above-mentioned image rendering method. The memory 1103 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1103 may further include a memory remotely arranged relative to the processor 1101, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] The above-mentioned transmission device 1105 is used to receive or send data via a network, and can also be used for data transmission between a processor and a memory. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1105 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1105 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0120] Specifically, the memory 1103 is used to store application programs.

[0121] The processor 1101 may call the application stored in the memory 1103 through the transmission device 1105 to perform the following steps:

[0122] A rendering request is obtained, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple perspectives;

[0123] In response to a rendering request, submitting object information of the target object to a graphics processor, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model being a model of the target object, and the surface texture being a texture used to represent a surface of the target object;

[0124] The three-dimensional model is rendered by a graphics processor according to the surface texture indicated by the object information to obtain a first image of the target object at each of the multiple viewing angles.

[0125] The processor 1101 is further configured to execute the following steps:

[0126] Rendering the target object in the virtual reality scene according to the three-dimensional model indicated by the object information and the surface texture of the three-dimensional model;

[0127] The target camera is controlled to collect images of the rendered target object according to each of the multiple viewing angles to obtain a first image at each viewing angle.

[0128] By adopting the embodiment of the present invention, when a rendering request is obtained, the object information of the target object is submitted to the graphics processor, the object information is used to indicate the three-dimensional model of the target object and the surface texture of the three-dimensional model, and the first image of the target object at each of multiple perspectives is rendered by the graphics processor using the saved object information. The graphics processor can render the first image of the target object at multiple perspectives through the three-dimensional model and texture in the object information, without the need for the CPU to submit the object information once when rendering the first image at each perspective. This can solve the technical problem in the related technology that image rendering requires a large amount of hardware resources, thereby achieving the technical effect of reducing the hardware resource consumption caused by image rendering.

[0129] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0130] It can be understood by those skilled in the art that Fig.11 The structure shown is for illustration only, and the terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.11 It does not limit the structure of the above electronic device. For example, the terminal may also include Fig.11 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.11 Different configurations are shown.

[0131] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0132] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to execute the program code of the image rendering method.

[0133] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.

[0134] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:

[0135] A rendering request is obtained, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple perspectives;

[0136] In response to a rendering request, submitting object information of the target object to a graphics processor, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model being a model of the target object, and the surface texture being a texture used to represent a surface of the target object;

[0137] The three-dimensional model is rendered by a graphics processor according to the surface texture indicated by the object information to obtain a first image of the target object at each of the multiple viewing angles.

[0138] Optionally, the storage medium is further configured to store program codes for executing the following steps:

[0139] Rendering the target object in the virtual reality scene according to the three-dimensional model indicated by the object information and the surface texture of the three-dimensional model;

[0140] The target camera is controlled to collect images of the rendered target object according to each of the multiple viewing angles to obtain a first image at each viewing angle.

[0141] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0142] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0143] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0144] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.

[0145] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for rendering an image, characterized in that: include: A rendering request is obtained, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of multiple perspectives; In response to the rendering request, submitting object information of the target object to a graphics processor, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model is a model of the target object, and the surface texture is a texture used to represent a surface of the target object; Rendering the three-dimensional model according to the surface texture indicated by the object information by the graphics processor to obtain the first image of the target object at each of the multiple viewing angles; Submitting the object information of the target object to the graphics processor includes: submitting the object information and configuration information of the target object to the graphics processor, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images of the multiple perspectives.

2. The method according to claim 1, characterized in that Rendering the three-dimensional model according to the surface texture indicated by the object information by the graphics processor to obtain the first image of the target object at each of the multiple viewing angles includes: When rendering the first image of the target object at each of the multiple perspectives, the graphics processor reads the object information from the cache indicated by the configuration information, and renders the three-dimensional model using the surface texture indicated by the read object information to obtain the first image at each of the perspectives, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images at the multiple perspectives.

3. The method according to claim 2, characterized in that Submitting the object information and configuration information of the target object to the graphics processor includes: The object information and the configuration information of the target object are submitted to the graphics processor through a target interface, wherein the target interface is used to transmit the object information to a cache, and the object information stored in the cache does not change when the graphics processor renders the first image of the multiple perspectives.

4. The method according to claim 1, characterized in that: Rendering the three-dimensional model according to the surface texture indicated by the object information by the graphics processor to obtain the first image of the target object at each of the multiple viewing angles includes: Creating a target camera in an image processing engine by means of the graphics processor; The target camera is controlled to render and capture an image of a surface texture of the three-dimensional model indicated by the object information at each of the multiple viewing angles, so as to obtain the first image at each of the viewing angles.

5. The method according to claim 4, characterized in that Controlling the target camera to render and collect images of the surface texture of the three-dimensional model according to each of the multiple viewing angles according to the object information, and obtaining the first image at each viewing angle includes: Rendering the target object in the virtual reality scene according to the three-dimensional model indicated by the object information and the surface texture of the three-dimensional model; The target camera is controlled to collect images of the rendered target object according to each of the multiple viewing angles, so as to obtain the first image under each of the viewing angles.

6. The method according to claim 5, characterized in that Controlling the target camera to collect images of the rendered target object according to each of the multiple viewing angles to obtain the first image at each viewing angle includes: The target object is cropped according to each of the multiple viewing angles, and image capture is performed on the cropped target object to obtain the first image at each viewing angle, wherein each of the first images is obtained by capturing the image of the target object after cropping according to one of the multiple viewing angles, and cropping the target object according to one of the multiple viewing angles includes cropping a portion of the target object that cannot be seen at one of the viewing angles.

7. The method according to claim 1, characterized in that The target object includes a plurality of objects, wherein submitting the object information of the target object to the graphics processor includes: Object information for each of the plurality of objects is submitted to the graphics processor.

8. The method according to claim 1, characterized in that The multiple viewing angles include two viewing angles, the first images are two, and after the graphics processor renders the three-dimensional model according to the surface texture indicated by the object information to obtain the first image of the target object at each of the multiple viewing angles, the method further includes: Cache the image data of two first images into two image cache arrays, wherein each of the image cache arrays is used to cache the image data of a corresponding first image; or, The image data of the two first images are cached in the same image cache array.

9. An image rendering device, characterized in that: include: An acquisition unit, configured to acquire a rendering request, wherein the rendering request is used to request rendering to obtain a first image of a target object in a virtual reality scene at each of a plurality of viewing angles; a submitting unit, configured to submit object information of the target object to a graphics processor in response to the rendering request, wherein the object information is used to indicate a three-dimensional model and a surface texture of the three-dimensional model, the three-dimensional model being a model of the target object, and the surface texture being a texture used to represent a surface of the target object; a rendering unit, configured to render the three-dimensional model according to the surface texture indicated by the object information through the graphics processor to obtain the first image of the target object at each of the multiple viewing angles; The submitting unit is further used to submit the object information and configuration information of the target object to the graphics processor, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images of the multiple perspectives.

10. The device according to claim 9, characterized in that The rendering unit is also used for: When rendering the first image of the target object at each of the multiple perspectives, the graphics processor reads the object information from the cache indicated by the configuration information, and renders the three-dimensional model using the surface texture indicated by the read object information to obtain the first image at each of the perspectives, wherein the configuration information is used to instruct the graphics processor to read the object information from the cache when rendering the first images at the multiple perspectives.

11. The device according to claim 10, characterized in that The submitting unit is further configured to: The object information and the configuration information of the target object are submitted to the graphics processor through a target interface, wherein the target interface is used to transmit the object information to a cache, and the object information stored in the cache does not change when the graphics processor renders the first image of the multiple perspectives.

12. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 8 when executed.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor executes the method described in any one of claims 1 to 8 through the computer program.