A method, system, device and medium for automatically capturing screen shots of Unreal Engine particle special effects

Through Unreal Engine's Python API and C++ API, combined with the Blueprint function, the frame-by-frame screen shooting and GIF file generation of particle special effects is achieved, solving the problem that the existing technology cannot capture dynamic changes and cumbersome operations, and improving the vividness and development efficiency of special effects display.

CN119113512BActive Publication Date: 2025-04-08GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411096114.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-04-08
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

Unreal Engine's screenshot function cannot capture the dynamic changes of particle effects, and the operation is cumbersome, so it is impossible to directly output dynamic sequence pictures or video files.

Method used

Through frame-by-frame screen shooting technology, using Unreal Engine Python API and C++ API, particle special effects assets are instantiated, playback functions are called, and GIF files are generated through the Blueprint function.

Benefits of technology

It realizes a complete capture of the dynamic change process of particle special effects, generates vivid and intuitive GIF files, simplifies the developer's workflow, and improves efficiency and effect consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119113512B_ABST
    Figure CN119113512B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of Unreal Engine technology, and in particular to an Unreal Engine particle special effect automatic screen capture method, system, device and medium, wherein the method specifically comprises: obtaining an Unreal Engine particle special effect asset selected by a user, and determining a corresponding screen capture special level according to the Unreal Engine particle special effect asset; instantiating the Unreal Engine particle special effect asset through the Unreal Engine Python API, and placing it in the scene world of the screen capture special level; starting the game mode according to the Unreal Engine C++ API, calling the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset; and capturing the playback screen of the Unreal Engine particle special effect asset frame by frame through the blueprint function of the screen capture special level to generate a GIF file. The present invention can completely capture the dynamic change process of the particle special effect through the frame-by-frame screen capture technology, and generate a GIF file, making the special effect display more vivid and intuitive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Unreal Engines, and in particular to a method, system, device and medium for automatically capturing screen shots of Unreal Engine particle special effects. Background Art

[0002] In the current field of game development and visual effects production, Unreal Engine is widely favored for its powerful rendering capabilities and flexible particle system. However, in the process of displaying and sharing particle effects, developers often face some technical challenges. Although the traditional Unreal Engine screenshot function can capture static images in the game scene, it has obvious limitations:

[0003] 1. Unreal Engine's built-in screenshot function can usually only capture a single static image of the current screen, and cannot capture the dynamic changes of special effects, which greatly limits the display effect and shareability of special effects.

[0004] 2. For scenes that need to display multiple particle effects or compare special effects, developers need to manually switch special effects, adjust camera positions and take screenshots one by one. This process is cumbersome and time-consuming.

[0005] 3. Unreal Engine does not natively support the functions of intelligently loading levels, automatically placing particle effects into the scene world, and automatically switching between multiple particle effects assets. These operations require developers to perform manually, which greatly reduces development efficiency and effect consistency.

[0006] 4. The screenshot function cannot directly output dynamic sequence images or video files. If you need to generate GIF or video files, developers need to use external software for post-processing, which increases the complexity and time cost of the workflow. Summary of the invention

[0007] The purpose of the present invention is to provide a method, system, device and medium for automatically capturing the screen of Unreal Engine particle special effects. Through frame-by-frame screen capturing technology, the dynamic change process of particle special effects can be fully captured, and a GIF file can be generated to make the special effects display more vivid and intuitive, so as to solve at least one of the above-mentioned prior art problems.

[0008] In a first aspect, the present invention provides a method for automatically capturing screen shots of Unreal Engine particle special effects, the method specifically comprising:

[0009] Obtaining an Unreal Engine particle special effect asset selected by a user, and determining a corresponding screen-shooting special level according to the Unreal Engine particle special effect asset;

[0010] Instantiating the Unreal Engine particle special effect asset through the Unreal Engine Python API and placing it in the scene world of the special screen capture level;

[0011] Start the game mode according to the Unreal Engine C++ API, and call the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset;

[0012] The playback screen of the Unreal Engine particle special effect asset is captured frame by frame through the blueprint function of the special capture level to generate a GIF file;

[0013] When it is detected that all Unreal Engine particle effect assets have finished capturing the screen, the game mode is stopped through the Unreal Engine C++ API.

[0014] In a second aspect, the present invention provides an Unreal Engine particle special effect automatic screen capture system, the system specifically comprising:

[0015] The first screen-shooting module is used to obtain the Unreal Engine particle special effect asset selected by the user, and determine the corresponding screen-shooting special level according to the Unreal Engine particle special effect asset;

[0016] The second screen-shooting module is used to instantiate the Unreal Engine particle special effect asset through the Unreal Engine Python API and place it in the scene world of the screen-shooting special level;

[0017] A third screen capture module is used to start the game mode according to the Unreal Engine C++ API and call the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset;

[0018] A fourth screen capture module is used to capture the playback screen of the Unreal Engine particle special effect asset frame by frame through the blueprint function of the screen capture special level to generate a GIF file;

[0019] The fifth screen capture module is used to stop the game mode through the Unreal Engine C++ API when it is detected that all Unreal Engine particle special effect assets have completed screen capture.

[0020] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor and a computer program stored in the memory, and when the computer program is executed on the processor, an Unreal Engine particle special effect automatic screen capture method as described in any one of the above methods is implemented.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for automatically capturing screen of Unreal Engine particle special effects as described in any one of the above methods is implemented.

[0022] Compared with the prior art, the present invention has at least one of the following technical effects:

[0023] 1. Through frame-by-frame screen shooting technology, the dynamic change process of particle special effects can be fully captured, and GIF or video files can be generated to make the special effects display more vivid and intuitive.

[0024] 2. Automatically load special levels for screen capture, instantiate particle special effect assets, call playback functions, and perform frame-by-frame screen capture, which greatly simplifies the developer's workflow and improves efficiency.

[0025] 3. It supports automatic selection of the screen capture level type based on the properties of the particle special effects asset, and intelligently calculates the appropriate position of the instantiated object within the camera's visible range based on the camera's position and rotation information, thus realizing the intelligent integration of particle effects and scenes.

[0026] 4. Provides a wealth of particle control parameters and playback functions. Developers can freely set the particle emission rules, speed, acceleration and direction according to their needs to achieve a variety of particle effects.

[0027] 5. Adopt the image fusion algorithm based on Fourier transform to fuse the image files captured frame by frame with high quality, generate smooth GIF files, and improve the display quality of special effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 It is a flow chart of an Unreal Engine particle special effect automatic screen capture method provided by an embodiment of the present invention;

[0030] Figure 2 It is a structural schematic diagram of an Unreal Engine particle special effect automatic screen capture system provided by an embodiment of the present invention;

[0031] Figure 3 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] Some nouns or terms that appear in the description of the embodiments of the present invention are subject to the following explanations:

[0039] Unreal Engine: Developed by Epic Games, this engine was originally designed for gaming, but it has been widely used in a variety of fields, including film production, architectural design, education and training, and other digital production software

[0040] Screen capture level: It is a container for Actor and can be used as a player's activity scene

[0041] Niagara Particle System: Used to create complex particle effects in video games and visual effects. This system was developed by Epic Games for its game engine Unreal Engine 4 (UE4) and later versions. The Niagara system provides powerful visual editing tools that allow artists and developers to create and control particle behavior in an intuitive way.

[0042] Cascade Particle System: An older particle system editor in Unreal Engine (UE), commonly used for particle effect creation in versions prior to Unreal Engine 4. It provides game developers and visual effects artists with tools to create and control particle systems such as fire, smoke, explosions, etc.

[0043] Blueprint scripting system: allows developers and artists to design and build game logic and behavior through a graphical interface without having to go into traditional text coding. This system is particularly suitable for rapid prototyping and iteration, and is one of the core features of Unreal Engine.

[0044] Unreal Engine Python API: Allows developers to use Python scripts to automate various tasks such as asset management, scene construction, and automated testing, which can be used to extend and enhance their development process.

[0045] Unreal Engine C++ API: The foundation for building and extending game functionality. Through this API, developers can access and control the core functions of the game engine, from basic game objects to complex game logic. Using C++, developers can create efficient and customized game experiences.

[0046] In the embodiment of the present application, the execution subject of the process includes a terminal device, which includes but is not limited to: a server, a computer, a smart phone, a tablet computer, and other devices capable of executing the method disclosed in the present application. Figure 1 A schematic diagram of a process of an Unreal Engine particle special effect automatic screen capture method disclosed in an embodiment of the present invention is shown, and the details are as follows:

[0047] S101, obtaining an Unreal Engine particle special effect asset selected by a user, and determining a corresponding screen-shooting special level according to the Unreal Engine particle special effect asset.

[0048] In this embodiment, a user interface (UI) needs to be built first, which allows users to select the special effects they want to display from a preset particle special effect asset library. The particle special effect asset library can contain various types of particle effects, such as explosions, fire, smoke, water flow, etc. These special effect assets have been stored in the UnrealEngine project in a specific format (such as .uasset).

[0049] Specifically, the user interface (UI) includes a list box (ListBox) for displaying all available particle effect assets. Each particle effect asset is accompanied by a check box (CheckBox), and users can select the effects they want to display by checking it. An "OK" button is provided, and the user clicks this button to confirm the selection after the selection is completed. When the user clicks the "OK" button, the program will traverse all particle effect assets in the list box and check which assets are checked, and collect the references (or paths) of the selected particle effect assets into a list.

[0050] Create corresponding special levels for different types of particle effects assets in advance. These levels have the same structure and can be fine-tuned according to the needs of special effects, such as adjusting the position, angle, lighting conditions, etc. of the camera. Each special level has a unique identifier or tag for matching with particle effects assets.

[0051] Create a mapping table (or dictionary) to associate the name (or type) of the particle effect asset with the corresponding screen-capturing level identifier. Based on the particle effect asset selected by the user, find the corresponding screen-capturing level identifier through the mapping table. Use the level loading function of Unreal Engine to load the corresponding screen-capturing level based on the found identifier.

[0052] In another possible embodiment, the selected UE particle special effect asset is obtained through the unreal.EditorUtilityLibrary function, and then the UE particle special effect type is obtained through the get_class function, and then compared with the level name. If it meets the conditions, the load_level function of the unreal.get_editor_subsystem (unreal.LevelEditorSubsystem) class is automatically used to load the corresponding screen-shooting special level.

[0053] In this embodiment, through the intuitive UI design, users can easily select the special effects they are interested in from a large number of particle special effect assets for display without having to deeply understand the internal structure of Unreal Engine. The corresponding screen-shooting special level is automatically loaded according to the user's selection, eliminating the tedious steps of manually setting the level and camera parameters, and improving work efficiency. It supports multiple types of particle special effect assets and flexibly associates them with the screen-shooting special level through a mapping table, so that the system can be easily expanded to support more types of special effects.

[0054] In some embodiments, the screen-shooting dedicated level includes a first screen-shooting dedicated level and a second screen-shooting dedicated level, the first screen-shooting dedicated level includes a camera, a level sequencer, a blueprint script system and a Niagara particle system, the first screen-shooting dedicated level includes a camera, a level sequencer, a blueprint script system and a Cascade particle system; the above step S101 specifically includes:

[0055] Add the tag information of the first screen shot special level or the second screen shot special level to each Unreal Engine particle special effect asset to form a special effect asset list;

[0056] According to the Unreal Engine particle special effects asset selected by the user in the special effects asset list, the screen-shooting level type of the Unreal Engine particle special effects asset selected by the user is determined through the marking information.

[0057] In this embodiment, the camera uses the Cine Camera that comes with the Unreal Engine, which can achieve movie-level picture effects. The level sequencer uses the Timeline tool to accurately control the appearance time and order of each element, with a time accuracy of up to 0.1 second. The blueprint script system uses visual programming to achieve complex logical control by connecting different nodes, and the number of nodes can reach thousands. The Niagara particle system can simulate up to millions of particle effects. By adjusting the emission rate, life cycle, speed and other parameters of the particles, realistic flames, water flows and other effects can be achieved. The Cascade particle system is an early particle system of the Unreal Engine, which can achieve relatively simple particle effects.

[0058] In order to facilitate users to select appropriate particle special effects assets, the system adds the tag information of the first screen-shooting special level or the second screen-shooting special level to each Unreal Engine particle special effects asset to form a special effects asset list. Users can select the corresponding asset in the list, and the system automatically determines the corresponding screen-shooting special level type based on the asset's tag information. For example, if a user selects an explosion special effects asset, and the asset's tag information is "Niagara", the system automatically determines that the corresponding screen-shooting special level type of the asset is the first screen-shooting special level. In this way, users can quickly find the special effects assets they need and automatically match them to the appropriate screen-shooting special level, greatly improving the efficiency of screen-shooting.

[0059] S102, instantiating the Unreal Engine particle special effect asset through the Unreal Engine Python API, and placing it in the scene world of the special screen shooting level.

[0060] In this embodiment, ensure that the Unreal Engine project has been configured with Python support (through the UnrealEngine Python plug-in), and import the required particle special effects assets into the project. The UnrealEngine Python API library is imported into the Python code, and the Unreal Engine particle special effects assets are placed in the scene world of the screen-capturing level through unreal.EditorLevelLibrary. According to the requirements of the screen-capturing level, the particle special effects are placed in a suitable position. For example, it can be placed within the visible range of the camera and ensure that it does not collide with other objects in the scene.

[0061] In this embodiment, the loading, instantiation and placement of particle effects are automatically completed through Python scripts, reducing the complexity and time cost of manual operations. Python scripts can be easily modified to adapt to different types of particle effect assets and screen-specific levels, improving the flexibility and scalability of the system.

[0062] In some embodiments, the above step S102 specifically includes:

[0063] Using the instantiated particle special effects function provided by the Unreal Engine Python API, each Unreal Engine particle special effects asset is converted into an instantiated object, and the instantiated object is added to the scene world of the special screen capture level;

[0064] Obtaining position information and rotation information of a camera of the scene world, and calculating a suitable position of each instantiated object within a visible range of the camera using a three-dimensional space coordinate transformation algorithm according to the position information and rotation information of the camera;

[0065] According to the attribute information of each instantiated object, the particle system of the screen-shooting special level is initialized and set.

[0066] In this embodiment, all particle special effects assets that need to be instantiated are obtained through the Unreal Engine Editor, and the asset paths are stored in a list to obtain a particle special effects asset path list. According to the instantiated particle special effects function provided by the Unreal Engine Python API, the particle special effects asset path list is traversed, and for each particle special effects asset path, the instantiated particle special effects function is called to convert the particle special effects asset into an instantiated object to obtain a particle special effects instantiated object list. The scene world object of the special level for screen shooting is obtained through the Unreal Engine Editor, and the scene world object is used as the target world of the particle special effects instantiated object. The particle special effects instantiated object list is traversed, and for each particle special effects instantiated object, the function of adding instantiated objects to the scene world provided by the Unreal Engine Python API is called to add the particle special effects instantiated object to the scene world of the special level for screen shooting, and the position and direction of the particle special effects in the scene are determined. According to the requirements of the special level for screen shooting, the parameters of each particle special effects instantiated object, such as the number of particles, life cycle, emission speed, etc., are adjusted so that the particle special effects achieve the expected visual effect in the scene, and the final special level scene for screen shooting is obtained.

[0067] According to the attribute information of each instantiated object, the particle system parameters of the special level for screen shooting are obtained. The particle system initialization algorithm is used to set the emitter position, particle number, particle size, particle speed and other parameters of the particle system through the attribute information to obtain the initialized particle system. According to the emission duration attribute of the particle system, the duration of particle emission is determined. According to the emission frequency attribute of the particle system, the frequency of particle emission is determined. The attribute mapping method is used to match the particle color, transparency and other attributes with the visual effects of the special level for screen shooting to obtain the final particle effect. According to the game progress of the special level for screen shooting, the properties of the particle system, such as the emission position and the number of particles, are dynamically adjusted to make the particle effect adapt to the game progress. By real-time monitoring of the screen shooting operation, it is determined whether a special particle effect is triggered, such as the explosion particle effect when the screen is shot. The optimization algorithm is used to optimize the performance of the particle system, reduce unnecessary calculations and rendering, and improve the smoothness of the particle effect. According to the performance differences of different devices, the parameters of the particle system are adaptively adjusted to ensure that good particle effect performance can be obtained on various devices. Through the above steps, the initialization settings of the particle system for the screen-shooting level are completed, so that the particle effects are coordinated with the game content, providing players with an immersive screen-shooting game experience.

[0068] The position coordinates (x, y, z) and rotation angles (pitch, yaw, roll) of the camera in the scene world are obtained as input parameters for calculating the position of the instantiated object. According to the obtained camera position coordinates and rotation angle information, a three-dimensional space coordinate transformation algorithm is used to transform the instantiated object from the local coordinate system to the camera's view coordinate system by multiplying the local coordinates of the instantiated object by the camera's view matrix and projection matrix. By performing a frustum clipping calculation on the converted instantiated object coordinates, it is determined whether each instantiated object is within the camera's visible range, and a set of visible instantiated objects is obtained. According to the spatial position of the visible instantiated object and the camera's viewing distance, a distance-based sorting algorithm is used to sort the visible instantiated objects from near to far to determine their rendering order. By analyzing the relative position relationship between the sorted visible instantiated objects, a collision detection algorithm is used to check whether there is occlusion or overlap between them, and the final position of the visible instantiated object without occlusion or overlap is obtained. According to the final position of the visible instantiated object, a three-dimensional rendering algorithm is used to draw it at a suitable position within the camera's visible range.

[0069] As an example, specifically, each Unreal Engine particle effect asset (such as Fire, Smoke, etc.) is converted into an instantiated object through the instantiated particle effect function ParticleSystemComponent provided by the UnrealEnginePythonAPI. For example, the instantiated object FireInstance of the Fire particle effect is generated by the function ParticleSystemComponent(Fire), and Smoke is generated by ParticleSystemComponent(Smoke). The instantiated objects such as Fire and Smoke are added to the scene world MyLevel of the screen-shooting level through the function AddComponent. The position information CameraLocation and rotation information CameraRotation of the camera Camera of MyLevel are obtained. According to CameraLocation and CameraRotation, a three-dimensional space coordinate transformation algorithm, such as the Euler angle to quaternion algorithm, is used to calculate the position FireLocation of Fire as an offset relative to the Camera, and the position SmokeLocation of Smoke is calculated as an offset relative to the Camera, so that Fire and Smoke are within the visible range of the Camera. According to the property information of Fire (such as the number of particles 1000, the particle radius 10), set the particle number parameter ParticlesNum of the particle system ParticleSystem of MyLevel to 1000, and the particle radius parameter ParticleRadius to 10. Similarly, according to the property information of Smoke (such as the number of particles 500, the particle radius 20), set the ParticleNum of ParticleSystem to 500, and the ParticleRadius to 20. This completes the process of instantiating the particle special effect asset and adding it to the scene, setting the appropriate position, and initializing the particle system parameters, providing rich and realistic particle special effects for screen synthesis.

[0070] S103, starting the game mode according to the Unreal Engine C++ API, and calling a corresponding play function for the instantiated object of the Unreal Engine particle special effect asset.

[0071] In this embodiment, after starting the game mode according to the Unreal Engine C++API, the in-game editing function provided by the Unreal Engine will first be called to switch the current level to an interactive game state. After the switch is completed, the function will traverse all particle special effect instances in the current level, and for each special effect instance, call its corresponding play function to start playing the special effect. When calling the play function, the initial parameters of the special effect instance will be passed to the play function, including the position of the particle emitter, particle properties, materials, etc. The play function instantiates the particle emitter in the game environment based on these initial parameters and sets its properties. After the particle emitter is created, the play function will control the generation and movement of particles according to the preset emission rules.

[0072] In this embodiment, the instantiation and management logic of particle effects are encapsulated in the game mode class, so that these logics can be reused in different games or projects without rewriting code.

[0073] In some embodiments, in the above step S103, calling a corresponding play function for the instantiated object of the Unreal Engine particle special effect asset specifically includes:

[0074] Obtaining playback information of each Unreal Engine particle special effect asset, and setting the instantiation object corresponding to each Unreal Engine particle special effect asset to one-time playback or loop playback according to the playback information;

[0075] Determine a corresponding play function according to the particle parameters of each instantiated object, and control the emission and movement of particles of each instantiated object by the play function;

[0076] According to the motion path of the camera in the scene world, a three-dimensional space interpolation algorithm is used to calculate in real time the first position information of each instantiated object relative to the camera in each frame;

[0077] The position of each instantiated object is updated in real time according to the first position information.

[0078] In this embodiment, all particle special effect assets in the Unreal Engine are obtained, and the ParticleSystem asset files in all Content directories are traversed through the asset browser to obtain a particle special effect asset list particleAssets. According to the particleAssets list, a loop iteration method is adopted to obtain the corresponding ParticleSystem component for each particle special effect asset asset, and the play mode playMode of the asset is judged by the EmitterDuration property value of the Required module in the property panel of the component. A conditional judgment statement is adopted. If playMode is equal to 0, the asset is determined to be in a one-time play mode. If playMode is greater than 0, the asset is determined to be in a loop play mode.

[0079] According to the particle parameter information contained in each instantiated object, the corresponding algorithm rules are used to obtain the particle attribute data of the instantiated object, and the particle parameter feature vector of each instantiated object is obtained by analyzing the characteristics of the particle attribute data. According to the particle parameter feature vector of the instantiated object, a machine learning classification algorithm, such as a support vector machine or a decision tree, is used to obtain the mapping relationship model between the particle parameter feature vector and the play function through training sample data, so as to determine the play function corresponding to each instantiated object. According to the determined play function of the instantiated object, the particle system rendering technology of computer graphics is used to obtain the initial position, speed and other attribute parameters of each particle, and the particle of each instantiated object is controlled to emit and move by simulating the motion trajectory of the particle, so as to realize the realistic display of the particle effect. In the process of particle emission and movement, according to the current position and speed attributes of the particle, a collision detection algorithm is used to obtain the spatial position relationship between the particle and other objects in the virtual scene, and the motion trajectory of the particle is dynamically adjusted by analyzing the collision situation to avoid the particle penetrating other objects and improve the authenticity of the particle effect. According to the emission duration and life cycle parameters of the particles, a timer mechanism is used to obtain the running time of the particle system. By judging whether the particle has reached the end of its life cycle, the extinction time of each particle is dynamically controlled, and the generation of new particles is triggered to maintain the continuous operation of the particle system until the particle effect of the instantiated object is completed.

[0080] According to the preset motion path of the camera in the scene world, a three-dimensional space interpolation algorithm is used to obtain the position and orientation information of the camera in each frame, and the real-time position and orientation parameters of the camera in the scene world are obtained. By traversing each instantiated object in the scene world, its coordinate position information in the three-dimensional space is obtained, and combined with the real-time position and orientation parameters of the camera, a three-dimensional coordinate conversion algorithm is used to calculate the relative position coordinates of each instantiated object relative to the camera. According to the calculated relative position coordinates of each instantiated object relative to the camera, combined with the internal and external parameter matrix of the camera, a three-dimensional projection transformation algorithm is used to project the object coordinates in the three-dimensional space into the two-dimensional screen space to obtain the two-dimensional pixel coordinates of each instantiated object in the current frame. By comparing the two-dimensional pixel coordinates of each instantiated object with the camera field of view, it is determined whether the object is visible in the current frame, and the visibility state of each instantiated object is obtained. According to the visibility state of each instantiated object, its rendering parameters are dynamically adjusted, and the visible objects are rendered and drawn, and the invisible objects are skipped for rendering, so as to improve the scene rendering efficiency and determine the final content of each frame. By splicing continuous frames in chronological order and combining them with frame rate control, a smooth animation effect is generated, and finally a complete scene roaming animation sequence is obtained, realizing the motion browsing effect of the camera in the scene world.

[0081] As an example, in Unreal Engine, you can access the EmitterDuration and bLooping properties of each particle effect asset to obtain its playback information. If EmitterDuration is 0 and bLooping is true, the instantiated object is set to loop playback; otherwise, it is set to one-time playback. According to particle parameters such as life cycle, initial velocity, acceleration, etc., you can choose to use the corresponding playback function of Cascade, GPUSprites or Niagara system. For example, for the Cascade particle system, you can call the UParticleSystemComponent::ActivateSystem() function to trigger particle emission, and control particle movement through the ParticleSystemComponent->SetBeamSourcePoint() and ParticleSystemComponent->SetBeamTargetPoint() functions. In the scene, assuming that the camera moves along the Catmull-Rom spline curve at a speed of 60 frames per second, the cubic Hermite interpolation algorithm can be used to calculate the position P(t) of the camera in each frame in real time, and then the position coordinates (x', y', z') of each instantiated object relative to the camera are obtained through matrix transformation, that is, the first position information. Assuming the original coordinates of the instantiated object are (x, y, z), then update its position in real time according to the formula x=x'+P(t), y=y'+P(t), z=z'+P(t), so that the particle effects can maintain the relative position unchanged as the camera moves, thus creating a realistic visual effect. In this way, the particle effects assets and camera animation functions provided by the Unreal Engine can be fully utilized, and combined with interpolation algorithms and coordinate transformations, dynamic and immersive three-dimensional particle effects rendering can be achieved.

[0082] Furthermore, controlling the emission and movement of particles of each instantiated object by the playback function specifically includes:

[0083] Determine movement information of each particle of each instantiated object according to the particle parameters, wherein the movement information includes a particle emission rule, a speed, an acceleration and a direction, and the particle emission rule includes emission in a random direction, emission in a specific direction and an annular emission;

[0084] By performing space division and neighborhood search for all particles of each instantiated object, it is determined whether particles of each instantiated object interact with each other, thereby obtaining a first determination result;

[0085] Determining the rendering degree of each particle of each instantiated object according to the distance relationship between each particle of each instantiated object and the camera of the scene world;

[0086] Based on the play function, the movement trajectory of each particle of each instantiated object is controlled through the movement information, the first judgment result and the rendering degree.

[0087] In this embodiment, according to the particle position information of each instantiated object, a space partitioning algorithm is used to divide the particles into different space grids to obtain the space grid information to which the particles belong. By traversing each space grid, a list of particles in the grid is obtained. For each particle, other particles in the grid where it is located and the adjacent grid are searched to determine the neighborhood particle set of each particle. According to the neighborhood particle set of each particle, a particle interaction force calculation method is used to calculate the force exerted on each particle from the neighborhood particles to obtain the force condition of the particle. By analyzing the force condition of each particle, it is determined whether the particle interacts with the neighborhood particles, and a judgment result of whether the particles interact with each other is obtained. According to the interaction judgment result of each particle, a set operation method is used to merge the interaction results of the particles belonging to the same instantiated object, and the comprehensive interaction between the particles of each instantiated object is obtained. By analyzing the comprehensive interaction of the particles of each instantiated object, it is determined whether the particles of the instantiated object interact as a whole, and a first judgment result is obtained, indicating the interaction state between the particles of each instantiated object.

[0088] According to the position coordinates of each particle of each instantiated object, the distance value between each particle of each instantiated object and the scene world camera is obtained by using the distance formula between two points in three-dimensional space. By setting a distance threshold, it is judged whether the distance value between each particle of each instantiated object and the scene world camera is less than the threshold, and the Boolean value of whether each particle of each instantiated object is close to the camera is obtained. According to the Boolean value of whether each particle of each instantiated object is close to the camera, a conditional judgment statement is used. When the particle is close to the camera, a higher rendering degree value is obtained; when the particle is far away from the camera, a lower rendering degree value is obtained. The rendering degree value can be a floating point number between 0 and 1, indicating the opacity or rendering detail of the particle. By normalizing the rendering degree values ​​of all particles of each instantiated object, the relative rendering degree weight of each particle is obtained. According to the relative rendering degree weight of each particle, a weighted average algorithm is used to obtain the overall rendering degree value of each instantiated object. By passing the overall rendering degree value of each instantiated object to the rendering engine, the detail degree and resource allocation of each instantiated object in the rendering process are determined, thereby realizing the dynamic adjustment of the rendering degree of the instantiated object according to the distance relationship with the camera.

[0089] Based on the playback function, a random number generation algorithm is used to combine the first judgment result, rendering degree and particle emission rules to obtain the initial emission direction of each particle. For random direction emission, the emission angle of the particle in space is determined by random numbers. For emission in a specific direction, the specific direction is directly used as the emission direction of the particle. For circular emission, the starting position and emission angle of the particle on the circular trajectory are obtained through mathematical calculations. According to the particle's speed and acceleration parameters, the physical motion formula is used to calculate the particle's displacement at each time step, and it is superimposed on the particle's current position to obtain the particle's new position at the next moment. By judging whether the particle has reached its life cycle, the particle is automatically generated. The system determines the extinction time of particles according to conditions such as the end of the period or exceeding the boundary, and removes particles that meet the extinction conditions from the particle system; obtains newly generated particles, and adds them to the particle system according to the particle emission rules and parameters to maintain the dynamic balance of the number of particles; repeats the execution, continuously updates the position and state of particles, and realizes the continuous motion effect of particles; according to the material, texture and other properties of the instantiated object, the graphic rendering algorithm is used to render the particle system to the screen, presenting a real and vivid particle effect; by adjusting particle parameters in real time, such as emission speed, acceleration, life cycle, etc., a dynamically changing particle effect is obtained, which improves the visual expression and interactivity of the picture.

[0090] S104, capturing the playback screen of the Unreal Engine particle special effect asset frame by frame through the blueprint function of the special level for capturing screen, and generating a GIF file.

[0091] In this embodiment, during the process of starting the screen capture, the rendering texture of the current frame is first obtained, and then the blueprint function of the screen capture special level is used to capture the current frame. The captured image data will be converted into a portable network graphics format. The file name is automatically generated according to the particle special effect name, underline, serial number, dot and portable network graphics suffix. The serial number is automatically incremented to ensure that the file name is unique. During the screenshot process, the image data of the current frame is obtained by accessing the resource view of the rendering texture. The image data is then passed to the image encoder, which uses a portable network graphics encoding algorithm to encode the image data into a portable network graphics format. The encoded data is written to the file output stream and saved using the previously generated file name. In order to improve the screenshot performance, an asynchronous screenshot method can be used. When a screenshot request is issued, it returns immediately without waiting for the screenshot to be completed. After the screenshot is completed, the screenshot requester is notified through a callback function. In the callback function, image encoding and file writing operations can be performed. The asynchronous screenshot method can avoid the screenshot operation blocking the game rendering thread, thereby improving the game performance.

[0092] In order to further improve the efficiency of screenshots, memory pool technology can be used to reuse memory. A certain number of memory blocks are applied in advance to store screenshot data. When you need to save a screenshot, take out a free memory block from the memory pool and copy the screenshot data to the memory block. When the screenshot is saved, put the memory block back into the memory pool for subsequent reuse. Memory pool technology can reduce the number of memory allocation and release and improve memory usage efficiency. When writing files, asynchronous writing is used to put the file writing operation into the background thread for execution. This can avoid blocking the main thread and affecting game performance. In order to ensure the reliability of file writing, the file can be verified after writing. If the verification fails, rewrite the file until the verification succeeds. Finally, in order to facilitate the management of screenshot files, screenshot files can be classified and stored according to date and time. According to the timestamp of the screenshot, a folder named by the date is automatically created and the screenshot file is stored in the corresponding folder. This makes it easy to find and manage screenshot files, and also avoids too many files in a single folder, which affects file access efficiency.

[0093] When the screen capture time reaches the set time, stop taking screenshots, read all captured portable network graphics sequence images, set the frame rate parameters, synthesize them into a GIF (Graphics Interchange Format) file, and save it according to the rules of particle special effect name plus dot plus graphics interchange format.

[0094] In some embodiments, the above step S104 specifically includes:

[0095] According to the blueprint function of the screen capture level, the current frame of the playback screen of the Unreal Engine particle special effect asset is captured and an image file is generated;

[0096] Determine the total duration of the animation according to the number and frame rate of the image files;

[0097] According to the total duration of the animation, an image fusion algorithm based on Fourier transform is adopted to fuse all image files to generate a GIF file.

[0098] In this embodiment, according to the blueprint function of the screen-shooting special level, the screenshot interface provided by the Unreal Engine is used to obtain the current frame of the Unreal Engine particle special effect asset during the playback process, and the current frame data is encoded into a common image format such as PNG or JPG through an image encoding algorithm to obtain an image file of a frame of particle special effect playback screen. A loop control statement is used to repeat the execution according to the playback progress of the Unreal Engine particle special effect asset until the particle special effect is played, and a series of image files reflecting the particle special effect playback process are obtained. By counting the number of generated image files, the total number of image frames N generated by the screenshot during the particle special effect playback process is obtained. According to the frame rate setting parameter FPS of the screen-shooting special level, the formula T=N / FPS is used, where T is the duration, N is the total number of image frames, and FPS is the frame rate, and the total animation duration T in seconds is calculated. The calculated total animation duration T is used as an attribute data of the particle special effect asset, associated with the corresponding particle special effect asset, and the playback duration of the particle special effect is determined.

[0099] Get all the image files to be fused, and determine the duration of each frame according to the total duration of the animation. Use Fourier transform to convert all image files from the spatial domain to the frequency domain to obtain the representation of the image in the frequency domain. According to the duration of each frame of the image, fuse all images by weighted averaging in the frequency domain to obtain the fused frequency domain representation. Use inverse Fourier transform to convert the fused frequency domain representation back to the spatial domain to obtain the fused image sequence. According to the fused image sequence, use GIF encoding algorithms such as LZW encoding to obtain the final GIF animation file, and the duration of each frame is consistent with the previously determined one. Determine whether the total duration of the generated GIF file is consistent with the total duration of the input animation. If not, return to adjust the duration of each frame until the total duration requirement is met.

[0100] As an example, assuming that 300 image files are captured, the total animation duration can be calculated to be 10 seconds based on the frame rate. Next, the 300 images are processed using an image fusion algorithm based on Fourier transform. The algorithm first performs a Fourier transform on each image, then performs a weighted average of the Fourier transform results of all images in the frequency domain, and finally performs an inverse Fourier transform on the average result to obtain the fused image. By adjusting the weight coefficients of different images, their influence on the final fusion result can be controlled. The fused image sequence is synthesized into a GIF animation file in chronological order, and the playback speed is set to 30 frames per second. Finally, a GIF animation with a duration of 10 seconds and the same resolution as the original image is generated to demonstrate the playback effect of the particle special effect asset.

[0101] Furthermore, the image fusion algorithm based on Fourier transform is used to fuse all image files, specifically including:

[0102] Perform Fourier transform on each image file to obtain a frequency domain representation of each image file;

[0103] Based on the frequency domain representation of each image file, determining the frequency domain difference between every two image files that are adjacent frames;

[0104] According to the frequency domain difference, a transition frame is generated by weighted averaging, and the transition frame is inserted between every two image files that are adjacent frames.

[0105] In this embodiment, according to a given image file path, a file reading function is used to obtain the original data of the image file to obtain the pixel matrix of the image. The Fourier transform algorithm is used to convert the image from the spatial domain to the frequency domain through the obtained image pixel matrix to obtain the frequency domain representation of the image. By analyzing the characteristics of the frequency domain representation data, the key information of each image file in the frequency domain, such as frequency amplitude, phase, etc., is extracted to form a frequency domain feature vector of each image file. According to the order of the image files, the frequency domain feature vectors of two adjacent image files are paired to form an adjacent frame pair. For each adjacent frame pair, a measurement method such as Euclidean distance or cosine similarity is used to calculate the difference value between the two frequency domain feature vectors to obtain the frequency domain difference measurement result between the adjacent frames. According to the frequency domain difference measurement result between the adjacent frames, a transition frame in the frequency domain is generated by weighted averaging; by performing an inverse Fourier transform on the transition frame in the frequency domain, a transition frame image file in the time domain is obtained; the transition frame image file in the time domain is inserted between the two image files as adjacent frames to obtain an image sequence containing the transition frame, thereby achieving a smooth transition between adjacent images.

[0106] As an example, for a grayscale image of 256x256 pixels, a fast Fourier transform algorithm can be used to obtain a 256x256 complex matrix, which represents the representation of the image in the frequency domain. Next, the frequency domain difference between each two adjacent image frames is calculated. The specific method is that for each position in the frequency domain, the modulus length of the difference between the complex values ​​of the corresponding positions of the two images is calculated to obtain a difference matrix. Then, a transition frame is generated according to the difference matrix. For example, the value of each position in the difference matrix can be multiplied by a weight coefficient, and then added to the frequency domain representation of the first frame image, and the transition frame is obtained by inverse Fourier transform. The weight coefficient can be determined according to the relative position of the transition frame between the two frames, for example, the value range is between 0 and 1. Finally, the generated transition frame is inserted between the two original frames to form a new image sequence. By reasonably setting the number of transition frames and the weight coefficient, a smooth and natural video transition effect can be obtained.

[0107] S105, when it is detected that all Unreal Engine particle special effect assets have finished capturing the screen, the game mode is stopped through the Unreal Engine C++ API.

[0108] In this embodiment, after completing the shooting of the current particle special effect asset, the custom switching special effect function is called, which first stops the playback of the current special effect, and then obtains the index of the next special effect to be shot from the pre-prepared particle special effect array. If the last special effect is currently being processed, after synthesizing the graphics exchange format file, the UnrealEngine C++API is called to exit the game mode and return to the editor state. If there are still unprocessed special effects, the index variable is incremented to start the next round of special effects shooting tasks. After the index variable is incremented in the previous cycle, its value is passed to the next round of switching special effects function to obtain a new special effect object to be processed, forming a complete special effects shooting closed loop. The various processing steps are connected through the index variable to form a strict logical chain until all special effects material files are generated.

[0109] In this embodiment, by tracking the progress of screen capture in the game mode and automatically stopping the game mode after completion, the screen capture process is automatically managed, reducing the need for human intervention.

[0110] Reference Figure 2 An embodiment of the present invention provides an Unreal Engine particle special effect automatic screen capture system 2, and the system 2 specifically includes:

[0111] The first screen-shooting module 201 is used to obtain the Unreal Engine particle special effect asset selected by the user, and determine the corresponding screen-shooting special level according to the Unreal Engine particle special effect asset;

[0112] The second screen-shooting module 202 is used to instantiate the Unreal Engine particle special effect asset through the Unreal Engine Python API and place it in the scene world of the screen-shooting special level;

[0113] The third screen shooting module 203 is used to start the game mode according to the Unreal Engine C++ API and call the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset;

[0114] The fourth screen capture module 204 is used to capture the playback screen of the Unreal Engine particle special effect asset frame by frame through the blueprint function of the screen capture special level to generate a GIF file;

[0115] The fifth screen capture module 205 is used to stop the game mode through the Unreal Engine C++ API when it is detected that all Unreal Engine particle special effect assets have completed screen capture.

[0116] It is understandable that if Figure 1 The contents of the Unreal Engine Particle Effects Automatic Screen Shooting Method Embodiment shown in the figure are applicable to the Unreal Engine Particle Effects Automatic Screen Shooting System Embodiment. The functions specifically implemented by the Unreal Engine Particle Effects Automatic Screen Shooting System Embodiment are similar to those in the embodiment shown in the figure. Figure 1 The Unreal Engine particle special effects automatic screen shooting method embodiment shown is the same as that shown in the embodiment, and the beneficial effects achieved are the same as those shown in the embodiment. Figure 1 The beneficial effects achieved by the embodiment of the Unreal Engine particle special effects automatic screen capture method shown are also the same.

[0117] It should be noted that the information interaction, execution process and other contents between the above-mentioned systems are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0118] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0119] Reference Figure 3 The embodiment of the present invention further provides a computer device 3, comprising: a memory 302 and a processor 301 and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, the Unreal Engine particle special effect automatic screen shooting method as described in any one of the above methods is implemented.

[0120] The computer device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0121] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0122] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 3. Further, the memory 302 may also include both an internal storage unit of the computer device 3 and an external storage device. The memory 302 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as the program code of the computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0123] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for automatically capturing screens using Unreal Engine particle special effects as described in any one of the above methods is implemented.

[0124] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0125] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0127] In the embodiments disclosed in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

Claims

1. An Unreal Engine particle special effects automatic screen capture method, characterized in that: The method specifically comprises: Obtaining an Unreal Engine particle special effect asset selected by a user, and determining a corresponding screen-shooting special level according to the Unreal Engine particle special effect asset; Instantiating the Unreal Engine particle special effect asset through the Unreal Engine Python API and placing it in the scene world of the special screen capture level; Start the game mode according to the Unreal Engine C++ API, and call the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset; The calling of the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset specifically includes: Obtaining playback information of each Unreal Engine particle special effect asset, and setting the instantiation object corresponding to each Unreal Engine particle special effect asset to one-time playback or loop playback according to the playback information; Determine a corresponding play function according to the particle parameters of each instantiated object, and control the emission and movement of particles of each instantiated object by the play function; According to the motion path of the camera in the scene world, a three-dimensional space interpolation algorithm is used to calculate in real time the first position information of each instantiated object relative to the camera in each frame; According to the first position information, updating the position of each instantiated object in real time; The playback screen of the Unreal Engine particle special effect asset is captured frame by frame through the blueprint function of the special capture level to generate a GIF file; When it is detected that all Unreal Engine particle effect assets have finished capturing the screen, the game mode is stopped through the Unreal Engine C++ API.

2. The method according to claim 1, characterized in that The special level for screen shooting includes a first special level for screen shooting and a second special level for screen shooting, wherein the first special level for screen shooting includes a camera, a level sequencer, a blueprint script system and a Niagara particle system, and the first special level for screen shooting includes a camera, a level sequencer, a blueprint script system and a Cascade particle system; the obtaining of the Unreal Engine particle special effect asset selected by the user and determining the corresponding special level for screen shooting according to the Unreal Engine particle special effect asset specifically includes: Add the tag information of the first screen shot special level or the second screen shot special level to each Unreal Engine particle special effect asset to form a special effect asset list; According to the Unreal Engine particle special effects asset selected by the user in the special effects asset list, the screen-shooting level type of the Unreal Engine particle special effects asset selected by the user is determined through the marking information.

3. The method according to claim 1, characterized in that The Unreal Engine particle special effect asset is instantiated through the Unreal Engine Python API and placed in the scene world of the screen shooting special level, specifically including: Using the instantiated particle special effects function provided by the Unreal Engine Python API, each Unreal Engine particle special effects asset is converted into an instantiated object, and the instantiated object is added to the scene world of the special screen capture level; Obtaining position information and rotation information of a camera of the scene world, and calculating a suitable position of each instantiated object within a visible range of the camera using a three-dimensional space coordinate transformation algorithm according to the position information and rotation information of the camera; According to the attribute information of each instantiated object, the particle system of the screen-shooting special level is initialized and set.

4. The method according to claim 1, characterized in that The controlling of the emission and movement of particles of each instantiated object by the play function specifically includes: Determine movement information of each particle of each instantiated object according to the particle parameters, wherein the movement information includes a particle emission rule, a speed, an acceleration and a direction, and the particle emission rule includes emission in a random direction, emission in a specific direction and an annular emission; By performing space division and neighborhood search for all particles of each instantiated object, it is determined whether each particle of each instantiated object interacts with each other, thereby obtaining a first determination result; Determining the rendering degree of each particle of each instantiated object according to the distance relationship between each particle of each instantiated object and the camera of the scene world; Based on the play function, the movement trajectory of each particle of each instantiated object is controlled through the movement information, the first judgment result and the rendering degree.

5. The method according to claim 1, characterized in that: The blueprint function of the special screen capture level is used to capture the playback screen of the Unreal Engine particle special effect asset frame by frame to generate a GIF file, which specifically includes: According to the blueprint function of the screen capture level, the current frame of the playback screen of the Unreal Engine particle special effect asset is captured and an image file is generated; Determine the total duration of the animation according to the number and frame rate of the image files; According to the total duration of the animation, an image fusion algorithm based on Fourier transform is adopted to fuse all image files to generate a GIF file.

6. The method according to claim 5, characterized in that The image fusion algorithm based on Fourier transform is used to fuse all image files, specifically including: Perform Fourier transform on each image file to obtain a frequency domain representation of each image file; Based on the frequency domain representation of each image file, determining the frequency domain difference between every two image files that are adjacent frames; According to the frequency domain difference, a transition frame is generated by weighted averaging, and the transition frame is inserted between every two image files that are adjacent frames.

7. An Unreal Engine particle special effects automatic screen capture system, characterized in that: The system specifically comprises: The first screen-shooting module is used to obtain the Unreal Engine particle special effect asset selected by the user, and determine the corresponding screen-shooting special level according to the Unreal Engine particle special effect asset; The second screen-shooting module is used to instantiate the Unreal Engine particle special effect asset through the Unreal Engine Python API and place it in the scene world of the screen-shooting special level; A third screen capture module is used to start the game mode according to the Unreal Engine C++ API and call the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset; The calling of the corresponding play function for the instantiated object of the Unreal Engine particle special effect asset specifically includes: Obtaining playback information of each Unreal Engine particle special effect asset, and setting the instantiation object corresponding to each Unreal Engine particle special effect asset to one-time playback or loop playback according to the playback information; Determine a corresponding play function according to the particle parameters of each instantiated object, and control the emission and movement of particles of each instantiated object by the play function; According to the motion path of the camera in the scene world, a three-dimensional space interpolation algorithm is used to calculate in real time the first position information of each instantiated object relative to the camera in each frame; According to the first position information, updating the position of each instantiated object in real time; A fourth screen capture module is used to capture the playback screen of the Unreal Engine particle special effect asset frame by frame through the blueprint function of the screen capture special level to generate a GIF file; The fifth screen capture module is used to stop the game mode through the UnrealEngine C++API when it is detected that all Unreal Engine particle special effect assets have completed screen capture.

8. A computer device, characterized in that: include: A memory and a processor and a computer program stored in the memory, when the computer program is executed on the processor, implements the Unreal Engine particle special effect automatic screen shooting method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for automatically capturing screens using Unreal Engine particle special effects as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Animation generation method and device, medium and electronic equipment

    CN115423903A

  • Virtual image processing method and related product

    CN116843802A