Volume cloud rendering method and device, equipment and storage medium

By using frame segmentation technology and semi-octahedral mapping, combined with jitter sampling and historical frame blending, the problem of high performance consumption in volumetric cloud rendering is solved, achieving efficient rendering and reducing GPU load and the risk of stuttering.

CN121937601APending Publication Date: 2026-04-28GUANGZHOU SNAP FINGER UNIVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU SNAP FINGER UNIVERSE TECH CO LTD
Filing Date
2025-12-08
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, volumetric cloud rendering consumes a lot of performance, resulting in an excessive burden on the GPU.

Method used

By breaking down the volumetric cloud rendering task into multiple subtasks and completing them step by step across multiple video frames, and by employing frame splitting technology and semi-octahedral mapping, combined with jitter sampling and historical frame mixing, the rendering burden of each frame is reduced.

Benefits of technology

It significantly reduces the rendering burden per frame, avoids stuttering, improves rendering efficiency, is suitable for different screen resolutions, and facilitates the formulation of device-level strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937601A_ABST
    Figure CN121937601A_ABST
Patent Text Reader

Abstract

The invention relates to a volume cloud rendering method and device, equipment and a storage medium, and the method comprises the steps: creating a rendering target of a to-be-rendered volume cloud, and obtaining a target video corresponding to the to-be-rendered volume cloud; determining a preset frame number corresponding to the octahedral texture of the volume cloud to be rendered during framing updating; obtaining a texture updating task corresponding to the rendering target, and splitting the texture updating task into the preset frame number of subtasks; for a current frame in the target video, based on the identifier of the current frame and the preset frame number, determining a rendering area of the current frame and a current subtask corresponding to the rendering area; and updating the rendering area based on the current subtask, and rendering and generating a volume cloud image corresponding to the current frame based on an updating result. Through the framing technology, texture updating is only carried out in the local area of each video frame, the volume cloud image is rendered and generated, and the performance consumption in the volume cloud rendering process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a volumetric cloud rendering method, apparatus, device, and storage medium. Background Technology

[0002] Volumetric clouds, also known as volumetric fog, are typically used in rendering virtual scenes (such as game scenes) to simulate the semi-transparent, irregular appearance of real clouds and fog. Volumetric cloud rendering is a key technology in modern game engines for enhancing environmental realism. It creates a three-dimensional and dynamically changing sky landscape by simulating the scattering and absorption of light within clouds. Real-time volumetric cloud rendering usually employs ray stepping technology, emitting rays from the camera, progressively sampling cloud density and calculating lighting effects. Light passing through a volume may be scattered by particles within that volume; this light effect is called multiple scattering, which forms the shape of the cloud. However, this method requires dozens or even hundreds of texture samples and a large amount of lighting calculations per pixel, placing a significant burden on the GPU. Summary of the Invention

[0003] This disclosure provides a volumetric cloud rendering method, apparatus, device, and storage medium to at least solve the problem of high performance consumption during volumetric cloud rendering in related technologies. The technical solution of this disclosure is as follows: According to a first aspect of the present disclosure, a volumetric cloud rendering method is provided, comprising: Create a rendering target for the volumetric cloud to be rendered, and obtain the target video corresponding to the volumetric cloud to be rendered; Determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; Obtain the texture update task corresponding to the rendering target, and split the texture update task into the preset number of sub-tasks; For the current frame in the target video, based on the identifier of the current frame and the preset frame number, the rendering area of ​​the current frame and the current subtask corresponding to the rendering area are determined; The rendering region is updated based on the current subtask, and a volumetric cloud image corresponding to the current frame is generated based on the update result.

[0004] In one exemplary implementation, updating the rendering region based on the current subtask and rendering the volumetric cloud image corresponding to the current frame based on the update result includes: Obtain the texture coordinates of the rendering area; The texture coordinates of the rendering area are mapped to a semi-octahedron to obtain the three-dimensional texture coordinates corresponding to the rendering area. The update result is obtained based on the current subtask and the three-dimensional texture coordinates; Based on the update result, a volumetric cloud image corresponding to the current frame is rendered and generated.

[0005] In one exemplary implementation, obtaining the update result based on the current subtask and the 3D texture coordinates includes: Obtain the current texture information corresponding to the current subtask; Render a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; Obtain the historical volumetric cloud results of the upper hemisphere of the historical frames in the target video that are located before the current frame; Based on the volumetric cloud results of the upper hemisphere of the current frame and the historical volumetric cloud results, the update result of the current frame is determined.

[0006] In one exemplary embodiment, the method further includes: The first sampling point of the historical frame and the second sampling point of the current frame are determined based on dithering sampling technology. The step of rendering a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame includes: At the first sampling point, a volumetric cloud is rendered based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: At the second sampling point, the historical volumetric cloud result of the upper hemisphere of the historical frame located before the current frame in the target video is obtained.

[0007] In one exemplary implementation, determining the update result of the current frame based on the volumetric cloud result of the upper hemisphere of the current frame and the historical volumetric cloud result includes: Determine a first weight and a second weight for the historical volumetric cloud results; the first weight is greater than the second weight. Calculate the first weighted result of the historical volumetric cloud result and the first weight, and the second weighted result of the volumetric cloud result and the second weight; The updated result is determined based on the first weighted result and the second weighted result.

[0008] In one exemplary implementation, the step of rendering and generating the volumetric cloud image corresponding to the current frame based on the update result includes: Perform a semi-octahedral texture inverse mapping on the volumetric cloud texture in the updated result to obtain a two-dimensional volumetric cloud texture. Obtain the current camera view information of the current frame; Based on the two-dimensional volumetric cloud texture and the current camera view information, a volumetric cloud image corresponding to the current frame is rendered and generated.

[0009] In one exemplary embodiment, the step of rendering and generating the volumetric cloud image corresponding to the current frame based on the two-dimensional volumetric cloud texture and the current camera viewpoint information includes: Based on the current camera viewpoint information, the two-dimensional volumetric cloud texture is analyzed to obtain the illumination results, optical depth, and average transmittance of the volumetric cloud through light stepping. Based on the illumination results of the light stepping of the volumetric cloud, a first octahedron is constructed, and based on the optical depth and average transmittance of the light stepping of the volumetric cloud, a second octahedron is constructed. Based on the current camera viewpoint information, the first octahedron, and the second octahedron, a volumetric cloud image corresponding to the current frame is rendered and generated.

[0010] In one exemplary embodiment, the step of rendering and generating a volumetric cloud image corresponding to the current frame based on the current camera viewpoint information, the first octahedron, and the second octahedron includes: Based on the current camera viewpoint information and the optical depth and average transmittance in the second octahedron, the fog effect parameters and atmospheric transmittance values ​​of the current frame under the current camera viewpoint are determined. The illumination results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​are mixed to obtain the volumetric cloud value; The volumetric cloud image corresponding to the current frame is generated based on the volumetric cloud numerical values.

[0011] In one exemplary implementation, determining the rendering region of the current frame and the current subtask corresponding to the rendering region based on the identifier of the current frame and the preset frame number includes: Obtain the digital identifier of the current frame; the digital identifier of the current frame is determined based on the position of the current frame in the target video; Calculate the remainder when the numerical identifier of the current frame is divided by the preset number of frames, and determine the texture range to be updated for the current frame based on the remainder, which is then used as the rendering area; The current subtask corresponding to the rendering region is determined based on the remainder.

[0012] In one exemplary embodiment, the method further includes: The target video is parsed to obtain a set of video frames, and the identifier of each video frame is determined according to the time corresponding to each video frame in the set of video frames; Based on the preset number of frames and the identifiers of the video frames, the video frame set is divided into frames to obtain at least one video frame group; each video frame group includes the preset number of video frames, the identifiers of each video frame are consecutively numbered, and the video frames are arranged in the order of the identifiers. The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: Determine the current video frame group corresponding to the current frame, and obtain the historical video frame groups preceding the current video frame group; Obtain the current position number of the current frame in the current video group, and query the historical video frame group for a video frame that matches the current position number, and use it as a historical frame of the current frame; Obtain the historical volumetric cloud results of the upper hemisphere of the historical frame.

[0013] According to a second aspect of the present disclosure, a volumetric cloud rendering apparatus is provided, comprising: The target creation module is configured to create a rendering target for a volumetric cloud to be rendered and to obtain the target video corresponding to the volumetric cloud to be rendered. The preset frame number determination module is configured to determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update. The task splitting module is configured to execute the task of obtaining the texture update corresponding to the rendering target, and to split the texture update task into the preset number of sub-tasks; The rendering region determination module is configured to perform the following operations for the current frame in the target video: based on the identifier of the current frame and the preset frame number, determine the rendering region of the current frame and the current subtask corresponding to the rendering region. The volumetric cloud image generation module is configured to update the rendering region based on the current subtask, and render and generate the volumetric cloud image corresponding to the current frame based on the update result.

[0014] In one exemplary embodiment, the volumetric cloud image generation module includes: The texture coordinate acquisition unit is configured to acquire the texture coordinates of the rendering area; The mapping unit is configured to perform a semi-octahedral mapping of the texture coordinates of the rendering region to obtain the three-dimensional texture coordinates corresponding to the rendering region. The update result determination unit is configured to perform an update based on the current subtask and the three-dimensional texture coordinates to obtain the update result; The image rendering unit is configured to perform rendering based on the update result to generate a volumetric cloud image corresponding to the current frame.

[0015] In one exemplary embodiment, the update result determination unit includes: The current texture acquisition subunit is configured to acquire the current texture information corresponding to the current subtask. The first result determination subunit is configured to execute volumetric cloud rendering based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; The second result determination subunit is configured to perform the acquisition of historical volumetric cloud results of the upper hemisphere of historical frames in the target video that are located before the current frame; The update result determination subunit is configured to perform volumetric cloud results based on the upper hemisphere of the current frame and the historical volumetric cloud results to determine the update result of the current frame.

[0016] In one exemplary embodiment, the apparatus further includes: The sampling point determination module is configured to perform a dithering sampling technique to determine the first sampling point of the historical frame and the second sampling point of the current frame. The first result determination subunit is also configured to execute at the first sampling point, rendering a volumetric cloud based on the current texture information and the three-dimensional texture coordinates, to obtain the volumetric cloud result of the upper hemisphere of the current frame; The second result determination subunit is further configured to perform at the second sampling point to obtain the historical volumetric cloud result of the upper hemisphere of the historical frames in the target video located before the current frame.

[0017] In one exemplary implementation, the update result determination subunit is further configured to perform the following: determine a first weight and a second weight of the historical volumetric cloud result; the first weight is greater than the second weight; calculate a first weighted result of the historical volumetric cloud result and the first weight, and a second weighted result of the volumetric cloud result and the second weight; and determine the update result based on the first weighted result and the second weighted result.

[0018] In one exemplary embodiment, the volumetric cloud image generation module includes: The inverse mapping unit is configured to perform a semi-octahedral texture inverse mapping on the volumetric cloud texture in the update result to obtain a two-dimensional volumetric cloud texture. The current camera view acquisition unit is configured to acquire the current camera view information of the current frame; The rendering unit is configured to render a volumetric cloud image corresponding to the current frame based on the two-dimensional volumetric cloud texture and the current camera view information.

[0019] In one exemplary embodiment, the rendering unit includes: The illumination result determination subunit is configured to perform the parsing of the two-dimensional volumetric cloud texture based on the current camera view information to obtain the illumination result, optical depth, and average transmittance of the volumetric cloud based on the light stepping. The first construction subunit is configured to perform illumination results based on the ray stepping of the volume cloud, construct a first octahedron, and construct a second octahedron based on the optical depth and average transmittance of the ray stepping of the volume cloud. The second construction subunit is configured to render and generate a volumetric cloud image corresponding to the current frame based on the current camera view information, the first octahedron, and the second octahedron.

[0020] In one exemplary embodiment, the second construction subunit is further configured to perform the following: determine the fog effect parameters and atmospheric perspective values ​​of the current frame under the current camera view based on the current camera view information and the optical depth and average perspective in the second octahedron; mix the illumination results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​to obtain volumetric cloud values; and render and generate a volumetric cloud image corresponding to the current frame based on the volumetric cloud values.

[0021] In one exemplary embodiment, the rendering region determination module includes: The identifier acquisition unit is configured to acquire the digital identifier of the current frame; the digital identifier of the current frame is determined based on the position of the current frame in the target video. The rendering region determination unit is configured to calculate the remainder of the numerical identifier of the current frame divided by the preset number of frames, and determine the texture range to be updated in the current frame based on the remainder, as the rendering region; The subtask determination unit is configured to perform the task of determining the current subtask corresponding to the rendering region based on the remainder.

[0022] In one exemplary embodiment, the apparatus further includes: The identifier determination module is configured to parse the target video to obtain a set of video frames, and determine the identifier of each video frame based on the time corresponding to each video frame in the set of video frames; The framing module is configured to perform framing based on the preset number of frames and the identifiers of the video frames to obtain at least one video frame group; each video frame group includes the preset number of video frames, the identifiers of each video frame are consecutively numbered, and the video frames are arranged in the order of the identifiers. The second result determination subunit is further configured to perform the following: determine the current video frame group corresponding to the current frame, and obtain the historical video frame group before the current video frame group; obtain the current position number of the current frame in the current video group, and query the historical video frame group for a video frame that matches the current position number as a historical frame of the current frame; and obtain the historical volume cloud result of the upper hemisphere of the historical frame.

[0023] According to a third aspect of the present disclosure, an electronic device is provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the volumetric cloud rendering method described above.

[0024] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by an electronic device processor, enables the electronic device to perform the volumetric cloud rendering method as described above.

[0025] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the volumetric cloud rendering method as described above.

[0026] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects: This disclosure creates a rendering target for a volumetric cloud to be rendered and obtains the target video corresponding to the volumetric cloud to be rendered; determines the preset number of frames corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; obtains the texture update task corresponding to the rendering target and splits the texture update task into the preset number of sub-tasks; thereby, the texture update task can be decomposed into multiple sub-tasks, thus splitting a computationally intensive or time-consuming task that is completed in a single frame into multiple consecutive frames for gradual completion, which can significantly reduce the rendering burden per frame. For the current frame in the target video, based on the identifier of the current frame and the preset number of frames, the rendering region of the current frame and the current sub-task corresponding to the rendering region are determined; the rendering region is updated based on the current sub-task, and the volumetric cloud image corresponding to the current frame is rendered based on the update result. This disclosure utilizes frame-segmentation technology to update textures only in local areas of each video frame, generating volumetric cloud images. During frame-segmentation updates, the resolution of the rendering target is independent of the screen resolution, reducing performance consumption at different screen resolutions during volumetric cloud rendering and avoiding stuttering. It also facilitates developers in formulating device-level strategies based on the number of frames.

[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0029] Figure 1 This is an application environment diagram illustrating a volumetric cloud rendering method according to an exemplary embodiment.

[0030] Figure 2 This is a flowchart illustrating a volumetric cloud rendering method according to an exemplary embodiment.

[0031] Figure 3 This is a flowchart illustrating a method for updating the rendering region based on the current subtask and rendering a volumetric cloud image corresponding to the current frame based on the update result, according to an exemplary embodiment.

[0032] Figure 4 This is a schematic diagram illustrating a process for performing semi-octahedral mapping on the texture coordinates of a rendering area according to an exemplary embodiment.

[0033] Figure 5 This is a flowchart illustrating a method for obtaining the update result based on the current subtask and the three-dimensional texture coordinates, according to an exemplary embodiment.

[0034] Figure 6 This is a flowchart illustrating another volumetric cloud rendering method according to an exemplary embodiment.

[0035] Figure 7 This is a block diagram illustrating a volumetric cloud rendering apparatus according to an exemplary embodiment.

[0036] Figure 8 This is a block diagram illustrating a server according to an exemplary embodiment.

[0037] Figure 9 This is a block diagram illustrating an electronic device for volumetric cloud rendering according to an exemplary embodiment. Detailed Implementation

[0038] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0039] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0040] Please see Figure 1 The diagram illustrates an application environment for a volumetric cloud rendering method according to an exemplary embodiment. The application environment may include a server 01 and a client 02.

[0041] Specifically, in the embodiments of this specification, server 01 may include a standalone server, a distributed server, or a server cluster composed of multiple servers. It may 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 (Content Delivery Network), and big data and artificial intelligence platforms. Server 01 may include a network communication unit, a processor, and a memory, etc. Specifically, server 01 can be used to create a rendering target for a volumetric cloud to be rendered, obtain the texture update task corresponding to the rendering target, and break down the texture update task into a preset number of sub-tasks; for the current frame in the target video, based on the identifier of the current frame and the preset number of frames, determine the rendering area of ​​the current frame and the current sub-task corresponding to the rendering area; update the rendering area based on the current sub-task, and render and generate the volumetric cloud image corresponding to the current frame based on the update result, and send the volumetric cloud image to client 02.

[0042] Specifically, in the embodiments of this specification, the client 02 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, and in-vehicle terminals, and may also include software running on the physical device, such as web pages provided to users by some service providers, or applications provided to users by these service providers. Specifically, the client 02 can be used to display volumetric cloud images.

[0043] Figure 2 This is a flowchart illustrating a volumetric cloud rendering method according to an exemplary embodiment, such as... Figure 2 As shown, this method can be applied to Figure 1 The server 01 shown includes the following steps.

[0044] In step S201, a rendering target for the volumetric cloud to be rendered is created, and the target video corresponding to the volumetric cloud to be rendered is obtained.

[0045] The method disclosed in this embodiment can be applied to volumetric cloud rendering scenarios in virtual engines. For example, it can be applied to volumetric cloud rendering in game scenes. The rendering target may include attribute information of the volumetric cloud to be rendered, which may include, but is not limited to, color, shape, density, and lighting. The target video may be a video in a preset business scenario. For example, the target video may be a video in a game that needs to be rendered as a volumetric cloud.

[0046] In step S203, the preset number of frames corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update is determined.

[0047] In this embodiment, a preset number of frames can be set for the octahedral texture of the volumetric cloud to be rendered during frame-by-frame updates. This preset number of frames can be determined through performance testing results from multiple experiments. For example, multiple initial frame numbers can be preset, and then frame-by-frame texture updates can be performed based on each initial frame number to obtain the volumetric cloud rendering result and performance test results. Then, based on the volumetric cloud rendering result and performance test results corresponding to each initial frame number, the preset number of frames is selected. The preset number of frames can be an initial number where both the volumetric cloud rendering result and the performance test result are satisfactory.

[0048] In step S205, the texture update task corresponding to the rendering target is obtained, and the texture update task is split into the preset number of sub-tasks.

[0049] In this embodiment, frame update splitting is an important rendering optimization technique, particularly suitable for computationally intensive effects such as volumetric clouds. Frame update splitting refers to distributing expensive computations performed within a single frame across multiple consecutive frames, thereby smoothing out performance consumption and avoiding stuttering.

[0050] In this embodiment of the disclosure, a semi-octahedral mapping technique can be used for volumetric cloud rendering. For each octahedral texture update, it can be decomposed into a preset number of sub-tasks. The octahedral texture update can include the texture update of the entire octahedral region, and can be decomposed into sub-tasks of texture update of multiple regions. Each sub-task is used to render and process part of the texture update.

[0051] In step S207, for the current frame in the target video, based on the identifier of the current frame and the preset frame number, the rendering area of ​​the current frame and the current subtask corresponding to the rendering area are determined.

[0052] In this embodiment, the target video can be parsed to obtain individual video frames, and the identifier of each video frame can be determined based on its time in the target video. This identifier can be the ID of the video frame, and can be in numerical form. Furthermore, the identifier of a video frame is proportional to its corresponding time. For example, the video frames of the target video may include a first video frame, a second video frame, ..., an Nth video frame arranged sequentially. The identifier of the first video frame can be set to the number 1, the identifier of the second video frame to the number 2, and so on, with the identifier of the Nth video frame being the number N. Then, based on the identifier of the current frame and the preset frame number, the rendering area of ​​the current frame is determined. There is a one-to-one correspondence between the texture area in the octahedron and the rendering area of ​​the video frame. The rendering area of ​​the current frame is a portion of the current frame on the screen, thereby further determining the rendering area of ​​the current frame and the current subtask corresponding to the rendering area.

[0053] In step S209, the rendering region is updated based on the current subtask, and a volumetric cloud image corresponding to the current frame is generated based on the update result.

[0054] In this embodiment of the disclosure, after the rendering region is determined, the rendering region in the current frame can be updated according to its corresponding current subtask, thereby rendering and generating the volumetric cloud image corresponding to the current frame.

[0055] This embodiment of the disclosure creates a rendering target for a volumetric cloud to be rendered and obtains the target video corresponding to the volumetric cloud to be rendered; determines the preset number of frames corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; obtains the texture update task corresponding to the rendering target and splits the texture update task into the preset number of sub-tasks; thereby, the texture update task can be decomposed into multiple sub-tasks, thus splitting a computationally intensive or time-consuming task that is completed in a single frame into multiple consecutive frames for gradual completion, which can significantly reduce the rendering burden per frame. For the current frame in the target video, based on the identifier of the current frame and the preset number of frames, the rendering region of the current frame and the current sub-task corresponding to the rendering region are determined; the rendering region is updated based on the current sub-task, and the volumetric cloud image corresponding to the current frame is rendered based on the update result. This disclosure utilizes frame-segmentation technology to update textures only in local areas of each video frame, generating volumetric cloud images. During frame-segmentation updates, the resolution of the rendering target is independent of the screen resolution, reducing performance consumption at different screen resolutions during volumetric cloud rendering and avoiding stuttering. It also facilitates developers in formulating device-level strategies based on the number of frames.

[0056] In some embodiments, determining the rendering region of the current frame and the current subtask corresponding to the rendering region based on the identifier of the current frame and the preset frame number includes: Obtain the digital identifier of the current frame; the digital identifier of the current frame is determined based on the position of the current frame in the target video; Calculate the remainder when the numerical identifier of the current frame is divided by the preset number of frames, and determine the texture range to be updated for the current frame based on the remainder, which is then used as the rendering area; The current subtask corresponding to the rendering region is determined based on the remainder.

[0057] In this embodiment, the video frames of the target video may include a first video frame, a second video frame, ..., an Nth video frame arranged in sequence. The numerical identifier of the first video frame can be set to the number 1, the numerical identifier of the second video frame can be the number 2, and so on, with the numerical identifier of the Nth video frame being the number N. Simultaneously, the octahedral texture update task can be decomposed into a preset number of texture regions, and the region identifier of each texture region can be determined. If the preset number of frames is 12, the texture update task corresponds to texture region 1, texture region 2, ..., and texture region 12, respectively. Based on the identifier of the current frame and the preset number of frames, the rendering region of the current frame is determined. It can be determined that the remainder obtained from the calculation of the first video frame is 1, so the first video frame corresponds to texture region 1; and so on, with the first video frame corresponding to texture region 1, and the twelfth video frame corresponding to texture region 12. Therefore, each texture update task can be split into a preset number of video frames for processing. There is a one-to-one correspondence between the texture regions in the octahedron and the rendering regions of the video frames. The rendering area of ​​the current frame is a portion of the current frame on the screen, which allows for further determination of the rendering area of ​​the current frame and the current subtask corresponding to the rendering area.

[0058] For example, under the default configuration, the update of the octahedral texture can be evenly distributed across 12 frames, and one part can be updated each frame using a compute shader. This allows us to use the current frame ID and the remainder of 12 (the number of frames updated in the sub-frames) to obtain the range of the texture being updated, thus determining the rendering area.

[0059] The embodiments disclosed herein utilize frame-segmentation technology to perform texture updates only in local areas of each video frame, which can significantly reduce the rendering burden per frame and reduce the computational pressure on the computing device during the rendering process.

[0060] In some embodiments, such as Figure 3 As shown, updating the rendering region based on the current subtask and rendering the volumetric cloud image corresponding to the current frame based on the update result includes: S301: Obtain the texture coordinates of the rendering area; S303: Perform a semi-octahedral mapping on the texture coordinates of the rendering area to obtain the three-dimensional texture coordinates corresponding to the rendering area; S305: Based on the current subtask and the three-dimensional texture coordinates, the update result is obtained; S307: Render and generate the volumetric cloud image corresponding to the current frame based on the update result.

[0061] In this embodiment, the texture coordinates of the rendering area can be obtained first, which are two-dimensional texture coordinates; then, a semi-octahedral mapping is performed on these texture coordinates to obtain the three-dimensional texture coordinates corresponding to the rendering area; the three-dimensional texture coordinates can be set in the form of a three-dimensional vector; then, based on the current subtask of the rendering area and the three-dimensional texture coordinates of the semi-octahedral, the update result of the volumetric cloud texture can be obtained, thereby rendering and generating the volumetric cloud image corresponding to the current frame. For example, as shown... Figure 4 As shown, Figure 4 This is a flowchart illustrating a process for mapping texture coordinates of a rendering area to a semi-octahedron. The plane corresponding to the texture coordinates of the rendering area can be first converted into a semi-octahedron, and then the semi-octahedron mapping is performed to obtain the three-dimensional texture coordinates corresponding to the rendering area.

[0062] In this embodiment, theoretically, frame-by-frame updates would cause a delay in the rendering of volumetric clouds. However, because the shape changes and translational movements of volumetric clouds are relatively slow and occur continuously, the impact of the delay is very small and almost imperceptible. Conversely, the performance gain from frame-by-frame updates is nearly 12 times, far outweighing the slight delay effect. In the Unreal Engine solution, since volumetric cloud rendering occurs from the camera's perspective, the volumetric cloud result in the current viewport is rendered immediately each frame, making frame-by-frame updates unsuitable. The octahedral texture in this embodiment records the volumetric cloud result of the complete upper hemisphere, making it very suitable for frame-by-frame update schemes. Regardless of the camera's rotation speed, the octahedral texture can provide a stable result.

[0063] In some embodiments, such as Figure 5 As shown, obtaining the update result based on the current subtask and the 3D texture coordinates includes: S501: Obtain the current texture information corresponding to the current subtask; S503: Render a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; S505: Obtain the historical volumetric cloud result of the upper hemisphere of the historical frames in the target video that are located before the current frame; S507: Based on the volumetric cloud result of the upper hemisphere of the current frame and the historical volumetric cloud result, determine the update result of the current frame.

[0064] In this embodiment, the current texture information corresponding to the current subtask can be parsed and obtained, and the current texture information is the texture information to be updated; then, a volumetric cloud is rendered based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; at the same time, the historical volumetric cloud results of the upper hemisphere of the historical frames in the target video located before the current frame can also be obtained; wherein, the method for determining the historical volumetric cloud results of the historical frames is similar to the method for determining the volumetric cloud results of the current frame; then, the volumetric cloud result of the upper hemisphere of the current frame and the historical volumetric cloud results can be fused to obtain the update result of the current frame, thereby improving the accuracy of the update result of the current frame.

[0065] In some embodiments, the method further includes: The first sampling point of the historical frame and the second sampling point of the current frame are determined based on dithering sampling technology. The step of rendering a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame includes: At the first sampling point, a volumetric cloud is rendered based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: At the second sampling point, the historical volumetric cloud result of the upper hemisphere of the historical frame located before the current frame in the target video is obtained.

[0066] In this embodiment, temporal anti-aliasing is a performance optimization technique. Its core idea is to leverage temporal continuity to reproject and blend rendering information (color, depth, etc.) from several past frames into the current frame, thereby accumulating more sampling information than allowed by the physical resolution within a single pixel. This embodiment implements dithering sampling and historical frame blending in temporal anti-aliasing. Dithering sampling is fundamental to temporal anti-aliasing. It achieves this by sampling a blue noise map to apply a random offset to the starting point of the lighting step. Since a complete texture update requires 12 frames, the starting offset is changed every 12 frames. Because the sampling point position is slightly different in each frame, historical frame blending is necessary. When the results of multiple frames are blended, it is equivalent to multiple samplings within a single pixel.

[0067] First, dithering sampling technique in temporal anti-aliasing is used to determine the first sampling point of the historical frame and the second sampling point of the current frame. Then, at the first sampling point, a volumetric cloud is rendered based on the current texture information and the 3D texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame. At the second sampling point, the historical volumetric cloud result of the upper hemisphere of the historical frame in the target video located before the current frame can be obtained. Then, the results of multiple frames are mixed, which is equivalent to sampling multiple times within a pixel. This splits a computationally intensive or time-consuming task that is completed in a single frame into multiple consecutive frames for gradual completion, which can significantly reduce the rendering burden of each frame.

[0068] In some embodiments, determining the update result of the current frame based on the volumetric cloud result of the upper hemisphere of the current frame and the historical volumetric cloud result includes: Determine a first weight and a second weight for the historical volumetric cloud results; the first weight is greater than the second weight. Calculate the first weighted result of the historical volumetric cloud result and the first weight, and the second weighted result of the volumetric cloud result and the second weight; The updated result is determined based on the first weighted result and the second weighted result.

[0069] In this embodiment of the disclosure, a first weight and a second weight of the historical volumetric cloud results can be set; the first weight is greater than the second weight; for example, the first weight can be set to 0.9 and the second weight to 0.1; then, based on the first weighted result of the historical volumetric cloud results and the first weight, and the second weighted result of the volumetric cloud results and the second weight, the texture update result of the current frame is determined.

[0070] For example, the implementation steps of frame-by-frame update in volumetric cloud rendering may include: a. Saving historical data: When rendering the current frame, the cloud rendering result (color, depth) and camera parameters of the current frame, as well as the motion vector of each pixel (used to reproject historical data to the current viewpoint). b. Reprojecting historical data: In the next frame, using the saved historical data and the camera parameters of the current frame, the cloud rendering result of the previous frame is reprojected onto the screen of the current frame. c. Blending history and current: The current frame is sampled only a small amount (e.g., half the number of samples), and then blended with the reprojected historical data (usually using a certain weight, such as the current frame accounting for 30% and historical data accounting for 70%). In this way, each frame only calculates a portion of new samples, while utilizing historical data to maintain image stability. d. Handling invalid pixels: Due to scene changes (such as object movement, rapid camera rotation), historical data may become invalid. It is necessary to detect these pixels and avoid using historical data, or increase the weight of the current frame. Frame-by-frame update can significantly reduce the rendering burden per frame.

[0071] In some embodiments, the step of rendering and generating the volumetric cloud image corresponding to the current frame based on the update result includes: Perform a semi-octahedral texture inverse mapping on the volumetric cloud texture in the updated result to obtain a two-dimensional volumetric cloud texture. Obtain the current camera view information of the current frame; Based on the two-dimensional volumetric cloud texture and the current camera view information, a volumetric cloud image corresponding to the current frame is rendered and generated.

[0072] In this embodiment, after obtaining the update result in three-dimensional coordinates, since the update result is an updated volumetric cloud texture, the volumetric cloud texture can be reverse-mapped using a semi-octahedral texture to be converted back into a two-dimensional volumetric cloud texture, thus obtaining a two-dimensional volumetric cloud texture. Since the octahedral texture only records the volumetric cloud result of the complete upper hemisphere and does not involve the camera viewpoint and the actual scene position, while the fog effect and atmospheric perspective effect depend on the pre-calculated result based on the camera viewpoint, it is necessary to obtain the current camera viewpoint information of the current frame. Then, based on the two-dimensional volumetric cloud texture and the current camera viewpoint information, the fog effect and atmospheric perspective effect are further determined, thereby rendering and generating a volumetric cloud image including fog effect and atmospheric perspective effect, improving the diversity of the display style of the volumetric cloud image.

[0073] In some embodiments, rendering the volumetric cloud image corresponding to the current frame based on the two-dimensional volumetric cloud texture and the current camera view information includes: Based on the current camera viewpoint information, the two-dimensional volumetric cloud texture is analyzed to obtain the illumination results, optical depth, and average transmittance of the volumetric cloud through light stepping. Based on the illumination results of the light stepping of the volumetric cloud, a first octahedron is constructed, and based on the optical depth and average transmittance of the light stepping of the volumetric cloud, a second octahedron is constructed. Based on the current camera viewpoint information, the first octahedron, and the second octahedron, a volumetric cloud image corresponding to the current frame is rendered and generated.

[0074] In this embodiment of the disclosure, the first octahedron is used to store the illumination results of the light stepping of the volumetric cloud, and the second octahedron is used to store the optical depth and average transmittance of the light stepping of the volumetric cloud.

[0075] In this embodiment, since the octahedral texture only records the volumetric cloud result of the complete upper hemisphere and does not involve the camera viewpoint or the actual scene position, while the fog effect and atmospheric perspective effect depend on the result pre-calculated based on the camera viewport, two octahedral textures are required: one to store the lighting result of the ray stepping of the volumetric cloud, and the other to store the optical depth and average perspective of the ray stepping. For example, the two-dimensional volumetric cloud texture can be parsed based on the current camera viewpoint information to obtain the lighting result, optical depth, and average perspective of the ray stepping of the volumetric cloud; then, based on the lighting result of the ray stepping of the volumetric cloud, a first octahedron is constructed to store the lighting result of the ray stepping of the volumetric cloud, and based on the optical depth and average perspective of the ray stepping of the volumetric cloud, a second octahedron is constructed to store the optical depth and average perspective of the ray stepping; subsequently, based on the current camera viewpoint information, the first octahedron, and the second octahedron, the volumetric cloud image corresponding to the current frame is rendered.

[0076] In some embodiments, the step of rendering and generating a volumetric cloud image corresponding to the current frame based on the current camera viewpoint information, the first octahedron, and the second octahedron includes: Based on the current camera viewpoint information and the optical depth and average transmittance in the second octahedron, the fog effect parameters and atmospheric transmittance values ​​of the current frame under the current camera viewpoint are determined. The illumination results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​are mixed to obtain the volumetric cloud value; The volumetric cloud image corresponding to the current frame is generated based on the volumetric cloud numerical values.

[0077] In this embodiment of the disclosure, volumetric clouds are typically combined with atmospheric scattering effects to enhance realism. Fog effects and atmospheric perspective are used to simulate the scattering of light in the air due to suspended particles (such as water droplets and dust), causing distant objects to appear lighter and more like the sky.

[0078] In this embodiment of the disclosure, the fog effect parameters and atmospheric perspective values ​​of the current frame under the current camera view can be determined based on the current camera view information and the optical depth and average perspective in the second octahedron; in volumetric cloud rendering, the calculation of fog effect and atmospheric perspective is usually based on the following factors: 1. Distance: The distance from the camera to the sampling point.

[0079] 2. Altitude: The altitude of the sampling point affects atmospheric density.

[0080] 3. Direction of view: The angle between the line of sight and the direction of the sun, etc.

[0081] For example, fog effects may include, but are not limited to, exponential fog that decays exponentially with distance and linear fog that varies linearly with distance.

[0082] The following is an example combining exponential fog and altitude fog, including the following steps: 1. Define the relevant parameters of fog (color, density, height attenuation, etc.).

[0083] 2. The cumulative effect of fog during the light's journey.

[0084] 3. Calculate atmospheric perspective based on the physical model.

[0085] For volumetric clouds, color and transparency are typically accumulated as light travels, while also considering fog effects. Fog can be viewed as a global occlusion and shading effect. More complex models consider light scattering in the atmosphere, which requires calculating the atmospheric illumination received at each sampling point.

[0086] Then, the lighting results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​are mixed to obtain the volumetric cloud value. For example, the fog effect parameters and atmospheric perspective values ​​under the current camera view can be mixed with the lighting results of the volumetric cloud texture to obtain the final volumetric cloud value, which is then output to the color buffer, thus completing the overall rendering of the volumetric cloud and generating a volumetric cloud image.

[0087] In some embodiments, the method further includes: The target video is parsed to obtain a set of video frames, and the identifier of each video frame is determined according to the time corresponding to each video frame in the set of video frames; Based on the preset number of frames and the identifiers of the video frames, the video frame set is divided into frames to obtain at least one video frame group; each video frame group includes the preset number of video frames, the identifiers of each video frame are consecutively numbered, and the video frames are arranged in the order of the identifiers. The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: Determine the current video frame group corresponding to the current frame, and obtain the historical video frame groups preceding the current video frame group; Obtain the current position number of the current frame in the current video group, and query the historical video frame group for a video frame that matches the current position number, and use it as a historical frame of the current frame; Obtain the historical volumetric cloud results of the upper hemisphere of the historical frame.

[0088] In this embodiment of the disclosure, a target video can be parsed to obtain a set of video frames, and the identifier of each video frame can be determined according to the time corresponding to each video frame in the set. For example, the video frames of the target video may include a first video frame, a second video frame, ..., an Nth video frame arranged in sequence. The digital identifier of the first video frame can be set to the number 1, the digital identifier of the second video frame can be the number 2, and so on, with the digital identifier of the Nth video frame being the number N. Then, the set of video frames can be divided into at least one video frame group according to a preset number of frames and the identifiers of the video frames. Each video frame group includes a preset number of video frames, and the identifiers of each video frame are consecutively numbered, with the video frames arranged in the order of their identifiers. For example, if the preset number of frames is 12, then the first video frame group includes the first video frame, the second video frame, ..., and the twelfth video frame; its corresponding identifier can be the number 1, the number 2, ..., the number 12. The second video frame group includes the thirteenth video frame, the fourteenth video frame, ..., and the twenty-fourth video frame; its corresponding identifier can be the number 13, the number 14, ..., the number 24.

[0089] Then, determine the current video frame group corresponding to the current frame, and obtain the historical video frame groups preceding the current video frame group; obtain the current position number of the current frame in the current video group, and query the historical video frame group for the video frame that matches the current position number, and use it as the historical frame of the current frame; for example, if the current frame is the thirteenth video frame in the second video frame group, then the first video frame in the first video frame group can be used as its corresponding historical frame; thereby obtaining the historical volumetric cloud result of the upper hemisphere of the historical frame, so as to accurately determine the volumetric cloud update result of the current frame.

[0090] In some embodiments, after splitting the texture update task into the preset number of sub-tasks, the method further includes: Each subtask is sequentially assigned to each video frame in the video frame group, and the corresponding texture update task is executed in each video frame.

[0091] The method further includes: The volumetric cloud results of each video frame in the video frame group are obtained and used as the execution result of the texture update task.

[0092] In this embodiment of the disclosure, after frame segmentation, each subtask can be sequentially assigned to each video frame in the video frame group, and the corresponding texture update task can be executed in each video frame. For example, the first video frame, the second video frame, ..., and the twelfth video frame all have corresponding subtasks set, thereby splitting a computationally intensive or time-consuming task that is completed in a single frame into multiple consecutive frames for gradual completion, which can significantly reduce the rendering burden of each frame. Then, the volumetric cloud results of each video frame in the video frame group are obtained as the execution result of the texture update task.

[0093] In some embodiments, such as Figure 6 As shown, Figure 6 A flowchart illustrating a volumetric cloud rendering method, including: S601: Create a rendering target for the volumetric cloud to be rendered, and obtain the target video corresponding to the volumetric cloud to be rendered; S603: Determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; obtain the texture update task corresponding to the rendering target, and split the texture update task into the preset number of sub-tasks; for the current frame in the target video, based on the identifier of the current frame and the preset frame number, determine the rendering area of ​​the current frame and the current sub-task corresponding to the rendering area. S605: Perform a semi-octahedral mapping on the texture coordinates of the rendering area to obtain the three-dimensional texture coordinates corresponding to the rendering area; obtain the update result based on the current subtask and the three-dimensional texture coordinates; S607: Render a volumetric cloud based on the current texture information corresponding to the current subtask and the three-dimensional texture coordinates, and obtain the lighting results, optical depth and average perspective of the light stepping of the volumetric cloud; S609: Obtain historical frames in the target video that are preceding the current frame from the historical frame buffer, determine the update result of the volumetric cloud texture based on the jitter sampling of temporal antialiasing, and store it in the historical frame buffer; S6011: Perform semi-octahedral texture inverse mapping on the volumetric cloud texture in the updated result to obtain a two-dimensional volumetric cloud texture; S6013: Determine the fog effect parameters and atmospheric perspective values ​​of the current frame under the current camera view based on the current camera view information of the current frame; S6015: Mixes the fog effect parameters and atmospheric perspective values ​​from the current camera viewpoint with the lighting results of the volumetric cloud texture to obtain the final volumetric cloud value, and then outputs it to the color buffer to generate a volumetric cloud image.

[0094] In this embodiment, rendering performance is significantly improved at high rendering resolutions. Thanks to the semi-octahedral mapping, volumetric cloud computing is updated frame-by-frame, and the target rendering resolution is independent of the screen resolution. While the performance consumption of the Unreal Engine solution increases with screen resolution, the consumption of this solution remains almost constant. Therefore, the advantages of this solution are more pronounced at high resolutions. For example, at 1K resolution, the original Unreal Engine solution takes 1.00ms, while the method in this embodiment takes 0.82ms; at 4K resolution, the original Unreal Engine solution takes 1.94ms, while the method in this embodiment takes 0.82ms. In this embodiment, since the volumetric cloud is calculated within the complete upper hemisphere, temporal anti-aliasing parameters with greater historical weights can be used, improving edge effects and reducing noise.

[0095] This disclosure introduces a semi-octahedral mapping method, transforming the rendering space of volumetric clouds from camera space to a complete upper hemispherical space. This provides more stable rendering results and enables subsequent frame-by-frame updates. Since the shape and position of volumetric clouds change relatively slowly, they are well-suited for frame-by-frame update techniques, distributing computationally intensive tasks from one frame across multiple frames. This significantly improves performance and makes it easy for developers to formulate device-level strategies based on the number of frames. Because volumetric clouds are calculated in a complete upper hemispherical space, independent of the viewpoint, temporal anti-aliasing parameters with greater historical weights can be used, significantly reducing noise and providing smooth rendering results even with rapid viewpoint rotation.

[0096] Figure 7 This is a block diagram illustrating a volumetric cloud rendering apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The device includes: The target creation module 710 is configured to create a rendering target for a volumetric cloud to be rendered and to obtain the target video corresponding to the volumetric cloud to be rendered. The preset frame number determination module 720 is configured to determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update. The task splitting module 730 is configured to execute the task of obtaining the texture update corresponding to the rendering target, and to split the texture update task into the preset number of sub-tasks; The rendering region determination module 740 is configured to perform the following operations for the current frame in the target video: based on the identifier of the current frame and the preset frame number, determine the rendering region of the current frame and the current subtask corresponding to the rendering region. The volumetric cloud image generation module 750 is configured to update the rendering region based on the current subtask and render the volumetric cloud image corresponding to the current frame based on the update result.

[0097] In one exemplary embodiment, the volumetric cloud image generation module includes: The texture coordinate acquisition unit is configured to acquire the texture coordinates of the rendering area; The mapping unit is configured to perform a semi-octahedral mapping of the texture coordinates of the rendering region to obtain the three-dimensional texture coordinates corresponding to the rendering region. The update result determination unit is configured to perform an update based on the current subtask and the three-dimensional texture coordinates to obtain the update result; The image rendering unit is configured to perform rendering based on the update result to generate a volumetric cloud image corresponding to the current frame.

[0098] In one exemplary embodiment, the update result determination unit includes: The current texture acquisition subunit is configured to acquire the current texture information corresponding to the current subtask. The first result determination subunit is configured to execute volumetric cloud rendering based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; The second result determination subunit is configured to perform the acquisition of historical volumetric cloud results of the upper hemisphere of historical frames in the target video that are located before the current frame; The update result determination subunit is configured to perform volumetric cloud results based on the upper hemisphere of the current frame and the historical volumetric cloud results to determine the update result of the current frame.

[0099] In one exemplary embodiment, the apparatus further includes: The sampling point determination module is configured to perform a dithering sampling technique to determine the first sampling point of the historical frame and the second sampling point of the current frame. The first result determination subunit is also configured to execute at the first sampling point, rendering a volumetric cloud based on the current texture information and the three-dimensional texture coordinates, to obtain the volumetric cloud result of the upper hemisphere of the current frame; The second result determination subunit is further configured to perform at the second sampling point to obtain the historical volumetric cloud result of the upper hemisphere of the historical frames in the target video located before the current frame.

[0100] In one exemplary implementation, the update result determination subunit is further configured to perform the following: determine a first weight and a second weight of the historical volumetric cloud result; the first weight is greater than the second weight; calculate a first weighted result of the historical volumetric cloud result and the first weight, and a second weighted result of the volumetric cloud result and the second weight; and determine the update result based on the first weighted result and the second weighted result.

[0101] In one exemplary embodiment, the volumetric cloud image generation module includes: The inverse mapping unit is configured to perform a semi-octahedral texture inverse mapping on the volumetric cloud texture in the update result to obtain a two-dimensional volumetric cloud texture. The current camera view acquisition unit is configured to acquire the current camera view information of the current frame; The rendering unit is configured to render a volumetric cloud image corresponding to the current frame based on the two-dimensional volumetric cloud texture and the current camera view information.

[0102] In one exemplary embodiment, the rendering unit includes: The illumination result determination subunit is configured to perform the parsing of the two-dimensional volumetric cloud texture based on the current camera view information to obtain the illumination result, optical depth, and average transmittance of the volumetric cloud based on the light stepping. The first construction subunit is configured to perform illumination results based on the ray stepping of the volume cloud, construct a first octahedron, and construct a second octahedron based on the optical depth and average transmittance of the ray stepping of the volume cloud. The second construction subunit is configured to render and generate a volumetric cloud image corresponding to the current frame based on the current camera view information, the first octahedron, and the second octahedron.

[0103] In one exemplary embodiment, the second construction subunit is further configured to perform the following: determine the fog effect parameters and atmospheric perspective values ​​of the current frame under the current camera view based on the current camera view information and the optical depth and average perspective in the second octahedron; mix the illumination results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​to obtain volumetric cloud values; and render and generate a volumetric cloud image corresponding to the current frame based on the volumetric cloud values.

[0104] In one exemplary embodiment, the rendering region determination module includes: The identifier acquisition unit is configured to acquire the digital identifier of the current frame; the digital identifier of the current frame is determined based on the position of the current frame in the target video. The rendering region determination unit is configured to calculate the remainder of the numerical identifier of the current frame divided by the preset number of frames, and determine the texture range to be updated in the current frame based on the remainder, as the rendering region; The subtask determination unit is configured to perform the task of determining the current subtask corresponding to the rendering region based on the remainder.

[0105] In one exemplary embodiment, the apparatus further includes: The identifier determination module is configured to parse the target video to obtain a set of video frames, and determine the identifier of each video frame based on the time corresponding to each video frame in the set of video frames; The framing module is configured to perform framing based on the preset number of frames and the identifiers of the video frames to obtain at least one video frame group; each video frame group includes the preset number of video frames, the identifiers of each video frame are consecutively numbered, and the video frames are arranged in the order of the identifiers. The second result determination subunit is further configured to perform the following: determine the current video frame group corresponding to the current frame, and obtain the historical video frame group before the current video frame group; obtain the current position number of the current frame in the current video group, and query the historical video frame group for a video frame that matches the current position number as a historical frame of the current frame; and obtain the historical volume cloud result of the upper hemisphere of the historical frame.

[0106] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0107] In one exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing processor-executable instructions; wherein, when the processor is configured to execute the instructions stored in the memory, it implements the volumetric cloud rendering method provided in any of the above embodiments.

[0108] The electronic device can be a terminal, a server, or a similar computing device. Taking a server as an example... Figure 8 This is a block diagram of a server according to an exemplary embodiment, such as... Figure 8As shown, the server 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 810 (CPUs 810 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 830 for storing data, and one or more storage media 820 (e.g., one or more mass storage devices) for storing application programs 823 or data 822. The memory 830 and storage media 820 may be temporary or persistent storage. The program stored in the storage media 820 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 810 may be configured to communicate with the storage media 820 and execute the series of instruction operations stored in the storage media 820 on the server 800. Server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input / output interfaces 840, and / or one or more operating systems 821, such as Windows Server™, Mac OSX™, Unix™, Linux™, FreeBSD™, etc.

[0109] The input / output interface 840 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 800. In one example, the input / output interface 840 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 840 may be a radio frequency (RF) module used for wireless communication with the Internet.

[0110] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 800 may also include... Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown.

[0111] In one exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 830 including instructions, which can be executed by a processor 810 of a server 800 to perform the above-described method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0112] In one exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the volumetric cloud rendering method provided in any of the above embodiments.

[0113] Figure 9 This is a block diagram illustrating an electronic device for volumetric cloud rendering according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a volumetric cloud rendering method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse. Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0114] This disclosure creates a rendering target for a volumetric cloud to be rendered and obtains the target video corresponding to the volumetric cloud to be rendered; determines the preset number of frames corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; obtains the texture update task corresponding to the rendering target and splits the texture update task into the preset number of sub-tasks; thereby, the texture update task can be decomposed into multiple sub-tasks, thus splitting a computationally intensive or time-consuming task that is completed in a single frame into multiple consecutive frames for gradual completion, which can significantly reduce the rendering burden per frame. For the current frame in the target video, based on the identifier of the current frame and the preset number of frames, the rendering region of the current frame and the current sub-task corresponding to the rendering region are determined; the rendering region is updated based on the current sub-task, and the volumetric cloud image corresponding to the current frame is rendered based on the update result. This disclosure utilizes frame-segmentation technology to update textures only in local areas of each video frame, generating volumetric cloud images. During frame-segmentation updates, the resolution of the rendering target is independent of the screen resolution, reducing performance consumption at different screen resolutions during volumetric cloud rendering and avoiding stuttering. It also facilitates developers in formulating device-level strategies based on the number of frames.

[0115] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0116] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0117] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A volumetric cloud rendering method, characterized in that, include: Create a rendering target for the volumetric cloud to be rendered, and obtain the target video corresponding to the volumetric cloud to be rendered; Determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update; Obtain the texture update task corresponding to the rendering target, and split the texture update task into the preset number of sub-tasks; For the current frame in the target video, based on the identifier of the current frame and the preset frame number, the rendering area of ​​the current frame and the current subtask corresponding to the rendering area are determined; The rendering region is updated based on the current subtask, and a volumetric cloud image corresponding to the current frame is generated based on the update result.

2. The method according to claim 1, characterized in that, The step of updating the rendering region based on the current subtask and rendering and generating a volumetric cloud image corresponding to the current frame based on the update result includes: Obtain the texture coordinates of the rendering area; The texture coordinates of the rendering area are mapped to a semi-octahedron to obtain the three-dimensional texture coordinates corresponding to the rendering area. The update result is obtained based on the current subtask and the three-dimensional texture coordinates; Based on the update result, a volumetric cloud image corresponding to the current frame is rendered and generated.

3. The method according to claim 2, characterized in that, The process of obtaining the update result based on the current subtask and the 3D texture coordinates includes: Obtain the current texture information corresponding to the current subtask; Render a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; Obtain the historical volumetric cloud results of the upper hemisphere of the historical frames in the target video that are located before the current frame; Based on the volumetric cloud results of the upper hemisphere of the current frame and the historical volumetric cloud results, the update result of the current frame is determined.

4. The method according to claim 3, characterized in that, The method further includes: The first sampling point of the historical frame and the second sampling point of the current frame are determined based on dithering sampling technology. The step of rendering a volumetric cloud based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame includes: At the first sampling point, a volumetric cloud is rendered based on the current texture information and the three-dimensional texture coordinates to obtain the volumetric cloud result of the upper hemisphere of the current frame; The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: At the second sampling point, the historical volumetric cloud result of the upper hemisphere of the historical frame located before the current frame in the target video is obtained.

5. The method according to claim 3, characterized in that, The determination of the update result for the current frame based on the volumetric cloud result of the upper hemisphere of the current frame and the historical volumetric cloud result includes: Determine a first weight and a second weight for the historical volumetric cloud results; the first weight is greater than the second weight. Calculate the first weighted result of the historical volumetric cloud result and the first weight, and the second weighted result of the volumetric cloud result and the second weight; The updated result is determined based on the first weighted result and the second weighted result.

6. The method according to claim 3, characterized in that, The step of rendering and generating the volumetric cloud image corresponding to the current frame based on the update result includes: Perform a semi-octahedral texture inverse mapping on the volumetric cloud texture in the updated result to obtain a two-dimensional volumetric cloud texture. Obtain the current camera view information of the current frame; Based on the two-dimensional volumetric cloud texture and the current camera view information, a volumetric cloud image corresponding to the current frame is rendered and generated.

7. The method according to claim 6, characterized in that, The step of rendering and generating the volumetric cloud image corresponding to the current frame based on the two-dimensional volumetric cloud texture and the current camera view information includes: Based on the current camera viewpoint information, the two-dimensional volumetric cloud texture is analyzed to obtain the illumination results, optical depth, and average transmittance of the volumetric cloud through light stepping. Based on the illumination results of the light stepping of the volumetric cloud, a first octahedron is constructed, and based on the optical depth and average transmittance of the light stepping of the volumetric cloud, a second octahedron is constructed. Based on the current camera viewpoint information, the first octahedron, and the second octahedron, a volumetric cloud image corresponding to the current frame is rendered and generated.

8. The method according to claim 7, characterized in that, The step of rendering and generating a volumetric cloud image corresponding to the current frame based on the current camera viewpoint information, the first octahedron, and the second octahedron includes: Based on the current camera viewpoint information and the optical depth and average transmittance in the second octahedron, the fog effect parameters and atmospheric transmittance values ​​of the current frame under the current camera viewpoint are determined. The illumination results in the first octahedron, the fog effect parameters, and the atmospheric perspective values ​​are mixed to obtain the volumetric cloud value; The volumetric cloud image corresponding to the current frame is generated based on the volumetric cloud numerical values.

9. The method according to claim 1, characterized in that, The step of determining the rendering region of the current frame and the current subtask corresponding to the rendering region based on the identifier of the current frame and the preset frame number includes: Obtain the digital identifier of the current frame; the digital identifier of the current frame is determined based on the position of the current frame in the target video; Calculate the remainder when the numerical identifier of the current frame is divided by the preset number of frames, and determine the texture range to be updated for the current frame based on the remainder, which is then used as the rendering area; The current subtask corresponding to the rendering region is determined based on the remainder.

10. The method according to claim 3, characterized in that, The method further includes: The target video is parsed to obtain a set of video frames, and the identifier of each video frame is determined according to the time corresponding to each video frame in the set of video frames; Based on the preset number of frames and the identifiers of the video frames, the video frame set is divided into frames to obtain at least one video frame group; each video frame group includes the preset number of video frames, the identifiers of each video frame are consecutively numbered, and the video frames are arranged in the order of the identifiers. The step of obtaining the historical volumetric cloud results of the upper hemisphere of historical frames in the target video preceding the current frame includes: Determine the current video frame group corresponding to the current frame, and obtain the historical video frame groups preceding the current video frame group; Obtain the current position number of the current frame in the current video group, and query the historical video frame group for a video frame that matches the current position number, and use it as a historical frame of the current frame; Obtain the historical volumetric cloud results of the upper hemisphere of the historical frame.

11. A volumetric cloud rendering device, characterized in that, include: The target creation module is configured to create a rendering target for a volumetric cloud to be rendered and to obtain the target video corresponding to the volumetric cloud to be rendered. The preset frame number determination module is configured to determine the preset frame number corresponding to the octahedral texture of the volumetric cloud to be rendered during frame-by-frame update. The task splitting module is configured to execute the task of obtaining the texture update corresponding to the rendering target, and to split the texture update task into the preset number of sub-tasks; The rendering region determination module is configured to perform the following operations for the current frame in the target video: based on the identifier of the current frame and the preset frame number, determine the rendering region of the current frame and the current subtask corresponding to the rendering region. The volumetric cloud image generation module is configured to update the rendering region based on the current subtask, and render and generate the volumetric cloud image corresponding to the current frame based on the update result.

12. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the volumetric cloud rendering method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by an electronic device processor, the electronic device is able to perform the volumetric cloud rendering method as described in any one of claims 1-10.

14. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the volumetric cloud rendering method according to any one of claims 1-10.