Display element rendering method and apparatus, device, storage medium, and program product

During the rendering process of the computer device, the world space offset is used to offset the offset caused by the perspective change, which solves the storage space occupation and low efficiency problems caused by off-screen rendering in the existing technology, and realizes the continuous display of display elements on the screen. Efficient rendering of displays.

WO2024164598A9PCT designated stage expired Publication Date: 2024-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/130375
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-08
Filing Date
2023-11-08
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In the prior art, during the display rendering process, in order to keep the position of the display elements on the screen unchanged, it is necessary to use an off-screen rendering method, which results in additional storage space usage and low efficiency.

Method used

By calculating the world vertex coordinates of the display element in world space, and calculating the world space offset based on the offset caused during the perspective transformation process, the relative offset is offset, thereby keeping the screen vertex coordinates unchanged during the coordinate transformation process. , to achieve continuous display of display elements.

Benefits of technology

It does not require additional storage space, improves rendering efficiency, and achieves a dynamic effect in which display elements maintain fixed positions during perspective changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023130375_03102024_PF_FP_ABST
    Figure CN2023130375_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses a display element rendering method and apparatus, a device, a storage medium, and a program product. The method comprises: on the basis of vertex information of a display element, determining world vertex coordinates of the display element in a world space, the display element being an element the display position of which in a screen keeps unchanged (101); on the basis of an offset mode of the world vertex coordinates in a view transformation process, determining a world space offset amount of the display element, the world space offset amount being used to offset the relative offset of the world vertex coordinates in the view transformation process (102); performing coordinate space transformation on the basis of the world vertex coordinates and the world space offset amount to obtain screen vertex coordinates of the display element in a screen space (103); and rendering the display element on the basis of the screen vertex coordinates (104).
Need to check novelty before this filing date? Find Prior Art

Description

Display element rendering method, device, equipment, storage medium and program product

[0001] This application claims priority to Chinese patent application No. 202310152279.4, filed on February 8, 2023, entitled “Rendering method, device, equipment, storage medium and program product for display elements”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device, storage medium, and program product for rendering a display element. Background Art

[0003] During the rendering process of the display image, there may be some special display elements that need to be always displayed on the screen, such as particle effects.

[0004] In the related art, in order to continuously display a specific display element on the screen, off-screen rendering is usually used. In this process, a 2D camera is used to capture the display element and the capture result is stored, and the stored capture image is subsequently rendered to the screen.

[0005] It can be seen that the off-screen rendering method requires additional storage space and is less efficient.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a method, apparatus, device, storage medium, and program product for rendering display elements, which do not require additional storage space and help improve rendering efficiency. The technical solution is as follows:

[0008] In one aspect, an embodiment of the present application provides a method for rendering a display element, the method being executed by a computer device, the method comprising:

[0009] Determining, based on vertex information of a display element, world vertex coordinates of the display element in a world space, wherein the display element is an element whose display position on the screen remains unchanged;

[0010] Determining a world space offset of the display element based on an offset mode of the world vertex coordinates during the perspective transformation process, wherein the world space offset is used to offset a relative offset of the world vertex coordinates during the perspective transformation process;

[0011] Performing coordinate space transformation based on the world vertex coordinates and the world space offset to obtain screen vertex coordinates of the display element in screen space;

[0012] The display element is rendered based on the screen vertex coordinates.

[0013] On the other hand, an embodiment of the present application provides a device for rendering a display element, the device comprising:

[0014] A coordinate determination module, configured to determine the world vertex coordinates of a display element in a world space based on vertex information of the display element, wherein the display element is an element whose display position on the screen remains unchanged;

[0015] an offset determination module, configured to determine a world space offset of the display element based on an offset mode of the world vertex coordinates during the perspective transformation process, wherein the world space offset is used to offset a relative offset of the world vertex coordinates during the perspective transformation process;

[0016] A space transformation module, configured to perform coordinate space transformation based on the world vertex coordinates and the world space offset to obtain the screen vertex coordinates of the display element in the screen space;

[0017] An element rendering module is used to render the display element based on the screen vertex coordinates.

[0018] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the rendering method of the display element as described in the above aspect.

[0019] On the other hand, a computer-readable storage medium is provided, wherein at least one computer instruction is stored in the computer-readable storage medium, and the at least one computer instruction is loaded and executed by a processor to implement the method for rendering a display element as described in the above aspect.

[0020] In another aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the display element rendering method provided in the above aspects.

[0021] In an embodiment of the present application, during the perspective transformation process, the computer device can determine the world-space offset of the display element based on the world-space offset caused by the perspective transformation. Thus, during the coordinate transformation process, the world-space offset is introduced to offset the position offset caused by the perspective transformation. This ensures that the screen vertex coordinates obtained after the coordinate transformation remain unchanged, ensuring that the display position of the display element on the screen remains unchanged, and achieving a dynamic effect in which the display element moves with the perspective transformation. In this process, there is no need to use additional modules or plug-ins, nor is there any need to occupy additional storage space to store off-screen rendering results. By calculating the world-space offset in real time, the display element is kept continuously displayed, which helps improve rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 shows a flowchart of a method for rendering a display element provided by an exemplary embodiment of the present application;

[0023] FIG2 is a schematic diagram showing the display position of a display element during a viewing angle change process provided by an exemplary embodiment of the present application;

[0024] FIG3 shows a flowchart of a rendering pipeline provided by an exemplary embodiment of the present application;

[0025] FIG4 shows a flowchart of a coordinate transformation process provided by an exemplary embodiment of the present application;

[0026] FIG5 shows a flowchart of a method for rendering a display element provided by another exemplary embodiment of the present application;

[0027] FIG6 shows a schematic diagram of an interface for setting world space offset properties provided by an exemplary embodiment of the present application;

[0028] FIG7 shows a schematic diagram of an interface of a preview display element provided by an exemplary embodiment of the present application;

[0029] FIG8 shows a schematic diagram of an interface for disabling depth testing provided by an exemplary embodiment of the present application;

[0030] FIG9 shows a schematic diagram of an interface for setting particle orientation provided by an exemplary embodiment of the present application;

[0031] FIG10 shows a structural block diagram of a rendering device for display elements provided by an exemplary embodiment of the present application;

[0032] FIG11 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0034] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0035] Some special rendering requirements may require display elements to be rendered at a fixed screen location, essentially rendering them as user interface (UI) components. Unreal Engine includes a built-in Unreal Motion Graphic component for rendering UI elements. However, this approach doesn't achieve dynamic effects, meaning it's impossible to keep display elements consistently displayed at a fixed screen location. Alternatively, partial screen rendering can be achieved through post-processing, but this also fails to achieve the aforementioned dynamic effects.

[0036] In addition, rendering can also be performed using off-screen rendering. In this method, a SceneCapture2D camera is used to capture display elements and the capture results are written to a Render Target in real time. The Render Target is then rendered to the screen. This method requires additional storage space to store the off-screen rendering results.

[0037] In an embodiment of the present application, a method for rendering display elements is proposed. By introducing a world space offset, during the coordinate transformation process, the relative offset of the world space caused by the perspective transformation can be offset based on the world space offset, so that the display element can be rendered at a fixed screen position, achieving a dynamic effect in which the display element can move with the perspective transformation. In this process, there is no need to reference additional modules or plug-ins, and there is no need to use post-processing methods, nor is there any need to apply for additional memory. The display element can be rendered on the screen as a UI only by deriving and changing the world coordinate offset of the display element material. This solution is highly feasible and can be widely used in the rendering process of display elements, expanding the diversity and possibilities of element rendering.

[0038] The method provided in the embodiment of the present application can be applied to the rendering process of any display element that needs to be fixedly displayed on the screen. Schematically, it can be applied to the particle rendering process. When particle special effects (such as fireworks) need to be fixedly displayed on the screen, the world space offset can be determined according to the world offset caused by the perspective transformation during the rendering process. The world space coordinates of the particle vertices are then updated based on the world space offset to offset the offset caused by the perspective transformation, so that the particle special effects are rendered at a fixed screen position. Of course, the method provided in the embodiment of the present application can also be applied to the rendering scenes of other elements, which is not limited in this embodiment.

[0039] The methods provided in the embodiments of this application can be applied to computer devices. The computer device is a device with image rendering capabilities, which can be a terminal such as a smartphone, tablet computer, or personal computer, or a backend server providing graphics rendering services, though this embodiment does not limit this. The following will illustrate this using exemplary embodiments.

[0040] Please refer to Figure 1, which shows a flowchart of a method for rendering a display element provided by an exemplary embodiment of the present application. This embodiment uses the method applied to a computer device as an example to illustrate the method, and the method includes the following steps:

[0041] Step 101 : determining the world vertex coordinates of a display element in a world space based on vertex information of the display element, where the display element is an element whose display position on the screen remains unchanged.

[0042] In the embodiments of this application, a display element refers to an element whose display position on the screen must remain unchanged. That is, during the perspective change process, the display element always remains displayed at a fixed position on the screen. For example, a display element can be a particle effect, an avatar, or a virtual object (such as an obstruction attached to a mask or helmet worn by an avatar in the first-person perspective), etc., and this embodiment does not limit this.

[0043] Optionally, the display position of the display element on the screen can be adjusted by the user in advance, and the rendering process is performed according to the fixed position set by the user. Alternatively, the display position of the display element on the screen is a preset position.

[0044] Among them, vertex information refers to the information of the vertices of the basic graphics that make up the display element. Optionally, the vertex information contains the vertex coordinates of each vertex. It should be noted that the vertex coordinates in the vertex information are coordinate information in the local space (i.e., model space), that is, the vertex coordinates are the coordinates with the model center as the origin, and the model center is set during modeling. During the rendering process, it is first necessary to convert to the world space to obtain the world vertex coordinates corresponding to the display element. Among them, the world vertex coordinates are the coordinates of the display element vertex in the world space.

[0045] In one possible implementation, the computer device may homogenize the three-dimensional vector corresponding to the vertex in local space (the three-dimensional coordinates of the vertex), and then multiply it by a model matrix to obtain homogeneous coordinates in world space, i.e., world vertex coordinates. The model matrix is ​​used to perform spatial transformation from model space to world space, which may be a virtual world space.

[0046] Step 102 : determining a world space offset of the display element based on the offset mode of the world vertex coordinates during the perspective transformation process. The world space offset is used to offset the relative offset of the world vertex coordinates during the perspective transformation process.

[0047] Perspective transformation refers to the process of changing the perspective from which you observe the virtual world. For example, when a virtual object in the virtual world moves, turns, or looks up or down, the perspective of the virtual object changes.

[0048] Typically, a change in perspective causes a change in the image displayed on the screen. This is usually achieved by offsetting objects in world space. This means that during the perspective change, the world vertex coordinates shift by a certain amount. For example, when the perspective switches from left to right, objects originally displayed on the left side of the screen gradually disappear.

[0049] In order to ensure that the display elements are always displayed at a fixed position on the screen, in an embodiment of the present application, a world space offset (World Position Offset) is introduced to offset the relative offset of the display elements during the perspective transformation process, thereby keeping the screen display position of the display elements unchanged.

[0050] In one possible implementation, during the perspective transformation process (i.e., during camera movement), the offset method of the world vertex coordinates is related to the position of the camera. The computer device can determine the offset of the world vertex coordinates based on the position of the camera during the perspective transformation process, and thus determine the world space offset of the display element based on the offset of the world vertex coordinates.

[0051] Optionally, the perspective transformation refers to a perspective translation transformation, for example, the perspective moves from left to right, from top to bottom, from upper left to lower right, etc.; or, the perspective transformation can be a perspective rotation transformation, for example, the perspective changes from facing north to facing east, etc. This embodiment does not limit this.

[0052] Step 103 : performing coordinate space transformation based on the world vertex coordinates and the world space offset to obtain the screen vertex coordinates of the display element in the screen space.

[0053] In some embodiments, after obtaining the world space offset corresponding to the display element, the world vertex coordinates may be first updated based on the world space offset, and then spatial transformation may be performed based on the updated world vertex coordinates to obtain the screen vertex coordinates of the display element in screen space. The screen vertex coordinates are the coordinates of the display element's vertices in screen space.

[0054] Step 104: Render display elements based on the screen vertex coordinates.

[0055] After obtaining the screen vertex coordinates, the computer device can input the screen vertex coordinates into the rasterizer for rasterization calculation, and then gradually perform pixel shading calculation, testing and blending processes, and output the rendered display elements to the frame buffer. Finally, the rendering data can be read from the frame buffer and displayed on the screen.

[0056] Rasterization determines which pixels of the rendered primitives are drawn on the screen. This calculation is based on the vertex data obtained in the previous stage, converting points in two-dimensional screen space into pixels on the screen. Pixel shading primarily uses interpolation to calculate the shading of each pixel.

[0057] Because the world space offset is used to eliminate the offset caused by the perspective change, the display position of the display element on the screen always remains unchanged. As shown in Figure 2, when the perspective moves, the display position of the display element 201 on the screen remains unchanged, and only the virtual scene 202 changes accordingly based on the perspective change.

[0058] That is, the method provided in the embodiment of the present application can achieve the dynamic effect of display elements moving according to the viewing angle compared to the method in the related art, and can save additional storage space compared to the off-screen rendering method. It only needs to calculate the world space offset to keep the display position of the display element on the screen unchanged, which can expand the diversity and possibilities of display element rendering.

[0059] In summary, in the embodiments of the present application, during the perspective transformation process, the computer device can determine the world space offset of the display element based on the world space offset caused by the perspective transformation. Thus, during the coordinate transformation process, the world space offset is introduced to offset the position offset caused by the perspective transformation. This ensures that the screen vertex coordinates obtained after the coordinate transformation remain unchanged, ensuring that the display position of the display element on the screen remains unchanged, and achieving the dynamic effect of the display element moving with the perspective transformation. In this process, there is no need to use additional modules or plug-ins, nor is there any need to occupy additional storage space to store off-screen rendering results. By calculating the world space offset in real time, the display element is kept continuously displayed, which helps improve rendering efficiency.

[0060] The world space offset is related to the offset of the world vertex coordinates during the perspective transformation process. The calculation principle of the world space offset is explained below.

[0061] The vertex information of the display elements is transmitted from the Central Processing Unit (CPU) to the Graphics Processing Unit (GPU) through the graphics interface. The rendering pipeline in the GPU renders and draws according to the vertex information, calculates and outputs it to the frame buffer (screen buffer), and finally displays the rendered image on the screen.

[0062] The rendering process involved in the entire rendering pipeline is shown in Figure 3. After the vertex information 301 is input, the vertex shader performs vertex shading calculation 302, then inputs it into the rasterizer for rasterization calculation 303, and then inputs it into the pixel shader for pixel shading calculation 304. After the shading calculation, testing and blending 305 are performed to complete the rendering calculation, and the calculated rendering data is output to the frame buffer 306 to obtain the final rendered image.

[0063] Vertex shading calculations primarily involve coordinate transformations. During this process, the computer first transforms the model's vertex coordinates from model space to world space; then from world space to observation space (also known as camera space); finally, from observation space to clip space, and finally from clip space to screen space to obtain the final output. The coordinate transformation process is shown in Figure 4 and includes the following steps:

[0064] Step 401, input vertex information;

[0065] Step 402, transforming vertex coordinates to world space coordinates;

[0066] Step 403, transforming the world space coordinates to the observation space coordinates;

[0067] Step 404, transforming the observation space coordinates to the clipping space coordinates;

[0068] Step 405: transform the clipping space coordinates into screen space coordinates.

[0069] The coordinate transformation process is achieved through matrix multiplication. During this process, the vertex coordinates can be multiplied by the model matrix to obtain the coordinates in world space, and then multiplied by the view matrix to obtain the coordinates in the observation space. The clip matrix is ​​then multiplied by the clip matrix to obtain the clip space coordinates. The final screen space coordinates are the coordinates in the clip space coordinate system. The view matrix can also be called the camera's observation matrix; the clip matrix can also be called the projection matrix. Correspondingly, the clip space coordinates can be called projection coordinates.

[0070] Schematically, when the vertex coordinate in the model space is A, the model matrix is ​​M, the view matrix of the scene camera is V, and the projection matrix is ​​P, the coordinate transformation process from the model space to the world space can be shown as follows: A′=P×V×M×A

[0071] When display elements are rendered to a fixed screen position, the vertex coordinate transformation needs to be fixed as follows: A″=P×V′×M×A

[0072] Where V′ is the view matrix of the UI camera. The UI camera is a fixed camera located at the origin of world space. The UI camera is used to capture display elements. The rendering position of display elements on the screen is fixed by converting them to the UI camera's corresponding observation space.

[0073] In the above formula, V is the view matrix of the scene camera. The scene camera refers to the default camera that captures the entire scene, that is, the camera corresponding to the observer's perspective, and its position moves with the perspective transformation. In Unreal Engine, the coordinate transformation process is encapsulated and cannot be directly modified. Therefore, by introducing a world space offset, the world space coordinates are changed so that A' is equal to A", achieving a fixed rendering effect. The process of changing the final world space coordinates by the world space offset can be expressed as: A' = P × V × (M × A + WPO)

[0074] Among them, WPO stands for world space offset.

[0075] In order to keep the display position of the display element unchanged, let A′=A″, as shown in the following formula: P×V×(M×A+WPO)=P×V′×M×A

[0076] The world space offset can be obtained as: WPO=V - ×V′×M×AM×A

[0077] Among them, V - That is the inverse viewing matrix of the scene camera, that is, the inverse matrix of the scene camera's corresponding viewing matrix.

[0078] As can be seen, the world space offset is related to the inverse view matrix of the scene camera, the view matrix of the UI camera, and the world vertex coordinates of the display elements. The following is an example of how to calculate the world space offset during rendering and how to perform spatial transformation based on the world space offset.

[0079] Please refer to Figure 5, which shows a flowchart of a method for rendering a display element provided by another exemplary embodiment of the present application. This embodiment uses the method applied to a computer device as an example to illustrate the method, and the method includes the following steps:

[0080] Step 501: Determine the world vertex coordinates of the display element in the world space based on the vertex information of the display element.

[0081] The implementation of this step can refer to step 101 in the above embodiment, and will not be described in detail in this embodiment.

[0082] Step 502: Determine the offset position coordinates of the display element vertices based on the inverse viewing matrix of the scene camera and the viewing matrix of the UI camera. The scene camera is the camera corresponding to the viewing angle, and the UI camera is the camera located at the origin of the world space.

[0083] In order to fix the display position of the display element during the perspective transformation, the computer device can transform the world vertex coordinates according to the inverse viewing matrix of the scene camera and the viewing matrix of the UI camera to obtain the offset position coordinates of the display element vertex during the perspective transformation.

[0084] The offset position coordinates are the coordinates of the display element vertices after position offset in the observation space.

[0085] In some embodiments, the process of determining the offset position coordinates includes the following steps:

[0086] Step 502a: transform the world vertex coordinates based on the view matrix of the UI camera to obtain the UI observation coordinates.

[0087] First, the computer device transforms the world vertex coordinates using the UI camera's view matrix. The UI camera, created at the world space origin, initially points upward. To adapt to the user's viewing angle, the coordinate axis order must be adjusted, i.e., the UI camera's view angle. Based on the coordinate axis adjustments, the UI camera's view matrix is ​​shown below:

[0088] That is, the transformation method of the view matrix of the UI camera is coordinate axis transformation. The transformation of V' is equivalent to transforming the X axis to the Z axis, transforming the Y axis to the X axis, and transforming the Z axis to the X axis.

[0089] The computer device performs coordinate axis transformation on the world vertex coordinates to obtain UI observation coordinates.

[0090] Step 502b: transform the UI observation coordinates based on the inverse viewing matrix of the scene camera to obtain offset position coordinates.

[0091] After obtaining the UI observation coordinates, the computer device transforms the UI observation coordinates based on the inverse viewing matrix of the scene camera (ie, multiplies the UI observation coordinates by the inverse viewing matrix), thereby determining the position offset of the display element vertex caused by the perspective transformation.

[0092] The scene camera's view matrix is ​​used to convert world-space coordinates to view-space coordinates in the scene camera's corresponding observation space. The inverse view matrix, on the other hand, is used to convert view-space coordinates to world-space coordinates. The inverse view matrix's conversion method corresponds to the transformation from the scene camera's corresponding observation space to world space. Therefore, the computer device can transform the UI's view coordinates by converting view-space coordinates to world-space coordinates to obtain the offset position.

[0093] In a possible implementation, the computer device transforms the UI observation coordinates based on a transformation from the observation space to the world space to obtain the offset position coordinates.

[0094] As shown in the following formula, the offset position coordinate is: V - ×V′×M×A

[0095] Step 503: Determine the coordinate difference between the offset position coordinates and the world vertex coordinates as the world space offset.

[0096] After determining the offset position, the computer device can subtract the world vertex coordinates from the offset position coordinates to obtain the world space offset, that is, V - ×V′×M×AM×A, where the world vertex coordinates are M×A.

[0097] It should be noted that the process of calculating the world space offset can be executed simultaneously with the above-mentioned process of converting the vertex coordinates in the model space into the vertex coordinates in the world space, or they can be executed one after another. This embodiment only provides an illustrative explanation of the implementation method and does not limit the execution timing.

[0098] Step 504 : performing coordinate offset processing on the world vertex coordinates based on the world space offset to obtain updated world vertex coordinates.

[0099] After determining the world space offset, the computer device can update the world vertex coordinates obtained after the world space transformation. This is done by adding the world space offset to the world vertex coordinates to eliminate the coordinate offset caused by the visual transformation, thereby obtaining updated world vertex coordinates. The coordinate offset processing process can be expressed as M×A+WPO.

[0100] Step 505 , performing observation space transformation, clipping space transformation, and screen space transformation on the updated world vertex coordinates to obtain screen vertex coordinates.

[0101] Afterwards, the computer device may perform observation space transformation, clipping space transformation, and screen space transformation on the updated world vertex coordinates in sequence to obtain screen vertex coordinates.

[0102] In one possible implementation, the computer device performs an observation space transformation on the updated world vertex coordinates through an observation matrix (i.e., the viewing matrix of the scene camera) to obtain observation vertex coordinates, and then transforms the observation vertex coordinates through a projection matrix (i.e., the clipping matrix) to obtain clipping vertex coordinates. Thereafter, a series of processing such as clipping is performed to complete the screen space transformation and obtain screen vertex coordinates.

[0103] Step 506: Render the display element based on the screen vertex coordinates.

[0104] The implementation of this step can refer to the above-mentioned step 104 and will not be described in detail in this embodiment.

[0105] In this embodiment, the offset position of the display element vertices during the perspective transformation is determined based on the inverse viewing matrix corresponding to the scene camera and the viewing matrix of the UI camera, thereby determining the world space offset of the display element vertices. The world space offset is offset by the world space offset, so that the display element can be rendered fixedly on the screen as a UI, thereby expanding the rendering diversity of the display elements.

[0106] In the above embodiment, the world vertex coordinates are adjusted by introducing a world space offset to achieve a fixed rendering position of the display element on the screen. The world space offset needs to be introduced by modifying the material information of the display element.

[0107] Among them, material information is information set in advance by the user through the material editor in the Unreal Engine. The material information includes a world space offset attribute. By setting the world space offset attribute, the world space offset can be calculated according to the instructions of the world space offset attribute during the rendering process, and the world vertex coordinates can be offset.

[0108] Optionally, the editing process of the world space offset attribute may be performed by a user or automatically by a computer device, which is not limited in this embodiment.

[0109] The world space offset is related to the world vertex coordinates of the display element, the inverse view matrix of the scene camera, and the view matrix of the UI camera. The world vertex coordinates, the inverse view matrix of the scene camera, and the view matrix of the UI camera can be imported through nodes in the Material Editor.

[0110] Alternatively, the world vertex coordinates may be provided by an Absolute World Position node in the Unreal Engine's material editor, or by an Excluding Material Offsets node. FIG6 illustrates this using the Absolute World Position node 601 as an example.

[0111] The UI camera's view matrix is ​​actually a coordinate axis transformation. This can be achieved by editing the Vector Split and Vector Join nodes in the Material Editor. Optionally, the Vector Split node can be a BreakOutFloat 3Components node (used to split a vector into single-channel scalars, such as RGB), and the Vector Join node can be a MakeFloat3 node (used to combine single-channel scalars into vectors, such as XYZ). This connection allows for coordinate axis transformation.

[0112] 6 , the connection method between the nodes can be: connecting the R node in the BreakOutFloat 3Components node 602 to the Z node in the MakeFloat3 node 603 to realize the transformation from the X axis to the Z axis; connecting the G node in the BreakOutFloat 3Components node 602 to the X node in the MakeFloat3 node 603 to realize the transformation from the Y axis to the X axis; connecting the B node in the BreakOutFloat 3Components node 602 to the Y node in the MakeFloat3 node 603 to realize the transformation from the Z axis to the Y axis.

[0113] In the Unreal Engine's material editor, it is not possible to obtain the scene camera's view matrix or calculate its inverse. Therefore, the coordinate transformation node Transform Position can be used to implement the transformation corresponding to the inverse view matrix. The coordinates in the world space can be multiplied by the view matrix to obtain the view space coordinates in the observation space, that is: V =Vx M

[0114] Multiplying both sides of the equation by the inverse matrix gives: V - x V =x M

[0115] It can be seen that transforming the observation space coordinates back to the world space coordinates is to multiply the inverse matrix V by V on the left - , thus we can get the inverse matrix V multiplied by V on the left -, as shown by the Transform Position node 604 in FIG6 , this node is used to implement the coordinate transformation from the camera observation space to the world space (Camera Space to Absolute World).

[0116] After introducing each node, the connection between the nodes can be encapsulated to obtain the element offset function node corresponding to the element offset function. The element offset function is used to indicate how the world space offset is calculated. After obtaining the element offset function node, the world space offset attribute is set based on the element offset function node. In subsequent rendering processes, the world space offset can be calculated according to the element offset function indicated by the world space offset attribute, i.e., the step of calculating the world space offset in the above embodiment is executed.

[0117] In one possible embodiment, in response to the connection operations on the absolute world position node, the edited vector splitting node, the vector splicing node and the edited coordinate transformation node, an element offset function node is encapsulated, and the element offset function node is used to call the element offset function, and the element offset function is used to calculate the world space offset.

[0118] That is, the user can edit and obtain the element offset function node by connecting the above nodes. Schematically, as shown in Figure 6, the Absolute World Position node 601 (input is the world vertex coordinates) is connected to the node for coordinate axis transformation composed of the BreakOutFloat 3Components node 602 and the MakeFloat3 node 603, which is used to realize the left multiplication of the world vertex coordinates by the UI camera view matrix, and the output result is connected to the Transform Position node 604 (the conversion from the camera's observation space to the world space) to realize the left multiplication of the inverse view matrix of the scene camera, and the output result is connected to the node A in the Substract node 605, and the Absolute World Position node 601 is connected to the node B of the Substract node 605 to realize the difference calculation between the coordinates after left multiplication by the inverse view matrix and the world vertex coordinates, thereby obtaining the output result.

[0119] The computer device can perform encapsulation according to the connection operation to obtain the element offset function node. Of course, the above node connection operation can also be automatically performed by the computer device, and this embodiment does not limit this.

[0120] After encapsulating the element offset function node, connect it to the World Position Offset node in the Material Editor to set the world space offset properties. The encapsulated element offset function node can also be stored for subsequent use when rendering other display elements.

[0121] In a possible implementation, in response to a connection operation between the element offset function node and the world space offset node, a world space offset attribute is added to the display element, where the world space offset attribute is used to indicate the element offset function.

[0122] In some embodiments, the world space offset attribute can be set by the user. When the user needs to render the current display element fixedly at a specific position on the screen, the element offset function node can be connected to the world space offset node in the material editor. When the computer device receives the connection operation of the element offset function node and the world space offset node, the world space offset attribute can be added to the display element.

[0123] In another possible implementation, in response to an element fixed display instruction, an element offset function node is connected to a world space offset node, and a world space offset attribute is added to the display element. The element fixed display instruction is used to indicate a display position of a fixed display element on the screen.

[0124] In some embodiments, setting the world-space offset attribute can be automatically performed by a computer device. In the material editor, an operation control can be set to trigger an instruction to fix the display element on the screen. The user can trigger the element fixation instruction by triggering the operation control. After receiving the element fixation instruction, the computer device can connect the encapsulated element offset function node to the world-space offset node to add the world-space offset attribute to the display element, which helps simplify the user's setting operation.

[0125] Alternatively, users can pre-set the element type of display elements that require fixed rendering. When the corresponding element type is detected, the computer automatically introduces the element offset function node in the material editor's world offset function node, eliminating the need for user configuration.

[0126] Schematically, as shown in FIG6 , an element offset function node 606 (NiaFunction) can be encapsulated. When the element offset function node 606 is connected to a world space offset node 607 (World Position Offset) in a material editor, a world space offset attribute can be added to the display element.

[0127] The world space offset attribute is part of the display element's material information. The CPU also transmits this material information to the GPU via the graphics interface. Upon receiving this material information, the GPU calculates the world space offset based on the element offset function corresponding to the world space offset attribute. This offset then changes the world space coordinates during the coordinate transformation process, achieving fixed rendering of the display element.

[0128] Schematically, as shown in Figure 6, after the material information (including the world space offset attribute) is set, the material information is transmitted to the GPU. The GPU can obtain the corresponding element offset function, and then calculate the world space offset of each vertex according to the element offset function for subsequent coordinate transformation process.

[0129] In this embodiment, the element offset function node is obtained by encapsulation, and the element offset function node is connected with the world space offset node in the material editor to give the display element material a world space offset attribute, so that during the rendering process, the world space offset can be calculated according to the element offset function corresponding to the world space offset attribute, thereby changing the world space offset and realizing fixed rendering.

[0130] In addition, in this embodiment, the world space offset attribute of the element material can be automatically set according to the user's element fixed display instruction, which can simplify user operations and improve efficiency.

[0131] The above embodiment describes the process of presetting the world space offset properties of the material corresponding to the display element. Before modifying the element's material, the position of the display element can be adjusted to meet user requirements. This process may include the following steps:

[0132] Step 1: In response to a camera creation instruction, a UI camera is created at the world coordinate origin of the world space, and the UI camera is used to shoot display elements.

[0133] In one possible implementation, users can create a virtual camera in the scene to preview the display effects of display elements for subsequent adjustments. When the computer receives a camera creation command, it can create a UI camera in the scene to capture the display elements. After creating the UI camera, its rotation must be reset—that is, it must be set to the world space origin to prevent subsequent world space offsets.

[0134] Schematically, as shown in FIG7 , a UI camera 701 is created in the scene, and the rotation change 702 (including location, rotation and scale) of the UI camera is reset to be at the world coordinate origin of the world space.

[0135] Step 2: When the UI camera captures a display element in the scene, the element display position on the screen is displayed in the image captured by the UI camera.

[0136] Users can place display elements in the scene. The UI camera captures the display elements in the scene and shows the element display position in the UI camera shooting picture, so that users can preview the display effect of the display elements.

[0137] In a possible implementation, the display element may be placed near the origin of the world space so as to be captured by the UI camera for preview.

[0138] Schematically, as shown in FIG. 7 , a display element 703 may be placed in the scene. When the UI camera 701 captures the display element 703 , the display position of the display element may be displayed in the captured image 704 .

[0139] Step 3: When the display element is moved, adjust the element display position of the display element in the shooting picture.

[0140] After viewing the display position of a display element on the preview screen, the user can adjust the display position of the display element by changing the position of the display element in the scene and adjusting it according to the display effect in the shooting screen. For example, if the user wants to display a display element on the left side and it is currently displayed on the right side of the screen, the display element can be moved and the preview of the shooting screen will be used to check whether it is moved to the desired position.

[0141] When the computer device receives a move operation on a display element, the element display position of the display element in the captured image may be adjusted according to the move position, so that the user can preview the element.

[0142] Optionally, the display element may be a particle effect. In one possible implementation, the user may create a virtual camera at the world space origin of the scene, and place a pre-set particle component near the origin and within the camera's shooting range. The particle component may be pre-set using the Niagara system. The particle system is a method for modeling fuzzy objects, used to simulate certain specific fuzzy objects, such as fire, explosions, fireworks, fallen leaves, clouds, and other objects with abstract visual effects. Through the Niagara system, the user may set the particle component used to simulate the target object.

[0143] After the virtual camera captures the particle component, the computer device can display the captured particle effects, allowing the user to preview it and adjust the display position according to the instructions on the preview screen.

[0144] After adjusting the display position, you can adjust the material used by the display element. Connect the Element Offset Function node to the World Space Offset node to add a World Space Offset attribute to the display element.

[0145] In some embodiments, after the display position adjustment is completed, the created virtual camera may be deleted.

[0146] In one possible scenario, users may need to display display elements on top of other scenes, that is, to avoid being blocked by other objects in the scene. In this scenario, users can disable depth testing for display elements. This eliminates the need for depth testing during rendering, allowing the display elements to be rendered on top of the scene.

[0147] Alternatively, in another possible embodiment, the method of turning off the depth test can be automatically executed by the computer device, that is, the computer device turns off the depth test of the display element when the depth test corresponding to the display element is turned on, wherein the display element after the depth test is turned off is rendered onto the scene screen.

[0148] Optionally, the computer device may determine whether to disable depth testing for a display element based on the characteristics of the display element. In one possible implementation, when the computer device determines that a display element is a transparent or semi-transparent object, the depth testing for the display element may be automatically disabled. If the display element is a non-transparent object, the computer device may prompt the user to confirm whether to disable depth testing. Upon receiving the user's confirmation, the depth testing for the display element is disabled.

[0149] Illustratively, as shown in FIG8 , the depth test 801 (Disable Depth Test) of the display element may be disabled in the setting interface.

[0150] Optionally, display elements can be particles. Within the particle model, there's a type of sprite particle, based on billboard technology. During rendering, these particles maintain their orientation toward the scene camera, allowing them to rotate with the camera's movements. To achieve a fixed rendering position for particles on screen, set the sprite particle's orientation to a fixed orientation to avoid displacement due to the scene camera's rotation. This fixed orientation can be towards the UI camera.

[0151] That is, when the computer device detects that the particle used in the particle model is a Sprite particle, its orientation can be automatically set to a fixed orientation. Of course, the orientation can also be set by the user, and this embodiment does not limit this.

[0152] Schematically, as shown in FIG9 , the orientation of the Sprite particles can be set in the sprite renderer interface. By triggering the orientation setting control 901 (facing mode), the orientation setting interface 902 can be triggered, and the orientation can be set to a fixed orientation (1, 0, 0) in the orientation setting interface 902.

[0153] It should be noted that the method provided in the embodiments of this application only fixes the rendering position of the display element on the screen, but does not change its original properties. For example, when the particle effect is a burst of fireworks, the fireworks will always burst at a fixed position on the screen, and the original properties of the fireworks will not be affected.

[0154] In this embodiment, the display position of the display element is previewed through the UI camera, so that the user can adjust the display position of the display element according to the preview picture, complete the customized setting of the display position, and thus the display element can be rendered at the customized position in the subsequent rendering process.

[0155] In this embodiment, by disabling the depth test, the display elements can be always displayed on top of other scene images, thus avoiding obstruction of the display elements.

[0156] FIG10 is a structural block diagram of a display element rendering device provided by an exemplary embodiment of the present application. As shown in FIG10 , the device includes:

[0157] A coordinate determination module 1001 is configured to determine the world vertex coordinates of a display element in a world space based on vertex information of the display element, wherein the display element is an element whose display position on the screen remains unchanged;

[0158] An offset determination module 1002 is configured to determine a world space offset of the display element based on an offset mode of the world vertex coordinates during the perspective transformation process, wherein the world space offset is used to offset a relative offset of the world vertex coordinates during the perspective transformation process;

[0159] A space transformation module 1003 is configured to perform coordinate space transformation based on the world vertex coordinates and the world space offset to obtain the screen vertex coordinates of the display element in the screen space;

[0160] The element rendering module 1004 is configured to render the display element based on the screen vertex coordinates.

[0161] Optionally, the offset determination module 1002 is further configured to:

[0162] Determine the offset position coordinates of the display element vertices based on the inverse viewing matrix of the scene camera and the viewing matrix of the UI camera, where the scene camera is the camera corresponding to the viewing angle and the UI camera is the camera located at the origin of the world space;

[0163] The coordinate difference between the offset position coordinates and the world vertex coordinates is determined as the world space offset.

[0164] Optionally, the offset determination module 1002 is further configured to:

[0165] Transforming the world vertex coordinates based on the view matrix of the UI camera to obtain UI observation coordinates;

[0166] The UI observation coordinates are transformed based on the inverse viewing matrix of the scene camera to obtain the offset position coordinates.

[0167] Optionally, the offset determination module 1002 is further configured to:

[0168] Performing coordinate axis transformation on the world vertex coordinates to obtain the UI observation coordinates;

[0169] Based on the transformation method from the observation space of the scene camera to the world space, the UI observation coordinates are transformed to obtain the offset position coordinates.

[0170] Optionally, the world vertex coordinates are provided by an absolute world position node in a material editor of the virtual engine;

[0171] Optionally, the coordinate axis transformation is achieved by editing a vector split node and a vector splicing node in the material editor;

[0172] Optionally, the transformation from the observation space to the world space is achieved by editing a coordinate transformation node in the material editor.

[0173] Optionally, the device further includes:

[0174] A function encapsulation module is used to encapsulate an element offset function node in response to the connection operation of the absolute world position node, the edited vector splitting node, the vector splicing node and the edited coordinate transformation node, wherein the element offset function node is used to call the element offset function, and the element offset function is used to calculate the world space offset.

[0175] Optionally, the device further includes:

[0176] an attribute adding module, configured to add a world space offset attribute to the display element in response to a connection operation between the element offset function node and the world space offset node, wherein the world space offset attribute is used to indicate the element offset function;

[0177] or,

[0178] The attribute adding module is also used to connect the element offset function node with the world space offset node and add a world space offset attribute to the display element in response to an element fixed display instruction, wherein the element fixed display instruction is used to indicate the fixed display position of the display element on the screen.

[0179] Optionally, the device further includes:

[0180] A camera creation module, configured to create a UI camera at the coordinate origin of the world space in response to a camera creation instruction, wherein the UI camera is used to shoot the display element;

[0181] An element display module, configured to display the element display position of the display element on the screen in the shooting picture of the UI camera when the UI camera captures the display element in the scene;

[0182] A position adjustment module is used to adjust the element display position of the display element in the shooting picture when the display element moves.

[0183] Optionally, the display element is a particle;

[0184] The device further comprises:

[0185] The orientation setting module is used to set the orientation of the sprite particles to a fixed orientation when the particle model used is a sprite particle, and the fixed orientation is the direction toward the UI camera.

[0186] Optionally, the device further includes:

[0187] A test closing module is used to close the depth test of the display element, wherein the display element after the depth test is closed is rendered to the upper layer of the scene screen.

[0188] Optionally, the space transformation module 1003 is further configured to:

[0189] Performing coordinate offset processing on the world vertex coordinates based on the world space offset to obtain updated world vertex coordinates;

[0190] Performing observation space transformation, clipping space transformation, and screen space transformation on the updated world vertex coordinates to obtain the screen vertex coordinates.

[0191] In an embodiment of the present application, during the perspective transformation process, a computer device can determine the world-space offset of a display element based on the world-space offset of the display element caused by the perspective transformation. Thus, during the coordinate transformation process, the world-space offset is introduced to offset the position offset caused by the perspective transformation. This ensures that the screen vertex coordinates obtained after the coordinate transformation remain unchanged, even if the display position of the display element on the screen remains unchanged. This achieves a dynamic effect in which the display element moves with the perspective transformation. This process does not require the use of additional modules or plug-ins, nor does it occupy additional storage space. By calculating the world-space offset in real time, the display element is kept continuously displayed, which helps improve rendering efficiency.

[0192] It should be noted that the apparatus provided in the above embodiments is merely exemplified by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The implementation process is detailed in the method embodiments and will not be repeated here.

[0193] Please refer to Figure 11, which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Specifically, the computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory 1102 and a read-only memory 1103, and a system bus 1105 connecting the system memory 1104 and the CPU 1101. The computer device 1100 also includes a basic input / output system (I / O system) 1106 that facilitates information transmission between various components within the computer, and a mass storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0194] In some embodiments, the basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109, such as a mouse or keyboard, for user input. Both the display 1108 and the input device 1109 are connected to the central processing unit 1101 via an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, printer, or other types of output devices.

[0195] The mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer-readable media provide non-volatile storage for the computer device 1100. In other words, the mass storage device 1107 may include a computer-readable medium (not shown) such as a hard disk or drive.

[0196] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1104 and mass storage device 1107 can be collectively referred to as memory.

[0197] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1101. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1101 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.

[0198] According to various embodiments of the present application, the computer device 1100 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1100 may be connected to a network 1112 via a network interface unit 1111 connected to the system bus 1105. Alternatively, the network interface unit 1111 may be used to connect to other types of networks or remote computer systems (not shown).

[0199] The memory also includes one or more programs, which are stored in the memory and include steps executed by a computer device in the method provided in the embodiment of the present application.

[0200] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer instruction is stored. The at least one computer instruction is loaded and executed by a processor to implement the method for rendering a display element described in any of the above embodiments.

[0201] The present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the display element rendering method provided in the above aspects.

[0202] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, which can be the computer-readable storage medium included in the memory in the above embodiments, or a separate computer-readable storage medium not incorporated into the terminal. The computer-readable storage medium stores at least one computer instruction, which is loaded and executed by a processor to implement the display element rendering method described in any of the above method embodiments.

[0203] Optionally, the computer-readable storage medium may include: ROM, RAM, solid-state drives (SSDs), or optical disks. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for descriptive purposes only and do not represent the advantages or disadvantages of the embodiments.

[0204] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0205] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for rendering a display element, the method being executed by a computer device, the method comprising: Determine the world vertex coordinates of the display element in the world space based on vertex information of the display element, wherein the display element is an element whose display position on the screen remains unchanged; Determining a world space offset of the display element based on an offset mode of the world vertex coordinates during the perspective transformation process, wherein the world space offset is used to offset a relative offset of the world vertex coordinates during the perspective transformation process; Performing coordinate space transformation based on the world vertex coordinates and the world space offset to obtain screen vertex coordinates of the display element in screen space; The display element is rendered based on the screen vertex coordinates.

2. The method according to claim 1, wherein: The determining of the world space offset of the display element based on the offset mode of the world vertex coordinates in the process of perspective transformation includes: Determine the offset position coordinates of the display element vertices based on the inverse viewing matrix of the scene camera and the viewing matrix of the UI camera, wherein the scene camera is a camera corresponding to the viewing angle, and the UI camera is a camera located at the origin of the world space; The coordinate difference between the offset position coordinates and the world vertex coordinates is determined as the world space offset.

3. The method according to claim 2, wherein: The step of determining the offset position coordinates of the display element vertices based on the inverse viewing matrix of the scene camera and the viewing matrix of the UI camera includes: Transform the world vertex coordinates based on the view matrix of the UI camera to obtain UI observation coordinates; The UI observation coordinates are transformed based on the inverse viewing matrix of the scene camera to obtain the offset position coordinates.

4. The method according to claim 3, wherein: The transforming the world vertex coordinates based on the view matrix of the UI camera to obtain UI observation coordinates includes: Performing coordinate axis transformation on the world vertex coordinates to obtain the UI observation coordinates; The transforming the UI observation coordinates based on the inverse viewing matrix of the scene camera to obtain the offset position coordinates includes: Based on the transformation method from the observation space of the scene camera to the world space, the UI observation coordinates are transformed to obtain the offset position coordinates.

5. The method according to claim 4, wherein: The world vertex coordinates are provided by the absolute world position node in the material editor of the virtual engine; The coordinate axis transformation is achieved by editing the vector split node and the vector splicing node in the material editor; The transformation from the observation space to the world space is achieved by editing the coordinate transformation node in the material editor.

6. The method according to claim 5, wherein: The method further comprises: In response to the connection operation of the absolute world position node, the edited vector splitting node, the vector splicing node and the edited coordinate transformation node, an element offset function node is encapsulated, and the element offset function node is used to call an element offset function, and the element offset function is used to calculate the world space offset.

7. The method according to claim 6, wherein: The method further comprises: In response to a connection operation between the element offset function node and the world space offset node, adding a world space offset attribute to the display element, wherein the world space offset attribute is used to indicate the element offset function; or, In response to an element fixed display instruction, the element offset function node is connected to the world space offset node, and a world space offset attribute is added to the display element. The element fixed display instruction is used to instruct to fix the display position of the display element on the screen.

8. The method according to any one of claims 1 to 7, wherein: The method further comprises: In response to a camera creation instruction, a UI camera is created at the coordinate origin of the world space, wherein the UI camera is used to photograph the display element; When the UI camera captures the display element in the scene, the element display position of the display element on the screen is displayed in the captured image of the UI camera; When the display element moves, the element display position of the display element in the shooting picture is adjusted.

9. The method according to claim 8, wherein: The display elements are particles; The method further comprises: When the adopted particle model is a sprite particle, the orientation of the sprite particle is set to a fixed orientation, and the fixed orientation is the direction toward the UI camera.

10. The method according to any one of claims 1 to 9, wherein: The method further comprises: The depth test of the display element is turned off, wherein the display element after the depth test is turned off is rendered to an upper layer of the scene screen.

11. The method according to any one of claims 1 to 10, wherein: The performing coordinate space transformation based on the world vertex coordinates and the world space offset to obtain the screen vertex coordinates of the display element in the screen space includes: Performing coordinate offset processing on the world vertex coordinates based on the world space offset to obtain updated world vertex coordinates; The updated world vertex coordinates are subjected to observation space transformation, clipping space transformation and screen space transformation to obtain the screen vertex coordinates.

12. A rendering device for a display element, the device comprising: A coordinate determination module, used to determine the world vertex coordinates of the display element in the world space based on vertex information of the display element, wherein the display element is an element whose display position on the screen remains unchanged; An offset determination module, used to determine the world space offset of the display element based on the offset mode of the world vertex coordinates during the perspective transformation process, wherein the world space offset is used to offset the relative offset of the world vertex coordinates during the perspective transformation process; A space transformation module, used for performing coordinate space transformation based on the world vertex coordinates and the world space offset to obtain the screen vertex coordinates of the display element in the screen space; An element rendering module is used to render the display element based on the screen vertex coordinates.

13. A computer device, comprising a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the rendering method of the display element according to any one of claims 1 to 11.

14. A computer-readable storage medium, wherein at least one computer instruction is stored in the computer-readable storage medium, and the at least one computer instruction is loaded and executed by a processor to implement the method for rendering a display element according to any one of claims 1 to 11.

15. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for rendering a display element as described in any one of claims 1 to 11.