WO2024174655A1 - 渲染方法和电子设备 - Google Patents
渲染方法和电子设备 Download PDFInfo
- Publication number
- WO2024174655A1 WO2024174655A1 PCT/CN2023/135910 CN2023135910W WO2024174655A1 WO 2024174655 A1 WO2024174655 A1 WO 2024174655A1 CN 2023135910 W CN2023135910 W CN 2023135910W WO 2024174655 A1 WO2024174655 A1 WO 2024174655A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- patch
- absolute coordinates
- frame
- rendering
- facet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/80—Two-dimensional [2D] animation, e.g. using sprites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/40—Filling planar surfaces by adding surface attributes, e.g. adding colours or textures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—Three-dimensional [3D] image rendering
- G06T15/04—Texture mapping
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/816—Monomedia components thereof involving special video data, e.g 3D video
Definitions
- the present application relates to the field of image processing, and in particular to a rendering method and an electronic device.
- the current mainstream method is to insert a predicted frame between or after two adjacent real frames after rendering to reduce the rendering overhead.
- the predicted frame is obtained by interpolating or moving two real frames according to pixels.
- the embodiments of the present application provide a rendering method and an electronic device for reducing the jitter of two-dimensional surface display content in a predicted frame.
- a rendering method comprising: obtaining rendering parameter information of a first facet in a first real frame, the absolute coordinates of the first facet, rendering parameter information of a second facet in a second real frame, and the absolute coordinates of the second facet, wherein the first real frame and the second real frame are adjacent real frames; the first facet and the second facet refer to two-dimensional faces whose shapes remain unchanged and whose relative positions of vertices remain unchanged; if the rendering parameter information of the first facet and the rendering parameter information of the second facet are the same, and the absolute coordinates of the first facet and the absolute coordinates of the second facet are within a certain range, then determining the absolute coordinates of a target facet according to the absolute coordinates of the first facet and the absolute coordinates of the second facet, the target facet being located in a predicted frame obtained based on the first real frame and the second real frame; and rendering the target facet according to the absolute coordinates of the target facet and the rendering parameter information.
- the rendering method provided in the embodiment of the present application for two-dimensional patches whose shapes and relative positions of vertices remain unchanged (in essence, the displayed content remains unchanged), in the process of obtaining a predicted frame based on two real frames, only the moving position of such patches is predicted in the predicted frame, and the display content of such patches is not interpolated or moved according to pixels.
- the display content of such patches in the predicted frame still uses the display content in the real frame, which can ensure that such patches are also very clear in the predicted frame, reducing the jitter of the display content of the two-dimensional patches in the predicted frame.
- the rendering parameter information of the first patch or the rendering parameter information of the second patch includes at least one of the following information: texture coordinates mapped to each vertex of the patch, an identifier of the program to which the patch belongs, and the number of vertices of the patch.
- the two patches are the same, which means that these parameters of the two patches are the same.
- the vertex shader source code includes the attribute information of the face.
- One way is to determine whether the patch is a two-dimensional patch with a constant shape and constant relative positions of vertices by using the attribute information of the patch.
- determining the absolute coordinates of the target facet according to the absolute coordinates of the first facet and the absolute coordinates of the second facet includes: smoothing the absolute coordinates of the first facet and the absolute coordinates of the second facet to obtain the absolute coordinates of the target facet, so that the movement of the two-dimensional facet whose shape remains unchanged and the relative positions of the vertices remain unchanged in the predicted frame and the real frame is relatively smooth.
- P (P1*W1+P2*W2)/(W1+W2), where P1 is the absolute coordinates of the first patch, P2 is the absolute coordinates of the second patch, and W1 and W2 are weight coefficients.
- w1 and w2 are equal, and in this case the target patch is located between the first patch and the second patch.
- P1 is the absolute coordinates of the first patch
- P2 is the absolute coordinates of the second patch
- W is the weight coefficient.
- an electronic device comprising a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the method described in the first aspect and any embodiment thereof is executed.
- a computer-readable storage medium comprising instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to the first aspect and any embodiment thereof.
- a computer program product comprising instructions is provided.
- the electronic device executes the method as described in the first aspect and any embodiment thereof.
- a chip system including a processor for supporting an electronic device to implement the functions involved in the first aspect.
- the device also includes an interface circuit, which can be used to receive signals from other devices (such as a memory) or send signals to other devices (such as a communication interface).
- the chip system may include a chip and may also include other discrete devices.
- FIG1 is a schematic diagram of a two-dimensional facet with unchanged shape and unchanged relative coordinates of vertices provided by an embodiment of the present application;
- FIG2 is a schematic diagram of three-dimensional modeling by splicing multiple facets provided in an embodiment of the present application
- FIG3 is a schematic diagram of a texture mapping provided in an embodiment of the present application.
- FIG4 is a schematic diagram of an interpolated frame and an extrapolated frame provided in an embodiment of the present application.
- FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a software architecture for running an electronic device provided in an embodiment of the present application.
- FIG7 is a schematic diagram of a flow chart of a rendering method provided in an embodiment of the present application.
- FIG8 is a schematic diagram of a facet provided in an embodiment of the present application in which the shape, relative positions of vertices, and viewing angle do not change;
- FIG. 9 is a diagram of a target face, a first face, and a second face when an interpolation frame is provided in an embodiment of the present application. Schematic diagram of absolute coordinate relationship
- FIG10 is a schematic diagram of the absolute coordinate relationship between a target face, a first face, and a second face when an extrapolation frame is provided in an embodiment of the present application;
- FIG11 is a schematic diagram of a flow chart of another rendering method provided in an embodiment of the present application.
- FIG12 is a schematic diagram of a flow chart of another rendering method provided in an embodiment of the present application.
- FIG13 is a schematic diagram of the structure of a chip system provided in an embodiment of the present application.
- Coupled and “connection” involved in the embodiments of the present application should be understood in a broad sense. For example, they may refer to a direct physical connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.
- Graphics rendering engine is used to model the objects in the image, then render the model, such as adding color, lighting, shadows, etc., and finally display it on the screen.
- Graphics rendering engines include open graphics library (OpenGL), Metal, Vulkan, DirectX, etc. This application takes OpenGL as an example for explanation, but is not intended to be limited to this.
- Open Graphics Library is a cross-language, cross-platform application programming interface (API) for rendering two-dimensional (2D) or three-dimensional (3D) vector graphics.
- OpenGL is commonly used in computer-aided design (CAD), virtual reality (VR), augmented reality (AR), scientific visualization programs, and electronic game development.
- CAD computer-aided design
- VR virtual reality
- AR augmented reality
- scientific visualization programs and electronic game development.
- the embodiments of this application take mobile games as an example, but are not intended to be limited to this.
- a shader is an editable program used to implement image rendering. Unless otherwise specified, the shaders involved in this application are all described using OpenGL shaders as an example. OpenGL shaders include vertex shaders and fragment shaders. Vertex shaders are mainly responsible for the geometric relationship calculation of vertices, while fragment shaders are mainly responsible for the color calculation of patches (for patches, see the following description). Since shaders are editable, a variety of image effects can be achieved without being restricted by the fixed rendering pipeline of the graphics card.
- the vertex shader is essentially a program code that is called at each vertex to process the data of each vertex (such as vertex coordinates, normals, colors, and texture coordinates), such as vertex coordinate transformation, texture coordinate generation and transformation, lighting, color material application, etc. In other words, each vertex must execute the program in the main function of the vertex shader.
- Absolute coordinates of vertices In OpenGL, all objects are located in 3D space, but the screen is 2D pixels, so OpenGL converts the 3D coordinates of the vertices into 2D coordinates that adapt to the screen through various transformations. The vertex is projected onto the screen, and the vertex coordinates in screen space are the absolute coordinates of the vertex.
- the OpenGL shader language provides the following predefined variables for the vertex shader: Graphics library position variable (gl_Position), which is used to represent the absolute coordinates of the vertex in screen space.
- Absolute coordinates of a patch Since a patch includes multiple vertices, the coordinates of each vertex in the patch are maintained in the form of an array. Therefore, for the convenience of description, this application exemplarily uses the coordinates of the first vertex in the array in the patch as the absolute coordinates of the patch.
- the surface of an object can be modeled in three dimensions by stitching together multiple basic shapes (such as triangles). Each basic shape is called a patch. The more patches there are, the more detailed the modeling is.
- the fragment shader is the code that runs at each pixel on each patch. It is used to calculate and fill the color of a single pixel. It can also perform operations such as interpolation, texture mapping, texture application, and color summation on pixels.
- Texture, texture coordinates and texture mapping To make the rendered object more realistic, on the one hand, more patches can be used to model the surface of the object. On the other hand, as shown in Figure 3, the coordinates of the vertices of the patches on the surface of the object can be mapped to the coordinates of the modeled surface of the object (texture coordinates), so that the corresponding texture is displayed at the patch. This process is texture mapping, and the texture coordinates are represented by the UV coordinate system. This not only makes the rendered model surface more detailed, but also is more convenient and efficient.
- OpenGL shaders are written in OpenGL shading language (GLSL). Since shaders are independent programs, the shader source code can be stored as a separate script for application calls, or it can be called directly in memory as a string. The shader source code is compiled to obtain a shader object, and then multiple shader objects are linked together to form a shader program. The sender's shader declares an output type variable A, and the receiver's shader declares an input type variable A. When compiling and linking, the two shaders with the same name A will be linked together.
- GLSL OpenGL shading language
- a uniform variable is a special variable in a shader program that can be accessed and remains consistent throughout the execution of the shader program.
- the viewport is a rectangular area in the window used to display graphics.
- a predicted frame is inserted between the two real frames (the interpolated frame shown in FIG4 A) or after the two real frames (the interpolated frame shown in FIG4 B) to reduce rendering overhead.
- the predicted frame is obtained by interpolating or moving the two real frames according to the pixels.
- the type of facets is not distinguished. For two-dimensional facets whose shapes and relative positions of vertices in the image remain unchanged, if they are also interpolated or moved according to the pixels, these facets will be blurred in the predicted frame but clear in the real frame (i.e., jitter). Users can clearly perceive the difference between the predicted frame and the real frame, which greatly reduces the gaming experience.
- the rendering method and electronic device provided in the embodiment of the present application, for two-dimensional facets whose shapes remain unchanged and whose relative positions of vertices remain unchanged (in essence, the displayed content remains unchanged), only predicts the position of the movement of such facets in the predicted frame, and does not interpolate or move the displayed content of such facets according to the pixels.
- the displayed content in the predicted frame still uses the displayed content in the real frame, so that these facets can be ensured to be clear in the predicted frame, and the jitter of the displayed content of the two-dimensional facets in the predicted frame is reduced. It can be applied not only to electronic games (such as mobile games) but also to CAD, VR, AR, scientific visualization programs, etc.
- the electronic device 101 provided in the embodiment of the present application may be a device with a display function, and the electronic device 101 may be mobile or fixed.
- the electronic device 101 may be deployed on land (e.g. Such as indoors or outdoors, handheld or vehicle-mounted, etc.), it can also be deployed on the water surface (such as ships, etc.), and it can also be deployed in the air (such as airplanes, etc.).
- the electronic device 101 can be called user equipment (UE), access terminal, terminal unit, subscriber unit, terminal station, mobile station (MS), mobile station, terminal agent or terminal device, etc.
- the electronic device can be a mobile phone, a tablet computer, a laptop computer, a virtual reality device, an augmented reality device, etc.
- the embodiments of the present application do not limit the specific type and structure of the electronic device. A possible structure of the electronic device is described below.
- the electronic device 101 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a power management module 240, a battery 241, a wireless charging coil 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294 and a subscriber identification module (SIM) card interface 295, etc.
- SIM subscriber identification module
- the sensor module 280 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 101.
- the electronic device 101 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
- the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
- the processor 210 may include one or more processing units, for example, the processor 210 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), an application processor (AP), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a baseband processor, and a neural-network processing unit (NPU).
- Different processing units may be independent devices or integrated in one or more processors.
- the processor 210 may be an application processor AP.
- the processor 210 may be integrated in a system on chip (SoC). Alternatively, the processor 210 may be integrated in an integrated circuit (IC) chip.
- the processor 210 may include an analog front end (AFE) and a micro-controller unit (MCU) in an IC chip.
- the processor 210 may be the nerve center and command center of the electronic device 101.
- the processor 210 may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
- the processor 210 may also be provided with a memory for storing instructions and data.
- the memory in the processor 210 is a cache memory.
- the memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
- processor 210 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface and/or USB interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- subscriber identity module subscriber identity module
- SIM subscriber identity module
- USB interface etc.
- the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 101.
- the electronic device 101 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the power management module 240 is used to receive charging input from a charger.
- the charger may be a wireless charger (such as a wireless charging base of the electronic device 101 or other device that can wirelessly charge the electronic device 101), or a wired charger.
- the power management module 240 may receive charging input from a wired charger through the USB interface 230.
- the power management module 240 may receive wireless charging input through the wireless charging coil 242 of the electronic device.
- the power management module 240 can charge the battery 241 and also power the electronic device.
- the power management module 240 receives input from the battery 241 and powers the processor 210, the internal memory 221, the external memory interface 220, the display screen 294, the camera 293, and the wireless communication module 260.
- the power management module 240 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance) of the battery 241. In some other embodiments, the power management module 240 can also be set in the processor 210.
- the wireless communication function of the electronic device 101 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, the baseband processor, and the like.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 101 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 250 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 101.
- the wireless communication module 260 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., applied to the electronic device 101.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication technology
- IR infrared technology
- the electronic device 101 implements the display function through a GPU, a display screen 294, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor.
- the GPU is used to perform mathematical and geometric calculations and is used for GPU rendering.
- the processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen 294 is used to display images, videos, etc.
- the display screen 294 includes a display panel.
- the electronic device 101 may include 1 or N display screens 294, where N is a positive integer greater than 1.
- the electronic device 101 can use the ISP, camera 293, video codec, GPU, display screen 294 and The application processor etc. realize the shooting function.
- the ISP is used to process the data fed back by the camera 293.
- the ISP can be set in the camera 293.
- the camera 293 is used to capture static images or videos.
- the electronic device 101 may include 1 or N cameras 293, where N is a positive integer greater than 1.
- the camera of the embodiment of the present application includes a wide-angle camera and a main camera.
- the external memory interface 220 can be used to connect an external memory card, such as a micro SanDisk (Micro SD) card, to expand the storage capacity of the electronic device 101.
- the external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
- the internal memory 221 may be used to store computer executable program codes, which include instructions.
- the processor 210 executes various functional applications and data processing of the electronic device 101 by running the instructions stored in the internal memory 221.
- the internal memory 221 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
- the memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories.
- the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory may be a random access memory (RAM), which is used as an external cache.
- RAM random access memory
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDR SDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchlink DRAM
- DR RAM direct rambus RAM
- the electronic device 101 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone interface 270D and the application processor.
- the audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
- the audio module 270 can be set in the processor 210, or some functional modules of the audio module 270 are set in the processor 210.
- the speaker 270A also known as the "speaker” is used to convert the audio electrical signal into a sound signal.
- the receiver 270B also known as the "earpiece”, is used to convert the audio electrical signal into a sound signal.
- the microphone 270C also known as the "microphone” or “microphone” is used to convert the sound signal into an electrical signal.
- the electronic device 101 can be provided with at least one microphone 270C.
- the headphone interface 270D is used to connect a wired headset.
- the headphone interface 270D can be a USB interface 230, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
- the key 290 includes a power button, a volume button, etc.
- the key 290 can be a mechanical key. It can also be a touch key.
- the electronic device 101 can receive key input and generate key signal input related to the user settings and function control of the electronic device 101.
- the motor 291 can generate a vibration prompt.
- the motor 291 can be used for incoming call vibration prompts, It can also be used for touch vibration feedback.
- the indicator 292 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc.
- the SIM card interface 295 is used to connect the SIM card.
- the SIM card can be connected to and separated from the electronic device 101 by inserting it into the SIM card interface 295 or pulling it out from the SIM card interface 295.
- the electronic device 101 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
- the SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the electronic device 101 uses an embedded SIM (eSIM) card, and the eSIM card can be embedded in the electronic device 101 and cannot be separated from the electronic device 101.
- eSIM embedded SIM
- the processor 210 or GPU executes the rendering method provided in the embodiment of the present application by executing the program and instructions stored in the internal memory 221.
- the program run by the processor 210 can be based on an operating system, such as an Android operating system. Apple (iOS) operating system Windows operating system, etc.
- the program executed by the processor 210 is based on the Android operating system.
- the programs run by the processor 210 are layered according to their functions, and may include an application layer, a framework layer, a local layer, a kernel layer, and a driver layer.
- the application layer can include various applications that require GPU rendering, such as CAD, video games, AR/VR applications, scientific visualization programs, etc.
- the framework layer is used to provide application programming interfaces (APIs) and system resource services to applications in the application layer, such as a GPU rendering API.
- APIs application programming interfaces
- system resource services such as a GPU rendering API.
- the rendering method involved in the present application can be implemented in the framework layer on the CPU side or in the GPU.
- the implementation in the framework layer on the CPU side is used for illustration, but it is not intended to be limited to this.
- the local layer can provide a static link library or a dynamic link library for the API call of the framework layer, for example, providing a static link library or a dynamic link library to the GPU rendering API in the framework layer.
- the kernel layer includes the operating system (OS) kernel, which manages the system's processes, memory, drivers, file systems, and network systems.
- OS operating system
- the driver layer is used to drive the hardware resources of the hardware layer.
- the driver layer may include a GPU driver.
- the rendering method provided in the embodiment of the present application includes:
- the first real frame and the second real frame are adjacent real frames; the first patch and the second patch both refer to two-dimensional patches whose shapes and relative positions of vertices remain unchanged, and this type of patch is referred to as a stable patch in the following text.
- the relative position of vertices refers to the relative position between vertices in the same patch.
- the patches such as the text (XXX), icon (smiley face icon), and health bar on the head of the game character in the electronic game shown in FIG8, regardless of whether the displayed game character is zoomed in or out (A), turned around (B), moved (C), or changed posture (D), the shape, relative position of vertices, and viewing angle of these patches will not change, that is, the displayed content remains unchanged.
- the absolute coordinates of the patch are described above and will not be repeated here.
- the rendering parameter information of the patch includes at least one of the following information: the texture coordinates mapped to each vertex of the patch, the identifier of the program to which the patch belongs, and the number of vertices of the patch.
- Step S101 may be performed during the process of rendering a real frame.
- the target patch is located in a predicted frame obtained based on the first real frame and the second real frame, and describes the same content (eg, the same text, the same icon, the same health bar, etc.) as the first patch and the second patch.
- the same content eg, the same text, the same icon, the same health bar, etc.
- the distance threshold i.e.
- the difference between the absolute coordinates P1 (i.e., gl_Position) of the first patch and the absolute coordinates P2 of the second patch is the movement of the second patch relative to the first patch. Therefore, the absolute coordinates of the first patch and the absolute coordinates of the second patch can be smoothed to obtain the absolute coordinates of the target patch in the predicted frame. This makes the movement of the two-dimensional patch with unchanged shape and unchanged relative position of vertices in the predicted frame and the real frame smoother.
- W1 and W2 may be equal, in which case the target patch is located between the first patch and the second patch.
- Step S102 may be performed during the process of rendering a real frame or may be performed during the process of rendering a predicted frame.
- S103 Render the target face patch according to the absolute coordinates of the target face patch and the rendering parameter information.
- the rendering parameter information of the first patch is the same as the rendering parameter information of the second patch
- the rendering parameter information of the target patch also uses the same rendering parameter information.
- the target patch is rendered according to the absolute coordinates of the target patch and the rendering parameter information, and is drawn to the main scene of the prediction frame. That is, at the absolute coordinates of the target patch, rendering is performed according to the texture coordinates mapped to each vertex of the patch.
- Step S103 may be performed during the process of rendering a real frame or may be performed during the process of rendering a predicted frame.
- the rendering method provided in the embodiment of the present application for two-dimensional patches whose shapes and relative positions of vertices remain unchanged (in essence, the displayed content remains unchanged), in the process of obtaining a predicted frame based on two real frames, only the moving position of such patches is predicted in the predicted frame, and the display content of such patches is not interpolated or moved according to pixels.
- the display content of such patches in the predicted frame still uses the display content in the real frame, which can ensure that such patches are also very clear in the predicted frame, reducing the jitter of the display content of the two-dimensional patches in the predicted frame.
- the rendering method includes:
- the GPU rendering API of the framework layer loads the image rendering source code (including the vertex shader source code and the fragment source code) through the shader source code acquisition function (glShaderSource)
- the real frame information includes but is not limited to the attribute information, absolute coordinates (i.e., gl_Position) and rendering parameter information of each face in the real frame.
- the absolute coordinates (i.e., gl_Position) and rendering parameter information of the face are described above and will not be repeated here.
- the vertex shader source code includes the attribute information of the patch, which is used to indicate whether the patch is a two-dimensional patch without depth information (i.e., it will not change with the viewing angle), with an unchanged shape and unchanged relative positions of vertices (i.e., the displayed content), i.e., the stable patch mentioned above. Then, when interpolating two adjacent real frames to obtain a predicted frame, for such a stable patch, it is not necessary to use the existing method of interpolating or moving pixels to obtain the patch in the predicted frame.
- the attribute information of the face patch can be set to word to indicate that the face patch is drawn with text
- the attribute information of the face patch can be set to icon to indicate that the face patch is drawn with an icon
- the attribute information of the face patch can be set to blood to indicate that the face patch is drawn with a health bar, and so on, thereby indicating that the face patch is a stable face patch.
- the stable patch is usually drawn after the main scene of the real frame or the predicted frame is drawn. Therefore, the patch indicated to be drawn after the main scene drawing is completed in the image rendering source code is the stable patch.
- each patch is a stable patch based on the patch's attribute information. For stable patches, replace the source code of its vertex shader and compile; for other patches, compile directly.
- the source code of the vertex shader of other facets in the image rendering source code except for the stable facets is not modified, and is still compiled according to the original logic before rendering.
- the real frame is rendered according to the rendering method in the prior art, and the two adjacent real frames are interpolated according to the interpolation method in the prior art to obtain the predicted frame and render it, which will not be repeated in this application.
- the rendering command is passed to the framework layer in the CPU, and then the CPU transmits a drawing initiation (DrawCall) command to the GPU to instruct the GPU to perform rendering (including real frames and predicted frames).
- DrawCall drawing initiation
- the real frame and the predicted frame are cached in different frame buffers (frame buffers).
- frame buffers For example, the real frame is cached in the first frame buffer, and the predicted frame is cached in the second frame buffer.
- the real frame and the predicted frame are cached in two different areas of the same frame buffer. For example, if the size of a single frame is A*B (A is the width and B is the height), the real frame can be cached in the left half of the 2A*B frame buffer, and the predicted frame can be cached in the right half of the frame buffer.
- the rendering parameter information and absolute coordinates of each patch are stored in a data list.
- the data list can be located in the shader storage buffer object (SSBO) of the GPU, and the real frame and the predicted frame are bound to different SSBOs respectively; alternatively, the data list can also be located in the CPU, which is not limited in this application.
- SSBO shader storage buffer object
- the prediction workflow sets the rendering flag of the frame through a uniform variable to indicate that the frame is a real frame, so that the rendering workflow can distinguish whether to render a real frame or a predicted frame when rendering.
- the GPU rendering API renders each patch (including a stable patch) in the real frame through a patch drawing function (glDrawElements).
- a patch drawing function glDrawElements
- the viewport can also be set to indicate in which area (e.g., the left half area) the real frame is rendered.
- the rendering and drawing of the stable patches, as well as the rendering and drawing of other patches can still be done in the original source code without modification.
- the rendering and drawing of the stable patches can still be done in the original source code without modification.
- they are drawn onto the main scene of the real frame, thus obtaining the real frame.
- the predicted frame needs to be predicted.
- the preset frame can still be obtained by interpolating or moving pixels in the prior art.
- the rendering parameter information and absolute coordinates of the stable patch in the real frame are stored.
- the rendering parameter information and absolute coordinates of the stable patch in the real frame can be stored in the data list of the real frame.
- the target patch in the predicted frame is to be rendered later, if the predicted frame is to be rendered, it is necessary to first obtain stable patches describing the same content in two adjacent real frames. It is assumed that the two adjacent real frames are the first real frame and the second real frame, and the first patch in the first real frame and the second patch in the second real frame are both stable patches.
- the original source code is run to calculate each vertex of the first face, and the rendering parameter information of the first face in the first real frame and the absolute coordinates of the first face are obtained and saved.
- the original source code is run to calculate each vertex of the second face, and the rendering parameter information of the second face in the second real frame and the absolute coordinates of the second face are obtained and saved.
- This step can obtain the rendering parameter information and absolute coordinates of the first facet in the first real frame, and the rendering parameter information and absolute coordinates of the second facet in the second real frame, which corresponds to the aforementioned step S101.
- S205 Predict the absolute coordinates of the stable patch in the prediction frame.
- the data list of the previous real frame is traversed to find the first facet that matches the second facet, so as to determine that the first facet and the second facet describe the same content (e.g., the same text, the same icon, the same health bar, etc.) in two adjacent real frames, which corresponds to the target facet in the predicted frame.
- the rendering parameter information of the first facet is the same as the rendering parameter information of the second facet, and the absolute coordinates of the first facet and the absolute coordinates of the second facet are within a certain range, it can be determined that the first facet and the second facet describe the same content in two adjacent real frames, and the absolute coordinates of the target facet can be determined in the predicted frame.
- the absolute coordinates of the target facet refer to the description of step S102, which will not be repeated here.
- This step corresponds to step S102 described above.
- the target surface is rendered according to the absolute coordinates of the target surface and the rendering parameter information.
- the prediction workflow sets the rendering flag of the frame through a uniform variable (Uniform) to indicate that the frame is a predicted frame.
- a uniform variable Uniform
- the viewport can also be set to indicate which area the rendering is located in.
- the predicted frame in the region (such as the right half region) is used to render the above stable patches in the predicted frame through the patch drawing function (glDrawElements). This enables the rendering workflow to distinguish whether to render the real frame or the predicted frame when rendering.
- This step corresponds to step S103 described above.
- the faces other than the stable face are still rendered in the original way and drawn to the main scene of the predicted frame. Then the rendered target face is overlaid and drawn on the main scene of the predicted frame to obtain a complete predicted frame.
- the prediction workflow will draw the rendered stable patch onto the main scene of the prediction frame.
- an embodiment of the present application also provides a chip system.
- the chip system 60 includes at least one processor 601 and at least one interface circuit 602. At least one processor 601 and at least one interface circuit 602 can be interconnected via lines.
- the processor 601 is used to support the electronic device to implement the various steps in the above method embodiments, such as the methods shown in Figures 7, 11, and 12, and at least one interface circuit 602 can be used to receive signals from other devices (such as memories), or to send signals to other devices (such as communication interfaces).
- the chip system may include chips and may also include other discrete devices.
- An embodiment of the present application also provides a computer-readable storage medium, which includes instructions.
- the instructions When the instructions are executed on the above-mentioned electronic device, the electronic device executes the various steps in the above-mentioned method embodiment, such as executing the methods shown in Figures 7, 11, and 12.
- An embodiment of the present application also provides a computer program product including instructions.
- the instructions When the instructions are executed on the above-mentioned electronic device, the electronic device executes each step in the above-mentioned method embodiment, for example, executes the method shown in Figures 7, 11, and 12.
- the size of the serial numbers of the above-mentioned processes does not mean the order of execution.
- the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
- modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
- the disclosed systems, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not performed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, which may be electrical, mechanical or other forms.
- modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
- the computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium.
- the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Image Generation (AREA)
Abstract
Description
Claims (9)
- 一种渲染方法,其特征在于,包括:获取第一真实帧中第一面片的渲染参数信息、所述第一面片的绝对坐标、第二真实帧中第二面片的渲染参数信息以及所述第二面片的绝对坐标,所述第一真实帧和第二真实帧为相邻真实帧;所述第一面片和所述第二面片指形状不变并且顶点的相对位置不变的二维面片;如果所述第一面片的渲染参数信息和所述第二面片的渲染参数信息相同,并且,所述第一面片的绝对坐标和所述第二面片的绝对坐标在一定范围内,则根据所述第一面片的绝对坐标和所述第二面片的绝对坐标确定目标面片的绝对坐标,所述目标面片位于基于所述第一真实帧和所述第二真实帧得到的预测帧;根据所述目标面片的绝对坐标以及所述渲染参数信息对所述目标面片进行渲染。
- 根据权利要求1所述的方法,其特征在于,所述第一面片的渲染参数信息或所述第二面片的渲染参数信息包括以下信息的至少一项:面片的各个顶点映射的纹理坐标、面片所属程序的标识、面片的顶点数。
- 根据权利要求1或2所述的方法,其特征在于,顶点着色器源码中包括面片的属性信息,所述属性信息用于指示面片为形状不变并且顶点的相对位置不变的二维面片。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述第一面片的绝对坐标和所述第二面片的绝对坐标确定所述目标面片的绝对坐标,包括:对所述第一面片的绝对坐标和所述第二面片的绝对坐标进行平滑处理,得到所述目标面片的绝对坐标。
- 根据权利要求4所述的方法,其特征在于,当所述预测帧位于所述第一真实帧和所述第二真实帧之间时,所述目标面片的绝对坐标P通过以下公式得到:P=(P1*W1+P2*W2)/(W1+W2),其中,P1为所述第一面片的绝对坐标,P2为所述第二面片的绝对坐标,W1和W2为权重系数。
- 根据权利要求5所述的方法,其特征在于,w1和w2相等。
- 根据权利要求4所述的方法,其特征在于,当所述预测帧位于所述第一真实帧和所述第二真实帧之后时,所述目标面片的绝对坐标P通过以下公式得到:P=P2+(P2-P1)*W,其中,P1为所述第一面片的绝对坐标,P2为所述第二面片的绝对坐标,W为权重系数。
- 一种电子设备,其特征在于,包括处理器和存储器,所述存储器中存储指令,当所述处理器执行所述指令时,如权利要求1-7任一项所述的方法被执行。
- 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在电子设备上执行时,使得所述电子设备执行如权利要求1-7任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23923818.1A EP4528656A4 (en) | 2023-02-21 | 2023-12-01 | RENDERING METHOD AND ELECTRONIC DEVICE |
| CN202380079933.1A CN120226050A (zh) | 2023-02-21 | 2023-12-01 | 渲染方法和电子设备 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310203005.3 | 2023-02-21 | ||
| CN202310203005.3A CN118537467A (zh) | 2023-02-21 | 2023-02-21 | 渲染方法和电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024174655A1 true WO2024174655A1 (zh) | 2024-08-29 |
Family
ID=92388429
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/135910 Ceased WO2024174655A1 (zh) | 2023-02-21 | 2023-12-01 | 渲染方法和电子设备 |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4528656A4 (zh) |
| CN (2) | CN118537467A (zh) |
| WO (1) | WO2024174655A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121582424B (zh) * | 2026-01-29 | 2026-03-31 | 瀚博半导体(上海)股份有限公司 | 一种图像处理的方法、装置、介质和产品 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110199377A1 (en) * | 2010-02-12 | 2011-08-18 | Samsung Electronics Co., Ltd. | Method, apparatus and computer-readable medium rendering three-dimensional (3d) graphics |
| CN106997610A (zh) * | 2016-01-26 | 2017-08-01 | 阿里巴巴集团控股有限公司 | 一种图像渲染方法、装置及电子设备 |
| WO2022068326A1 (zh) * | 2020-09-30 | 2022-04-07 | 华为技术有限公司 | 一种图像帧预测的方法及电子设备 |
| CN114470750A (zh) * | 2021-07-06 | 2022-05-13 | 荣耀终端有限公司 | 图像帧流的显示方法、电子设备和存储介质 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9111287B2 (en) * | 2009-09-30 | 2015-08-18 | Microsoft Technology Licensing, Llc | Video content-aware advertisement placement |
-
2023
- 2023-02-21 CN CN202310203005.3A patent/CN118537467A/zh active Pending
- 2023-12-01 WO PCT/CN2023/135910 patent/WO2024174655A1/zh not_active Ceased
- 2023-12-01 EP EP23923818.1A patent/EP4528656A4/en active Pending
- 2023-12-01 CN CN202380079933.1A patent/CN120226050A/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110199377A1 (en) * | 2010-02-12 | 2011-08-18 | Samsung Electronics Co., Ltd. | Method, apparatus and computer-readable medium rendering three-dimensional (3d) graphics |
| CN106997610A (zh) * | 2016-01-26 | 2017-08-01 | 阿里巴巴集团控股有限公司 | 一种图像渲染方法、装置及电子设备 |
| WO2022068326A1 (zh) * | 2020-09-30 | 2022-04-07 | 华为技术有限公司 | 一种图像帧预测的方法及电子设备 |
| CN114470750A (zh) * | 2021-07-06 | 2022-05-13 | 荣耀终端有限公司 | 图像帧流的显示方法、电子设备和存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4528656A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4528656A1 (en) | 2025-03-26 |
| CN120226050A (zh) | 2025-06-27 |
| EP4528656A4 (en) | 2025-08-20 |
| CN118537467A (zh) | 2024-08-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115398907B (zh) | 一种图像帧预测的方法及电子设备 | |
| CN109993823B (zh) | 阴影渲染方法、装置、终端及存储介质 | |
| CN109427083B (zh) | 三维虚拟形象的显示方法、装置、终端及存储介质 | |
| US20250225620A1 (en) | Special effect image processing method and apparatus, electronic device, and storage medium | |
| US20210225067A1 (en) | Game screen rendering method and apparatus, terminal, and storage medium | |
| CN107247548B (zh) | 图像显示方法、图像处理方法及装置 | |
| CN109961498B (zh) | 图像渲染方法、装置、终端及存储介质 | |
| CN108537889A (zh) | 增强现实模型的调整方法、装置、存储介质和电子设备 | |
| CN108961382B (zh) | 一种图像渲染方法、装置和存储介质 | |
| CN112001851B (zh) | 图像处理方法、装置、计算机设备及存储介质 | |
| CN110335200B (zh) | 一种虚拟现实反畸变方法、装置以及相关设备 | |
| CN114764358A (zh) | 一种界面显示方法及电子设备 | |
| EP4528656A1 (en) | Rendering method and electronic device | |
| WO2025020657A1 (zh) | 用于虚拟场景的图像显示方法、设备、介质及程序产品 | |
| CN116188724A (zh) | 动画渲染的方法、装置、设备及存储介质 | |
| WO2023280241A1 (zh) | 图像画面渲染方法及电子设备 | |
| CN113436348A (zh) | 三维模型处理方法、装置、电子设备及存储介质 | |
| WO2025021149A1 (zh) | 端云协同的渲染方法及相关装置 | |
| WO2024103872A1 (zh) | 图像处理方法及电子设备 | |
| CN116708931A (zh) | 图像处理方法及电子设备 | |
| CN117131296A (zh) | 内容呈现方法、装置、设备及存储介质 | |
| CN115970281A (zh) | 模型图标生成方法、装置、设备及存储介质 | |
| CN118921451B (zh) | 图像处理方法、相关装置及存储介质 | |
| CN111563956A (zh) | 一种二维图片的三维显示方法、装置、设备及介质 | |
| CN110201392B (zh) | 用户界面生成方法、装置和终端 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23923818 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023923818 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023923818 Country of ref document: EP Effective date: 20241218 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202380079933.1 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202380079933.1 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |