A scene rendering method and device and related products

By removing static object sets during game rendering and rendering only dynamic objects, the problem of reduced image detail and lighting effects caused by performance optimization in existing technologies is solved, achieving efficient rendering and a smooth gaming experience.

CN122164069APending Publication Date: 2026-06-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-12-09
Publication Date
2026-06-09

Smart Images

  • Figure CN122164069A_ABST
    Figure CN122164069A_ABST
Patent Text Reader

Abstract

This application provides a scene rendering method, apparatus, and related products, relating to the field of display processing technology. The scene rendering method provided in this application first obtains the scene to be rendered, then determines a static object set by removing skeletal objects and animation objects from the set of objects to be rendered in the scene. Subsequently, the scene is rendered after removing the static object set from the scene to be rendered. Therefore, this application avoids redrawing static objects that have not actually changed in each frame, reducing a large number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also reduces the possibility of game stuttering and latency while maintaining high-quality image details and lighting effects, thus improving the user's gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display processing technology, and in particular to a scene rendering method, apparatus, device and medium. Background Technology

[0002] To ensure excellent performance in complex game scenarios, technical staff typically use specialized performance testing tools after game development to collect test data on electronic devices, such as CPU utilization and GPU performance metrics. This test data helps technical staff understand whether the game's performance meets expectations.

[0003] In related technologies, if it is found that the performance of a game does not meet expectations, and the reason for this is the performance bottleneck of the electronic device, then the relevant technicians will usually take measures such as reducing the material complexity of the object to be rendered and reducing dynamic lighting effects to improve the game performance.

[0004] However, while reducing the material complexity of the objects to be rendered and reducing dynamic lighting effects can significantly reduce the pressure on the CPU and GPU of electronic devices, it also means that the game's visual details are reduced and the richness of lighting effects is decreased, thereby reducing the user's gaming experience. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a scene rendering method, apparatus, and related products that not only reduce the load on the CPU and GPU and improve rendering efficiency, but also reduce the possibility of game stuttering and latency while maintaining high-quality image details and lighting effects, thereby enhancing the user's gaming experience.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In view of the above, the first aspect of this application discloses a scene rendering method, the method comprising:

[0008] Obtain the scene to be rendered, which includes a collection of objects to be rendered;

[0009] A static object set is determined by removing skeletal objects and animation objects from the set of objects to be rendered, wherein the skeletal object is an object with a skeletal framework and whose vertex position changes dynamically with the movement of the skeletal framework, and the animation object is an object that undergoes one of the transformations of movement, rotation, and scaling.

[0010] The scene to be rendered after removing the set of static objects is determined.

[0011] The scene to be rendered after the removal is then rendered.

[0012] The second aspect of this application discloses a scene rendering apparatus, the apparatus comprising: a scene acquisition module, an object determination module, a scene determination module, and a scene rendering module;

[0013] The scene acquisition module is used to acquire the scene to be rendered, which includes a set of objects to be rendered;

[0014] The object determination module is used to determine a static object set by removing skeletal objects and animation objects from the set of objects to be rendered, wherein the skeletal object is an object with a skeletal framework and whose vertex position changes dynamically with the movement of the skeletal framework, and the animation object is an object that undergoes one of the transformations of movement, rotation and scaling;

[0015] The scene determination module is used to determine the scene to be rendered after removing the set of static objects from the scene to be rendered.

[0016] The scene rendering module is used to render the scene to be rendered after the removal.

[0017] A third aspect of this application discloses a computer device, the device comprising a processor and a memory:

[0018] The memory is used to store program code and transmit the program code to the processor;

[0019] The processor is used to execute the steps of the scene rendering method described in the first aspect according to the instructions in the program code.

[0020] The fourth aspect of this application discloses a computer-readable storage medium for storing program code for performing the steps of the scene rendering method described in the first aspect.

[0021] The fifth aspect of this application discloses a computer program product, including a computer program or instructions that, when executed by a computer device, implement the steps of the scene rendering method described in the first aspect.

[0022] Compared with the prior art, this application has the following beneficial effects:

[0023] This application discloses a scene rendering method, apparatus, and related products. The method first acquires a scene to be rendered. Then, by removing all objects except skeletal and animated objects from the set of objects to be rendered in the scene, a static object set is determined. Subsequently, the scene is rendered after removing the static object set. Therefore, this application avoids redrawing static objects that haven't actually changed in each frame, reducing a large number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also reduces the possibility of game stuttering and latency while maintaining high-quality image details and lighting effects, thus enhancing the user's gaming experience. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of a performance improvement process;

[0026] Figure 2 A scene architecture diagram of a scene rendering method provided in this application embodiment;

[0027] Figure 3 A flowchart illustrating a scene rendering method provided in an embodiment of this application;

[0028] Figure 4 A flowchart illustrating another scene rendering method provided in this application embodiment;

[0029] Figure 5 A flowchart for obtaining the viewpoint position of the current frame, provided as an embodiment of this application;

[0030] Figure 6 A flowchart for determining the set of objects to be rendered within the viewport range of the current frame, provided in an embodiment of this application;

[0031] Figure 7 A flowchart illustrating the determination of viewport boundaries and the set of objects to be rendered within the viewport range in the current frame, provided as an embodiment of this application;

[0032] Figure 8 A flowchart illustrating the process of obtaining a processed set of objects to be rendered, as provided in this embodiment of the application;

[0033] Figure 9A flowchart for determining static objects in the current frame is provided as an embodiment of this application;

[0034] Figure 10 A flowchart for rendering a static object is provided in an embodiment of this application;

[0035] Figure 11 Another flowchart for rendering a static object provided in this application embodiment;

[0036] Figure 12 A schematic diagram of a scene rendering apparatus provided in an embodiment of this application;

[0037] Figure 13 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0038] Figure 14 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0039] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0040] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0041] See Figure 1The diagram illustrates a performance improvement process. As described earlier, after game development, technical personnel typically use professional performance testing tools (such as PerfDog) to collect test data on electronic devices (such as CPU usage, GPU performance metrics, etc.). This test data helps them understand whether the game's performance meets expectations. If the game's performance is found to be unsatisfactory, and the reason for this is a bottleneck in the electronic device's performance, then technical personnel will typically take measures such as reducing the material complexity of the objects to be rendered and reducing dynamic lighting effects to improve game performance.

[0042] However, while reducing the material complexity of the objects to be rendered and reducing dynamic lighting effects can significantly reduce the pressure on the CPU and GPU of electronic devices, it also means that the game's visual details are reduced and the richness of lighting effects is decreased, thereby reducing the user's gaming experience.

[0043] Through research, the inventors have proposed a scene rendering method, apparatus, and related products. This method first acquires the scene to be rendered. Then, by removing all objects except skeletal and animated objects from the set of objects to be rendered in the scene, a set of static objects is determined. Subsequently, the scene is rendered after removing the set of static objects. Therefore, this application avoids redrawing static objects that haven't actually changed every frame, reducing a significant number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also allows the freed-up computing resources to be used to process more complex dynamic objects (such as skeletal and animated objects), as well as to increase image detail and optimize lighting effects, thereby improving the overall visual experience. Furthermore, reducing the computational load during rendering means shorter processing time per frame, which helps maintain frame rate stability, thereby reducing stuttering, latency, and frame dropping caused by sudden high loads, ultimately improving the user experience.

[0044] Next, the execution subject of the scene rendering method provided in this application embodiment will be described in detail:

[0045] The execution entity of the scene rendering method provided in this application embodiment can be a computer device with data processing capabilities, specifically a terminal device or a server. As examples, terminal devices can include, but are not limited to, mobile phones, desktop computers, tablet computers, laptops, handheld computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. Furthermore, the server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. In addition, the scene rendering method provided in this application embodiment can also be executed collaboratively by the terminal device and the server. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Therefore, this application embodiment does not limit the implementation entity of the technical solution of this application.

[0046] Next, the scene rendering method provided in the embodiments of this application will be described in detail:

[0047] See Figure 2 This figure is a scene architecture diagram of a scene rendering method provided in an embodiment of this application, including a computer device 100. The computer device 100 can be one of the various types of terminal devices or servers described above. Specifically, the following embodiments use computer device 100 as server A for illustrative purposes.

[0048] Server A is used to obtain the scene to be rendered, which includes a collection of objects to be rendered. It can be understood that each scene to be rendered consists of a collection of objects to be rendered, and these objects can be static objects (such as buildings or trees) or dynamic objects (such as characters or vehicles).

[0049] Server A is used to determine a set of static objects by removing skeletal objects and animated objects from the set of objects to be rendered. Static objects are those objects whose positions are fixed and do not change in the scene to be rendered. For example, static objects include, but are not limited to: terrain (such as ground, mountains, hills, etc.), background (such as buildings, trees, rocks, etc.), and vegetation (such as grass, shrubs, flowers, etc.). This application does not limit the specific static objects. Skeletal objects are objects with a skeletal framework whose vertex positions dynamically change with the movement of the skeletal framework, such as people and animals. Skeletal objects typically have complex animations and deformations, and therefore are not considered static objects. Animated objects are objects that undergo one of the transformations—movement, rotation, or scaling—in the current frame, such as trees swaying in the wind, water rippling, or moving clouds. Animated objects are also not considered static objects.

[0050] Server A is used to determine the rendered scene after removing the set of static objects. Understandably, in the rendered scene after removal, only dynamic objects that undergo transformations such as movement, rotation, or scaling are retained.

[0051] Server A is used to render the scene after the removal of static objects. This avoids repeatedly drawing unchanged static objects, thus reducing a large number of rendering operations. This strategy effectively reduces the workload of the CPU and GPU, significantly improving rendering efficiency. More importantly, by releasing these saved computing resources, electronic devices can more efficiently allocate resources to processing more complex dynamic objects, such as skeletal objects and animated objects, as well as adding image details and optimizing lighting effects, thereby improving the overall visual experience. Furthermore, saving computing resources during the rendering process directly shortens the processing cycle per frame, which is crucial for maintaining frame rate stability. By ensuring that each frame is processed smoothly within the specified time, problems such as screen stuttering, operation delays, and frame loss caused by instantaneous computational overload are effectively avoided, thus significantly enhancing the smoothness and continuity of the user experience.

[0052] Next, taking server A as the execution subject, the scene rendering method provided in this application embodiment will be described in detail:

[0053] See Figure 3 This figure is a flowchart of a scene rendering method provided in an embodiment of this application. Figure 3 The scene rendering method shown includes the following steps:

[0054] S301: Obtain the scene to be rendered, which includes a collection of objects to be rendered.

[0055] The scene to be rendered refers to the 3D virtual environment that will be processed by the rendering engine and displayed on the screen, including the Renderable Object Set. The Renderable Object Set is a collection of all objects in the scene that need to be rendered. Each Renderable Object has its own geometry, material properties, texture information, etc. For example, taking a city environment as the scene to be rendered, the Renderable Object Set would include buildings, roads, trees, vehicles, and the player-controlled character, etc.

[0056] S302: Determine a static object set by removing skeletal objects and animation objects from the set of objects to be rendered, wherein a skeletal object is an object with a skeletal framework whose vertex position changes dynamically with the movement of the skeletal framework, and an animation object is an object that undergoes one of the transformations of movement, rotation, and scaling.

[0057] First, for each object in the set of objects to be rendered, check if it is a skeletal object. A skeletal object is an object with a skeletal framework whose vertex positions dynamically change as the framework moves, such as a person or an animal. Skeletal objects typically have complex animations and deformations, therefore they are not considered static objects. If the set of objects to be rendered contains a skeletal object, then the skeletal object is removed from the set, resulting in the processed set of objects to be rendered.

[0058] Next, for each object in the processed set of objects to be rendered, check if it is an animated object. An animated object is an object that undergoes one of the transformations—movement, rotation, or scaling—in the current frame, such as trees swaying in the wind, water rippling, or moving clouds. Animated objects are not static objects. If the processed set of objects to be rendered contains an animated object, then the animated object is removed from the processed set of objects to be rendered.

[0059] After the above filtering, the remaining objects are static objects. Static objects do not move, rotate or undergo other forms of deformation over time, so they can be rendered according to the preset drawing frequency in subsequent steps.

[0060] S303: Determine the scene to be rendered after removing the collection of static objects from the scene to be rendered.

[0061] S304: Render the scene to be rendered after removal.

[0062] In summary, this application provides a scene rendering method. This method first obtains the scene to be rendered, then determines a static object set by removing all objects except skeletal and animation objects from the set of objects to be rendered in the scene. Subsequently, it renders the scene after removing the static object set. Therefore, this application avoids redrawing static objects that haven't actually changed in each frame, reducing a large number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also allows the freed-up computing resources to be used to process more complex dynamic objects (such as skeletal and animation objects), as well as to increase image detail and optimize lighting effects, thereby improving the overall visual experience. Furthermore, reducing the computational load during rendering means shorter processing time per frame, which helps maintain frame rate stability, thereby reducing stuttering, latency, and frame dropping caused by sudden high loads, and ultimately improving the user experience.

[0063] See Figure 4 This figure is a flowchart of another scene rendering method provided in an embodiment of this application. Figure 4 The scene rendering method shown includes the following steps:

[0064] S401: When it is determined that the current frame of the scene to be rendered needs to be rendered, obtain the view position of the current frame.

[0065] At the start of each frame, server A checks whether the current frame of the scene to be rendered needs to be rendered. Normally, rendering is required for every frame to maintain visual continuity and smoothness. However, in some scenes, such as static scenes or when the player has paused the game, rendering may not be necessary for every frame.

[0066] Viewpoint position refers to the current position and orientation of an observer (such as a camera or user) in the virtual world. The current position refers to the observer's specific location in a three-dimensional coordinate system, usually represented by (x, y, z) coordinates. Orientation includes pitch, yaw, and roll angles. The pitch angle determines the range of angles the user can look up or down; setting the pitch angle limits the maximum angle the user can look up or down, preventing the user from seeing content outside the game's design (such as the edge of the skybox or texture seams on the ground). The yaw angle determines the range of angles the user can look left or right; setting the yaw angle limits the maximum angle the user can look left or right, ensuring the user's field of vision remains within the game's design range. The roll angle determines the user's rotation angle.

[0067] In some specific implementations, the viewpoint position of the current frame can be determined by calling the game engine's Application Programming Interface (API). See also Figure 5 The figure is a flowchart illustrating how to obtain the viewpoint position of the current frame according to an embodiment of this application. For example, the pseudocode for obtaining the viewpoint position of the current frame can be as follows:

[0068] / / Create a scene view family context (ViewFamily) and initialize it with the default constructor values.

[0069] Initialize the ViewFamily view family context as the new scene view family context.

[0070] / / Configure the view using the default pitch and yaw ranges in the world settings.

[0071] Set the ViewFamily's pitch range to the default pitch range obtained from the world settings.

[0072] Set the yaw angle range of ViewFamily to the default yaw angle range obtained from the world settings.

[0073] / / Set the view background color to white

[0074] Set the background color of ViewFamily to white.

[0075] / / Initialize the view matrix

[0076] Set the ViewFamily's view matrix to the new view matrix.

[0077] S402: Determine the set of objects to be rendered within the viewport range of the current frame based on the current frame's view position and viewport boundaries.

[0078] The viewport is the area on an electronic device's screen where the game screen is displayed. The viewport is typically a rectangular area, its size defined by its width and height. Specifically, the width and height of the viewport can be obtained by calling the `Viewport->GetSizeXY()` function. This function returns a structure containing two values: the viewport's width (X) and height (Y). The viewport boundaries can then be determined based on these values. For example, assuming the viewport width is 1920 pixels and the height is 1080 pixels, the viewport boundaries are a rectangle from (0,0) to (1920,1080). After determining the viewport boundaries, the set of objects to be rendered within the viewport's area in the current frame can be determined based on the viewpoint position of the current frame and the viewport boundaries.

[0079] See Figure 6 This figure is a flowchart illustrating how to determine the set of objects to be rendered within the viewport range of the current frame, according to an embodiment of this application.

[0080] Specifically, first, iterate through each element in the primitives table of all rendering elements in the scene to be rendered. These elements typically represent objects or parts of objects in the scene, such as a character's body or a wall of a building.

[0081] Secondly, by calling the PrimitiveComponent->GetRenderObject() function, the object corresponding to each element is determined. This object contains all the necessary information about how to render the element, such as material (which defines the object's appearance properties, such as color, gloss, reflectivity, etc.), texture (an image applied to the object's surface, increasing the object's detail and realism), position (the object's coordinates in three-dimensional space), rotation angle (the object's rotation angle around an axis), and scaling ratio.

[0082] Subsequently, the `GetBox()` function is called to determine the bounding box of each object. The bounding box is a rectangle or cube that tightly surrounds the object. For each bounding box, it is checked whether it is inside or intersects with the viewport boundary. If the bounding box is inside the viewport boundary, it means the entire object is within the camera's field of view; therefore, the object is to be rendered. If the bounding box intersects with the viewport boundary, it means a portion of the object is within the camera's field of view; therefore, the object is to be rendered. If the bounding box is neither inside nor intersects with the viewport boundary, it means the object is outside the camera's field of view; therefore, the object is not to be rendered and should be ignored or clipped. Thus, this boundary determination quickly identifies and excludes objects completely outside the camera's field of view. These objects do not require subsequent rendering processing, avoiding unnecessary computation and resource consumption. Furthermore, rendering only objects within the camera's field of view significantly reduces rendering latency and stuttering by minimizing unnecessary computation, thereby improving the user experience.

[0083] Finally, the objects to be rendered are added to a list called OutRenderables (i.e., a collection of objects to be rendered), which will store all objects to be rendered that are visible within the viewport.

[0084] See Figure 7 This figure is a flowchart illustrating how to determine the viewport boundary and the set of objects to be rendered within the viewport range of the current frame, according to an embodiment of this application. For example, the pseudocode for determining the viewport boundary and the set of objects to be rendered within the viewport range of the current frame can be as follows:

[0085] / / Define viewport boundaries

[0086] The viewport boundaries (ViewportBounds) are defined as the bounding boxes formed by converting the view's viewing area.

[0087] / / Iterate through all the basic primitives rendered in the scene.

[0088] For each primitive set, Primitives are among all primitive sets in the viewpoint.

[0089] For each primitive index, PrimitiveIndex, in the primitive index list of the basic primitive set

[0090] / / Get the component associated with the primitive

[0091] Component = A component obtained from the basic primitive set via primitive index.

[0092] If the component is not empty

[0093] / / Get the rendering object corresponding to this component

[0094] RenderObject = Component's render object

[0095] If the rendering object exists

[0096] / / Get the boundaries of the rendered object

[0097] RenderObjectBounds = Boundaries of the rendered object

[0098] / / Check if the boundary of the rendered object is located at or intersects with the viewport boundary.

[0099] If the viewport boundary and the render object boundary intersect

[0100] / / If they intersect, add this rendered object to the list of objects to be rendered.

[0101] Add the rendering object to the collection of objects to be rendered.

[0102] S403: Obtain the processed set of objects to be rendered by removing the skeleton objects from the set of objects to be rendered.

[0103] A skeletal object is an object with a skeletal framework whose vertex positions dynamically change as the framework moves, such as a person or an animal. Skeletal animation enables these objects to perform complex movements and deformations, thus providing more realistic animation effects.

[0104] Specifically, firstly, for each object in the set of objects to be rendered, the `GetOwner` function is called to obtain the corresponding scene node (`SceneComponent`). A scene node is typically a component within the scene to be rendered, defining the object's position, rotation, and scaling within that scene. Next, the `GetOwner` function is called again to obtain the top-level Actor object to which the scene node belongs. This is because skeletal object components are usually attached to Actor objects, not directly to scene nodes. Then, the `FindComponentByClass` function is called to check if the Actor object contains a skeletal object component. If a skeletal object component is found, it means that the Actor object contains skeletal animation, i.e., the object to be rendered is a skeletal object. If a particular object is determined to be a skeletal object, it needs to be removed from the set of objects to be rendered to obtain the processed set of objects to be rendered.

[0105] SeeFigure 8 This figure is a flowchart illustrating how to obtain a processed set of objects to be rendered, according to an embodiment of this application. For example, the pseudocode for obtaining the processed set of objects to be rendered by removing skeletal objects from the set can be as follows:

[0106] / / Iterate through the collection of objects to be rendered

[0107] For each render object (RenderObject), in the collection of objects to be rendered (OutRenderables)

[0108] / / Attempt to convert the owner of the rendered object to an Actor type

[0109] If Actor = successfully casts the owner of the rendered object to the Actor type.

[0110] / / Check if the Actor object contains a skeleton mesh component

[0111] SkeletalMeshComponent = Find the component of type USkeletalMeshComponent in the Actor

[0112] If the skeletal mesh component is found

[0113] / / If a skeletal mesh component is found, remove the rendered object from the collection of objects to be rendered.

[0114] Remove the renderable object from the OutRenderables collection of objects to be rendered.

[0115] S404: Determine the set of static objects in the current frame by removing animated objects from the processed set of objects to be rendered.

[0116] Animated objects are objects that undergo one of the transformations—movement, rotation, or scaling—within the scene to be rendered, such as trees swaying in the wind, water surfaces rippling, or moving clouds.

[0117] Specifically, firstly, for each object in the processed set of objects to be rendered, the `GetOwner` function is called to obtain the corresponding scene node `SceneComponent`. Next, the `GetOwner` function is called again to obtain the top-level `Actor` object to which the scene node belongs. Then, it is checked whether the `Actor` object includes the animation object component `UAnimInstance`. If it does and the animation object component is playing an animation, then the object to be rendered is an animated object. If an animated object is determined to be an animated object, it needs to be removed from the processed set of objects to be rendered to determine the static objects in the current frame.

[0118] It should be noted that this application does not impose any restrictions on the order in which S403 and S404 are executed.

[0119] See Figure 9 This figure is a flowchart illustrating how to determine static objects in the current frame according to an embodiment of this application. For example, the pseudocode for determining static objects in the current frame by removing animated objects from the processed set of objects to be rendered can be as follows:

[0120] / / Traverse the processed collection of objects to be rendered

[0121] For each render object (RenderObject), in the collection of objects to be rendered (OutRenderables)

[0122] / / Attempt to convert the owner of the rendered object to an Actor type

[0123] If Actor = successfully casts the owner of the rendered object to the Actor type.

[0124] / / Get the animation instance from the mesh component of the Actor object

[0125] AnimInstance = Actor's Mesh Component -> Get AnimInstance

[0126] If the animation instance exists and the animation instance is playing any animation.

[0127] / / If an animation instance is found and the animation is playing, remove the renderable object from the OutRenderables collection.

[0128] S405: Determine the scene to be rendered after removing the collection of static objects from the scene to be rendered.

[0129] S406: Determine whether the view position of the current frame is the same as the view position of the previous frame. If not, proceed to step S407; if yes, proceed to step S409.

[0130] Specifically, server A needs to check whether the position (x1, y1, z1) of the current frame is different from the position (x0, y0, z0) of the previous frame, and also needs to check whether the direction (Pitch1, Yaw1, Roll1) of the current frame is different from the direction (Pitch0, Yaw0, Roll0) of the previous frame. If either the position or direction of the current frame is different from that of the previous frame, the viewpoint position is considered to have changed. If the viewpoint positions are different, step S407 is executed; if the viewpoint positions are the same, step S409 is executed.

[0131] It should be noted that in practical applications, directly comparing the viewpoint position of the current frame with that of the previous frame may lead to misjudgments due to accuracy issues. Therefore, position thresholds ε1 and direction thresholds ε2 are typically set to determine whether the viewpoint position of the current frame is sufficiently close to that of the previous frame, thus determining whether they are the same. For example, if the difference between the position of the current frame and the position of the previous frame is less than the position threshold ε1 and the difference between the directions of the current frame and the previous frame is less than the direction threshold ε2, then the viewpoint position of the current frame is considered the same as that of the previous frame; conversely, if the difference between the position of the current frame and the position of the previous frame is greater than or equal to the position threshold ε1, or the difference between the directions of the current frame and the previous frame is greater than or equal to the direction threshold ε2, then the viewpoint position of the current frame is considered different from that of the previous frame.

[0132] S407: Determine the frame number difference between the current frame and the first reference frame, where the first reference frame is a historical frame used to render the scene after removal.

[0133] The first reference frame is a historical frame used to render the scene after removal (i.e., a historical frame that only renders dynamic objects). The frame difference between the current frame and the first reference frame refers to how many frames have passed from the first reference frame to the frame currently being processed (i.e., the current frame). For example, if the current frame is frame 10 and the first reference frame is frame 1, then the frame difference between the current frame and the first reference frame is 10 - 1 = 9 frames.

[0134] S408: Render the scene to be rendered after removal based on the frame difference between the current frame and the first reference frame and the preset rendering frequency.

[0135] Rendering based on the frame rate difference between the current frame and the first reference frame, along with a preset rendering frequency, allows for precise control over the rendering timing of static objects. This avoids redrawing static objects that haven't actually changed in each frame, significantly reducing rendering operations. This not only lowers the load on the CPU and GPU and improves rendering efficiency, but also allows the freed-up computing resources to be used to process more complex dynamic objects (such as skeletal and animated objects), as well as to add detail and optimize lighting effects, thereby enhancing the overall visual experience. Furthermore, reducing the computational load during rendering means shorter processing time per frame, which helps maintain frame rate stability, reducing stuttering, latency, and frame dropping caused by sudden high loads, ultimately improving the user experience.

[0136] Furthermore, in this embodiment, rendering of the removed scene is performed only when the viewpoint position of the current frame differs from that of the previous frame, based on the frame rate difference between the current frame and the first reference frame and a preset rendering frequency. This is because when the viewpoint position of the game scene does not change, the scene content seen by the user remains essentially unchanged. Rendering static objects in this situation is redundant, consuming computational resources and potentially introducing rendering latency. Therefore, by rendering the removed scene only when the viewpoint position of the current frame differs from that of the previous frame, based on the frame rate difference between the current frame and the first reference frame and a preset rendering frequency, unnecessary static object rendering can be reduced, significantly reducing the load on the CPU and GPU, improving rendering efficiency, enabling electronic devices to process each frame's rendering task more quickly and meticulously, and maintaining frame rate stability.

[0137] In one specific implementation, if the preset drawing frequency instructs that static objects be drawn once every even-numbered frames (i.e., once every two frames), taking the first and second frames of the scene to be rendered as an example, then the set of static objects needs to be determined by removing skeletal objects and animation objects from the set of objects to be rendered in the first frame of the scene to be rendered. Subsequently, the first frame of the scene to be rendered after removing the set of static objects is determined. Finally, the first and second frames of the scene to be rendered after removing the static objects are rendered. That is, when the current frame is the 2nd, 4th, 6th, etc., both static and dynamic objects are rendered, while when the current frame is the 1st, 3rd, 5th, etc., only dynamic objects are rendered, not static objects. Therefore, this application avoids redrawing static objects in odd-numbered frames. In odd-numbered frames, since static objects are not rendered, the electronic device can allocate more computing resources to the rendering and updating of dynamic objects. This means that dynamic objects can receive more refined processing, such as smoother animation transitions, finer detail, and faster response times. This resource allocation strategy not only enhances the visual effects of dynamic objects but also ensures their real-time performance and interactivity within the scene. In even-numbered frames, static objects are rendered, forming a complete scene together with the dynamic objects. Because static objects are rendered only in even-numbered frames, they can maintain high quality without the performance degradation caused by frequent updates. Furthermore, due to the persistence of vision, users will not perceive the absence of static objects in odd-numbered frames, thus ensuring the continuity and realism of the scene.

[0138] It should be noted that this application does not limit the specific preset rendering frequency. In one specific implementation, the preset rendering frequency can be flexibly set according to the needs of the scene to be rendered. If there are many static objects in the scene to be rendered (such as a city full of details), then a lower preset rendering frequency can be set (for example, changing the preset rendering frequency from 3 frames / time to 5 frames / time) to reduce the rendering burden, improve rendering efficiency, reduce game stuttering and latency, and improve the user experience.

[0139] In another specific implementation, the preset rendering frequency can be flexibly set according to the hardware performance of the electronic device. This is because high-performance electronic devices can handle complex rendering tasks faster, while low-performance electronic devices may face rendering bottlenecks when handling complex rendering tasks. If the hardware performance of the electronic device is poor, a lower preset rendering frequency can be set to reduce the rendering burden, improve rendering efficiency, reduce game stuttering and latency, and enhance the user experience.

[0140] In another specific implementation, the preset rendering frequency can be flexibly set based on the movement rate of the viewpoint. If the viewpoint movement rate is high (e.g., in fast-paced action games where the user frequently changes their viewpoint), then a lower preset rendering frequency can be set (i.e., the movement rate and the preset rendering frequency are negatively correlated). This is because with rapid changes in viewpoint position, the user may not notice subtle changes in static objects. Therefore, increasing the preset rendering frequency can reduce the rendering burden, improve rendering efficiency, reduce game stuttering and latency, and enhance the user experience. After adjusting the preset rendering frequency based on the movement rate of the viewpoint, static objects can be rendered according to the frame difference between the current frame and the initial frame, as well as the adjusted preset rendering frequency.

[0141] It should also be noted that server A can use the Euclidean distance formula to determine the distance between the viewpoint position of the current frame and the target point of the static object, i.e., the distance between the camera position and the static object position. Then, based on the calculated distance information, an appropriate rendering level is selected. The rendering level is typically determined by a set of predefined distance thresholds. For example, if the distance between the viewpoint position of the current frame and the target point of the static object is greater than or equal to the first distance threshold, the rendering level is determined to be level one; if the distance is greater than the second distance threshold but less than the first distance threshold, the rendering level is determined to be level two; if the distance is less than the second distance threshold, the rendering level is determined to be level three. Finally, the static object is rendered according to the rendering level corresponding to the distance information. For example, for static objects far from the camera, a lower resolution texture or a simplified model (i.e., a lower rendering level) can be used to render the static object. In this way, it is possible to ensure that nearby static objects have high resolution and rich detail, while distant static objects use lower resolution textures or simplified models, thereby reducing the rendering burden, improving rendering efficiency, reducing game stuttering and latency, and enhancing the user experience.

[0142] It should also be noted that since the position of static objects does not change, multithreading technology can be used to pre-calculate and store the rendering results (such as vertex data, texture coordinates, etc.) of these static objects in one or more secondary threads. This allows for subsequent drawing of static objects directly from these prepared rendering results, eliminating the need for recalculation each time. This reduces the rendering burden, improves rendering efficiency, reduces game stuttering and latency, and enhances the user experience. For dynamic objects that require real-time updates to their position, orientation, and other attributes (such as characters and vehicles), rendering should be performed on the main thread or a dedicated thread for dynamic objects.

[0143] It should also be noted that the above embodiment is based on the example of a preset drawing frequency indicating that a static object (i.e., the scene to be rendered) is drawn once every N frames. In practical applications, the preset drawing frequency can also indicate that a static object and a dynamic object (i.e., the scene to be rendered after removal) are drawn once every N frames. This application does not limit this.

[0144] In practical applications, to render static objects in the current frame, a texture called a RenderTarget is typically used to store intermediate rendering results. This approach allows developers more flexible control over the rendering process. Specifically, the initial RenderTarget is an empty RenderTarget, ready to receive subsequent rendering output. Furthermore, the size of the RenderTarget needs to match the screen or window of the electronic device, or be scaled according to specific needs; therefore, the specific width (ScreenWidth) and height (ScreenHeight) of the RenderTarget need to be set according to the screen size. Subsequently, to ensure the correctness of the rendering and the desired visual effects, a custom depth stencil buffer (CustomDepthStencil) needs to be created. The depth stencil buffer is used to handle depth testing and stencil testing. Depth testing determines which pixels should be rendered in front and which should be occluded, while stencil testing is used for more complex rendering effects, such as clipping regions and shadow casting. Next, by setting the target of the rendering context, the rendering operations are no longer directly output to the screen or window, but instead output to the empty RenderTarget created earlier. Finally, the static objects in the current frame can be rendered, and the rendering results of these static objects are written to the RenderTarget. Furthermore, after rendering all static objects, the Canvas.Flush() function needs to be called to end the rendering operation and submit the rendering result from the rendering surface to the rendering target texture RenderTarget.

[0145] See Figure 10 This figure is a flowchart illustrating the rendering of a static object according to an embodiment of this application. For example, the pseudocode for rendering a static object can be as follows:

[0146] / / Create an empty render target with a resolution of 1 / RT of the screen resolution.

[0147] Create a new render target (RenderTarget) of type UTextureRenderTarget2D.

[0148] Set the size of the RenderTarget to screen width * RT and screen height * RT.

[0149] Set the target gamma value of RenderTarget to the gamma value of the display.

[0150] / / Create a custom depth stencil buffer and associate it with the render target

[0151] Create a custom depth template buffer (CustomDepthStencil)

[0152] Set the render target of CustomDepthStencil to RenderTarget.

[0153] / / Start rendering to render target

[0154] Create a Canvas and associate it with a RenderTarget

[0155] Clear canvas color to black

[0156] / / Render all static objects to the canvas

[0157] For each render object (RenderObject), in the collection of objects to be rendered (OutRenderables)

[0158] / / Convert the owner of the rendered object to an Actor type

[0159] If Actor = successfully casts the owner of the rendered object to the Actor type.

[0160] / / Draw Actors on the canvas

[0161] Canvas drawing Actor

[0162] / / End rendering and move to the render target

[0163] Refresh Canvas

[0164] S409: Determine the frame number difference between the current frame and the second reference frame, where the second reference frame is the previous frame in which the scene to be rendered was rendered and the view position is the same as the view position of the current frame.

[0165] To optimize performance and reduce unnecessary computation when the viewpoint position of the current frame is the same as that of the previous frame, it is necessary to obtain the previous frame (i.e., the second reference frame) that was rendered in the scene to be rendered and whose viewpoint position is the same as that of the current frame, and calculate the frame difference between the current frame and the second reference frame. For example, if the current frame is frame 10 and the second reference frame is frame 7, then the frame difference between the current frame and the second reference frame is 10 - 7 = 3 frames.

[0166] Specifically, server A maintains a counter to count how many frames have passed since the last rendering of a static object. Each time a new frame is generated, it checks if the viewpoint position has changed. If not, it increments the counter.

[0167] S410: Determine whether the frame number difference between the current frame and the second reference frame is greater than or equal to a preset frame number threshold. If so, proceed to step S411.

[0168] A preset frame rate threshold (such as MinFramesToReRender) is used to indicate the minimum number of frames to re-render. For example, if the preset frame rate threshold is 10, it means that if the view position of the current frame is the same as the view position of the previous frame, the static object needs to be re-rendered at least once every 10 frames.

[0169] It should be noted that this application does not limit the value of the preset frame rate threshold. In one specific implementation, different preset frame rate thresholds can be set for static objects of different importance. For example, critical static objects or static objects located in the center of the screen may need to be updated more frequently, so a lower preset frame rate threshold needs to be set, while static objects located in the edge area of ​​the screen or less important static objects are allowed to have longer update intervals, so a higher preset frame rate threshold can be set.

[0170] S411: Render the scene to be rendered.

[0171] If the preset frame rate threshold is 10, once the number of frames in which the viewpoint position of the current frame is the same as that of the previous frame reaches 10, even in odd-numbered frames, a rendering operation for static objects will be forced. This means rendering the scene to be rendered, including static objects. Therefore, by setting a preset frame rate threshold, it is possible to ensure that static objects on the screen remain up-to-date even if the camera does not move for a long time. At the same time, it can significantly reduce unnecessary drawing operations, thereby reducing the rendering burden, improving rendering efficiency, reducing game stuttering and latency, and enhancing the user experience.

[0172] See Figure 11 This figure is a flowchart illustrating another method for rendering a static object according to an embodiment of this application. For example, the pseudocode for rendering a static object can be as follows:

[0173] / / Get the current camera position

[0174] Current Camera Location (CurrentCameraLocation) = Get camera location

[0175] If the current camera location is not equal to the initial camera location (InitialCameraLocation)

[0176] Set the current camera position to the initial camera position.

[0177] / / Increase the freeze counter if the camera position does not change.

[0178] FreezeCount increases by 1

[0179] / / If the freeze counter reaches 12, render the static object.

[0180] If the freeze counter reaches 12, draw the rendering target on the screen canvas, covering the entire screen.

[0181] / / Reset freeze counter

[0182] Set the freeze counter to 0.

[0183] In summary, this application provides a scene rendering method. This method first obtains the scene to be rendered, then determines a static object set by removing all objects except skeletal and animation objects from the set of objects to be rendered in the scene. Subsequently, it renders the scene after removing the static object set. Therefore, this application avoids redrawing static objects that haven't actually changed in each frame, reducing a large number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also allows the freed-up computing resources to be used to process more complex dynamic objects (such as skeletal and animation objects), as well as to increase image detail and optimize lighting effects, thereby improving the overall visual experience. Furthermore, reducing the computational load during rendering means shorter processing time per frame, which helps maintain frame rate stability, thereby reducing stuttering, latency, and frame dropping caused by sudden high loads, and ultimately improving the user experience. Furthermore, by setting a preset frame rate threshold, this application can ensure that static objects on the screen remain up-to-date even if the camera does not move for a long time. At the same time, it can significantly reduce unnecessary drawing operations, thereby reducing the rendering burden, improving rendering efficiency, reducing game stuttering and latency, and enhancing the user experience.

[0184] Based on the scene rendering method provided in the preceding embodiments, this application also provides a scene rendering apparatus. The scene rendering apparatus provided in this application will be described in detail below:

[0185] See Figure 12 The figure is a schematic diagram of a scene rendering device provided in an embodiment of this application. The scene rendering device 600 includes: a scene acquisition module 601, an object determination module 602, a scene determination module 603, and a scene rendering module 604.

[0186] The scene acquisition module 601 is used to acquire the scene to be rendered, which includes a collection of objects to be rendered.

[0187] The object determination module 602 is used to determine a static object set by removing skeletal objects and animation objects from the set of objects to be rendered. The skeletal object is an object with a skeletal framework whose vertex position changes dynamically with the movement of the skeletal framework, and the animation object is an object that undergoes one of the transformations of movement, rotation, and scaling.

[0188] The scene determination module 603 is used to determine the scene to be rendered after removing the collection of static objects from the scene to be rendered.

[0189] Scene rendering module 604 is used to render the scene to be rendered after the removal.

[0190] In some specific implementations, the scene rendering module 604 is specifically used to: render the removed scene to be rendered based on the frame difference between the current frame of the scene to be rendered and the first reference frame and the preset rendering frequency, wherein the first reference frame is a historical frame used to render the removed scene to be rendered.

[0191] In some specific implementations, the scene rendering module 604 is specifically used to: render the scene to be rendered after removal, when the view position of the current frame is different from the view position of the previous frame, based on the frame number difference between the current frame and the first reference frame of the scene to be rendered and the preset rendering frequency.

[0192] In some specific implementations, the scene rendering device 600 also includes: a rate determination module and a rate adjustment module;

[0193] A rate determination module is used to determine the movement rate of the viewpoint position based on the viewpoint position of the current frame and the viewpoint position of the previous frame.

[0194] A rate adjustment module is used to adjust the preset drawing frequency according to the movement rate of the viewpoint position, wherein the movement rate and the preset drawing frequency are negatively correlated.

[0195] The scene rendering module 604 is specifically used to render the scene to be rendered after removal based on the frame difference between the current frame and the first reference frame of the scene to be rendered and the adjusted preset rendering frequency.

[0196] In some specific implementations, the scene rendering device 600 also includes: a difference determination module;

[0197] The difference determination module is used to determine the frame number difference between the current frame and the second reference frame when the view position of the current frame is the same as that of the previous frame, wherein the second reference frame is the historical frame that was previously rendered and whose view position is the same as that of the current frame; and to render the scene when the frame number difference between the current frame and the second reference frame is greater than or equal to a preset frame number threshold.

[0198] In some specific implementations, the unit for determining the collection of objects to be rendered is as follows:

[0199] The first determining unit is used to obtain the viewport boundary of the current frame of the scene to be rendered, and the object boundary of all objects in the current frame, wherein all objects in the current frame include the first target object;

[0200] The second determining unit is configured to determine that the set of objects to be rendered includes the first target object when the object boundary of the first target object is located inside the viewport boundary of the current frame, or when the object boundary of the first target object intersects with the viewport boundary of the current frame.

[0201] In some specific implementations, the scene acquisition module 601 is specifically used to: acquire the first frame and the second frame of the scene to be rendered; the object determination module 602 is specifically used to: determine the static object set by removing skeletal objects and animation objects from the set of objects to be rendered in the first frame of the scene to be rendered; the scene determination module 603 is specifically used to: determine the first frame of the scene to be rendered after removing the static object set in the first frame of the scene to be rendered; and the scene rendering module 604 is specifically used to: render the first frame of the scene to be rendered after removing the static object set and the second frame of the scene to be rendered.

[0202] In summary, this application provides a scene rendering apparatus. This apparatus first acquires a scene to be rendered, then determines a static object set by removing all objects except skeletal and animated objects from the set of objects to be rendered in the scene. Subsequently, it renders the scene after removing the static object set. Therefore, this application avoids redrawing static objects that haven't actually changed in each frame, reducing a large number of rendering operations. This not only reduces the load on the CPU and GPU and improves rendering efficiency, but also allows the freed-up computing resources to be used to process more complex dynamic objects (such as skeletal and animated objects), as well as to increase image detail and optimize lighting effects, thereby improving the overall visual experience. Furthermore, reducing the computational load during rendering means shorter processing time per frame, which helps maintain frame rate stability, thereby reducing stuttering, latency, and frame dropping caused by sudden high loads, and ultimately improving the user experience. Furthermore, by setting a preset frame rate threshold, this application can ensure that static objects on the screen remain up-to-date even if the camera does not move for a long time. At the same time, it can significantly reduce unnecessary drawing operations, thereby reducing the rendering burden, improving rendering efficiency, reducing game stuttering and latency, and enhancing the user experience.

[0203] See Figure 13 , Figure 13 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For example... Figure 13 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants, point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a computer as an example:

[0204] Figure 13 This is a block diagram illustrating a portion of the structure of a computer associated with the terminal provided in an embodiment of this application. (Reference) Figure 13 The computer includes: a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230 (including a touch panel 1231 and other input devices 1232), a display unit 1240 (including a display panel 1241), a sensor 1250, an audio circuit 1260 (which can connect to a speaker 1261 and a microphone 1262), a wireless fidelity (WiFi) module 1270, a processor 1280, and a power supply 1290, etc. Those skilled in the art will understand that... Figure 13The computer architecture shown does not constitute a limitation on the computer and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0205] The memory 1220 can be used to store software programs and modules. The processor 1280 executes various computer functions and data processing by running the software programs and modules stored in the memory 1220. The memory 1220 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer (such as audio data, telephone directory, etc.). In addition, the memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0206] The processor 1280 is the control center of the computer, connecting various parts of the computer through various interfaces and lines. It performs various computer functions and processes data by running or executing software programs and / or modules stored in the memory 1220, and by calling data stored in the memory 1220. Optionally, the processor 1280 may include one or more processing units; preferably, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 1280.

[0207] In this embodiment of the application, the processor 1280 included in the terminal also has the following functions:

[0208] Obtain the scene to be rendered, which includes a collection of objects to be rendered;

[0209] A static object set is determined by removing skeletal objects and animation objects from the set of objects to be rendered. Skeletal objects are objects with a skeletal framework whose vertex positions change dynamically with the movement of the skeletal framework, and animation objects are objects that undergo one of the transformations of movement, rotation, and scaling.

[0210] The scene to be rendered is determined by removing the collection of static objects from the scene to be rendered;

[0211] Render the scene to be rendered after the removal process.

[0212] See Figure 14 , Figure 14This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1300 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 1322 (e.g., one or more processors) and memory 1332, and one or more storage media 1330 (e.g., one or more mass storage devices) for storing application programs 1342 or data 1344. The memory 1332 and storage media 1330 can be temporary or persistent storage. The program stored in the storage media 1330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1322 may be configured to communicate with the storage media 1330 and execute the series of instruction operations in the storage media 1330 on the server 1300.

[0213] Server 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input / output interfaces 1358, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0214] The steps performed by the server in the above embodiments can be based on this Figure 14 The server structure shown.

[0215] CPU1322 is used to perform the following steps:

[0216] Obtain the scene to be rendered, which includes a collection of objects to be rendered;

[0217] A static object set is determined by removing skeletal objects and animation objects from the set of objects to be rendered. Skeletal objects are objects with a skeletal framework whose vertex positions change dynamically with the movement of the skeletal framework, and animation objects are objects that undergo one of the transformations of movement, rotation, and scaling.

[0218] The scene to be rendered is determined by removing the collection of static objects from the scene to be rendered;

[0219] Render the scene to be rendered after the removal process.

[0220] This application also provides a computer-readable storage medium for storing a computer program that executes any one of the implementation methods of the scene rendering method described in the foregoing embodiments.

[0221] This application also provides a computer program product or computer program that 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 any one of the scene rendering methods described in the foregoing embodiments.

[0222] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0223] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

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

[0225] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0226] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0227] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0228] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A scene rendering method, characterized in that, The method includes: Obtain the scene to be rendered, which includes a collection of objects to be rendered; A static object set is determined by removing skeletal objects and animation objects from the set of objects to be rendered, wherein the skeletal object is an object with a skeletal framework and whose vertex position changes dynamically with the movement of the skeletal framework, and the animation object is an object that undergoes one of the transformations of movement, rotation, and scaling. The scene to be rendered after removing the set of static objects is determined. The scene to be rendered after the removal is then rendered.

2. The method according to claim 1, characterized in that, The rendering of the scene to be rendered after removal includes: The scene to be rendered after removal is rendered based on the frame difference between the current frame and the first reference frame of the scene to be rendered and the preset rendering frequency, wherein the first reference frame is a historical frame used to render the scene to be rendered after removal.

3. The method according to claim 2, characterized in that, The step of rendering the scene after removal based on the frame difference between the current frame and the first reference frame of the scene to be rendered and a preset rendering frequency includes: When the viewpoint position of the current frame is different from that of the previous frame, the scene to be rendered after removal is rendered according to the frame number difference between the current frame and the first reference frame of the scene to be rendered and the preset rendering frequency.

4. The method according to claim 3, characterized in that, After determining that the viewpoint position of the current frame is different from the viewpoint position of the previous frame, the method further includes: The movement rate of the viewpoint is determined based on the viewpoint position of the current frame and the viewpoint position of the previous frame. The preset drawing frequency is adjusted according to the movement rate of the viewpoint position, wherein the movement rate and the preset drawing frequency are negatively correlated. The step of rendering the scene after removal based on the frame difference between the current frame and the first reference frame of the scene to be rendered and a preset rendering frequency includes: The scene to be rendered after removal is rendered based on the frame difference between the current frame and the first reference frame of the scene to be rendered and the adjusted preset rendering frequency.

5. The method according to claim 3, characterized in that, The method further includes: When the view position of the current frame is the same as the view position of the previous frame, the frame difference between the current frame and the second reference frame is determined, wherein the second reference frame is the previous frame in which the scene to be rendered was rendered and the view position is the same as the view position of the current frame. When the frame number difference between the current frame and the second reference frame is greater than or equal to a preset frame number threshold, the scene to be rendered is rendered.

6. The method according to claim 1, characterized in that, The method for determining the set of objects to be rendered is as follows: Obtain the viewport boundary of the current frame of the scene to be rendered, and the object boundary of all objects in the current frame, wherein all objects in the current frame include the first target object; When the object boundary of the first target object is located inside the viewport boundary of the current frame, or when the object boundary of the first target object intersects with the viewport boundary of the current frame, it is determined that the set of objects to be rendered includes the first target object.

7. The method according to any one of claims 1-6, characterized in that, The process of obtaining the scene to be rendered includes: Get the first and second frames of the scene to be rendered; The process of determining the static object set by removing skeletal objects and animation objects from the set of objects to be rendered includes: The static object set is determined by removing skeletal objects and animation objects from the set of objects to be rendered in the first frame of the scene to be rendered; The step of determining the rendered scene after removing the set of static objects from the rendered scene includes: The first frame of the scene to be rendered after removing the set of static objects is determined. The rendering of the scene to be rendered after removal includes: Render the first frame and the second frame of the scene to be rendered after the removal.

8. A scene rendering device, characterized in that, The device includes: a scene acquisition module, an object determination module, a scene determination module, and a scene rendering module; The scene acquisition module is used to acquire the scene to be rendered, which includes a set of objects to be rendered; The object determination module is used to determine a static object set by removing skeletal objects and animation objects from the set of objects to be rendered, wherein the skeletal object is an object with a skeletal framework and whose vertex position changes dynamically with the movement of the skeletal framework, and the animation object is an object that undergoes one of the transformations of movement, rotation and scaling; The scene determination module is used to determine the scene to be rendered after removing the set of static objects from the scene to be rendered. The scene rendering module is used to render the scene to be rendered after the removal.

9. A computer device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the steps of the scene rendering method according to any one of claims 1 to 7, based on the instructions in the program code.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for performing the steps of the scene rendering method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program or instructions that, when executed by a computer device, implement the steps of the scene rendering method according to any one of claims 1 to 7.