Animation data caching method and animation rendering method

By subcontracting the cached data according to the preset capacity threshold during particle animation cache, the problems of bloated cache files and management difficulties under high-end visual effects are solved, and a more efficient animation rendering and production process is achieved.

CN118710778BActive Publication Date: 2025-03-18YOUKU CULTURE TECH (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410620810.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2025-03-18
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

The size of the particle animation cache data file with high-end visual effects has increased exponentially, resulting in bloated cache files, slow loading, and difficult management, increasing the number of developers' invalid waiting time and the probability of software crash.

Method used

Using the animation data caching method, by obtaining the single package capacity threshold in the preset cache parameters, during the particle animation cache process, a cache package is generated whenever the cache package reaches the capacity threshold and stored in the preset folder until all cache packages are stored, forming a cache file set.

Benefits of technology

Through subcontracting management, the system memory usage of a single cache file is reduced, the number of rendered objects on the same screen is increased, the cache reading time and the probability of software crashes are reduced, and the animation production efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710778B_ABST
    Figure CN118710778B_ABST
Patent Text Reader

Abstract

This specification provides an animation data caching method and an animation rendering method. The animation data caching method manages cache data by sub-packaging, splitting a single large cache file into multiple small cache packages, so that in the subsequent rendering process, only a single cache package data needs to be loaded each time, which greatly reduces the occupation of system memory space, increases the number of objects rendered on the same screen, reduces the cache reading time and the probability of software crashes, and improves animation production efficiency. At the same time, a self-parsing packet header information configuration structure is set inside the cache package, which can realize the integrity check of cache data and content deserialization reconstruction on any digital content production DCC software, thereby providing a solution for external software to repair cache interspersed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of animation production technology, and in particular, to an animation data caching method and an animation rendering method. Background Art

[0002] Animation cache is a data storage method in 3D digital content production software. In animation production, the simulation results of the particle system or other animation data can be pre-calculated and stored in the form of cache, so that when rendering the animation, the data in the cache can be directly read and used to speed up the rendering of the animation, avoiding the need to repeat the simulation of particle behavior each time, saving computing resources and time.

[0003] However, as people's demand for high-end visual effects continues to increase, large-scale object particle animation effects are urgently needed, which leads to an exponential growth in the size of cache data files. This will inevitably lead to bloated cache files, slow loading, and difficult management, and increase developers' ineffective waiting time and the probability of software crashes. Summary of the invention

[0004] In order to solve the problems of bloated cache data monomers, inefficient management and reading and writing of high-end visual effect particle animations, one or more embodiments of this specification provide an animation data caching method and device, an animation rendering method and device, an electronic device, a storage medium, and a computer program product.

[0005] In a first aspect, one or more embodiments of this specification provide an animation data caching method, comprising:

[0006] Acquire preset cache parameters, wherein the preset cache parameters include a single packet capacity threshold, and the single packet capacity threshold is used to configure the storage capacity of a single cache packet of the particle animation;

[0007] During the process of caching and recording the particle animation, when the storage capacity of the cached animation data in the currently recorded cache package reaches the single package capacity threshold, a cache package is generated, the cache package including the cached animation data and configuration data, the configuration data being used to indicate package body information of the cache package;

[0008] The generated cache package is stored in a preset folder, and the recording of the next cache package is started until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation.

[0009] In some embodiments, the configuration data includes a file format verification value corresponding to the cache package and cache deserialization reconstruction configuration information, the file format verification value is used to verify the file format of the cache package, and the cache deserialization reconstruction configuration information is used to record the packet header data of the cache package.

[0010] In some implementations, the packet header data includes version number information of the cache packet, cache management object file path of the particle animation, and single-frame particle information of the animation data in the cache packet;

[0011] The cached animation data includes particle position information corresponding to each frame of animation and / or particle velocity information corresponding to each frame of animation.

[0012] In some implementations, storing the generated cache package in a preset folder includes:

[0013] When starting to cache the particle animation, creating the preset folder based on the cache management object file path of the particle animation;

[0014] During the process of caching and recording the particle animation, the cache packages corresponding to the particle animation are stored in the preset folder, and each cache package is named in order based on a preset naming rule.

[0015] In some embodiments, the method exemplified in this specification further includes:

[0016] Generate an information hash value corresponding to each cache package based on the animation data corresponding to the cache package;

[0017] The information hash value corresponding to each cache package is configured in the cache management object file of the particle animation.

[0018] In some implementations, the process of caching and recording the particle animation includes:

[0019] Configuring the animation sequence corresponding to the particle animation on the cached animation recording track;

[0020] During the process of caching and recording the particle animation, the cursor is controlled to slide frame by frame on the animation sequence, and the animation data corresponding to each frame of animation indicated by the cursor is cached in the currently recorded cache package.

[0021] In a second aspect, one or more embodiments of this specification provide an animation rendering method, including:

[0022] In response to a user operation instruction, importing a cache management object file corresponding to the particle animation into a processing engine;

[0023] During the particle animation playback process, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, each cache package contains part of the animation data of the particle animation and configuration data corresponding to the cache package, and the configuration data is used to indicate the package body information of the cache package;

[0024] The particle animation is rendered and played based on each of the cache packages in the cache file set.

[0025] In some implementations, the cache file set corresponding to the particle animation is obtained based on the method of any of the aforementioned implementations.

[0026] In some implementations, during the particle animation playback process, reading and loading each cache package from a cache file set corresponding to the particle animation based on the cache management object file includes:

[0027] During the particle animation playback process, based on the cache management object file, a first cache package and a second cache package are read and loaded in parallel by multiple threads from a cache file set corresponding to the particle animation, wherein the second cache package is adjacent to the first cache package and is located downstream of the first cache package;

[0028] Rendering and playing the particle animation based on each cache package in the cache file set includes:

[0029] In response to the completion of rendering and playback of the first cache package, the cache management object file reads and loads a third cache package from the cache file set, wherein the third cache package is adjacent to the second cache package and is located downstream of the second cache package, until rendering and playback of all cache packages in the cache file set are completed.

[0030] In some implementations, during the particle animation playback process, reading and loading each cache package from a cache file set corresponding to the particle animation based on the cache management object file includes:

[0031] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain a file format check value corresponding to the cache package;

[0032] In response to the file format check value passing verification, determining a first information hash value based on the animation data stored in the cache package obtained by parsing;

[0033] Determine a second information hash value corresponding to the cache package based on a cache management object file corresponding to the particle animation;

[0034] In response to the first information hash value and the second information hash value matching each other, the cache package is read and loaded.

[0035] In some implementations, during the particle animation playback process, reading and loading each cache package from a cache file set corresponding to the particle animation based on the cache management object file includes:

[0036] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain the version number information included in the cache deserialization reconstruction configuration information of the cache package;

[0037] The animation data to be read in the cache package is determined based on the version number information, and the animation data to be read is read and loaded.

[0038] In some implementations, in response to a user operation instruction, importing a cache management object file corresponding to the particle animation into a processing engine includes:

[0039] In response to a user operation instruction, a cached animation recording track is added on the operation interface of the processing engine, and an animation sequence corresponding to the particle animation is placed on the cached animation recording track based on the cache management object file.

[0040] In some embodiments, the method exemplified in this specification further includes:

[0041] During the particle animation playback process, in response to detecting the playback progress selected by the user on the cached animation recording track, determining a target cache package to be played based on the playback progress;

[0042] The target cache package is read and loaded, and the cache frame corresponding to the playback progress in the target cache package is jumped to start rendering and playback.

[0043] In some embodiments, the method exemplified in this specification further includes:

[0044] During the particle animation playback process, in response to detecting a cache interval segment selected by a user on the cache animation recording track, determining one or more cache packages to be exported based on the cache interval segment;

[0045] In response to detecting a user export instruction, the one or more cache packages are exported.

[0046] In a third aspect, one or more embodiments of this specification provide an animation data caching device, including:

[0047] A parameter acquisition module is configured to acquire preset cache parameters, wherein the preset cache parameters include a single packet capacity threshold, and the single packet capacity threshold is used to configure the storage capacity of a single cache packet of the particle animation;

[0048] The packet caching module is configured to generate a cache package when the storage capacity of the cached animation data in the currently recorded cache package reaches the single package capacity threshold during the process of caching the particle animation, wherein the cache package includes the cached animation data and configuration data, and the configuration data is used to indicate the package body information of the cache package;

[0049] The file cache module is configured to store the generated cache package in a preset folder and start recording the next cache package until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation.

[0050] In some embodiments, the configuration data includes a file format verification value corresponding to the cache package and cache deserialization reconstruction configuration information, the file format verification value is used to verify the file format of the cache package, and the cache deserialization reconstruction configuration information is used to record the packet header data of the cache package.

[0051] In some implementations, the packet header data includes version number information of the cache packet, cache management object file path of the particle animation, and single-frame particle information of the animation data in the cache packet;

[0052] The cached animation data includes particle position information corresponding to each frame of animation and / or particle velocity information corresponding to each frame of animation.

[0053] In some implementations, the file cache module is configured to:

[0054] When starting to cache the particle animation, creating the preset folder based on the cache management object file path of the particle animation;

[0055] During the process of caching and recording the particle animation, the cache packages corresponding to the particle animation are stored in the preset folder, and each cache package is named in order based on a preset naming rule.

[0056] In some implementations, the packet caching module is configured to:

[0057] Generate an information hash value corresponding to each cache package based on the animation data corresponding to the cache package;

[0058] The information hash value corresponding to each cache package is configured in the cache management object file of the particle animation.

[0059] In some implementations, the packet caching module is configured to:

[0060] Configuring the animation sequence corresponding to the particle animation on the cached animation recording track;

[0061] During the process of caching and recording the particle animation, the cursor is controlled to slide frame by frame on the animation sequence, and the animation data corresponding to each frame of animation indicated by the cursor is cached in the currently recorded cache package.

[0062] In a fourth aspect, an embodiment of the present specification provides an animation rendering device, including:

[0063] A cache import module is configured to import a cache management object file corresponding to the particle animation into the processing engine in response to a user operation instruction;

[0064] A cache loading module is configured to read and load each cache package from the cache file set corresponding to the particle animation based on the cache management object file during the particle animation playback process, each cache package containing part of the animation data of the particle animation and configuration data corresponding to the cache package, wherein the configuration data is used to indicate the package body information of the cache package;

[0065] The animation rendering module is configured to render and play the particle animation based on each of the cache packages in the cache file set.

[0066] In some implementations, the cache loading module is configured to:

[0067] During the particle animation playback process, based on the cache management object file, a first cache package and a second cache package are read and loaded in parallel by multiple threads from a cache file set corresponding to the particle animation, wherein the second cache package is adjacent to the first cache package and is located downstream of the first cache package;

[0068] The animation rendering module comprises:

[0069] In response to the completion of rendering and playback of the first cache package, the cache management object file reads and loads a third cache package from the cache file set, wherein the third cache package is adjacent to the second cache package and is located downstream of the second cache package, until rendering and playback of all cache packages in the cache file set are completed.

[0070] In some implementations, the cache loading module is configured to:

[0071] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain a file format check value corresponding to the cache package;

[0072] In response to the file format check value passing verification, determining a first information hash value based on the animation data stored in the cache package obtained by parsing;

[0073] Determine a second information hash value corresponding to the cache package based on a cache management object file corresponding to the particle animation;

[0074] In response to the first information hash value and the second information hash value matching each other, the cache package is read and loaded.

[0075] In some implementations, the cache loading module is configured to:

[0076] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain the version number information included in the cache deserialization reconstruction configuration information of the cache package;

[0077] The animation data to be read in the cache package is determined based on the version number information, and the animation data to be read is read and loaded.

[0078] In some implementations, the cache import module is configured to:

[0079] In response to a user operation instruction, a cached animation recording track is added on the operation interface of the processing engine, and an animation sequence corresponding to the particle animation is placed on the cached animation recording track based on the cache management object file.

[0080] In some implementations, the animation rendering module is configured to:

[0081] During the particle animation playback process, in response to detecting the playback progress selected by the user on the cached animation recording track, determining a target cache package to be played based on the playback progress;

[0082] The target cache package is read and loaded, and the cache frame corresponding to the playback progress in the target cache package is jumped to start rendering and playback.

[0083] In some implementations, the animation rendering module is configured to:

[0084] During the particle animation playback process, in response to detecting a cache interval segment selected by a user on the cache animation recording track, determining one or more cache packages to be exported based on the cache interval segment;

[0085] In response to detecting a user export instruction, the one or more cache packages are exported.

[0086] In a fifth aspect, an embodiment of the present specification provides an electronic device, including:

[0087] Processor; and

[0088] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.

[0089] In a sixth aspect, an embodiment of this specification provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the aforementioned embodiments.

[0090] In a seventh aspect, an embodiment of this specification provides a computer program product, which implements the method described in any of the aforementioned embodiments when running.

[0091] The animation data caching method of the embodiment of the present specification includes obtaining preset cache parameters. During the particle animation caching process, whenever it is detected that the storage capacity of the cached animation data in the current cache package reaches the single package capacity threshold, a cache package is generated based on the cached animation data and configuration data, and the generated cache package is stored in a preset folder until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation. By sub-packetizing the cache data, a single large-volume cache file is divided into multiple small-volume cache data packets, so that in the subsequent rendering process, only a single cache package data needs to be loaded each time, which greatly reduces the occupation of system memory space, increases the number of objects rendered on the same screen, reduces the cache reading time and the probability of software crash, and improves animation production efficiency. At the same time, the configuration data of the cache header is set inside the cache package, and the integrity check and content deserialization reconstruction of the cache data can be realized on any digital content production DCC software, thereby providing a solution for external software to repair cache interspersed. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 is a flowchart of an animation data caching method in some implementation modes of this specification.

[0093] Figure 2 It is a schematic diagram of the animation data caching method in some implementation methods of this specification.

[0094] Figure 3 It is a schematic diagram of the animation data caching method in some implementation methods of this specification.

[0095] Figure 4 It is a schematic diagram of the animation data caching method in some implementation methods of this specification.

[0096] Figure 5 is a flowchart of an animation data caching method in some implementation modes of this specification.

[0097] Figure 6 It is a schematic diagram of the animation data caching method in some implementation methods of this specification.

[0098] Figure 7 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0099] Figure 8 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0100] Fig. 9 It is a schematic diagram of the animation rendering method in some implementation methods of this specification.

[0101] Fig.10 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0102] Fig.11 It is a schematic diagram of the animation rendering method in some implementation methods of this specification.

[0103] Fig.12 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0104] Fig.13 It is a schematic diagram of the animation rendering method in some implementation methods of this specification.

[0105] Fig.14 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0106] Fig.15 is a flowchart of an animation rendering method in some implementation modes of this specification.

[0107] Fig.16 It is a structural block diagram of an animation data caching device in some implementation modes of this specification.

[0108] Fig.17 It is a structural block diagram of an animation rendering device in some implementation modes of this specification.

[0109] Fig.18 It is a structural block diagram of an electronic device in some implementation modes of this specification. DETAILED DESCRIPTION

[0110] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0112] With the continuous development of computer animation (CA) technology, 3D animation has gradually become the mainstream in the industry. Nowadays, there are more and more 3D digital content production software, which provides more possibilities for the production of 3D animation. Taking Unreal Engine (UE) as an example, UE provides a powerful Chaos physics system and Niagara particle system, which can be better used to simulate particle motion based on certain physical laws such as cloth, flame, water, fireworks, etc.

[0113] The particle system is different from the traditional 3D point-line-surface modeling method. It splits the simulated scene assets into many tiny particles that walk randomly. Each particle has its own physical characteristics (such as speed, position, color, etc.) and will continuously calculate subsequent state changes over time, so as to dynamically simulate the changes of physical phenomena. The basic idea of ​​the particle system is to split the scene assets to be simulated into a large number of point particles, and simulate the movement trajectories of a large number of particles based on the laws of objects to show the dynamic changes of the scene.

[0114] Cache files are a form of data storage in 3D digital content production software. During the animation production process, the simulation results of the particle system or other animation data can be pre-calculated and stored in the form of cache, so that when rendering the animation, the data in the cache can be directly read and used to speed up the rendering of the animation, avoiding the need to repeat the simulation of particle behavior each time, saving computing resources and time.

[0115] However, with the rapid development of digital entertainment industries such as games, animation, film and television, people are increasingly pursuing extremely clear image quality, complex and detailed scene assets, and stunning visual effects, which inevitably leads to an exponential growth in the cache data of particle animation.

[0116] In the related art, the caching solution of particle animation is usually stored in the form of a single large file. For example, taking Alembic (an animation sequence cache file format) cache file as an example, for high-precision multi-layer cloth animation, the volume of a single Alembic cache file may reach tens or even more than 100 GB.

[0117] On the one hand, the hardware resources on the user side are limited, and loading too large cache files may cause the runtime software to crash. On the other hand, various digital content creation (DCC) software (such as Maya, Houdini, Blender, etc.) takes a long time to read and load cache files. Some software (such as UE) even needs to convert the cache to its own format, which greatly increases the developer's ineffective waiting time, resulting in a long animation production process cycle and low efficiency.

[0118] Based on this, one or more embodiments of the present specification provide an animation data caching method and device, an animation rendering method and device, an electronic device, a storage medium, and a computer program, which aim to realize automatic splitting and storage of cache data of particle animation, splitting a single large-capacity cache file into multiple small-capacity cache packages, and designing a management and scheduling strategy for the sub-packages, so that when reading the cache, a single cache package can be read in intelligent fragments, reducing the occupancy and consumption of memory resources, and significantly increasing the number of objects rendered on the same screen to ensure the presentation of the richest possible scene details, reduce the invalid waiting time in the process of developing and scheduling cache data, and improve animation production efficiency.

[0119] In some embodiments, this specification provides an animation data caching method, which can be applied to UE or other DCC software and presented in the form of a software function or plug-in. That is, the producer can click on the function or plug-in interface in the software to trigger the animation data caching method described in this specification.

[0120] Animation data refers to the data corresponding to the animation created by the producer through three-dimensional animation software. In the implementation mode of this specification, the animation data is the particle animation data corresponding to the scene animation simulated by the particle system. Particle animation is a computer graphics technology that creates visual effects by simulating the behavior of a large number of small particles. It can be an animation corresponding to objects such as cloth, grass, water, and flames. The animation data of the particle animation includes data corresponding to multiple consecutive frames of animation, and each frame of data includes the behavior data of the particle cluster that makes up the frame of animation.

[0121] In animation production, the animation data corresponding to the particle animation can be pre-calculated and stored in the form of a cache, so that in the subsequent animation rendering process, the animation data in the cache package can be directly read and used to accelerate the rendering of the particle animation without repeatedly calculating the particle behavior. The process of caching the animation data of the particle animation is the cache recording process of the animation data described in this manual.

[0122] like Figure 1 As shown, in some implementations, the animation data caching method of the example in this specification includes:

[0123] S110: Obtain preset cache parameters.

[0124] In the implementation manner of this specification, the producer can prepare the particle animation in advance. For example, the producer can prepare the particle animation through DCC software such as UE, Maya, Houdini, etc., and then cache and record the animation data corresponding to the particle animation.

[0125] In some implementations, Unreal Engine UE is taken as an example, and the particle animation is taken as cloth animation. The animation data caching method of this specification can be presented as a software function in UE. After the producer uses UE to make particle animation, or uses other DCC software to make particle animation and imports it into UE, the producer can trigger the data caching process of the particle animation by clicking the cache function in the UE interface.

[0126] For example Figure 2 The software interface for executing the caching method of this specification is shown, see Figure 2 As shown, the user interface 100 includes a scene display window 101 and a cached animation recording track 102. The scene display window 101 is used to display a single-frame animation rendering result, such as Figure 2 The particle animation is a cloth animation, and the scene display window 101 can render and output a single-frame animation result of the cloth. The cached animation recording track 102 refers to the animation cache data production track (Sequencer). The animation sequence 103 of the particle animation can be mounted on the cached animation recording track 102, thereby realizing various operations such as cache recording, playback, and splitting of animation data. The physical simulation frame rate and length corresponding to the cached animation recording track 102 can be determined in combination with the specific animation configuration information, and there is no restriction on this.

[0127] Taking the data caching process as an example, the user can drag the animation sequence 103 of the particle animation to be cached to the cache animation recording track 102, for example Figure 2 In this example, the animation sequence of the particle animation is t0~t n Length frame sequence, and then the caching process of particle animation can be started according to user instructions.

[0128] Continue to refer to Figure 2 When the particle animation is cached or played, the cursor 104 above the animation sequence 103 moves on the animation sequence 103 along with the currently displayed frame animation, that is, the frame sequence position indicated by the cursor 104 is the position corresponding to the current frame animation displayed on the scene display window 101. For example, taking data caching as an example, as the caching process continues, the cursor 104 slides frame by frame from the leftmost side of the animation sequence to the rightmost side, thereby storing the animation data frame by frame in the cache package.

[0129] In the implementation mode of this specification, before the data cache starts, it is necessary to set the preset cache parameters, which are used to configure the data cache process. The preset cache parameters can be manually configured by the user or configured by default by the computer system. It should be noted that in the implementation mode of this specification, during the caching process of the particle animation, the animation data of the entire particle animation is not cached in a cache file, but the animation data of the particle animation needs to be cached in packets, thereby reducing the storage capacity of a single cache package.

[0130] Therefore, in the implementation of this specification, the preset cache parameters need to include at least a single packet capacity threshold, which indicates the upper limit of the disk storage capacity of a single cache package of the particle animation during the cache recording process, that is, the maximum storage capacity of each cache package in the multiple cache packages obtained after caching will not exceed the single packet capacity threshold. For example, in some examples, the single packet capacity threshold can be set to any capacity size such as 256MB, 512MB, 1GB, 2GB, 5GB, etc., and this specification does not limit this.

[0131] In some embodiments, the preset cache parameters may include not only a single packet capacity threshold, but also include, for example, a physical simulation animation frame rate, whether to cache particle speed, etc. The physical simulation animation frame rate refers to the number of animation frames simulated per second, and whether to cache particle speed refers to whether the particle speed information is included in the cache file. In one example, before the particle animation starts caching, the UE may output a display configuration interface to the user, and the user may enter parameters such as a single packet capacity threshold, a physical simulation animation frame rate, whether to cache particle speed, etc. in the configuration interface, thereby obtaining the cache preset parameters entered by the user. Those skilled in the art may understand this, and this specification will not elaborate on it.

[0132] S120: During the process of caching and recording the particle animation, when the storage capacity of the cached animation data in the currently recorded cache package reaches a single package capacity threshold, a cache package is generated.

[0133] After configuring the preset cache parameters, you can choose to start data caching. Figure 2 For example, during the data caching process, the cursor 104 starts from the t0th frame and moves to the t n Frame sliding, whenever the cursor 104 points to a certain frame of animation, the single frame animation data corresponding to the frame of animation can be stored in the cache package.

[0134] In some embodiments, the storage location and path of the cache package can be pre-configured by the user. For example, the user can pre-configure a preset folder for caching cache data of particle animation, so that the system can store the cache package of particle animation in the preset folder according to the preset folder configured by the user.

[0135] In other implementations, the system may automatically create a matching preset folder for the particle animation, so that the cache package of the particle animation may be stored in the preset folder, which is described in the following implementations of this specification.

[0136] In the implementation mode of this specification, as the animation data caching process proceeds, the storage capacity of the cached animation data in the current cache package gradually increases. When the storage capacity of the cached animation data in the cache package reaches the single package capacity threshold, it means that the data capacity of the current cache package has reached the upper limit, and thus the current cache package needs to be sub-packaged for storage, and subsequent animation data needs to be cached in the next cache package until the storage capacity of the next cache package also reaches the single package capacity threshold, and so on, until all the animation data of the entire particle animation is cached.

[0137] For example, Figure 2 In the example, at the beginning of data caching, the cursor 104 slides rightward frame by frame from the starting position t0, so that each frame of animation data indicated by the cursor 104 is cached in the current cache package. As the storage capacity of the cached animation data in the current cache package gradually increases, when the cursor 104 slides to the t1 position, the data capacity of the cached animation data in the current cache package reaches the single package capacity threshold, and the current cache package can be sub-packaged for storage, and the caching process of the second cache package can be started. For example, when the cursor 104 slides to the t2 position, the data capacity of the cached animation data in the second cache package reaches the single package capacity threshold, so the second cache package can be sub-packaged for storage, and the caching process of the third cache package can be performed again, and so on, until the cursor 104 slides to the t n Position, generate and store the last cache package. It can be understood that if the data in the last cache package cannot reach the single package capacity threshold, the last cache package can be directly generated based on the cached animation data.

[0138] In the implementation manner of this specification, during the animation data caching process, the animation data of the entire particle animation is divided into multiple cache packages for sub-packet storage, and the capacity threshold of a single cache package can be freely set by the user.

[0139] It is worth noting that in the implementation manner of this specification, the data in a single cache package not only includes the animation data of the particle animation, but also further includes the configuration data of the cache package. The configuration data of the cache package refers to the relevant data used to indicate the package body information of the cache package. During the rendering process, by parsing the configuration data of the cache package, the cache package's information such as version number, data structure format, information hash value (MD5) and animation frame details can be determined. On the one hand, the integrity of the cache package data can be verified, and on the other hand, the cross-platform self-construction and cross-version compatibility of the cache package data can be achieved.

[0140] For example, in an example scenario, the animation data of particle animation can be cached in packets through UE. If only the animation data of particle animation is cached in a single cache package, the cache package can be correctly identified and read when the UE calls these cached cache packages. However, when other DCC software wants to read, due to the lack of configuration data indicating the cache package body information in the cache package, other DCC software cannot identify and render the particle animation corresponding to the reconstructed cache package, resulting in cross-platform restrictions on cache data. In addition, when the cache package structure or data is updated, the old version of the cache package cannot be correctly identified, resulting in incompatibility between the old and new versions of the cache package data, and unable to achieve version iteration compatibility.

[0141] Based on this, in the implementation manner of this specification, when the storage capacity of the cached animation data in a single cache package reaches the single package capacity threshold, the cached animation data is not only packaged and stored, but the configuration data corresponding to the cache package is generated at the same time, and the configuration data and the cached animation data are packaged together to obtain a cache package.

[0142] In some embodiments, the configuration data of the cache package includes a file format checksum and cache deserialization reconstruction configuration information. The file format checksum is used to verify whether the file format of the current cache package is a predefined file format. The cache deserialization reconstruction configuration information is used to record the package header data of the cache package. The package header data may include version number information, cache management object file path, single-frame particle information of a single-frame animation, etc. The data structure of each cache package is described in the following embodiments of this specification.

[0143] S130, storing the generated cache package in a preset folder, and starting the recording of the next cache package, until all cache packages corresponding to the particle animation are stored, and obtaining a cache file set corresponding to the particle animation.

[0144] In combination with the above, it can be known that when the particle animation caching starts, a preset folder for caching the animation data of the particle animation can be created. In some embodiments, the preset folder can be manually created by the user, and the user can manually configure the location and path of the preset folder in the DCC software. In other embodiments, the preset folder can be automatically created by the system, for example, the system can automatically create a matching preset folder for the particle animation according to the category and name of the particle animation.

[0145] During the caching process, each time a cache package is generated, the cache package can be stored in the preset folder, and the recording of the next cache package can be started until the above caching process is completed, so that all cache packages corresponding to the particle animation are stored in the preset folder, and the preset folder is the cache file set corresponding to the particle animation.

[0146] In some embodiments, when each cache package corresponding to the particle animation is stored in a preset folder, each cache package can be named in order according to a preset naming rule. For example, in an example, the particle animation takes cloth as an example, and each cache package can be named Cloth_X.PCache when caching data, where X can start from 0 and increase in order, representing the sequence number of each cache package.

[0147] From the above, it can be seen that in the implementation mode of this specification, when caching data for particle animation, the cache data can be stored in packages, and a single large cache file can be split into multiple small cache packages, so that in the subsequent rendering process, only a single cache package data needs to be loaded each time, which greatly reduces the occupancy of system memory resources, reduces the waiting time and crash probability of cache reading, and improves animation production efficiency.

[0148] Moreover, by designing the cache package data structure, each cache package has cache package configuration data indicating the package body information, so that in the subsequent rendering process, cache package self-parsing can be achieved on any DCC software, and the cache package data can be correctly verified and read based on the cache package configuration data, thereby realizing rendering reconstruction and cross-version compatibility of particle animation.

[0149] The Cache Manager is also called the Cache Management Class in some cases. It is a system provided by 3D animation software to manage data cache. The animation data cache and reading of particle animation can be done through the Cache Manager. When caching particle animation, the Cache Manager will create a corresponding cache management object file (.uasset file) for the particle animation. The cache management object file is used to record the cache package related information of the particle animation. Therefore, when reading the cache file, the cache manager can correctly call and read the cache according to the related information recorded in the cache management object file.

[0150] by Figure 2 Taking the scene shown as an example, when the animation data starts to be cached, the cache manager can create the above-mentioned preset folder for storing cache packages based on the cache management object file path of the particle animation.

[0151] See also Figure 3As shown in the figure, in this example, the ClothTest.uasset file is the cache management object file corresponding to the cloth particle animation. When caching starts, the cache manager can create a preset folder ClothTest_PCache in the same directory as the cloth cache management object file ClothTest.uasset. The ClothTest_PCache folder is the folder used to store the cloth particle animation cache package. The preset folder ClothTest_PCache and the cloth cache management object file ClothTest.uasset are created in the same directory to facilitate user search.

[0152] Figure 3 The red framed part is an example of the content of the ClothTest_PCache folder. During the data caching process, based on the aforementioned caching method process, multiple cache packages of particle animation are generated in sequence, and the cache packages are named in the order of the preset naming rules. Then, all these cache packages are stored in the ClothTest_PCache folder. The final ClothTest_PCache file is the cache file set corresponding to the cloth particle animation.

[0153] As mentioned above, in the implementation of this specification, the data structure of the cache package corresponding to the particle animation includes the configuration data of the cache package and the cached animation data. In some implementations, the configuration data includes a file format checksum and cache deserialization reconstruction configuration information (Package Head). Figure 4 The data structure of the cache package is described.

[0154] See also Figure 4 As shown in the example of this manual, the data structure of the cache packet includes the following three parts:

[0155] 1) File format checksum

[0156] Checksum is used to verify the file format of the cache package, which is generally a 64-bit integer. For example, when the cache manager reads a cache package, it can first determine whether the read file format is the cache package format based on the format verification data Checksum.

[0157] 2) Cache deserialization and reconstruction configuration information (Package Head)

[0158] Package Head is generally a string converted from a json value, which is used to record the package body related information of the cache package. For example, in this example, the cache deserialization reconstruction configuration information Package Head includes the version number information (Version) corresponding to the cache package, the cache management object file path (Usaaet Path), the single frame particle information (SingleFrame) and the string terminator ($).

[0159] The version number information (Version) refers to the version number corresponding to the cache package. It is understandable that when caching particle animation data, different cache data may be selected according to different scene requirements, so the generated cache package versions will also be different, and the version number information can identify the cache package version. For example, in one example, for the same cloth animation, in a certain data caching process, it is selected that the color data of the cloth does not need to be cached, so the cache file with the version number V1.0 obtained by caching does not contain color data. In another data caching process, the color data of the cloth needs to be cached, so the cache file with the version number V2.0 obtained by caching contains color data. When reading the cache package, the data content contained in the cache package can be determined based on the version number information of the cache package, and then the cache package can be correctly read to achieve compatibility between the old and new versions.

[0160] The cache management object file path (Usaaet Path) refers to the storage path of the cache package of the particle animation. According to the above, when caching data, the cache manager (Cache Manager) will generate a cache management object file corresponding to the particle animation, such as Figure 3 At the same time, create a preset folder for particle animation in the same directory to store cache packages. The preset folder is as follows: Figure 3 The ClothTest_PCache file in the Cache Management Object File Path (Usaaet Path) refers to the path of the cache management object file and the default folder.

[0161] Single frame particle information (Single Frame) refers to the single frame detail data of the animation data in the cache package. During the data caching process of the cache package, the single frame particle information can be configured based on the cached animation data in the cache package. For example Figure 4In the example, the single-frame particle information includes the number of particles corresponding to each frame of animation (ParticleNum), the time start offset value (TimeOffset), the byte size occupied by time (TimeLength), the transform start offset value (TransformOffset), the byte size occupied by transform (TransformLength), the position start offset value (PosOffset), the byte size occupied by position (PosLength), the velocity start offset value (VelOffset), the byte size occupied by velocity (VelLength), and the byte size occupied by the single-frame animation (FrameLength).

[0162] The number of particles (ParticleNum) indicates the total number of particles contained in this frame of animation. The time start offset value (TimeOffset) indicates the byte position where the data of this frame of animation starts. The time byte size (TimeLength) refers to the number of bytes occupied by the time data of this frame of animation, which is used to indicate how many bytes need to be read to obtain complete time information. The transform start offset value (TransformOffset) refers to the starting position of the transformation matrix data of this frame of animation. The transform byte size (TransformLength) indicates the number of bytes occupied by the transformation matrix. The position start offset value (PosOffset) refers to the starting position of the particle position information in this frame of animation. The position byte size (PosLength) refers to the number of bytes occupied by the particle position information in this frame of animation. The velocity start offset value (VelOffset) refers to the starting position of the particle velocity information in this frame of animation. The velocity byte size (VelLength) indicates the number of bytes occupied by the particle velocity information in this frame of animation. The byte size (FrameLength) of a single frame of animation refers to the number of bytes occupied by the entire animation data of that frame of animation. It is used to determine the complete size of a frame of animation data for correct reading and parsing.

[0163] It can be understood that the single-frame particle information is not limited to the aforementioned data content, and may also include more or less data content, which will not be elaborated in this specification.

[0164] The string terminator ($) is a placeholder indicating the end of the Package Header data. Since the Package Header data is a string converted from a JSON value, cache reading is done by bit-by-bit, and it is difficult to determine the end position of the string. Therefore, the string terminator ($) is introduced. When the terminator ($) is read, it indicates that the Package Header data has been read.

[0165] 3) Package Body

[0166] In the implementation mode of this specification, the package body data of the cache data is the animation data cached in the cache package, which represents the animation data of multiple consecutive frames. Figure 4 In the example, the package body data Package Body consists of continuous single-frame animation data. Each single-frame animation data includes a single-frame time point (SingleFrameTime), a single-frame object transformation value (SingleFrameTransform), and particle motion information in the single-frame animation (SingleFrameVelAndPos).

[0167] Single Frame Time represents the timestamp corresponding to each frame of animation.

[0168] The single-frame object transformation value (SingleFrameTransform) represents the object affine transformation information corresponding to each frame of animation, including displacement, rotation, and scaling.

[0169] The particle motion information (SingleFrameVelAndPos) in a single-frame animation represents the motion information of all particles constituting a macroscopic object (such as cloth) in each frame of animation. The particle motion information may include, for example, particle position information and / or particle velocity information.

[0170] Of course, it is understandable that the package body data cached in the cache package is not limited to the data content of the above examples, and may also include more or less data content, which will not be elaborated in this specification.

[0171] In the implementation mode of this specification, in the animation data caching process of particle animation, taking the generation process of a cache package as an example, as the caching process proceeds, the storage capacity of the cached animation data in the cache package gradually increases until the storage capacity occupied by the cached animation data meets the single package capacity threshold. Configuration data can be determined based on the cached data, and the configuration data includes the aforementioned file format check value and cache deserialization reconstruction configuration information, and then refer to Figure 4 The data structure of the example generates a cache package based on the cached animation data (i.e., package body data), file format checksum, and cache deserialization reconstruction configuration information, and stores the cache package in a preset folder. The above process is repeated until all cache packages corresponding to the entire particle animation are stored, and the cache file set corresponding to the particle animation is obtained.

[0172] Combined with the above Figure 4The data structure of the example illustrates the caching process of the cache package. As mentioned above, during the data caching process, the cache manager will also configure a cache management object file (ie, .uasset file) for the cache file of the particle animation. The cache management object file is configured with detailed information related to the cache file of the particle animation.

[0173] In some embodiments, in order to verify the cached package of particle animation, the information hash value of each cached package corresponding to the particle animation can be calculated in real time during the animation data caching process, and the information hash value can be configured in the cache management object file (i.e., .uasset file), so that when reading the cached package, it can be determined whether the cached package has data tampering, errors, etc. by verifying the information hash value of the cached package. Figure 5 Provide explanation.

[0174] like Figure 5 As shown, in some implementations, the animation data caching method of the example in this specification includes:

[0175] S510: Generate an information hash value corresponding to each cache package based on the animation data corresponding to each cache package.

[0176] S520: configuring the information hash value corresponding to each cache package in the cache management object file of the particle animation.

[0177] MD5 (Message Digest Algorithm) is a cryptographic hash function that can generate a fixed-length (eg, 128-bit) information hash value for data to ensure the integrity and consistency of information transmission.

[0178] In the particle animation caching process, taking the generation process of a cache package as an example, as the animation data is continuously cached in the cache package, the information hash value of the current cache package can be calculated at the same time. Specifically, the cached animation data in the current cache package can be input into the MD5 algorithm, and a fixed-length MD5 value is generated after being processed by the MD5 algorithm. This MD5 value is the information hash value corresponding to the current cache package. Until the storage capacity of the cached animation data in the current cache package meets the single-package capacity threshold, the MD5 value finally calculated based on the cached animation data is used as the information hash value of the current cache package. After the information hash value of the cache package is generated, the information hash value of the cache package can be stored in the cache management object file corresponding to the particle animation, that is, the aforementioned Figure 3 In the ClothTest.uasset file in the example.

[0179] The above only takes a cache package of particle animation as an example to illustrate the process of generating and saving the information hash value of the cache package. As the entire animation data caching process proceeds, the above method process can be executed on each cache package to obtain the information hash value of each cache package of the particle animation, and the information hash values ​​corresponding to these cache packages are stored in the cache management object file.

[0180] In addition, it is worth noting that the data content of the cache management object file (.uasset file) corresponding to the particle animation is not limited to the information hash value of the cache package, but can also include other detailed information of the cache package, including but not limited to: cache package sequence number, cache package path, number of bytes occupied by the cache package, cache package version number, cache start time, cache end time, cache start frame, cache end frame, whether the cache data contains particle speed, cache single frame length, etc. Those skilled in the art can understand this and this manual will not elaborate on it.

[0181] The above describes the process of caching particle animation. In some embodiments, the data caching process can be displayed to the user through the user interface 100 during the data caching process. Figure 6 Provide explanation.

[0182] Reference Figure 6 For example, during the data caching process, as the cursor 104 gradually moves from the t0th frame to the t n The frame slides, and the animation data corresponding to the particle animation is gradually packaged and stored according to the cache method process described above, and multiple cache packages are generated and stored. In order to allow the user to intuitively see the cache progress, in the implementation of this specification, the animation sequence 103 of the particle animation can be divided into intervals according to the position of the cursor 104.

[0183] For example Figure 6 In (a), the cursor 104 is currently located at the t a Frame, that is, t0~t a The interval is the cached data interval, and t a ~t n The interval is the data interval to be cached, so that the cached data interval and the data interval to be cached can be distinguished by different filling colors. Figure 6 In the example, t0~t a The fill color of the cached data interval is green (RGB: 117, 121, 74), t a ~t n The fill color of the data interval to be cached is red (RGB: 130, 57, 53), so that the user can intuitively see the cache progress through the color.

[0184] In addition, for the process of packet caching, in some implementations of this specification, a single packet progress bar 105 may be set in the animation sequence 103. For example Figure 6 In the example, a single-packet progress bar 105 may be provided above the animation sequence 103 , and the single-packet progress bar 105 indicates the cache progress of the current cached packet.

[0185] For example, refer to Figure 6 As shown in (a), the cursor 104 moves from the initial position t0 to t a During the process, the single packet progress bar 105 increases with the position of the cursor 104 until the cursor 104 moves to t1, completing the generation and storage of the first cache packet. Figure 6 As shown in (b), during the caching process of the second cache packet, the single packet progress bar 105 takes t1 as the starting point and gradually increases as the cursor 104 moves. For example, in the figure, the cursor 104 is located at t b position, the interval range of the single packet progress bar 105 is t1~t b , and so on.

[0186] In the implementation manner of this specification, the single-packet progress bar 105 may be filled with a color that is different from the buffered data interval and the to-be-buffered data interval, for example Figure 6 In the example, the filling color of the single-packet progress bar 105 is yellow (RGB: 255, 255, 0). Of course, it can be understood that this specification does not limit the color of the above example.

[0187] Through the above example, during the animation data caching process, the user can not only visually see the overall caching progress through the color changes of the animation sequence, but also visually see the caching progress of the current cache package through the single package progress bar, thereby improving the user experience.

[0188] The above describes the data caching process of particle animation. It can be understood that users can cache the animation data of multiple particle animations through the above method process. The cache files of these particle animations can be used as animation assets. When rendering the animation, the required cache file set of one or more particle animations can be called, so as to quickly realize the particle animation rendering reconstruction without remaking and calculating the particle motion information. The process of animation rendering based on cache files is described below.

[0189] In some implementations, this specification provides an animation rendering method, which can be applied to UE or other DCC software and presented in the form of a software function or plug-in.

[0190] like Figure 7 As shown, in some implementations, the animation rendering method of the example in this specification includes:

[0191] S710: In response to a user operation instruction, import a cache management object file corresponding to the particle animation into a processing engine.

[0192] S720. During the particle animation playback process, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, each cache package contains part of the animation data of the particle animation, and configuration data corresponding to the cache package, and the configuration data is used to indicate the package body information of the cache package.

[0193] S730: Render and play particle animation based on each cache package included in the cache file set.

[0194] In some implementations, the cache file set corresponding to the particle animation may be obtained based on the animation data caching method described above.

[0195] In combination with the above, it can be known that the cache management object file refers to the .uasset file corresponding to the cache file of the particle animation during the caching process, which is used to record the relevant information of the cache file of the particle animation, so that the location path and related configuration information of the cache file corresponding to the particle animation can be determined by parsing the cache management object file of the particle animation.

[0196] In some embodiments, taking UE as an example, the processing engine for animation rendering, the user can read the pre-cached particle animation through the UE. Specifically, the user can select the animation rendering operation in the UE interface, so that the system can detect the corresponding user operation instruction based on the user action and start the animation rendering process.

[0197] For example, see Figure 2 As shown, during the rendering process, the system can generate a cached animation recording track 102 in the user interface 100. The cached animation recording track 102 refers to the animation cache data production track (Sequencer). The physical simulation frame rate and length corresponding to the cached animation recording track 102 can be set by the user independently, which will not be elaborated on.

[0198] Then, the user can select the particle animation to be rendered based on the asset catalog provided by the cache manager of the UE, and import the particle animation into the cache animation recording track 102. Figure 2 In the example, the particle animation that the user needs to render is a cloth animation. The user can import the cache management object file of the particle animation provided by the cache manager into the processing engine on the UE interface. For example, the user can drag the cache management object file to the user interface 100, so that the system can configure the animation sequence 103 corresponding to the cloth animation on the cache animation recording track 102.

[0199] It can be understood that since the cache management object file of the particle animation records the relevant information corresponding to the particle animation, the animation sequence 103 can be configured by parsing the cache management object file, for example, the sequence length of the animation sequence 103 is determined based on the number of frames of the particle animation contained in the cache management object file.

[0200] Afterwards, the user can click to start rendering and playing the particle animation. Rendering and playing the particle animation means that the processing engine UE reads the cache file set of the particle animation, loads the cache package data in the cache file set into the memory, and then renders the corresponding picture of the particle animation based on the cache package data in the memory and displays it in the scene display window 101, so that the user can view the rendering result of the particle animation.

[0201] Combined with the above, it can be seen that the cache file of the particle animation includes multiple cache packages stored in separate packages, so that the cache manager (Cache Manager) can determine the path location of the cache file, the cache package sequence number and other information based on the cache management object file (.uasset file) of the particle animation, and then read and load the multiple cache packages in the cache file in sequence based on the acquired information, and realize the rendering and playback of the particle animation by parsing the cache package data.

[0202] For example, Figure 2 As shown in the example, when the cursor 104 moves from the initial position t0 to t n During the frame-by-frame sliding process, the system reads and loads each cache package in sequence, and sequentially reads the cache packages as the cursor 104 slides frame by frame until the cursor 104 moves to t n Position, complete the cache file reading of the entire cloth animation and the rendering of the animation effect.

[0203] From the above, it can be seen that in the implementation of this specification, when rendering animation, it is not necessary to load the cache data of the entire particle animation, but to read the cache package of the particle animation in packets, so that the machine memory resources are rarely occupied, and more rendering objects can be loaded under the same configuration, for example, multiple particle animations can be loaded at the same time, enriching the rendering effect of animation rendering. In addition, the animation rendering process is smoother, reducing the invalid waiting time and software crash probability during cache reading, and improving the efficiency of animation production.

[0204] In some embodiments, during the particle animation rendering process, the system can use a single thread to sequentially read and load each cache package. For example, when the animation corresponding to the current cache package is completed, it can start reading and loading the next cache package, and so on, until all cache packages are rendered.

[0205] However, considering that there may be a delay in the process of reading and loading the cache package, it is easy to cause playback jamming during the cache package switching process. Therefore, in other implementations, the cache package can be loaded in parallel by multi-threading in a ping-pong rotation manner, that is, two cache packages are loaded into the memory at the same time, so as to eliminate or alleviate the risk of jamming during the cache package switching process. Figure 8 Provide explanation.

[0206] like Figure 8 As shown, in some implementations, the animation rendering method of the example in this specification, the process of reading the cache file and rendering the particle animation includes:

[0207] S810. During the particle animation playback process, based on the cache management object file, dual threads read and load the first cache package and the second cache package in parallel from the cache file set corresponding to the particle animation.

[0208] S820: In response to the completion of rendering and playing of the first cache package, read and load the third cache package from the cache file set until rendering and playing of all cache packages in the cache file set are completed.

[0209] In the implementation mode of this specification, when the system reads and loads the cache package from the cache file of the particle animation, dual-thread parallel operation can be adopted. For example, at the start time of the particle animation playback, thread 1 reads the first cache package from the cache file and loads the first cache package into the system memory. At the same time, thread 2 reads the second cache package from the cache file and loads the second cache package into the system memory. The first cache package and the second cache package are cache packages connected by sequence numbers, and the second cache package is located downstream of the first cache package.

[0210] It can be understood that at this time, the system memory is loaded with the first cache package and the second cache package. As the animation rendering process proceeds, when the animation cache data corresponding to the first cache package is rendered and played, the system continues to render and play the animation data corresponding to the second cache package based on the second cache package loaded in the memory. It can be understood that since the second cache package has been pre-loaded into the system memory, there is almost no lag when the second cache package is rendered and played, and seamless connection can be achieved. At the same time, thread 1 can release the memory usage of the first cache package, continue to read the third cache package from the cache file set, and load the third cache package into the system memory. At this time, the system memory is loaded with the second cache package and the third cache package.

[0211] Similarly, as the animation cache data corresponding to the second cache package is rendered and played, the system continues to render and play the animation data corresponding to the third cache package based on the third cache package loaded in the memory. Since the third cache package has been pre-loaded into the system memory, there is almost no lag when the third cache package is rendered and played, and a seamless connection can be achieved. At the same time, thread 2 can release the memory occupied by the second cache package, continue to read the fourth cache package from the cache file set, and load the fourth cache package into the system memory. At this point, the third cache package and the fourth cache package are loaded in the system memory.

[0212] Similarly, by alternately reading and loading cache packages through dual threads, the next cache package can be loaded into the memory while the current cache package is being played, thus realizing ping-pong rotation loading.

[0213] For ease of understanding, Fig. 9 A visual example of the animation rendering method of this specification is shown in Fig. 9 In the figure, numbers 0 to 15 are the cache package numbers corresponding to the animation sequence of the particle animation. Cursors of different colors on the animation sequence correspond to different positions. The black box below indicates the cache package number in the system memory when the cursor of the corresponding color is at the position.

[0214] For example, when the cursor is located at the initial position indicated by red, thread 1 reads and loads cache package 0, and thread 2 reads and loads cache package 1. At this time, cache package 0 and cache package 1 are loaded in the system memory.

[0215] As the cursor slides, when it moves to the green position, the animation data corresponding to cache package 0 ends, thread 1 releases the memory occupied by cache package 1, reads and loads cache package 2, and now cache package 2 and cache package 1 are loaded in the system.

[0216] When the cursor continues to slide to the position indicated by blue, cache package 2 and cache package 3 are loaded into the system memory.

[0217] When the cursor continues to slide to the position indicated by black, cache package 6 and cache package 7 are loaded into the system memory.

[0218] When the cursor continues to slide to the yellow position, the animation data corresponding to cache package 14 is finished playing, and the last cache package 15 has also been loaded into the memory. There is no subsequent cache package, and the cache package can be no longer loaded at this time, thereby stopping the playback process after the animation data of cache package 15 is played. Cache package 0 can also be reloaded, that is, after the animation data of cache package 15 is played, the playback process will be stopped from the beginning. This manual does not limit this.

[0219] From the above, it can be known that in the implementation of this specification, by alternately reading and loading cache packages through dual threads, the next cache package can be loaded into the memory while the current cache package is being played, thereby eliminating or alleviating the jamming when switching the cache package to play, making the rendering of the entire particle animation smoother. Moreover, there are at most two cache packages in the system memory at the same time, which still greatly reduces the memory usage compared to the traditional single cache file without sub-packaging. More rendering objects can be loaded under the same configuration, reducing the invalid waiting time and software crash probability during cache reading, and improving animation production efficiency.

[0220] In some embodiments, in the above-mentioned dual-threaded parallel loading of cache packages, ISPC technology can be used to optimize and accelerate the parallel process. ISPC is a high-performance parallel compiler based on SPMD (single program multiple data). Using ISPC to compile the above-mentioned parallel processing process can effectively improve the loading speed of the cache package. Through practice, the data loading speed can be increased by about 7 times. For the ISPC compilation process, those skilled in the art can understand it with reference to relevant technologies, and this specification will not go into details.

[0221] On the basis of the above, combined with Fig. 9 As shown in the figure, it can be understood that during the particle animation rendering and playback process, the user may have the need to manually select the playback position. For example, the current rendering and playback cache package 3, the user may want to directly view the animation effect at the cache package 11, so the user can drag the cursor and directly drag the cursor to the approximate location of the cache package 11. At this time, it is necessary to load and render the corresponding cache package based on the user's dragging operation. Fig.10 Provide explanation.

[0222] like Fig.10 As shown, in some implementations, the animation rendering method of the example in this specification includes:

[0223] S1010. During the particle animation playback process, in response to detecting the playback progress selected by the user on the cached animation recording track, determine a target cache package to be played based on the playback progress.

[0224] S1020: Read and load the target cache package, and jump to the cache frame corresponding to the playback progress in the target cache package to start rendering and playback.

[0225] In the implementation mode of this specification, during the particle animation rendering and playback process, if the user expects to start the rendering and playback directly from a certain time point, the user can click the playback progress on the cached animation recording track. There are many ways to click the playback progress, such as dragging the cursor 104, clicking the animation sequence, sliding and dragging on the animation sequence, etc., and this specification does not limit this.

[0226] In one example, see Fig.11 As shown, the animation sequence of particle animation is t0~t n In the above animation rendering and playback process, assuming that the current playback progress is the tth c The corresponding cache package is cache package A. Assume that the user drags the cursor 104 to the tth frame animation. d The position of the frame indicates the user's expectation from the tth d Frame animation rendering and playback.

[0227] In this case, the system can d The playback progress of the frame is determined based on the start and end frames of each cache packet recorded in the cache management object file (.uasset file). d The cache packet corresponding to the frame is the target cache packet, for example Fig.11 In this example, determine the tth d The target cache packet corresponding to the frame is cache packet B.

[0228] Then, the target cache package B and its next cache package can be read and loaded, and based on the single frame particle information (Single Frame) recorded in the package header data (Package Head) of the cache package, the tth d The frame corresponds to the data position, and then the rendering playback progress jumps to the tth d The animation corresponding to the frame starts playing. The subsequent animation rendering process is the same as the above, and will not be repeated here.

[0229] From the above, it can be seen that in the implementation mode of this specification, the user can arbitrarily select the playback progress he wants to view for rendering and playback, which is convenient for the user's animation production operation.

[0230] In some implementations, considering that during the animation rendering process, one or more frames of animation may have errors, such as multiple consecutive frames of animation having a problem of clipping, in this case, it is necessary to quickly help the user locate the defective cache package and export it for the user to modify. Fig.12 Provide explanation.

[0231] like Fig.12 As shown, in some implementations, the animation rendering method of the example in this specification includes:

[0232] S1210. During the particle animation playback process, in response to detecting a cache interval segment selected by a user on a cache animation recording track, determine one or more cache packages to be exported based on the cache interval segment.

[0233] S1220. In response to detecting a user export instruction, export one or more cache packages.

[0234] In one example, see Fig.13 As shown, during the particle animation rendering and playback process, if the user finds that t j ~t k The animation effect of the interval has defects such as penetration, and the user wants to modify the defects. At this time, the user can select the corresponding cache interval segment on the animation sequence 103 by box selection, point selection, touch, etc. For example, in this example, the user selects t j ~t k The cache interval between .

[0235] Then, the system can determine one or more cache packets corresponding to the cache interval according to the cache interval segment selected by the user and based on the start and end frames of each cache packet recorded in the cache management object file (.uasset file). Fig.13 In this example, based on the cache interval t j ~t k It is determined that the corresponding cache packages with problems include cache package C, cache package D and cache package E.

[0236] After determining that one or more cache packages have problems, the user export instruction can be detected, and these cache packages can be exported when the user export instruction is detected. For example, in one example, a prompt "Do you want to export the following cache packages: cache package C, cache package D, cache package E" can be output on the user interface. When receiving the user confirmation instruction, it can be determined that the user export instruction is detected, and the system can execute the automatic export process to export cache package C, cache package D, and cache package E.

[0237] After obtaining the exported files of these cache packages, users can import these cache packages into other DCC software for modification. For example, taking cloth as an example, it can be exported as a universal cache file in the form of Alembic file, and then repaired in Houdini, Maya, Blender software, and then reloaded into UE after repairing the cache package.

[0238] It is understandable that, in combination with the aforementioned data caching method process, the cache deserialization reconstruction configuration information (Package Head) of the cache package records the relevant configuration information of the cache package, so that the cache package can realize cache package self-analysis on any DCC software, thereby realizing cross-platform data reconstruction. Moreover, when exporting and repairing particle animation, only the defective cache package needs to be exported, and there is no need to export the cache file of the entire particle animation, thereby saving a lot of data export and import time and improving animation production efficiency.

[0239] In addition, combined with the aforementioned data caching method, it can be known that when a particle animation performs data caching, the cache manager will generate a corresponding cache management object file (.uasset file) for each particle animation, and the cache management object file records the information hash value of each cache package, which is used to verify the correctness of the cache package. Therefore, in some implementations of this specification, when reading a cache package, it is necessary to further verify the cache package. Fig.14 Provide explanation.

[0240] like Fig.14 As shown, in some implementations, the animation rendering method of the example in this specification, the process of reading and loading the cache package, includes:

[0241] S1410. During the particle animation playback process, for any cache package in the cache file set, parse the configuration data of the cache package to obtain a file format check value corresponding to the cache package.

[0242] S1420. In response to the file format check value passing verification, determine a first information hash value based on the animation data stored in the parsed cache package.

[0243] S1430. Determine a second information hash value corresponding to the cache package based on the cache management object file corresponding to the particle animation.

[0244] S1440 . In response to the first information hash value and the second information hash value matching each other, read and load the cache package.

[0245] Combination Figure 4 As shown, the cache package data structure of the particle animation includes a file format checksum, which is used to verify that the data format of the cache package is a predetermined data format. Therefore, when reading the cache package data, the file format checksum can be obtained by parsing the cache package, and whether the cache package format is verified is determined based on the file format checksum.

[0246] In the implementation manner of this specification, when the file format check value passes the verification, it means that the read cache package file format is correct, so that the complete consistency of the cache package can be further verified.

[0247] In combination with the above, it can be known that when a particle animation performs data caching, the cache manager (Cache Manager) will generate a corresponding cache management object file (.uasset file) for each particle animation, and the cache management object file records the information hash value of each cache package, and the information hash value stored in the cache management object file is defined as the second information hash value.

[0248] In the implementation manner of this specification, by parsing the cache package data, the package body data (Package Body) stored in the cache package can be obtained. The package body data is also the animation data cached in the cache package. Based on the MD5 algorithm, the information hash value corresponding to the cache package can be calculated, and the calculated information hash value is defined as the first information hash value.

[0249] It can be understood that if the data in the cache package is not missing or modified, the calculated first information hash value should be consistent with the second information hash value pre-stored in the cache management object file. Conversely, if the data in the cache package is modified or incomplete, the calculated first information hash value should be inconsistent with the second information hash value pre-stored in the cache management object file.

[0250] Based on this principle, the calculated first information hash value of the cache package can be matched with the second information hash value stored in the cache management object file. If the two are consistent, it means that the cache package has been verified, so the cache package can be read and loaded. If the two are inconsistent, it means that the cache package may have data missing or tampered, so a prompt message can be output to inform the user, for example, a prompt message such as "cache package export failed" can be output on the user interface.

[0251] It can be seen from the above that in the implementation mode of this specification, the security and reliability of the cache package data are improved by verifying the file format and the information hash value when reading the cache package.

[0252] It can be understood that, in combination with the aforementioned data caching method process, the package header data (PackageHead) of the cache package records the version number information (Version) of the cache package, so that cross-version data compatibility can be achieved based on the version information. Fig.15 Provide explanation.

[0253] like Fig.15 As shown, in some implementations, the animation rendering method of the example in this specification, the process of reading and loading the cache package, includes:

[0254] S1510. During the particle animation playback process, for any cache package in the cache file set, parse the configuration data of the cache package to obtain the version number information included in the cache deserialization reconstruction configuration information of the cache package.

[0255] S1520: Determine the animation data to be read in the cache package based on the version number information, and read and load the animation data to be read.

[0256] Combined with the above, it can be seen that the version number information (Version) refers to the version number corresponding to the cache package. When caching particle animation data, different cache data may be selected according to different scene requirements, so the generated cache package version will also be different. Therefore, during the rendering process, it is necessary to identify the version number information to determine the animation data to be read.

[0257] For example, in one example, for the same cloth animation, the user chooses not to cache the cloth color data during the data caching process of the old version, so the cached package with version number information V1.0 does not contain color data. In the subsequent version update, the user chooses to cache the cloth color data during the data caching process, so the cached package with updated version number information V2.0 contains color data.

[0258] When a cache package is read during the animation rendering and playback process, the cache deserialization and reconstruction configuration information of the cache package can be parsed to obtain the version number information, and the animation data to be read in the cache package can be determined based on the version number information. For example, in the above example, assuming that the version number information of the cache package obtained by parsing is V1.0, it can be determined that the data structure of the cache package does not contain color data, and thus it can be determined that the animation data to be read does not contain color data. If the animation data that does not contain color data is the animation data to be read, the animation data to be read can be read and loaded to achieve the corresponding animation rendering and playback effect. Conversely, assuming that the version number information of the cache package obtained by parsing is V2.0, it can be determined that the data structure of the cache package contains color data, and thus it can be determined that the animation data to be read contains color data. If the animation data containing color data is the animation data to be read, the animation data to be read can be read and loaded to achieve the corresponding animation rendering and playback effect.

[0259] It can be seen from the above that in the implementation of this specification, by identifying version information when reading a cache package, cross-version compatibility of cache data can be achieved, thereby improving the adaptability of cache text of particle animation.

[0260] like Fig.16 As shown, in some embodiments, this specification provides an animation data caching device, including:

[0261] The parameter acquisition module 10 is configured to acquire preset cache parameters, wherein the preset cache parameters include a single packet capacity threshold, and the single packet capacity threshold is used to configure the storage capacity of a single cache packet of the particle animation;

[0262] The packet caching module 20 is configured to generate a cache packet when the storage capacity of the cached animation data in the currently recorded cache packet reaches the single packet capacity threshold during the process of caching the particle animation, wherein the cache packet includes the cached animation data and configuration data, and the configuration data is used to indicate the packet body information of the cache packet;

[0263] The file cache module 30 is configured to store the generated cache package in a preset folder and start recording the next cache package until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation.

[0264] In some embodiments, the configuration data includes a file format verification value corresponding to the cache package and cache deserialization reconstruction configuration information, the file format verification value is used to verify the file format of the cache package, and the cache deserialization reconstruction configuration information is used to record the packet header data of the cache package.

[0265] In some implementations, the packet header data includes version number information of the cache packet, cache management object file path of the particle animation, and single-frame particle information of the animation data in the cache packet;

[0266] The cached animation data includes particle position information corresponding to each frame of animation and / or particle velocity information corresponding to each frame of animation.

[0267] In some implementations, the file cache module 30 is configured to:

[0268] When starting to cache the particle animation, creating the preset folder based on the cache management object file path of the particle animation;

[0269] During the process of caching and recording the particle animation, the cache packages corresponding to the particle animation are stored in the preset folder, and each cache package is named in order based on a preset naming rule.

[0270] In some implementations, the packet caching module 20 is configured to:

[0271] Generate an information hash value corresponding to each cache package based on the animation data corresponding to the cache package;

[0272] The information hash value corresponding to each cache package is configured in the cache management object file of the particle animation.

[0273] In some implementations, the packet caching module 20 is configured to:

[0274] Configuring the animation sequence corresponding to the particle animation on the cached animation recording track;

[0275] During the process of caching and recording the particle animation, the cursor is controlled to slide frame by frame on the animation sequence, and the animation data corresponding to each frame of animation indicated by the cursor is cached in the currently recorded cache package.

[0276] like Fig.17 As shown, in some embodiments, this specification provides an animation rendering device, including:

[0277] The cache import module 40 is configured to import the cache management object file corresponding to the particle animation into the processing engine in response to the user operation instruction;

[0278] The cache loading module 50 is configured to read and load each cache package from the cache file set corresponding to the particle animation based on the cache management object file during the particle animation playback process, each cache package containing part of the animation data of the particle animation and configuration data corresponding to the cache package, wherein the configuration data is used to indicate the package body information of the cache package;

[0279] The animation rendering module 60 is configured to render and play the particle animation based on each of the cache packages in the cache file set.

[0280] In some implementations, the cache loading module 50 is configured to:

[0281] During the particle animation playback process, based on the cache management object file, a first cache package and a second cache package are read and loaded in parallel by multiple threads from a cache file set corresponding to the particle animation, wherein the second cache package is adjacent to the first cache package and is located downstream of the first cache package;

[0282] The animation rendering module 60 is configured as follows:

[0283] In response to the completion of rendering and playback of the first cache package, the cache management object file reads and loads a third cache package from the cache file set, wherein the third cache package is adjacent to the second cache package and is located downstream of the second cache package, until rendering and playback of all cache packages in the cache file set are completed.

[0284] In some implementations, the cache loading module 50 is configured to:

[0285] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain a file format check value corresponding to the cache package;

[0286] In response to the file format check value passing verification, determining a first information hash value based on the animation data stored in the cache package obtained by parsing;

[0287] Determine a second information hash value corresponding to the cache package based on a cache management object file corresponding to the particle animation;

[0288] In response to the first information hash value and the second information hash value matching each other, the cache package is read and loaded.

[0289] In some implementations, the cache loading module 50 is configured to:

[0290] During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain the version number information included in the cache deserialization reconstruction configuration information of the cache package;

[0291] The animation data to be read in the cache package is determined based on the version number information, and the animation data to be read is read and loaded.

[0292] In some implementations, the cache import module 40 is configured to:

[0293] In response to a user operation instruction, a cached animation recording track is added on the operation interface of the processing engine, and an animation sequence corresponding to the particle animation is placed on the cached animation recording track based on the cache management object file.

[0294] In some implementations, the animation rendering module 60 is configured to:

[0295] During the particle animation playback process, in response to detecting the playback progress selected by the user on the cached animation recording track, determining a target cache package to be played based on the playback progress;

[0296] The target cache package is read and loaded, and the cache frame corresponding to the playback progress in the target cache package is jumped to start rendering and playback.

[0297] In some implementations, the animation rendering module 60 is configured to:

[0298] During the particle animation playback process, in response to detecting a cache interval segment selected by a user on the cache animation recording track, determining one or more cache packages to be exported based on the cache interval segment;

[0299] In response to detecting a user export instruction, the one or more cache packages are exported.

[0300] In some implementations, this specification provides an electronic device, including:

[0301] Processor; and

[0302] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.

[0303] In some embodiments, the present specification provides a storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the aforementioned embodiments.

[0304] In some embodiments, the present specification provides a computer program product, which implements the method described in any of the aforementioned embodiments when running.

[0305] Fig.18 is a schematic structural diagram of a device provided by an exemplary embodiment. Fig.18 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include hardware required for other scenarios. One or more embodiments of this specification may be implemented based on software, such as the processor 702 reading the corresponding computer program from the non-volatile memory 710 into the memory 708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0306] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0307] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0308] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0309] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0310] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.

Claims

1. A method for caching animation data, characterized in that: include: Acquire preset cache parameters, wherein the preset cache parameters include a single packet capacity threshold, and the single packet capacity threshold is used to configure the storage capacity of a single cache packet of the particle animation; During the process of caching and recording the particle animation, when the storage capacity of the cached animation data in the currently recorded cache package reaches the single package capacity threshold, a cache package is generated, the cache package including the cached animation data and configuration data, the configuration data being used to indicate package body information of the cache package; The generated cache package is stored in a preset folder, and the recording of the next cache package is started until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation; Among them, the configuration data includes cache deserialization and reconstruction configuration information corresponding to the cache package, and the cache deserialization and reconstruction configuration information is used to record the packet header data of the cache package, and the packet header data includes version number information of the cache package, the cache management object file path of the particle animation, and single-frame particle information of the animation data in the cache package.

2. The method according to claim 1, characterized in that The configuration data includes a file format check value corresponding to the cache package, and the file format check value is used to verify the file format of the cache package.

3. The method according to claim 2, characterized in that The cached animation data includes particle position information corresponding to each frame of animation and / or particle velocity information corresponding to each frame of animation.

4. The method according to claim 1, characterized in that: The generated cache package is stored in a preset folder, including: When starting to cache the particle animation, creating the preset folder based on the cache management object file path of the particle animation; During the process of caching and recording the particle animation, the cache packages corresponding to the particle animation are stored in the preset folder, and each cache package is named in order based on a preset naming rule.

5. The method according to claim 1, characterized in that: Also includes: Generate an information hash value corresponding to each cache package based on the animation data corresponding to the cache package; The information hash value corresponding to each cache package is configured in the cache management object file of the particle animation.

6. The method according to claim 1, characterized in that The process of caching and recording the particle animation includes: Configuring the animation sequence corresponding to the particle animation on the cached animation recording track; During the process of caching and recording the particle animation, the cursor is controlled to slide frame by frame on the animation sequence, and the animation data corresponding to each frame of animation indicated by the cursor is cached in the currently recorded cache package.

7. An animation rendering method, characterized in that: include: In response to a user operation instruction, importing a cache management object file corresponding to the particle animation into a processing engine; During the playing process of the particle animation, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, each cache package contains part of the animation data of the particle animation, and configuration data corresponding to the cache package, the configuration data is used to indicate the package body information of the cache package, wherein the cache file set corresponding to the particle animation is obtained based on the method described in any one of claims 1 to 6; The particle animation is rendered and played based on each of the cache packages in the cache file set.

8. The method according to claim 7, characterized in that During the particle animation playback process, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, including: During the particle animation playback process, based on the cache management object file, dual threads read and load a first cache package and a second cache package in parallel from a cache file set corresponding to the particle animation, wherein the second cache package is adjacent to the first cache package and is located downstream of the first cache package; Rendering and playing the particle animation based on each of the cache packages in the cache file set includes: In response to the completion of rendering and playback of the first cache package, a third cache package is read and loaded from the cache file set, the third cache package being adjacent to the second cache package and located downstream of the second cache package, until rendering and playback of all cache packages in the cache file set are completed.

9. The method according to claim 7, characterized in that: During the particle animation playback process, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, including: During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain a file format check value corresponding to the cache package; In response to the file format check value passing verification, determining a first information hash value based on the animation data stored in the cache package obtained by parsing; Determine a second information hash value corresponding to the cache package based on a cache management object file corresponding to the particle animation; In response to the first information hash value and the second information hash value matching each other, the cache package is read and loaded.

10. The method according to claim 7, characterized in that During the particle animation playback process, each cache package is read and loaded from the cache file set corresponding to the particle animation based on the cache management object file, including: During the particle animation playback process, for any cache package in the cache file set, the configuration data of the cache package is parsed to obtain the version number information included in the cache deserialization reconstruction configuration information of the cache package; The animation data to be read in the cache package is determined based on the version number information, and the animation data to be read is read and loaded.

11. The method according to claim 7, characterized in that In response to the user operation instruction, the cache management object file corresponding to the particle animation is imported into the processing engine, including: In response to a user operation instruction, a cached animation recording track is added on the operation interface of the processing engine, and an animation sequence corresponding to the particle animation is placed on the cached animation recording track based on the cache management object file.

12. The method according to claim 11, characterized in that Also includes: During the particle animation playback process, in response to detecting the playback progress selected by the user on the cached animation recording track, determining a target cache package to be played based on the playback progress; The target cache package is read and loaded, and the cache frame corresponding to the playback progress in the target cache package is jumped to start rendering and playback.

13. The method according to claim 11, characterized in that Also includes: During the particle animation playback process, in response to detecting a cache interval segment selected by a user on the cache animation recording track, determining one or more cache packages to be exported based on the cache interval segment; In response to detecting a user export instruction, the one or more cache packages are exported.

14. An animation data caching device, characterized in that: include: A parameter acquisition module is configured to acquire preset cache parameters, wherein the preset cache parameters include a single packet capacity threshold, and the single packet capacity threshold is used to configure the storage capacity of a single cache packet of the particle animation; The packet caching module is configured to generate a cache package when the storage capacity of the cached animation data in the currently recorded cache package reaches the single package capacity threshold during the process of caching the particle animation, wherein the cache package includes the cached animation data and configuration data, and the configuration data is used to indicate the package body information of the cache package; A file cache module is configured to store the generated cache package in a preset folder and start recording the next cache package until all cache packages corresponding to the particle animation are stored, thereby obtaining a cache file set corresponding to the particle animation; Among them, the configuration data includes cache deserialization and reconstruction configuration information corresponding to the cache package, and the cache deserialization and reconstruction configuration information is used to record the packet header data of the cache package, and the packet header data includes version number information of the cache package, the cache management object file path of the particle animation, and single-frame particle information of the animation data in the cache package.

15. An animation rendering device, characterized in that: include: A cache import module is configured to import a cache management object file corresponding to the particle animation into the processing engine in response to a user operation instruction; a cache loading module, configured to read and load each cache package from the cache file set corresponding to the particle animation based on the cache management object file during the playing process of the particle animation, each cache package including partial animation data of the particle animation and configuration data corresponding to the cache package, the configuration data being used to indicate package body information of the cache package, wherein the cache file set corresponding to the particle animation is obtained based on the method described in any one of claims 1 to 6; The animation rendering module is configured to render and play the particle animation based on each of the cache packages in the cache file set.

16. An electronic device, characterized in that: include: processor; and A memory storing computer instructions, wherein the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 13.

17. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 13.

18. A computer program product, characterized in that The computer program product implements the method according to any one of claims 1 to 13 when running.

Citation Information

Patent Citations

  • Three-dimensional dynamic display construction method and equipment for technological process of digital water plant

    CN116433832A